Compare commits

...

45 Commits

Author SHA1 Message Date
Fenopy
75a41fb028 Merge pull request #157 from nerdunit/beta/RSL-2.20
Release/RSL-2.20
2023-05-25 14:35:13 -05:00
Chax
7cf1baec25 Fix crashing on filtering. 2023-05-24 16:14:18 -05:00
Chax
0763917adf Remove refreshing the gamelist when adding to queue and only refresh it once queue is empty after downloads, also wont refresh if in nodevicemode 2023-05-23 15:27:57 -05:00
Fenopy
2344d7ce51 chore: bump versions 2023-05-23 14:59:42 -05:00
Fenopy
f8724bae66 Merge pull request #156 from Chax1/fix/QualityOfLife
Quality of Life Changes
2023-05-23 12:13:55 -05:00
Chax
b705c56948 Move extraction into a thread to avoid UI Freezes. 2023-05-23 19:09:50 +02:00
Chax
60b9fe5809 Use better code for getting thumbnail paths 2023-05-23 19:09:50 +02:00
Chax
32ea38867a Check for parent process when killing off rclone to avoid killing off unrelated rclone processes. 2023-05-23 19:09:50 +02:00
Chax
dd1044ee3d Optimize Progressbar Code 2023-05-23 19:09:50 +02:00
Chax
7f4e828567 Optimize trailer code slightly 2023-05-23 19:09:50 +02:00
Chax
64ec55ba54 Cleaner code for dropdowns 2023-05-23 19:09:50 +02:00
Chax
39fa784540 Remove redundant standardinput.writeline and flush, we already give ADB the command in " adb.StartInfo.Arguments = command;" 2023-05-23 19:09:49 +02:00
Chax
4a20f2fd89 Check for filter clicks before attempting to reload gamelist. 2023-05-23 19:09:49 +02:00
Chax
1a860399d9 Invoke MessageBox to avoid crashes during debugging. 2023-05-23 19:09:49 +02:00
Chax
502b259b8c Add newlines to "All tasks finished." 2023-05-23 19:09:49 +02:00
Fenopy
c010fda0db fix: storage display for v50 or below 2023-05-19 10:14:16 -05:00
Fenopy
743b9d1d54 Merge pull request #152 from Chax1/beta/RSL-2.20
fix storage display for Android 12; fix to rclone update; added loglevels;
2023-05-17 13:29:04 -05:00
Chax
7506282950 Re-add check for singular queue when removing active download. 2023-05-17 20:10:23 +02:00
Chax
2346accccc Add loglevels to exceptions etc. 2023-05-17 16:49:01 +02:00
Chax
dd69b75c7f Fix storage display 2023-05-17 16:43:49 +02:00
Chax
a71ebaedc3 Add loglevel to logger and change DateTime to UtcNow 2023-05-17 16:23:03 +02:00
Chax
1c85b91f32 Update RCLONE if version doesn't match required. 2023-05-17 16:22:14 +02:00
Fenopy
b130644c47 fix: 1 retry for non-pub configs 2023-05-16 07:26:53 -05:00
Fenopy
0febf9ef0d Merge pull request #151 from Chax1/beta/RSL-2.20
Download newer rclone
2023-05-16 07:25:35 -05:00
Chax
c1e9a5dcfc Download newer rclone 2023-05-16 14:01:25 +02:00
Fenopy
3ddba35295 Merge branch 'beta/RSL-2.20' of https://github.com/nerdunit/androidsideloader into beta/RSL-2.20 2023-05-16 06:49:25 -05:00
Fenopy
2aede4a341 Merge pull request #150 from Chax1/fix/Checkbox
Fix the checkbox inside of Settings
2023-05-16 06:45:14 -05:00
Fenopy
19d6e25f06 Merge pull request #149 from Chax1/fix/Crash
fix/Crash
2023-05-16 06:44:55 -05:00
Fenopy
0b5d3bfddd Merge pull request #148 from Chax1/fix/Queue
fix/Queue
2023-05-16 06:44:44 -05:00
Fenopy
823c2607d9 fix: settings dialog display adjustments 2023-05-16 06:16:13 -05:00
Fenopy
d8bbac3096 Merge pull request #140 from Chax1/fix/CheckInternet
Removal of HasInternet due to redundancy
2023-05-16 06:08:28 -05:00
Fenopy
8af2b7dd66 Merge pull request #144 from Chax1/beta/RSL-2.20
Give users the ability to enter an IP manually to connect via ADB over WiFi
2023-05-16 06:07:06 -05:00
Chax
d480f13024 Add a check for devices for install.txts 2023-05-04 15:05:33 +02:00
Chax
40a02cc8e0 Cleanup code 2023-05-03 20:45:28 +02:00
Chax
505c145794 Cleanup code. 2023-05-03 20:42:19 +02:00
Chax
79648f2e07 Possibly fix the crash upon trying to remove current game in queue when it does not exist in the queue anymore. 2023-05-03 14:09:43 +02:00
Chax
02b03328d1 Fix "Serving remote control" catch, which causes Rookie to not extract games on first download apparently. 2023-04-29 15:57:18 +02:00
Chax
34046ecb4b Fix the checkbox inside of Settings 2023-04-19 02:13:11 +02:00
Chax
6ecba949c2 Delete old OBB folders after download to make sure that no space gets wasted on the quest. 2023-04-18 23:25:19 +02:00
Chax
3edadfa475 Give users the ability to enter an IP manually to connect via ADB over WiFi, also add border to ADB Box. 2023-04-17 20:24:06 +02:00
Chax
99aab8bc2e Merge branch 'beta/RSL-2.20' of https://github.com/nerdunit/androidsideloader into beta/RSL-2.20 2023-04-17 19:19:02 +02:00
Chax
0c52656a5e Fix displaying storage with a connected device, the MainForm.nodeviceonstart was interrupting displaying storage, should only check for when a device is connected, which it does above this method. 2023-04-12 09:53:22 -05:00
Chax
1e0be54c43 Fix displaying storage with a connected device, the MainForm.nodeviceonstart was interrupting displaying storage, should only check for when a device is connected, which it does above this method. 2023-04-01 23:07:41 +02:00
Chax
bf91c1f9f3 Possibly fix one crash, add single threaded mode for downloads to help compatibility wise, and 2023-03-28 03:56:11 +02:00
Chax
3314228b9c Remove redundant Internet Check for Rookie, Rookie already checks for the internet by attempting to download dependencies on start, which will fail if no internet exists and therefore not let Rookie launch. 2023-03-25 17:48:26 +01:00
18 changed files with 773 additions and 616 deletions

33
ADB.cs
View File

@@ -24,7 +24,6 @@ namespace AndroidSideloader
}
if (!command.Contains("dumpsys") && !command.Contains("shell pm list packages") && !command.Contains("KEYCODE_WAKEUP"))
{
string logcmd = command;
if (logcmd.Contains(Environment.CurrentDirectory))
@@ -37,15 +36,11 @@ namespace AndroidSideloader
adb.StartInfo.FileName = adbFilePath;
adb.StartInfo.Arguments = command;
adb.StartInfo.RedirectStandardError = true;
adb.StartInfo.RedirectStandardInput = true;
adb.StartInfo.RedirectStandardOutput = true;
adb.StartInfo.CreateNoWindow = true;
adb.StartInfo.UseShellExecute = false;
adb.StartInfo.WorkingDirectory = adbFolderPath;
_ = adb.Start();
adb.StandardInput.WriteLine(command);
adb.StandardInput.Flush();
adb.StandardInput.Close();
string output = "";
string error = "";
@@ -56,9 +51,10 @@ namespace AndroidSideloader
error = adb.StandardError.ReadToEnd();
}
catch { }
if (command.Contains("connect"))
{
bool graceful = adb.WaitForExit(3000); //Wait 3 secs.
bool graceful = adb.WaitForExit(3000); // Wait 3 secs.
if (!graceful)
{
adb.Kill();
@@ -91,9 +87,10 @@ namespace AndroidSideloader
_ = Logger.Log(output);
}
_ = Logger.Log(error);
_ = Logger.Log(error, "ERROR");
return new ProcessOutput(output, error);
}
public static ProcessOutput RunAdbCommandToStringWOADB(string result, string path)
{
string command = result;
@@ -166,7 +163,7 @@ namespace AndroidSideloader
}
}
_ = Logger.Log(output);
_ = Logger.Log(error);
_ = Logger.Log(error, "ERROR");
return new ProcessOutput(output, error);
}
public static ProcessOutput RunCommandToString(string result, string path = "")
@@ -229,7 +226,7 @@ namespace AndroidSideloader
}
}
_ = Logger.Log(output);
_ = Logger.Log(error);
_ = Logger.Log(error, "ERROR");
return new ProcessOutput(output, error);
}
@@ -254,7 +251,7 @@ namespace AndroidSideloader
foreach (string currLine in output)
{
if (currLine.StartsWith("/data/media"))
if (currLine.StartsWith("/dev/fuse") || currLine.StartsWith("/data/media"))
{
string[] foo = currLine.Split(' ');
int i = 0;
@@ -325,12 +322,20 @@ namespace AndroidSideloader
ADB.WakeDevice();
if (!Properties.Settings.Default.AutoReinstall)
{
DialogResult dialogResult1 = FlexibleMessageBox.Show(Program.form, "In place upgrade has failed. Rookie can attempt to backup your save data and\nreinstall the game automatically, however " +
"some games do not store their saves\nin an accessible location(less than 5%). Continue with reinstall?", "In place upgrade failed.", MessageBoxButtons.OKCancel);
if (dialogResult1 == DialogResult.Cancel)
bool cancelClicked = false;
if (!Properties.Settings.Default.AutoReinstall)
{
return ret;
Program.form.Invoke((MethodInvoker)(() =>
{
DialogResult dialogResult1 = FlexibleMessageBox.Show(Program.form, "In place upgrade has failed. Rookie can attempt to backup your save data and reinstall the game automatically, however some games do not store their saves in an accessible location (less than 5%). Continue with reinstall?", "In place upgrade failed.", MessageBoxButtons.OKCancel);
if (dialogResult1 == DialogResult.Cancel)
cancelClicked = true;
}));
}
if (cancelClicked)
return ret;
}
Program.form.ChangeTitle("Performing reinstall, please wait...");

View File

@@ -203,6 +203,9 @@
<setting name="backupDir" serializeAs="String">
<value />
</setting>
<setting name="singleThreadMode" serializeAs="String">
<value>False</value>
</setting>
</AndroidSideloader.Properties.Settings>
<AndroidADB.Sideloader.Properties.Settings>
<setting name="checkForUpdates" serializeAs="String">

View File

@@ -1,4 +1,24 @@
RSL 2.18
RSL 2.19
- Feature: Added streaming Game Trailers (enable in Settings)
- Feature: Added custom Download Directories
- Feature: Added custom Backup Directories
- Feature: Added Game Filtering (click on the Colored-Labels in the Top-Right)
- Feature: When uninstalling games, Rookie will now ask if you want to back up save data
- Feature: "No Device Mode" now automatically disables "Delete after Download and Install"
- Feature: Offline Mode now has the ability to donate new games/updates
- Fix: OBBs will no longer be attempted to push in "No Device Mode"
- Fix: Comparing OBB sizes will no longer error during "No Device Mode"
- Fix: Comparing OBB Sizes will no longer state "Input string was not in a correct format", it will now properly tell the user what is wrong
- Fix: The GitHub Error when starting up will now show the actual URL it tries to access
- Fix: Added a check to make Rookie not attempt to get available space when no devices are connected
- Removed Bandwidth Limit settings
- Thank you to Chax for the new features!
- Thank you to JP for the Trailers framework!
~ fenopy
RSL 2.18
- Moving Rookie onto a different Directory than C: will not break Pull App To Desktop anymore
- Rookie should now tell the user why it couldnt get the Rclone/ADB etc. Files

25
MainForm.Designer.cs generated
View File

@@ -125,9 +125,9 @@ namespace AndroidSideloader
this.etaLabel_Tooltip = new System.Windows.Forms.ToolTip(this.components);
this.EnterInstallBox_Tooltip = new System.Windows.Forms.ToolTip(this.components);
this.panel2 = new System.Windows.Forms.Panel();
this.webView21 = new Microsoft.Web.WebView2.WinForms.WebView2();
this.downloadInstallGameButton = new AndroidSideloader.RoundButton();
this.MountButton = new AndroidSideloader.RoundButton();
this.webView21 = new Microsoft.Web.WebView2.WinForms.WebView2();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ULGif)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imgBattery)).BeginInit();
@@ -1059,6 +1059,7 @@ namespace AndroidSideloader
// label2
//
this.label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.label2.Location = new System.Drawing.Point(464, 196);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(271, 120);
@@ -1306,6 +1307,17 @@ namespace AndroidSideloader
this.panel2.Size = new System.Drawing.Size(798, 34);
this.panel2.TabIndex = 96;
//
// webView21
//
this.webView21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.webView21.CreationProperties = null;
this.webView21.DefaultBackgroundColor = System.Drawing.Color.White;
this.webView21.Location = new System.Drawing.Point(224, 475);
this.webView21.Name = "webView21";
this.webView21.Size = new System.Drawing.Size(374, 214);
this.webView21.TabIndex = 97;
this.webView21.ZoomFactor = 1D;
//
// downloadInstallGameButton
//
this.downloadInstallGameButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
@@ -1361,17 +1373,6 @@ namespace AndroidSideloader
this.MountButton.Click += new System.EventHandler(this.MountButton_Click);
this.MountButton.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
//
// webView21
//
this.webView21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.webView21.CreationProperties = null;
this.webView21.DefaultBackgroundColor = System.Drawing.Color.White;
this.webView21.Location = new System.Drawing.Point(224, 475);
this.webView21.Name = "webView21";
this.webView21.Size = new System.Drawing.Size(374, 214);
this.webView21.TabIndex = 97;
this.webView21.ZoomFactor = 1D;
//
// MainForm
//
this.AllowDrop = true;

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ namespace AndroidSideloader.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -789,5 +789,17 @@ namespace AndroidSideloader.Properties {
this["backupDir"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool singleThreadMode {
get {
return ((bool)(this["singleThreadMode"]));
}
set {
this["singleThreadMode"] = value;
}
}
}
}

View File

@@ -194,5 +194,8 @@
<Setting Name="backupDir" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="singleThreadMode" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -2,6 +2,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Management;
using System.Text;
using System.Windows.Forms;
@@ -12,9 +13,28 @@ namespace AndroidSideloader
//Kill all rclone, using a static rclone variable doesn't work for some reason #tofix
public static void killRclone()
{
foreach (var process in Process.GetProcessesByName("rclone"))
var parentProcessId = Process.GetCurrentProcess().Id;
var processes = Process.GetProcessesByName("rclone");
foreach (var process in processes)
{
process.Kill();
try
{
using (ManagementObject obj = new ManagementObject($"win32_process.handle='{process.Id}'"))
{
obj.Get();
var ppid = Convert.ToInt32(obj["ParentProcessId"]);
if (ppid == parentProcessId)
{
process.Kill();
}
}
}
catch (Exception ex)
{
// Handle exception if the process no longer exists
}
}
}
@@ -39,7 +59,7 @@ namespace AndroidSideloader
//Run rclone command
public static ProcessOutput runRcloneCommand_DownloadConfig(string command)
{
if (!MainForm.HasInternet || MainForm.isOffline)
if (MainForm.isOffline)
{
return new ProcessOutput("", "No internet");
}
@@ -131,7 +151,7 @@ namespace AndroidSideloader
{
if (!string.IsNullOrWhiteSpace(error))
{
_ = Logger.Log($"Rclone error: {error}\n");
_ = Logger.Log($"Rclone error: {error}\n", "ERROR");
}
if (!string.IsNullOrWhiteSpace(output))
@@ -144,11 +164,6 @@ namespace AndroidSideloader
public static ProcessOutput runRcloneCommand_UploadConfig(string command)
{
if (!MainForm.HasInternet)
{
return new ProcessOutput("", "No internet");
}
ProcessOutput prcoutput = new ProcessOutput();
//Rclone output is unicode, else it will show garbage instead of unicode characters
rclone.StartInfo.StandardOutputEncoding = Encoding.UTF8;
@@ -200,7 +215,7 @@ namespace AndroidSideloader
//if there is one of these errors, we switch the mirrors
if (error.Contains("400 Bad Request") || error.Contains("cannot fetch token") || error.Contains("authError") || error.Contains("quota") || error.Contains("exceeded") || error.Contains("directory not found") || error.Contains("Failed to"))
{
_ = Logger.Log(error);
_ = Logger.Log(error, "ERROR");
return new ProcessOutput("Upload Failed.", "Upload failed.");
}
else
@@ -213,7 +228,7 @@ namespace AndroidSideloader
{
if (!string.IsNullOrWhiteSpace(error))
{
_ = Logger.Log($"Rclone error: {error}\n");
_ = Logger.Log($"Rclone error: {error}\n", "ERROR");
}
if (!string.IsNullOrWhiteSpace(output))
@@ -226,7 +241,7 @@ namespace AndroidSideloader
public static ProcessOutput runRcloneCommand_PublicConfig(string command)
{
if (!MainForm.HasInternet || MainForm.isOffline)
if (MainForm.isOffline)
{
return new ProcessOutput("", "No internet");
}
@@ -292,7 +307,7 @@ namespace AndroidSideloader
|| error.Contains("directory not found")
|| error.Contains("Failed to"))
{
_ = Logger.Log(error);
_ = Logger.Log(error, "ERROR");
return new ProcessOutput("Failed to fetch from public mirror.", "Failed to fetch from public mirror.");
}
else
@@ -305,7 +320,7 @@ namespace AndroidSideloader
{
if (!string.IsNullOrWhiteSpace(error))
{
_ = Logger.Log($"Rclone error: {error}\n");
_ = Logger.Log($"Rclone error: {error}\n", "ERROR");
}
if (!string.IsNullOrWhiteSpace(output))

View File

@@ -41,6 +41,7 @@ namespace AndroidSideloader
this.trailersOn = new System.Windows.Forms.CheckBox();
this.downloadDirectorySetter = new System.Windows.Forms.FolderBrowserDialog();
this.backupDirectorySetter = new System.Windows.Forms.FolderBrowserDialog();
this.singleThread = new System.Windows.Forms.CheckBox();
this.setBackupDirectory = new AndroidSideloader.RoundButton();
this.setDownloadDirectory = new AndroidSideloader.RoundButton();
this.btnOpenDebug = new AndroidSideloader.RoundButton();
@@ -194,6 +195,20 @@ namespace AndroidSideloader
//
this.backupDirectorySetter.RootFolder = System.Environment.SpecialFolder.MyComputer;
//
// singleThread
//
this.singleThread.AutoSize = true;
this.singleThread.BackColor = System.Drawing.Color.Transparent;
this.singleThread.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.singleThread.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
this.singleThread.Location = new System.Drawing.Point(11, 263);
this.singleThread.Name = "singleThread";
this.singleThread.Size = new System.Drawing.Size(186, 22);
this.singleThread.TabIndex = 25;
this.singleThread.Text = "Enable Single-Threading";
this.singleThread.UseVisualStyleBackColor = false;
this.singleThread.CheckedChanged += new System.EventHandler(this.singleThread_CheckedChanged);
//
// setBackupDirectory
//
this.setBackupDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
@@ -204,7 +219,7 @@ namespace AndroidSideloader
this.setBackupDirectory.ForeColor = System.Drawing.Color.White;
this.setBackupDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.setBackupDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.setBackupDirectory.Location = new System.Drawing.Point(29, 463);
this.setBackupDirectory.Location = new System.Drawing.Point(27, 514);
this.setBackupDirectory.Name = "setBackupDirectory";
this.setBackupDirectory.Radius = 5;
this.setBackupDirectory.Size = new System.Drawing.Size(285, 31);
@@ -225,7 +240,7 @@ namespace AndroidSideloader
this.setDownloadDirectory.ForeColor = System.Drawing.Color.White;
this.setDownloadDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.setDownloadDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.setDownloadDirectory.Location = new System.Drawing.Point(29, 426);
this.setDownloadDirectory.Location = new System.Drawing.Point(27, 477);
this.setDownloadDirectory.Name = "setDownloadDirectory";
this.setDownloadDirectory.Radius = 5;
this.setDownloadDirectory.Size = new System.Drawing.Size(285, 31);
@@ -246,7 +261,7 @@ namespace AndroidSideloader
this.btnOpenDebug.ForeColor = System.Drawing.Color.White;
this.btnOpenDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.btnOpenDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.btnOpenDebug.Location = new System.Drawing.Point(28, 315);
this.btnOpenDebug.Location = new System.Drawing.Point(26, 350);
this.btnOpenDebug.Name = "btnOpenDebug";
this.btnOpenDebug.Radius = 5;
this.btnOpenDebug.Size = new System.Drawing.Size(285, 31);
@@ -267,7 +282,7 @@ namespace AndroidSideloader
this.btnResetDebug.ForeColor = System.Drawing.Color.White;
this.btnResetDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.btnResetDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.btnResetDebug.Location = new System.Drawing.Point(28, 352);
this.btnResetDebug.Location = new System.Drawing.Point(26, 387);
this.btnResetDebug.Name = "btnResetDebug";
this.btnResetDebug.Radius = 5;
this.btnResetDebug.Size = new System.Drawing.Size(285, 31);
@@ -288,7 +303,7 @@ namespace AndroidSideloader
this.btnUploadDebug.ForeColor = System.Drawing.Color.White;
this.btnUploadDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.btnUploadDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.btnUploadDebug.Location = new System.Drawing.Point(28, 389);
this.btnUploadDebug.Location = new System.Drawing.Point(26, 424);
this.btnUploadDebug.Name = "btnUploadDebug";
this.btnUploadDebug.Radius = 5;
this.btnUploadDebug.Size = new System.Drawing.Size(285, 31);
@@ -309,7 +324,7 @@ namespace AndroidSideloader
this.resetSettingsButton.ForeColor = System.Drawing.Color.White;
this.resetSettingsButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.resetSettingsButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.resetSettingsButton.Location = new System.Drawing.Point(180, 278);
this.resetSettingsButton.Location = new System.Drawing.Point(179, 297);
this.resetSettingsButton.Name = "resetSettingsButton";
this.resetSettingsButton.Radius = 5;
this.resetSettingsButton.Size = new System.Drawing.Size(133, 31);
@@ -333,7 +348,7 @@ namespace AndroidSideloader
this.applyButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
this.applyButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.applyButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.applyButton.Location = new System.Drawing.Point(28, 278);
this.applyButton.Location = new System.Drawing.Point(27, 297);
this.applyButton.Name = "applyButton";
this.applyButton.Radius = 5;
this.applyButton.Size = new System.Drawing.Size(133, 31);
@@ -350,7 +365,8 @@ namespace AndroidSideloader
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
this.ClientSize = new System.Drawing.Size(342, 519);
this.ClientSize = new System.Drawing.Size(339, 561);
this.Controls.Add(this.singleThread);
this.Controls.Add(this.setBackupDirectory);
this.Controls.Add(this.trailersOn);
this.Controls.Add(this.setDownloadDirectory);
@@ -405,5 +421,6 @@ namespace AndroidSideloader
private System.Windows.Forms.FolderBrowserDialog downloadDirectorySetter;
private RoundButton setBackupDirectory;
private System.Windows.Forms.FolderBrowserDialog backupDirectorySetter;
private System.Windows.Forms.CheckBox singleThread;
}
}

View File

@@ -32,6 +32,7 @@ namespace AndroidSideloader
bmbfBox.Checked = Properties.Settings.Default.BMBFchecked;
AutoReinstBox.Checked = Properties.Settings.Default.AutoReinstall;
trailersOn.Checked = Properties.Settings.Default.TrailersOn;
singleThread.Checked = Properties.Settings.Default.singleThreadMode;
if (nodevicemodeBox.Checked)
{
deleteAfterInstallCheckBox.Checked = false;
@@ -153,7 +154,7 @@ namespace AndroidSideloader
private void nodevicemodeBox_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.nodevicemode = nodevicemodeBox.Checked;
if (!deleteAfterInstallCheckBox.Checked)
if (!nodevicemodeBox.Checked)
{
deleteAfterInstallCheckBox.Checked = true;
Properties.Settings.Default.deleteAllAfterInstall = true;
@@ -231,6 +232,12 @@ namespace AndroidSideloader
Properties.Settings.Default.Save();
}
}
private void singleThread_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.singleThreadMode = singleThread.Checked;
Properties.Settings.Default.Save();
}
}
}

View File

@@ -1,5 +1,6 @@
using JR.Utils.GUI.Forms;
using System;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
@@ -107,7 +108,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
RecursiveSideload(d);
}
}
catch (Exception ex) { _ = Logger.Log(ex.Message); }
catch (Exception ex) { _ = Logger.Log(ex.Message, "ERROR"); }
}
//Recursive copy any obb folder
@@ -125,7 +126,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
RecursiveCopyOBB(d);
}
}
catch (Exception ex) { _ = Logger.Log(ex.Message); }
catch (Exception ex) { _ = Logger.Log(ex.Message, "ERROR"); }
}
//uninstalls an app
@@ -328,8 +329,8 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
{
currentAccessedWebsite = "rclone";
string url = Environment.Is64BitOperatingSystem
? "https://downloads.rclone.org/v1.55.1/rclone-v1.55.1-windows-amd64.zip"
: "https://downloads.rclone.org/v1.55.1/rclone-v1.55.1-windows-386.zip";
? "https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-amd64.zip"
: "https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-386.zip";
//Since sideloader is build for x86, it should work on both x86 and x64 so we download the according rclone version
client.DownloadFile(url, "rclone.zip");
@@ -348,6 +349,31 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
}
}
}
else
{
string pathToRclone = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
if (File.Exists(pathToRclone))
{
var versionInfo = FileVersionInfo.GetVersionInfo(pathToRclone);
string version = versionInfo.ProductVersion;
Logger.Log($"Current RCLONE Version {version}");
if (version != "1.62.2")
{
Logger.Log("RCLONE Version not matching! Downloading required version.", "WARNING");
File.Delete(pathToRclone);
currentAccessedWebsite = "rclone";
string architecture = Environment.Is64BitOperatingSystem ? "amd64" : "386";
string url = $"https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-{architecture}.zip";
client.DownloadFile(url, "rclone.zip");
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "rclone.zip"), Environment.CurrentDirectory);
File.Delete("rclone.zip");
string rcloneDirectory = Path.Combine(Environment.CurrentDirectory, $"rclone-v1.62.2-windows-{architecture}");
File.Move(Path.Combine(rcloneDirectory, "rclone.exe"), pathToRclone);
Directory.Delete(rcloneDirectory, true);
}
}
}
}
catch (Exception ex)

View File

@@ -255,7 +255,7 @@ namespace AndroidSideloader
{
string resultString = responseReader.ReadToEnd();
_ = Logger.Log($"Retrived updated config from: {configUrl}");
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\vrp.upload.config", resultString);
@@ -264,7 +264,7 @@ namespace AndroidSideloader
}
catch (Exception e)
{
_ = Logger.Log($"Failed to update Upload config: {e.Message}");
_ = Logger.Log($"Failed to update Upload config: {e.Message}", "ERROR");
}
}
@@ -284,7 +284,7 @@ namespace AndroidSideloader
{
string resultString = responseReader.ReadToEnd();
_ = Logger.Log($"Retrived updated config from: {configUrl}");
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
File.WriteAllText(Environment.CurrentDirectory + "\\vrp-public.json", resultString);
@@ -293,7 +293,7 @@ namespace AndroidSideloader
}
catch (Exception e)
{
_ = Logger.Log($"Failed to update Public config: {e.Message}");
_ = Logger.Log($"Failed to update Public config: {e.Message}", "ERROR");
}
}

View File

@@ -11,7 +11,7 @@ namespace AndroidSideloader
private static string RawGitHubUrl;
private static string GitHubUrl;
public static readonly string LocalVersion = "2.19";
public static readonly string LocalVersion = "2.20";
public static string currentVersion = string.Empty;
public static string changelog = string.Empty;

View File

@@ -93,7 +93,7 @@ namespace AndroidSideloader.Utilities
string error = cmd.StandardError.ReadToEnd();
string output = cmd.StandardOutput.ReadToEnd();
_ = Logger.Log($"Output: {output}");
_ = Logger.Log($"Error: {error}");
_ = Logger.Log($"Error: {error}", "ERROR");
return new ProcessOutput(output, error);
}

View File

@@ -6,22 +6,24 @@ namespace AndroidSideloader
internal class Logger
{
public string logfile = Properties.Settings.Default.CurrentLogPath;
public static bool Log(string text, bool ret = true)
public static bool Log(string text, string logLevel = "NOTICE", bool ret = true)
{
string time = DateTime.Now.ToString("hh:mmtt(UTC): ");
if (text.Length > 5)
{
string newline = "\n";
if (text.Length > 40 && text.Contains("\n"))
{
newline += "\n\n";
}
try { File.AppendAllText(Properties.Settings.Default.CurrentLogPath, time + text + newline); } catch { }
if (text.Length <= 5)
return ret;
string time = DateTime.UtcNow.ToString("hh:mmtt(UTC): ");
string newline = text.Length > 40 && text.Contains("\n") ? "\n\n" : "\n";
string logEntry = time + "[" + logLevel.ToUpper() + "] " + text + newline;
try
{
File.AppendAllText(Properties.Settings.Default.CurrentLogPath, logEntry);
}
catch
{
// Handle the exception if necessary
}
return ret;
}
}

View File

@@ -60,7 +60,7 @@ namespace AndroidSideloader.Utilities
MessageBoxIcon.Error);
}
_ = Logger.Log(x.StandardOutput.ReadToEnd());
_ = Logger.Log(error);
_ = Logger.Log(error, "ERROR");
throw new ApplicationException($"Extracting failed, status code {x.ExitCode}");
}
}

View File

@@ -1,19 +1,21 @@
RSL 2.19
RSL 2.20
- Feature: Added streaming Game Trailers (enable in Settings)
- Feature: Added custom Download Directories
- Feature: Added custom Backup Directories
- Feature: Added Game Filtering (click on the Colored-Labels in the Top-Right)
- Feature: When uninstalling games, Rookie will now ask if you want to back up save data
- Feature: "No Device Mode" now automatically disables "Delete after Download and Install"
- Feature: Offline Mode now has the ability to donate new games/updates
- Fix: OBBs will no longer be attempted to push in "No Device Mode"
- Fix: Comparing OBB sizes will no longer error during "No Device Mode"
- Fix: Comparing OBB Sizes will no longer state "Input string was not in a correct format", it will now properly tell the user what is wrong
- Fix: The GitHub Error when starting up will now show the actual URL it tries to access
- Fix: Added a check to make Rookie not attempt to get available space when no devices are connected
- Removed Bandwidth Limit settings
- Feature: Added manual IP on Wireless ADB
- Feature: Rookie will now delete old OBB Folders before pushing new obb folders
- Feature: Add Single-Thread mode in settings (For users with download issues using multiple threads)
- Feature: Add a setting to disable reloading the game list whenever a game gets added into the download queue
- Fix: Device Storage and battery display
- Fix: Games that come with install.txt will now check for a device to avoid freezes
- Fix: "No Device Mode" checkbox can't have "Delete after Download and Install" enabled at the same time anymore
- Fix: Removing Queue Items should no longer ever crash Rookie
- Fix: Rookie will no longer reload the gamelist if you have filtered it
- Fix: Check if the rclone we are killing is ours
- Fix: Put zip extraction into a thread to avoid freezing the UI
- Chore: Update RCLONE to 1.62.2
- Chore: Cleaning up the code for the Trailers, progress bar, dropdown categories, redundant internet checks, and other code cleanup
- Chore: Other UI and message box display cleanup
- Chore: Optimize the code for getting the thumbnail paths
- Chore: Log Levels added to Debuglog
- Thank you to Chax for the new features!
- Thank you to JP for the Trailers framework!
- Thank you to Chax for the new features and fixes!
~ fenopy

View File

@@ -1 +1 @@
2.19
2.20