Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
418a5ebc33 | ||
|
|
43e2343676 | ||
|
|
8e3faf4682 | ||
|
|
26db46e844 | ||
|
|
88bbbb2ced | ||
|
|
d02505b172 | ||
|
|
cbd54f7319 | ||
|
|
258c251567 | ||
|
|
1f851470e0 | ||
|
|
0070e44917 | ||
|
|
596e126d2b | ||
|
|
5a6ccf423a | ||
|
|
efadb70d72 |
93
ADB.cs
93
ADB.cs
@@ -26,7 +26,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
command = $" -s {DeviceID} {command}";
|
||||
}
|
||||
if (!command.Contains("dumpsys") && !command.Contains("shell pm list packages") && !command.Contains("KEYCODE_WAKEUP"))
|
||||
if (!command.Contains("dumpsys") && !command.Contains("shell pm list packages") && !command.Contains("KEYCODE_WAKEUP"))
|
||||
{
|
||||
|
||||
string logcmd = command;
|
||||
@@ -66,18 +66,24 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS"))
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && !Properties.Settings.Default.adbdebugwarned)
|
||||
{
|
||||
FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.");
|
||||
ADB.WakeDevice();
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
if (error.Contains("not enough storage space"))
|
||||
{
|
||||
FlexibleMessageBox.Show("There is not enough room on your device to install this package. Please clear AT LEAST 2x the amount of the app you are trying to install.");
|
||||
}
|
||||
if (!output.Contains("version") && !output.Contains("KEYCODE_WAKEUP") && !output.Contains("KEYCODE_WAKEUP") && !output.Contains("Filesystem") && !output.Contains("package:") && !output.Equals(null))
|
||||
Logger.Log(output);
|
||||
if (!output.Contains("version") && !output.Contains("KEYCODE_WAKEUP") && !output.Contains("Filesystem") && !output.Contains("package:") && !output.Equals(null))
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
@@ -117,24 +123,41 @@ namespace AndroidSideloader
|
||||
catch { }
|
||||
if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS"))
|
||||
else if (command.Contains("install"))
|
||||
{
|
||||
FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.");
|
||||
ADB.WakeDevice();
|
||||
bool graceful = adb.WaitForExit(120000);
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
}
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && Properties.Settings.Default.adbdebugwarned)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
public static ProcessOutput RunCommandToString(string result, string path)
|
||||
public static ProcessOutput RunCommandToString(string result, string path = "")
|
||||
{
|
||||
string command = result;
|
||||
Properties.Settings.Default.ADBFolder = adbFolderPath;
|
||||
@@ -145,7 +168,7 @@ namespace AndroidSideloader
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
Logger.Log($"Running command: {logcmd}");
|
||||
adb.StartInfo.FileName = @"C:\windows\system32\cmd.exe";
|
||||
adb.StartInfo.FileName = @"C:\Windows\System32\cmd.exe";
|
||||
adb.StartInfo.Arguments = command;
|
||||
adb.StartInfo.RedirectStandardError = true;
|
||||
adb.StartInfo.RedirectStandardInput = true;
|
||||
@@ -178,9 +201,16 @@ namespace AndroidSideloader
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS"))
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && Properties.Settings.Default.adbdebugwarned)
|
||||
{
|
||||
FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.");
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
Logger.Log(output);
|
||||
@@ -246,7 +276,7 @@ namespace AndroidSideloader
|
||||
public static void WakeDevice()
|
||||
{
|
||||
string devicesout = RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP").Output;
|
||||
if (!devicesout.Contains("found"))
|
||||
if (!devicesout.Contains("found") && !Properties.Settings.Default.nodevicemode)
|
||||
{
|
||||
if (Properties.Settings.Default.IPAddress.Contains("connect"))
|
||||
{
|
||||
@@ -259,15 +289,19 @@ namespace AndroidSideloader
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("Either your Quest is idle or you have rebooted the device.\nRSL's wireless ADB will persist on PC reboot but not on Quest reboot.\n\nNOTE: If you haven't rebooted your Quest it may be idle.\n\nTo prevent this press the HOLD button 2x prior to launching RSL. Or\nkeep your Quest plugged into power to keep it permanently \"awake\".\n\nHave you assigned your Quest a static IP in your router configuration?\n\nIf you no longer want to use Wireless ADB or your device was idle please hit CANCEL.", "DEVICE REBOOTED\\IDLE?", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show("Press OK to remove your stored IP address.\nIf your Quest went idle press the HOLD button on the device twice then press CANCEL to reconnect.", "REMOVE STORED IP?", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult2 == DialogResult.Cancel)
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show("PRESS YES TO DISABLE WIRELESS ADB.\n\nIf your Quest went idle press the HOLD button on the device twice then press NO to reconnect.\n\nIf you just want to exit this prompt press CANCEL.", "DISABLE WIRELESS ADB?", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult2 == DialogResult.No)
|
||||
WakeDevice();
|
||||
if (dialogResult2 == DialogResult.OK)
|
||||
if (dialogResult2 == DialogResult.Yes)
|
||||
{
|
||||
Properties.Settings.Default.IPAddress = "";
|
||||
Properties.Settings.Default.Save();
|
||||
WakeDevice();
|
||||
}
|
||||
if (dialogResult2 == DialogResult.Cancel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else if (dialogResult == DialogResult.Yes)
|
||||
@@ -334,6 +368,7 @@ namespace AndroidSideloader
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -342,19 +377,19 @@ namespace AndroidSideloader
|
||||
|
||||
WakeDevice();
|
||||
ProcessOutput ret = new ProcessOutput();
|
||||
Program.form.ChangeTitle($"Sideloading {Path.GetFileName(path)}");
|
||||
ret += RunAdbCommandToString($"install -g -r \"{path}\"");
|
||||
string out2 = ret.Output + ret.Error;
|
||||
if (out2.Contains("failed"))
|
||||
{
|
||||
string BackupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
if (out2.Contains("offline"))
|
||||
Logger.Log(out2);
|
||||
if (out2.Contains("offline") && !Properties.Settings.Default.nodevicemode)
|
||||
{
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show("Device is offline. Press Yes to reconnect, or if you don't wish to connect and just want to download the game (requires unchecking \"Delete games after install\" from settings menu) then press No.", "Device offline.", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult2 == DialogResult.Yes)
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
if (out2.Contains($"INSTALL_FAILED_UPDATE_INCOMPATIBLE") || out2.Contains("INSTALL_FAILED_VERSION_DOWNGRADE"))
|
||||
if (out2.Contains($"INSTALL_FAILED_UPDATE_INCOMPATIBLE") || out2.Contains("INSTALL_FAILED_VERSION_DOWNGRADE") || out2.Contains("signatures do not match") || out2.Contains("failed to install"))
|
||||
{
|
||||
ret.Error = string.Empty;
|
||||
ret.Output = string.Empty;
|
||||
@@ -376,7 +411,7 @@ namespace AndroidSideloader
|
||||
else
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show($"No savedata found! Continue with the uninstall!", "None Found", MessageBoxButtons.OK);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
@@ -423,8 +458,8 @@ namespace AndroidSideloader
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\config.json\" /sdcard/android/data/{packagename}/private/config.json");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Program.form.ChangeTitle("");
|
||||
return ret;
|
||||
}
|
||||
@@ -432,7 +467,9 @@ namespace AndroidSideloader
|
||||
public static ProcessOutput CopyOBB(string path)
|
||||
{
|
||||
WakeDevice();
|
||||
if (Path.GetDirectoryName(path).Contains(".") && !Path.GetDirectoryName(path).Contains("_data") || path.Contains("."))
|
||||
|
||||
string folder = Path.GetFileName(path);
|
||||
if (!folder.Contains("+") && !folder.Contains("_") && folder.Contains("."))
|
||||
{
|
||||
return RunAdbCommandToString($"push \"{path}\" \"/sdcard/Android/obb\"");
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -260,6 +261,7 @@
|
||||
<ItemGroup>
|
||||
<Content Include="changelog.txt" />
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="ChangelogHistory.txt" />
|
||||
<None Include="Resources\battery11.png" />
|
||||
<None Include="Resources\battery.png" />
|
||||
<None Include="Resources\battery1.png" />
|
||||
|
||||
@@ -149,6 +149,15 @@
|
||||
<setting name="QblindOn" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="adbdebugwarned" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="nodevicemode" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="BMBFchecked" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
|
||||
1488
ChangelogHistory.txt
Normal file
1488
ChangelogHistory.txt
Normal file
File diff suppressed because it is too large
Load Diff
60
MainForm.Designer.cs
generated
60
MainForm.Designer.cs
generated
@@ -114,9 +114,9 @@
|
||||
this.m_combo.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.m_combo.Location = new System.Drawing.Point(227, 8);
|
||||
this.m_combo.Name = "m_combo";
|
||||
this.m_combo.Size = new System.Drawing.Size(353, 24);
|
||||
this.m_combo.Size = new System.Drawing.Size(353, 26);
|
||||
this.m_combo.TabIndex = 0;
|
||||
this.m_combo.Text = "Select an app to uninstall...";
|
||||
this.m_combo.Text = "Select an app to uninstall or extract...";
|
||||
//
|
||||
// startsideloadbutton
|
||||
//
|
||||
@@ -239,7 +239,7 @@
|
||||
this.getApkButton.Padding = new System.Windows.Forms.Padding(23, 0, 0, 0);
|
||||
this.getApkButton.Size = new System.Drawing.Size(218, 28);
|
||||
this.getApkButton.TabIndex = 2;
|
||||
this.getApkButton.Text = "Extract Apk from device";
|
||||
this.getApkButton.Text = "Extract App to Desktop";
|
||||
this.getApkButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.getApkButton.UseVisualStyleBackColor = false;
|
||||
this.getApkButton.Click += new System.EventHandler(this.getApkButton_Click);
|
||||
@@ -336,6 +336,8 @@
|
||||
this.downloadInstallGameButton.Text = "Download and Install Game/Add to Queue";
|
||||
this.downloadInstallGameButton.UseVisualStyleBackColor = false;
|
||||
this.downloadInstallGameButton.Click += new System.EventHandler(this.downloadInstallGameButton_Click);
|
||||
this.downloadInstallGameButton.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
|
||||
this.downloadInstallGameButton.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
@@ -370,7 +372,7 @@
|
||||
this.BatteryLbl.BackColor = System.Drawing.Color.Transparent;
|
||||
this.BatteryLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.BatteryLbl.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.BatteryLbl.Location = new System.Drawing.Point(157, 580);
|
||||
this.BatteryLbl.Location = new System.Drawing.Point(156, 580);
|
||||
this.BatteryLbl.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.BatteryLbl.Name = "BatteryLbl";
|
||||
this.BatteryLbl.Size = new System.Drawing.Size(47, 17);
|
||||
@@ -737,7 +739,7 @@
|
||||
this.diskLabel.Location = new System.Drawing.Point(7, 622);
|
||||
this.diskLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.diskLabel.Name = "diskLabel";
|
||||
this.diskLabel.Size = new System.Drawing.Size(74, 17);
|
||||
this.diskLabel.Size = new System.Drawing.Size(77, 18);
|
||||
this.diskLabel.TabIndex = 7;
|
||||
this.diskLabel.Text = "Disk Label";
|
||||
//
|
||||
@@ -751,7 +753,7 @@
|
||||
this.speedLabel.Location = new System.Drawing.Point(7, 680);
|
||||
this.speedLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.speedLabel.Name = "speedLabel";
|
||||
this.speedLabel.Size = new System.Drawing.Size(141, 17);
|
||||
this.speedLabel.Size = new System.Drawing.Size(149, 18);
|
||||
this.speedLabel.TabIndex = 76;
|
||||
this.speedLabel.Text = "DLS: Speed in MBPS";
|
||||
//
|
||||
@@ -765,7 +767,7 @@
|
||||
this.etaLabel.Location = new System.Drawing.Point(7, 699);
|
||||
this.etaLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.etaLabel.Name = "etaLabel";
|
||||
this.etaLabel.Size = new System.Drawing.Size(139, 17);
|
||||
this.etaLabel.Size = new System.Drawing.Size(148, 18);
|
||||
this.etaLabel.TabIndex = 75;
|
||||
this.etaLabel.Text = "ETA: HH:MM:SS Left";
|
||||
//
|
||||
@@ -799,13 +801,15 @@
|
||||
this.gamesQueListBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.gamesQueListBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.gamesQueListBox.FormattingEnabled = true;
|
||||
this.gamesQueListBox.ItemHeight = 16;
|
||||
this.gamesQueListBox.ItemHeight = 18;
|
||||
this.gamesQueListBox.Location = new System.Drawing.Point(601, 475);
|
||||
this.gamesQueListBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gamesQueListBox.Name = "gamesQueListBox";
|
||||
this.gamesQueListBox.Size = new System.Drawing.Size(369, 162);
|
||||
this.gamesQueListBox.Size = new System.Drawing.Size(369, 146);
|
||||
this.gamesQueListBox.TabIndex = 9;
|
||||
this.gamesQueListBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.gamesQueListBox_MouseClick);
|
||||
this.gamesQueListBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
|
||||
this.gamesQueListBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
|
||||
//
|
||||
// devicesComboBox
|
||||
//
|
||||
@@ -820,7 +824,7 @@
|
||||
this.devicesComboBox.Location = new System.Drawing.Point(227, 39);
|
||||
this.devicesComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.devicesComboBox.Name = "devicesComboBox";
|
||||
this.devicesComboBox.Size = new System.Drawing.Size(161, 24);
|
||||
this.devicesComboBox.Size = new System.Drawing.Size(161, 26);
|
||||
this.devicesComboBox.TabIndex = 1;
|
||||
this.devicesComboBox.Text = "Select your device";
|
||||
this.devicesComboBox.SelectedIndexChanged += new System.EventHandler(this.devicesComboBox_SelectedIndexChanged);
|
||||
@@ -838,7 +842,7 @@
|
||||
this.remotesList.Location = new System.Drawing.Point(527, 39);
|
||||
this.remotesList.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.remotesList.Name = "remotesList";
|
||||
this.remotesList.Size = new System.Drawing.Size(53, 24);
|
||||
this.remotesList.Size = new System.Drawing.Size(53, 26);
|
||||
this.remotesList.TabIndex = 3;
|
||||
this.remotesList.SelectedIndexChanged += new System.EventHandler(this.remotesList_SelectedIndexChanged);
|
||||
//
|
||||
@@ -852,13 +856,15 @@
|
||||
this.gamesListView.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.gamesListView.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.gamesListView.HideSelection = false;
|
||||
this.gamesListView.Location = new System.Drawing.Point(224, 72);
|
||||
this.gamesListView.Location = new System.Drawing.Point(224, 71);
|
||||
this.gamesListView.Name = "gamesListView";
|
||||
this.gamesListView.Size = new System.Drawing.Size(746, 359);
|
||||
this.gamesListView.Size = new System.Drawing.Size(746, 360);
|
||||
this.gamesListView.TabIndex = 6;
|
||||
this.gamesListView.UseCompatibleStateImageBehavior = false;
|
||||
this.gamesListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
|
||||
this.gamesListView.SelectedIndexChanged += new System.EventHandler(this.gamesListView_SelectedIndexChanged);
|
||||
this.gamesListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
|
||||
this.gamesListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
|
||||
this.gamesListView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.gamesListView_KeyPress);
|
||||
this.gamesListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.gamesListView_MouseDoubleClick);
|
||||
//
|
||||
@@ -878,7 +884,7 @@
|
||||
this.searchTextBox.MaximumSize = new System.Drawing.Size(231, 26);
|
||||
this.searchTextBox.MinimumSize = new System.Drawing.Size(231, 26);
|
||||
this.searchTextBox.Name = "searchTextBox";
|
||||
this.searchTextBox.Size = new System.Drawing.Size(231, 23);
|
||||
this.searchTextBox.Size = new System.Drawing.Size(231, 24);
|
||||
this.searchTextBox.TabIndex = 5;
|
||||
this.searchTextBox.Text = "Search";
|
||||
this.searchTextBox.Visible = false;
|
||||
@@ -895,7 +901,7 @@
|
||||
this.gamesQueueLabel.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.gamesQueueLabel.Location = new System.Drawing.Point(597, 601);
|
||||
this.gamesQueueLabel.Name = "gamesQueueLabel";
|
||||
this.gamesQueueLabel.Size = new System.Drawing.Size(51, 17);
|
||||
this.gamesQueueLabel.Size = new System.Drawing.Size(52, 18);
|
||||
this.gamesQueueLabel.TabIndex = 86;
|
||||
this.gamesQueueLabel.Text = "Queue";
|
||||
//
|
||||
@@ -948,7 +954,7 @@
|
||||
this.notesRichTextBox.ShowSelectionMargin = true;
|
||||
this.notesRichTextBox.Size = new System.Drawing.Size(369, 67);
|
||||
this.notesRichTextBox.TabIndex = 10;
|
||||
this.notesRichTextBox.Text = "";
|
||||
this.notesRichTextBox.Text = "\n\n\n TIP: PRESS F1 TO SEE A LIST OF SHORTCUTS";
|
||||
//
|
||||
// DragDropLbl
|
||||
//
|
||||
@@ -974,7 +980,7 @@
|
||||
this.label1.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.label1.Location = new System.Drawing.Point(597, 674);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(45, 17);
|
||||
this.label1.Size = new System.Drawing.Size(48, 18);
|
||||
this.label1.TabIndex = 86;
|
||||
this.label1.Text = "Notes";
|
||||
//
|
||||
@@ -999,7 +1005,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.label2.Location = new System.Drawing.Point(465, 196);
|
||||
this.label2.Location = new System.Drawing.Point(464, 196);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(271, 120);
|
||||
this.label2.TabIndex = 89;
|
||||
@@ -1029,11 +1035,11 @@
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label4.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label4.Location = new System.Drawing.Point(532, 284);
|
||||
this.label4.Location = new System.Drawing.Point(506, 283);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(132, 17);
|
||||
this.label4.Size = new System.Drawing.Size(183, 17);
|
||||
this.label4.TabIndex = 90;
|
||||
this.label4.Text = "Shorcut: CTRL+F";
|
||||
this.label4.Text = "Shorcuts: CTRL+F or F2";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.label4.Visible = false;
|
||||
//
|
||||
@@ -1044,9 +1050,9 @@
|
||||
this.label5.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label5.Location = new System.Drawing.Point(692, 11);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(99, 17);
|
||||
this.label5.Size = new System.Drawing.Size(105, 17);
|
||||
this.label5.TabIndex = 90;
|
||||
this.label5.Text = "Search apps";
|
||||
this.label5.Text = "Quick Search";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label6
|
||||
@@ -1096,7 +1102,7 @@
|
||||
this.EnterInstallBox.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.EnterInstallBox.Location = new System.Drawing.Point(593, 7);
|
||||
this.EnterInstallBox.Name = "EnterInstallBox";
|
||||
this.EnterInstallBox.Size = new System.Drawing.Size(78, 52);
|
||||
this.EnterInstallBox.Size = new System.Drawing.Size(80, 54);
|
||||
this.EnterInstallBox.TabIndex = 93;
|
||||
this.EnterInstallBox.Text = " Install w/ \r\n Enter Key";
|
||||
this.EnterInstallBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@@ -1119,7 +1125,7 @@
|
||||
this.ADBcommandbox.MaximumSize = new System.Drawing.Size(231, 26);
|
||||
this.ADBcommandbox.MinimumSize = new System.Drawing.Size(231, 26);
|
||||
this.ADBcommandbox.Name = "ADBcommandbox";
|
||||
this.ADBcommandbox.Size = new System.Drawing.Size(231, 23);
|
||||
this.ADBcommandbox.Size = new System.Drawing.Size(231, 24);
|
||||
this.ADBcommandbox.TabIndex = 5;
|
||||
this.ADBcommandbox.Visible = false;
|
||||
this.ADBcommandbox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged);
|
||||
@@ -1198,6 +1204,8 @@
|
||||
this.gamesPictureBox.Size = new System.Drawing.Size(371, 214);
|
||||
this.gamesPictureBox.TabIndex = 84;
|
||||
this.gamesPictureBox.TabStop = false;
|
||||
this.gamesPictureBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
|
||||
this.gamesPictureBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
@@ -1206,6 +1214,7 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.ClientSize = new System.Drawing.Size(980, 721);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.EnterInstallBox);
|
||||
this.Controls.Add(this.ProgressText);
|
||||
this.Controls.Add(this.pictureBox4);
|
||||
@@ -1216,7 +1225,6 @@
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.ADBcommandbox);
|
||||
this.Controls.Add(this.searchTextBox);
|
||||
this.Controls.Add(this.label9);
|
||||
|
||||
490
MainForm.cs
490
MainForm.cs
@@ -30,6 +30,8 @@ namespace AndroidSideloader
|
||||
#else
|
||||
public bool keyheld;
|
||||
public bool keyheld2;
|
||||
public static string CurrAPK;
|
||||
public static string CurrPCKG;
|
||||
public static bool debugMode = false;
|
||||
public bool DeviceConnected = false;
|
||||
#endif
|
||||
@@ -64,7 +66,6 @@ namespace AndroidSideloader
|
||||
}
|
||||
else
|
||||
{
|
||||
FlexibleMessageBox.Show("Cannot generate debug log until RSL is done syncing with the server. Once RSL has fully loaded please reset your DebugLog in Settings.");
|
||||
Properties.Settings.Default.CurrentLogPath = $"{Environment.CurrentDirectory}\\debuglog.txt";
|
||||
}
|
||||
|
||||
@@ -78,10 +79,7 @@ namespace AndroidSideloader
|
||||
t2.Interval = 30; // 30ms
|
||||
t2.Tick += new EventHandler(timer_Tick2);
|
||||
t2.Start();
|
||||
System.Windows.Forms.Timer t3 = new System.Windows.Forms.Timer();
|
||||
t3.Interval = 350; // 1 second before clipboard copy is allowed
|
||||
t3.Tick += new EventHandler(timer_Tick3);
|
||||
t3.Start();
|
||||
|
||||
lvwColumnSorter = new ListViewColumnSorter();
|
||||
this.gamesListView.ListViewItemSorter = lvwColumnSorter;
|
||||
if (searchTextBox.Visible)
|
||||
@@ -98,13 +96,13 @@ namespace AndroidSideloader
|
||||
|
||||
|
||||
private string oldTitle = "";
|
||||
|
||||
public static bool updatesnotified;
|
||||
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
updatesnotified = false;
|
||||
|
||||
|
||||
|
||||
|
||||
string adbFile = "C:\\RSL\\2.1.1\\adb\\adb.exe";
|
||||
string adbDir = "C:\\RSL\\2.1.1\\adb";
|
||||
string fileName = "";
|
||||
@@ -190,6 +188,8 @@ namespace AndroidSideloader
|
||||
catch { }
|
||||
if (File.Exists("crashlog.txt"))
|
||||
{
|
||||
if (File.Exists(Properties.Settings.Default.CurrentCrashPath))
|
||||
File.Delete(Properties.Settings.Default.CurrentCrashPath);
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show($"Sideloader crashed during your last use.\nPress OK if you'd like to send us your crash log.\n\n NOTE: THIS CAN TAKE UP TO 30 SECONDS.", "Crash Detected", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
@@ -234,6 +234,7 @@ namespace AndroidSideloader
|
||||
freeDisclaimer.Invoke(() => { freeDisclaimer.Dispose(); });
|
||||
}).Start();
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
if (!debugMode && Properties.Settings.Default.checkForUpdates)
|
||||
@@ -243,11 +244,11 @@ namespace AndroidSideloader
|
||||
Updater.Update();
|
||||
}
|
||||
progressBar.Invoke(() => { progressBar.Style = ProgressBarStyle.Marquee; });
|
||||
|
||||
ChangeTitle("Initializing Mirrors");
|
||||
initMirrors(true);
|
||||
ChangeTitle("Initializing Games");
|
||||
if (!Directory.Exists(SideloaderRCLONE.Nouns))
|
||||
SideloaderRCLONE.UpdateNouns(currentRemote);
|
||||
SideloaderRCLONE.UpdateNouns(currentRemote);
|
||||
SideloaderRCLONE.initGames(currentRemote);
|
||||
if (!Directory.Exists(SideloaderRCLONE.ThumbnailsFolder) || !Directory.Exists(SideloaderRCLONE.NotesFolder))
|
||||
{
|
||||
@@ -255,31 +256,39 @@ namespace AndroidSideloader
|
||||
}
|
||||
ChangeTitle("Syncing Game Photos");
|
||||
SideloaderRCLONE.UpdateGamePhotos(currentRemote);
|
||||
ChangeTitle("Updating list of needed clean apps...");
|
||||
SideloaderRCLONE.UpdateNouns(currentRemote);
|
||||
ChangeTitle("Checking for Updates on server...");
|
||||
SideloaderRCLONE.UpdateGameNotes(currentRemote);
|
||||
listappsbtn();
|
||||
ChangeTitle("Loaded");
|
||||
});
|
||||
t1.SetApartmentState(ApartmentState.STA);
|
||||
t1.IsBackground = false;
|
||||
t1.IsBackground = true;
|
||||
if (HasInternet)
|
||||
t1.Start();
|
||||
|
||||
showAvailableSpace();
|
||||
|
||||
intToolTips();
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
Thread configThread = new Thread(() =>
|
||||
{
|
||||
ChangeTitle("Checking if config is updated and updating config");
|
||||
SideloaderRCLONE.updateConfig(currentRemote);
|
||||
ChangeTitle("");
|
||||
|
||||
});
|
||||
configThread.IsBackground = true;
|
||||
configThread.Start();
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
ChangeTitle("Populating update list, please wait...");
|
||||
listappsbtn();
|
||||
initListView();
|
||||
ChangeTitle("Loaded");
|
||||
showAvailableSpace();
|
||||
intToolTips();
|
||||
ChangeTitle("");
|
||||
downloadInstallGameButton.Enabled = true;
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
isLoading = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -320,14 +329,9 @@ namespace AndroidSideloader
|
||||
|
||||
void timer_Tick2(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
keyheld = false;
|
||||
}
|
||||
|
||||
void timer_Tick3(object sender, EventArgs e)
|
||||
{
|
||||
keyheld2 = false;
|
||||
}
|
||||
public async void ChangeTitle(string txt, bool reset = true)
|
||||
{
|
||||
try
|
||||
@@ -348,7 +352,8 @@ namespace AndroidSideloader
|
||||
if (!ProgressText.IsDisposed)
|
||||
ProgressText.Text = oldTitle;
|
||||
});
|
||||
} catch
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
@@ -356,7 +361,6 @@ namespace AndroidSideloader
|
||||
|
||||
|
||||
|
||||
|
||||
private void ShowSubMenu(Panel subMenu)
|
||||
{
|
||||
if (subMenu.Visible == false)
|
||||
@@ -461,17 +465,19 @@ namespace AndroidSideloader
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (devicesComboBox.Items.Count > 0)
|
||||
devicesComboBox.SelectedIndex = 0;
|
||||
battery = ADB.RunAdbCommandToString("shell dumpsys battery").Output;
|
||||
battery = Utilities.StringUtilities.RemoveEverythingBeforeFirst(battery, "level:");
|
||||
battery = Utilities.StringUtilities.RemoveEverythingAfterFirst(battery, "\n");
|
||||
battery = Utilities.StringUtilities.KeepOnlyNumbers(battery);
|
||||
BatteryLbl.Text = BatteryLbl.Text.Replace("N/A", battery);
|
||||
|
||||
if (devicesComboBox.Items.Count > 0)
|
||||
devicesComboBox.SelectedIndex = 0;
|
||||
|
||||
return devicesComboBox.SelectedIndex;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -563,16 +569,18 @@ namespace AndroidSideloader
|
||||
{
|
||||
DeviceConnected = false;
|
||||
this.Text = "No Device Connected";
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("No device found. Please ensure the following: \n\n -Developer mode is enabled. \n -ADB drivers are installed. \n -ADB connection is enabled on your device (this can reset). \n -Your device is plugged in.\n\nThen press \"Retry\"", "No device found.", MessageBoxButtons.RetryCancel);
|
||||
if (dialogResult == DialogResult.Retry)
|
||||
if (!Properties.Settings.Default.nodevicemode)
|
||||
{
|
||||
devicesbutton.PerformClick();
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("No device found. Please ensure the following: \n\n -Developer mode is enabled. \n -ADB drivers are installed. \n -ADB connection is enabled on your device (this can reset). \n -Your device is plugged in.\n\nThen press \"Retry\"", "No device found.", MessageBoxButtons.RetryCancel);
|
||||
if (dialogResult == DialogResult.Retry)
|
||||
{
|
||||
devicesbutton.PerformClick();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
@@ -706,6 +714,7 @@ namespace AndroidSideloader
|
||||
m_combo.Invoke(() => { m_combo.Items.Clear(); });
|
||||
|
||||
var line = listapps().Split('\n');
|
||||
|
||||
string forsettings = String.Join("", line);
|
||||
Properties.Settings.Default.InstalledApps = forsettings;
|
||||
Properties.Settings.Default.Save();
|
||||
@@ -736,9 +745,10 @@ namespace AndroidSideloader
|
||||
|
||||
m_combo.Invoke(() => { m_combo.MatchingMethod = StringMatchingMethod.NoWildcards; });
|
||||
}
|
||||
|
||||
public static bool isworking = false;
|
||||
private async void getApkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ADB.WakeDevice();
|
||||
|
||||
if (m_combo.SelectedIndex == -1)
|
||||
@@ -746,24 +756,67 @@ namespace AndroidSideloader
|
||||
notify("Please select an app first");
|
||||
return;
|
||||
}
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
|
||||
string GameName = m_combo.SelectedItem.ToString();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
ChangeTitle("Extracting APK....");
|
||||
Thread t1 = new Thread(() =>
|
||||
if (!isworking)
|
||||
{
|
||||
output = Sideloader.getApk(GameName);
|
||||
});
|
||||
t1.IsBackground = true;
|
||||
t1.Start();
|
||||
isworking = true;
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
string HWID = SideloaderUtilities.UUID();
|
||||
string GameName = m_combo.SelectedItem.ToString();
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
string InstalledVersionCode = ADB.RunAdbCommandToString($"shell \"dumpsys package {packageName} | grep versionCode -F\"").Output;
|
||||
InstalledVersionCode = Utilities.StringUtilities.RemoveEverythingBeforeFirst(InstalledVersionCode, "versionCode=");
|
||||
InstalledVersionCode = Utilities.StringUtilities.RemoveEverythingAfterFirst(InstalledVersionCode, " ");
|
||||
ulong VersionInt = UInt64.Parse(Utilities.StringUtilities.KeepOnlyNumbers(InstalledVersionCode));
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}"))
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}", true);
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{packageName} v{VersionInt}.zip"))
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\{packageName} v{VersionInt}.zip");
|
||||
if (File.Exists($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\{GameName} v{VersionInt}.zip"))
|
||||
File.Delete($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\{GameName} v{VersionInt}.zip");
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
ChangeTitle("Extracting APK....");
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
ChangeTitle("APK Extracted to " + Properties.Settings.Default.MainDir + ". Opening folder now.");
|
||||
Process.Start("explorer.exe", Properties.Settings.Default.MainDir);
|
||||
ShowPrcOutput(output);
|
||||
Directory.CreateDirectory($"{Properties.Settings.Default.MainDir}\\{packageName}");
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\{packageName}\\HWID.txt", HWID);
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
output = Sideloader.getApk(GameName);
|
||||
});
|
||||
t1.IsBackground = true;
|
||||
t1.Start();
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
ChangeTitle("Extracting obb if it exists....");
|
||||
Thread t2 = new Thread(() =>
|
||||
{
|
||||
output += ADB.RunAdbCommandToString($"pull \"/sdcard/Android/obb/{packageName}\" \"{Properties.Settings.Default.MainDir}\\{packageName}\"");
|
||||
});
|
||||
t2.IsBackground = true;
|
||||
t2.Start();
|
||||
|
||||
while (t2.IsAlive)
|
||||
await Task.Delay(100);
|
||||
ChangeTitle("Zipping extracted application...");
|
||||
string cmd = $"7z a {packageName}v{VersionInt}.zip .\\{packageName}\\*";
|
||||
string path = $"{Properties.Settings.Default.MainDir}\\7z.exe";
|
||||
Thread t3 = new Thread(() =>
|
||||
{
|
||||
ADB.RunCommandToString(cmd, path);
|
||||
});
|
||||
t3.IsBackground = true;
|
||||
t3.Start();
|
||||
|
||||
while (t3.IsAlive)
|
||||
await Task.Delay(100);
|
||||
File.Move($"{Properties.Settings.Default.MainDir}\\{packageName}v{VersionInt}.zip", $"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\{GameName} v{VersionInt}.zip");
|
||||
FlexibleMessageBox.Show($"The app has been zipped and placed on your desktop as\n\n{GameName} v{VersionInt}.zip\n\nPlease upload this file to a free file hosting service like\n https://1fichier.com or https://mega.nz and share the link with a moderator.");
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}", true);
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
ChangeTitle("");
|
||||
isworking = false;
|
||||
}
|
||||
else MessageBox.Show("You must wait until each app is finished extracting to start another.");
|
||||
}
|
||||
|
||||
private async void uninstallAppButton_Click(object sender, EventArgs e)
|
||||
@@ -869,10 +922,12 @@ namespace AndroidSideloader
|
||||
|
||||
private async void Form1_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
DragDropLbl.Visible = false;
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
ADB.WakeDevice();
|
||||
ADB.DeviceID = GetDeviceID();
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
|
||||
Thread t1 = new Thread(() =>
|
||||
|
||||
{
|
||||
@@ -885,8 +940,9 @@ namespace AndroidSideloader
|
||||
string path = $"{dir}\\Install.txt";
|
||||
if (Directory.Exists(data))
|
||||
{
|
||||
Program.form.ChangeTitle($"Copying {data} to device...");
|
||||
output += ADB.CopyOBB(data);
|
||||
Program.form.ChangeTitle("");
|
||||
Program.form.ChangeTitle($"");
|
||||
string extension = Path.GetExtension(data);
|
||||
if (extension == ".apk")
|
||||
{
|
||||
@@ -901,6 +957,7 @@ namespace AndroidSideloader
|
||||
else
|
||||
ChangeTitle("Sideloading custom install.txt automatically.");
|
||||
output += Sideloader.RunADBCommandsFromFile(path);
|
||||
Logger.Log($"Sideloading {path}");
|
||||
if (output.Error.Contains("mkdir"))
|
||||
output.Error = "";
|
||||
if (output.Error.Contains("reserved"))
|
||||
@@ -912,15 +969,31 @@ namespace AndroidSideloader
|
||||
foreach (string file2 in files)
|
||||
{
|
||||
if (File.Exists(file2))
|
||||
{
|
||||
if (file2.EndsWith(".apk"))
|
||||
{
|
||||
ChangeTitle($"Installing apk... (If this hangs, uninstall app first then install again)");
|
||||
output += ADB.Sideload(file2);
|
||||
}
|
||||
|
||||
if (file2.EndsWith(".zip") && Properties.Settings.Default.BMBFchecked)
|
||||
{
|
||||
string datazip = file2;
|
||||
string zippath = Path.GetDirectoryName(data);
|
||||
datazip = datazip.Replace(zippath, "");
|
||||
datazip = Utilities.StringUtilities.RemoveEverythingAfterFirst(datazip, ".");
|
||||
datazip = datazip.Replace(".", "");
|
||||
string command2 = $"\"{Properties.Settings.Default.MainDir}\\7z.exe\" e \"{file2}\" -o\"{zippath}\\{datazip}\\\"";
|
||||
ADB.RunCommandToString(command2, file2);
|
||||
output += ADB.RunAdbCommandToString($"push \"{zippath}\\{datazip}\" /sdcard/ModData/com.beatgames.beatsaber/Mods/SongLoader/CustomLevels/");
|
||||
Directory.Delete($"{zippath}\\{datazip}", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
string[] folders = Directory.GetDirectories(data);
|
||||
foreach (string folder in folders)
|
||||
{
|
||||
|
||||
Program.form.ChangeTitle($"Copying {folder} to device...");
|
||||
output += ADB.CopyOBB(folder);
|
||||
Program.form.ChangeTitle("");
|
||||
Properties.Settings.Default.CurrPckg = dir;
|
||||
@@ -950,11 +1023,14 @@ namespace AndroidSideloader
|
||||
else
|
||||
|
||||
{
|
||||
ChangeTitle($"Installing {Path.GetFileName(data)}...");
|
||||
ChangeTitle($"Installing apk... (If this hangs, uninstall app first then install again)");
|
||||
output += ADB.Sideload(data);
|
||||
|
||||
|
||||
ChangeTitle("");
|
||||
}
|
||||
}
|
||||
//If obb is dragged and dropped alone onto Rookie, Rookie will recreate its obb folder automatically with this code.
|
||||
else if (extension == ".obb")
|
||||
{
|
||||
string filename = Path.GetFileName(data);
|
||||
@@ -969,7 +1045,21 @@ namespace AndroidSideloader
|
||||
Directory.Delete(foldername, true);
|
||||
ChangeTitle("");
|
||||
}
|
||||
// BMBF Zip extraction then push to BMBF song folder on Quest.
|
||||
else if (extension == ".zip" && Properties.Settings.Default.BMBFchecked)
|
||||
{
|
||||
string datazip = data;
|
||||
string zippath = Path.GetDirectoryName(data);
|
||||
datazip = datazip.Replace(zippath, "");
|
||||
datazip = Utilities.StringUtilities.RemoveEverythingAfterFirst(datazip, ".");
|
||||
datazip = datazip.Replace(".", "");
|
||||
|
||||
string command = $"\"{Properties.Settings.Default.MainDir}\\7z.exe\" e \"{data}\" -o\"{zippath}\\{datazip}\\\"";
|
||||
|
||||
ADB.RunCommandToString(command, data);
|
||||
output += ADB.RunAdbCommandToString($"push \"{zippath}\\{datazip}\" /sdcard/ModData/com.beatgames.beatsaber/Mods/SongLoader/CustomLevels/");
|
||||
Directory.Delete($"{zippath}\\{datazip}", true);
|
||||
}
|
||||
else if (extension == ".txt")
|
||||
{
|
||||
ChangeTitle("Sideloading custom install.txt automatically.");
|
||||
@@ -992,6 +1082,9 @@ namespace AndroidSideloader
|
||||
DragDropLbl.Visible = false;
|
||||
|
||||
ShowPrcOutput(output);
|
||||
listappsbtn();
|
||||
initListView();
|
||||
|
||||
}
|
||||
|
||||
private void Form1_DragEnter(object sender, DragEventArgs e)
|
||||
@@ -1005,8 +1098,10 @@ namespace AndroidSideloader
|
||||
private void Form1_DragLeave(object sender, EventArgs e)
|
||||
{
|
||||
DragDropLbl.Visible = false;
|
||||
DragDropLbl.Text = "";
|
||||
ChangeTitle("");
|
||||
}
|
||||
private void initListView()
|
||||
private async void initListView()
|
||||
{
|
||||
gamesListView.Items.Clear();
|
||||
gamesListView.Columns.Clear();
|
||||
@@ -1018,7 +1113,6 @@ namespace AndroidSideloader
|
||||
{
|
||||
gamesListView.Columns.Add(column, 150);
|
||||
}
|
||||
|
||||
List<ListViewItem> GameList = new List<ListViewItem>();
|
||||
foreach (string[] release in SideloaderRCLONE.games)
|
||||
{
|
||||
@@ -1068,6 +1162,73 @@ namespace AndroidSideloader
|
||||
else
|
||||
Game.BackColor = Color.FromArgb(102, 77, 0);
|
||||
}
|
||||
bool dontget = false;
|
||||
if (installedVersionInt > cloudVersionInt)
|
||||
{
|
||||
string RlsName = Sideloader.PackageNametoGameName(packagename);
|
||||
string GameName = Sideloader.gameNameToSimpleName(RlsName);
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\nouns\\blacklist.txt"))
|
||||
{
|
||||
string[] blacklist = File.ReadAllLines($"{Environment.CurrentDirectory}\\nouns\\blacklist.txt");
|
||||
|
||||
foreach (string blacklistpckg in blacklist)
|
||||
{
|
||||
if (packagename.Contains(blacklistpckg))
|
||||
{
|
||||
dontget = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!GameName.Contains("Beat Saber") && !dontget && !updatesnotified && SideloaderRCLONE.games.Count > 0)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show($"It seems you have a newer version of:\n\n{GameName}\n\nAll apps on Rookie are from donors, please share the updated files with us.\nThis is the only way to keep the apps up to date for everyone.\n\nNOTE: Rookie will only extract the APK/OBB which contain NO personal information whatsoever.", "Share clean files?", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
Sideloader.getApk(GameName);
|
||||
});
|
||||
t1.IsBackground = true;
|
||||
t1.Start();
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(1000);
|
||||
ChangeTitle("Extracting obb if it exists....");
|
||||
Thread t2 = new Thread(() =>
|
||||
{
|
||||
ADB.RunAdbCommandToString($"pull \"/sdcard/Android/obb/{packagename}\" \"{Properties.Settings.Default.MainDir}\\{packagename}\"");
|
||||
});
|
||||
t2.IsBackground = true;
|
||||
t2.Start();
|
||||
|
||||
while (t2.IsAlive)
|
||||
await Task.Delay(1000);
|
||||
ChangeTitle("Zipping extracted application...");
|
||||
string cmd = $"7z a {packagename}v{installedVersionInt}.zip .\\{packagename}\\*";
|
||||
string path = $"{Properties.Settings.Default.MainDir}\\7z.exe";
|
||||
|
||||
Thread t3 = new Thread(() =>
|
||||
{
|
||||
string HWID = SideloaderUtilities.UUID();
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\{packagename}\\HWID.txt", HWID);
|
||||
ADB.RunCommandToString(cmd, path);
|
||||
if (File.Exists($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\{GameName} v{installedVersionInt}.zip"))
|
||||
File.Delete($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\{GameName} v{installedVersionInt}.zip");
|
||||
File.Move($"{Properties.Settings.Default.MainDir}\\{packagename}v{installedVersionInt}.zip", $"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\{GameName} v{installedVersionInt}.zip");
|
||||
FlexibleMessageBox.Show($"The app has been zipped and placed on your desktop as\n\n{GameName} v{installedVersionInt}.zip\n\nPlease upload this file to a free file hosting service like\n https://1fichier.com or https://mega.nz \nThen share the link to the moderators listed in the\npinned message on Telegram.");
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packagename}", true);
|
||||
});
|
||||
t3.IsBackground = true;
|
||||
t3.Start();
|
||||
|
||||
while (t3.IsAlive)
|
||||
await Task.Delay(100);
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
ChangeTitle("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -1086,6 +1247,11 @@ namespace AndroidSideloader
|
||||
gamesListView.BeginUpdate();
|
||||
gamesListView.Items.AddRange(arr);
|
||||
gamesListView.EndUpdate();
|
||||
updatesnotified = true;
|
||||
if(gamesListView.Columns.Count > 0)
|
||||
{
|
||||
gamesListView.Columns[1].Width = 280;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1095,6 +1261,10 @@ namespace AndroidSideloader
|
||||
remotesList.Invoke(() => { index = remotesList.SelectedIndex; remotesList.Items.Clear(); });
|
||||
|
||||
string[] mirrors = RCLONE.runRcloneCommand("listremotes").Output.Split('\n');
|
||||
string item = "VRP-mirror07";
|
||||
string item2 = "VRP-mirror09";
|
||||
mirrors = mirrors.Where(val => val != item).ToArray();
|
||||
mirrors = mirrors.Where(val => val != item2).ToArray();
|
||||
|
||||
Logger.Log("Loaded following mirrors: ");
|
||||
int itemsCount = 0;
|
||||
@@ -1102,9 +1272,12 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (mirror.Contains("mirror"))
|
||||
{
|
||||
|
||||
|
||||
Logger.Log(mirror.Remove(mirror.Length - 1));
|
||||
remotesList.Invoke(() => { remotesList.Items.Add(mirror.Remove(mirror.Length - 1).Replace("VRP-mirror", "")); });
|
||||
itemsCount++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1197,15 +1370,12 @@ without him none of this would be possible
|
||||
Properties.Settings.Default.IPAddress = IPcmnd;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
FlexibleMessageBox.Show($"Connected! We can now automatically disable the Quest wifi chip from falling asleep. This makes it so Rookie can work wirelessly even if the device has entered \"sleep mode\". This setting is NOT permanent and resets upon Quest reboot, just like wireless ADB functionality.\n\nNOTE: This may cause the device battery to drain while it is in sleep mode at a very slightly increased rate. We recommend this setting for the majority of users for ease of use purposes. If you click NO you must keep your Quest connected to a charger or wake your device and then put it back on hold before using Rookie wirelessly. Do you want us to stop sleep mode from disabling wireless ADB?", "", MessageBoxButtons.YesNo);
|
||||
MessageBox.Show($"Connected! We can now automatically disable the Quest wifi chip from falling asleep. This makes it so Rookie can work wirelessly even if the device has entered \"sleep mode\". This setting is NOT permanent and resets upon Quest reboot, just like wireless ADB functionality.\n\nNOTE: This may cause the device battery to drain while it is in sleep mode at a very slightly increased rate. We recommend this setting for the majority of users for ease of use purposes. If you click NO you must keep your Quest connected to a charger or wake your device and then put it back on hold before using Rookie wirelessly. Do you want us to stop sleep mode from disabling wireless ADB?", "", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
else
|
||||
FlexibleMessageBox.Show("No device connected!");
|
||||
@@ -1215,7 +1385,7 @@ without him none of this would be possible
|
||||
private async void listApkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
|
||||
ChangeTitle("Refreshing connected devices, installed apps and update list...");
|
||||
if (isLoading)
|
||||
return;
|
||||
isLoading = true;
|
||||
@@ -1237,6 +1407,7 @@ without him none of this would be possible
|
||||
initListView();
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
isLoading = false;
|
||||
ChangeTitle("");
|
||||
}
|
||||
|
||||
private static readonly HttpClient client = new HttpClient();
|
||||
@@ -1246,7 +1417,7 @@ without him none of this would be possible
|
||||
private bool gamesAreDownloading = false;
|
||||
private List<string> gamesQueueList = new List<string>();
|
||||
private int quotaTries = 0;
|
||||
|
||||
public static bool timerticked = false;
|
||||
public void SwitchMirrors()
|
||||
{
|
||||
quotaTries++;
|
||||
@@ -1271,7 +1442,7 @@ without him none of this would be possible
|
||||
{
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
if (gamesListView.SelectedItems.Count == 0) return;
|
||||
|
||||
|
||||
string namebox = gamesListView.SelectedItems[0].ToString();
|
||||
string nameboxtranslated = Sideloader.gameNameToSimpleName(namebox);
|
||||
ChangeTitle($"Checking filesize of {nameboxtranslated}...");
|
||||
@@ -1440,9 +1611,9 @@ without him none of this would be possible
|
||||
if (gameDownloadOutput.Error.Length > 0)
|
||||
{
|
||||
string err = gameDownloadOutput.Error.ToLower();
|
||||
if (err.Contains("quota") && err.Contains("exceeded"))
|
||||
err += gameDownloadOutput.Output.ToLower();
|
||||
if (err.Contains("quota") && err.Contains("exceeded") || err.Contains("directory not found"))
|
||||
{
|
||||
FlexibleMessageBox.Show("The download Quota has been reached for this mirror, trying to switch mirrors...");
|
||||
quotaError = true;
|
||||
|
||||
|
||||
@@ -1492,56 +1663,45 @@ without him none of this would be possible
|
||||
await Task.Delay(100);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!isinstalltxt)
|
||||
{
|
||||
if (!isinstalltxt)
|
||||
if (extension == ".apk")
|
||||
{
|
||||
if (extension == ".apk")
|
||||
CurrAPK = file;
|
||||
CurrPCKG = packagename;
|
||||
System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
|
||||
t.Interval = 60000; // 60 seconds to fail
|
||||
t.Tick += new EventHandler(timer_Tick4);
|
||||
t.Start();
|
||||
Thread apkThread = new Thread(() =>
|
||||
{
|
||||
Thread apkThread = new Thread(() =>
|
||||
{
|
||||
output += ADB.Sideload(file, packagename);
|
||||
});
|
||||
Program.form.ChangeTitle($"Sideloading apk...");
|
||||
output += ADB.Sideload(file, packagename);
|
||||
});
|
||||
apkThread.Start();
|
||||
while (apkThread.IsAlive)
|
||||
await Task.Delay(100);
|
||||
t.Stop();
|
||||
}
|
||||
|
||||
apkThread.Start();
|
||||
while (apkThread.IsAlive)
|
||||
await Task.Delay(100);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Debug.WriteLine(wrDelimiter);
|
||||
string[] folders = Directory.GetDirectories(Environment.CurrentDirectory + "\\" + gameName);
|
||||
|
||||
foreach (string folder in folders)
|
||||
Debug.WriteLine(wrDelimiter);
|
||||
if (Directory.Exists($"{Environment.CurrentDirectory}\\{gameName}\\{packagename}"))
|
||||
{
|
||||
Thread obbThread = new Thread(() =>
|
||||
{
|
||||
ChangeTitle("Installing game obb " + gameName, false);
|
||||
string[] obbs = Directory.GetFiles(folder);
|
||||
|
||||
foreach (string currObb in obbs)
|
||||
{
|
||||
Thread obbThread = new Thread(() =>
|
||||
{
|
||||
string obbcontainingdir = Path.GetFileName(folder);
|
||||
ChangeTitle($"Copying {obbcontainingdir} obb to device...");
|
||||
output += ADB.CopyOBB(folder);
|
||||
Program.form.ChangeTitle("");
|
||||
});
|
||||
obbThread.IsBackground = true;
|
||||
obbThread.Start();
|
||||
ChangeTitle($"Copying {packagename} obb to device...");
|
||||
output += ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\{gameName}\\{packagename}\" \"/sdcard/Android/obb\"");
|
||||
Program.form.ChangeTitle("");
|
||||
});
|
||||
obbThread.IsBackground = true;
|
||||
obbThread.Start();
|
||||
|
||||
while (obbThread.IsAlive)
|
||||
await Task.Delay(100);
|
||||
}
|
||||
}
|
||||
while (obbThread.IsAlive)
|
||||
await Task.Delay(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (Properties.Settings.Default.deleteAllAfterInstall)
|
||||
{
|
||||
ChangeTitle("Deleting game files", false);
|
||||
@@ -1569,6 +1729,62 @@ without him none of this would be possible
|
||||
}
|
||||
}
|
||||
|
||||
private void timer_Tick4(object sender, EventArgs e)
|
||||
{
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
if (!timerticked)
|
||||
{
|
||||
timerticked = true;
|
||||
string[] blacklist = File.ReadAllLines($"{Environment.CurrentDirectory}\\installedPackages.json");
|
||||
bool isinstalled = false;
|
||||
foreach (string blacklistpckg in blacklist)
|
||||
{
|
||||
if (blacklistpckg.Contains(CurrPCKG))
|
||||
{
|
||||
isinstalled = true;
|
||||
}
|
||||
}
|
||||
if (isinstalled)
|
||||
{
|
||||
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show("In place upgrade has failed.\n\nThis means the app must be uninstalled first before updating.\nRookie can attempt to do this while retaining your savedata.\nWhile the vast majority of games can be backed up there are some exceptions\n(we don't know which apps can't be backed up as there is no list online)\n\nDo you want Rookie to uninstall and reinstall the app automatically?", "In place upgrade failed", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.OK)
|
||||
{
|
||||
ChangeTitle("Preforming reinstall, please wait...");
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
ADB.RunAdbCommandToString($"pull /sdcard/Android/data/{CurrPCKG} \"{Environment.CurrentDirectory}\"");
|
||||
ADB.RunAdbCommandToString($"shell pm uninstall {CurrPCKG}");
|
||||
output += ADB.RunAdbCommandToString($"install -g -r \"{CurrAPK}\"");
|
||||
ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\{CurrPCKG}\" /sdcard/Android/data/");
|
||||
listappsbtn();
|
||||
initListView();
|
||||
|
||||
timerticked = false;
|
||||
if (Directory.Exists($"{Environment.CurrentDirectory}\\{CurrPCKG}"))
|
||||
Directory.Delete($"{Environment.CurrentDirectory}\\{CurrPCKG}", true);
|
||||
ChangeTitle("");
|
||||
ShowPrcOutput(output);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show("Would you like to cancel the install? Press NO to keep waiting.", "Cancel install?", MessageBoxButtons.YesNo);
|
||||
if (dialogResult2 == DialogResult.Yes)
|
||||
{
|
||||
ChangeTitle("Stopping Install...");
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
RCLONE.killRclone();
|
||||
@@ -1750,6 +1966,12 @@ without him none of this would be possible
|
||||
label4.Visible = true;
|
||||
searchTextBox.Focus();
|
||||
}
|
||||
if (keyData == (Keys.Control | Keys.H))
|
||||
{
|
||||
string HWID = SideloaderUtilities.UUID();
|
||||
Clipboard.SetText(HWID);
|
||||
FlexibleMessageBox.Show($"Your unique HWID is:\n\n{HWID}\n\nThis has been automatically copied to your clipboard. Press CTRL+V in a message to send it.");
|
||||
}
|
||||
if (keyData == (Keys.Control | Keys.R))
|
||||
{
|
||||
ADBcommandbox.Visible = true;
|
||||
@@ -1845,14 +2067,20 @@ without him none of this would be possible
|
||||
|
||||
|
||||
if (keyData == (Keys.F12))
|
||||
{
|
||||
if (File.Exists($"{Properties.Settings.Default.CurrentCrashPath}"))
|
||||
{
|
||||
RCLONE.runRcloneCommand($"copy \"{Properties.Settings.Default.CurrentCrashPath}\" RSL-debuglogs:CrashLogs");
|
||||
FlexibleMessageBox.Show($"Your CrashLog has been copied to the server. Please mention your DebugLog ID ({Properties.Settings.Default.CurrentCrashName}) to the Mods (it has been automatically copied to your clipboard).");
|
||||
Clipboard.SetText(Properties.Settings.Default.CurrentCrashName);
|
||||
|
||||
}
|
||||
else
|
||||
FlexibleMessageBox.Show("No CrashLog found in Rookie directory.");
|
||||
else
|
||||
FlexibleMessageBox.Show("No CrashLog found in Rookie directory.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
|
||||
@@ -1864,7 +2092,8 @@ without him none of this would be possible
|
||||
System.Windows.Forms.KeyPressEventHandler(CheckEnter);
|
||||
if (gamesListView.Items.Count > 0)
|
||||
{
|
||||
ListViewItem foundItem = gamesListView.FindItemWithText(searchTextBox.Text, true, 0, true);
|
||||
ListViewItem foundItem = gamesListView.Items.Cast<ListViewItem>()
|
||||
.FirstOrDefault(i => i.Text.IndexOf(searchTextBox.Text, StringComparison.CurrentCultureIgnoreCase) >= 0);
|
||||
if (foundItem != null)
|
||||
{
|
||||
foundItem.Selected = true;
|
||||
@@ -1906,22 +2135,25 @@ without him none of this would be possible
|
||||
Clipboard.SetText(CurrentPackageName);
|
||||
keyheld2 = true;
|
||||
}
|
||||
if (!keyheld)
|
||||
|
||||
string ImagePath = "";
|
||||
if (File.Exists($"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.jpg"))
|
||||
ImagePath = $"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.jpg";
|
||||
else if (File.Exists($"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.png"))
|
||||
ImagePath = $"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.png";
|
||||
if (gamesPictureBox.BackgroundImage != null)
|
||||
gamesPictureBox.BackgroundImage.Dispose();
|
||||
if (File.Exists(ImagePath) && !keyheld)
|
||||
{
|
||||
string ImagePath = $"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.jpg";
|
||||
if (gamesPictureBox.BackgroundImage != null)
|
||||
gamesPictureBox.BackgroundImage.Dispose();
|
||||
if (File.Exists(ImagePath) && !keyheld)
|
||||
{
|
||||
gamesPictureBox.BackgroundImage = Image.FromFile(ImagePath);
|
||||
|
||||
}
|
||||
else
|
||||
gamesPictureBox.BackgroundImage = new Bitmap(367, 214);
|
||||
keyheld = true;
|
||||
|
||||
gamesPictureBox.BackgroundImage = Image.FromFile(ImagePath);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
gamesPictureBox.BackgroundImage = new Bitmap(367, 214);
|
||||
keyheld = true;
|
||||
|
||||
|
||||
|
||||
string NotePath = $"{SideloaderRCLONE.NotesFolder}\\{CurrentReleaseName}.txt";
|
||||
if (File.Exists(NotePath))
|
||||
notesRichTextBox.Text = File.ReadAllText(NotePath);
|
||||
|
||||
36
Properties/Settings.Designer.cs
generated
36
Properties/Settings.Designer.cs
generated
@@ -574,5 +574,41 @@ namespace AndroidSideloader.Properties {
|
||||
this["QblindOn"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool adbdebugwarned {
|
||||
get {
|
||||
return ((bool)(this["adbdebugwarned"]));
|
||||
}
|
||||
set {
|
||||
this["adbdebugwarned"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool nodevicemode {
|
||||
get {
|
||||
return ((bool)(this["nodevicemode"]));
|
||||
}
|
||||
set {
|
||||
this["nodevicemode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool BMBFchecked {
|
||||
get {
|
||||
return ((bool)(this["BMBFchecked"]));
|
||||
}
|
||||
set {
|
||||
this["BMBFchecked"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,5 +140,14 @@
|
||||
<Setting Name="QblindOn" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="adbdebugwarned" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="nodevicemode" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="BMBFchecked" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -90,7 +90,7 @@ namespace AndroidSideloader
|
||||
rclone.WaitForExit();
|
||||
|
||||
//if there is one of these errors, we switch the mirrors
|
||||
if (error.Contains("cannot fetch token") || error.Contains("authError") || (error.Contains("quota") || error.Contains("exceeded")))
|
||||
if (error.Contains("cannot fetch token") || error.Contains("authError") || (error.Contains("quota") || error.Contains("exceeded") || error.Contains("directory not found")))
|
||||
{
|
||||
string oldRemote = MainForm.currentRemote;
|
||||
try
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# androidsideloader
|
||||
|
||||
!IMPORTANT!
|
||||
This app may be buggy and have problems, I will recode it from scratch when MAUI will be released (This september) and a linux port will be available, making RSL cross-platform.
|
||||
|
||||
This app might get detected as malware, however both the sideloader and the sideloader launcher are open source
|
||||
|
||||
https://www.virustotal.com/gui/file/977105693610cf360fc29339b918e224180ba393ba05a64b6255af3845cbf376/relations
|
||||
@@ -15,4 +18,4 @@ Special thanks to
|
||||
- [rclone](https://rclone.org/) team for [rclone](https://rclone.org/) :D
|
||||
- [erike](https://stackoverflow.com/users/57611/erike) for the folder browser dialog code
|
||||
- Serge Weinstock for developing SergeUtils, which is used to search the combo box
|
||||
- https://www.c-sharpcorner.com/members/mike-gold2 for the scrollable message box
|
||||
- https://www.c-sharpcorner.com/members/mike-gold2 for the scrollable message box
|
||||
|
||||
78
SettingsForm.Designer.cs
generated
78
SettingsForm.Designer.cs
generated
@@ -46,6 +46,8 @@
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.CblindBox = new System.Windows.Forms.CheckBox();
|
||||
this.nodevicemodeBox = new System.Windows.Forms.CheckBox();
|
||||
this.bmbfBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkForUpdatesCheckBox
|
||||
@@ -55,7 +57,7 @@
|
||||
this.checkForUpdatesCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.checkForUpdatesCheckBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.checkForUpdatesCheckBox.Name = "checkForUpdatesCheckBox";
|
||||
this.checkForUpdatesCheckBox.Size = new System.Drawing.Size(142, 21);
|
||||
this.checkForUpdatesCheckBox.Size = new System.Drawing.Size(148, 22);
|
||||
this.checkForUpdatesCheckBox.TabIndex = 0;
|
||||
this.checkForUpdatesCheckBox.Text = "Check for updates";
|
||||
this.checkForUpdatesCheckBox.UseVisualStyleBackColor = true;
|
||||
@@ -70,7 +72,7 @@
|
||||
this.applyButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.applyButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.applyButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.applyButton.Location = new System.Drawing.Point(67, 230);
|
||||
this.applyButton.Location = new System.Drawing.Point(67, 280);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Size = new System.Drawing.Size(101, 31);
|
||||
this.applyButton.TabIndex = 5;
|
||||
@@ -85,7 +87,7 @@
|
||||
this.enableMessageBoxesCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.enableMessageBoxesCheckBox.Location = new System.Drawing.Point(12, 39);
|
||||
this.enableMessageBoxesCheckBox.Name = "enableMessageBoxesCheckBox";
|
||||
this.enableMessageBoxesCheckBox.Size = new System.Drawing.Size(293, 21);
|
||||
this.enableMessageBoxesCheckBox.Size = new System.Drawing.Size(309, 22);
|
||||
this.enableMessageBoxesCheckBox.TabIndex = 1;
|
||||
this.enableMessageBoxesCheckBox.Text = "Enable Message Boxes on task completed";
|
||||
this.enableMessageBoxesCheckBox.UseVisualStyleBackColor = true;
|
||||
@@ -100,7 +102,7 @@
|
||||
this.resetSettingsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.resetSettingsButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.resetSettingsButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.resetSettingsButton.Location = new System.Drawing.Point(174, 230);
|
||||
this.resetSettingsButton.Location = new System.Drawing.Point(174, 280);
|
||||
this.resetSettingsButton.Name = "resetSettingsButton";
|
||||
this.resetSettingsButton.Size = new System.Drawing.Size(101, 31);
|
||||
this.resetSettingsButton.TabIndex = 4;
|
||||
@@ -115,7 +117,7 @@
|
||||
this.deleteAfterInstallCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.deleteAfterInstallCheckBox.Location = new System.Drawing.Point(12, 65);
|
||||
this.deleteAfterInstallCheckBox.Name = "deleteAfterInstallCheckBox";
|
||||
this.deleteAfterInstallCheckBox.Size = new System.Drawing.Size(279, 21);
|
||||
this.deleteAfterInstallCheckBox.Size = new System.Drawing.Size(288, 22);
|
||||
this.deleteAfterInstallCheckBox.TabIndex = 3;
|
||||
this.deleteAfterInstallCheckBox.Text = "Delete games after download and install";
|
||||
this.deleteAfterInstallCheckBox.UseVisualStyleBackColor = true;
|
||||
@@ -128,7 +130,7 @@
|
||||
this.updateConfigCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.updateConfigCheckBox.Location = new System.Drawing.Point(12, 92);
|
||||
this.updateConfigCheckBox.Name = "updateConfigCheckBox";
|
||||
this.updateConfigCheckBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.updateConfigCheckBox.Size = new System.Drawing.Size(208, 22);
|
||||
this.updateConfigCheckBox.TabIndex = 6;
|
||||
this.updateConfigCheckBox.Text = "Update config automatically";
|
||||
this.updateConfigCheckBox.UseVisualStyleBackColor = true;
|
||||
@@ -141,7 +143,7 @@
|
||||
this.userJsonOnGameInstall.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.userJsonOnGameInstall.Location = new System.Drawing.Point(12, 119);
|
||||
this.userJsonOnGameInstall.Name = "userJsonOnGameInstall";
|
||||
this.userJsonOnGameInstall.Size = new System.Drawing.Size(233, 21);
|
||||
this.userJsonOnGameInstall.Size = new System.Drawing.Size(243, 22);
|
||||
this.userJsonOnGameInstall.TabIndex = 9;
|
||||
this.userJsonOnGameInstall.Text = "Push random user.json on install";
|
||||
this.userJsonOnGameInstall.UseVisualStyleBackColor = true;
|
||||
@@ -155,9 +157,9 @@
|
||||
this.BandwithTextbox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.BandwithTextbox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.BandwithTextbox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.BandwithTextbox.Location = new System.Drawing.Point(52, 198);
|
||||
this.BandwithTextbox.Location = new System.Drawing.Point(52, 248);
|
||||
this.BandwithTextbox.Name = "BandwithTextbox";
|
||||
this.BandwithTextbox.Size = new System.Drawing.Size(177, 23);
|
||||
this.BandwithTextbox.Size = new System.Drawing.Size(177, 24);
|
||||
this.BandwithTextbox.TabIndex = 11;
|
||||
//
|
||||
// label1
|
||||
@@ -165,9 +167,9 @@
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.label1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.label1.Location = new System.Drawing.Point(40, 175);
|
||||
this.label1.Location = new System.Drawing.Point(40, 225);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(235, 17);
|
||||
this.label1.Size = new System.Drawing.Size(245, 18);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "Download speed limiter, 0 to disable";
|
||||
//
|
||||
@@ -186,9 +188,9 @@
|
||||
"K",
|
||||
"M",
|
||||
"G"});
|
||||
this.BandwithComboBox.Location = new System.Drawing.Point(235, 198);
|
||||
this.BandwithComboBox.Location = new System.Drawing.Point(235, 248);
|
||||
this.BandwithComboBox.Name = "BandwithComboBox";
|
||||
this.BandwithComboBox.Size = new System.Drawing.Size(55, 24);
|
||||
this.BandwithComboBox.Size = new System.Drawing.Size(55, 26);
|
||||
this.BandwithComboBox.TabIndex = 13;
|
||||
//
|
||||
// DebugLogCopy
|
||||
@@ -200,7 +202,7 @@
|
||||
this.DebugLogCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.DebugLogCopy.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.DebugLogCopy.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.DebugLogCopy.Location = new System.Drawing.Point(29, 275);
|
||||
this.DebugLogCopy.Location = new System.Drawing.Point(29, 325);
|
||||
this.DebugLogCopy.Name = "DebugLogCopy";
|
||||
this.DebugLogCopy.Size = new System.Drawing.Size(285, 31);
|
||||
this.DebugLogCopy.TabIndex = 5;
|
||||
@@ -211,7 +213,7 @@
|
||||
// crashlogID
|
||||
//
|
||||
this.crashlogID.AutoSize = true;
|
||||
this.crashlogID.Location = new System.Drawing.Point(13, 406);
|
||||
this.crashlogID.Location = new System.Drawing.Point(13, 441);
|
||||
this.crashlogID.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.crashlogID.Name = "crashlogID";
|
||||
this.crashlogID.Size = new System.Drawing.Size(0, 13);
|
||||
@@ -226,7 +228,7 @@
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.button1.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.button1.Location = new System.Drawing.Point(29, 310);
|
||||
this.button1.Location = new System.Drawing.Point(29, 360);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(285, 31);
|
||||
this.button1.TabIndex = 5;
|
||||
@@ -237,7 +239,7 @@
|
||||
// debuglogID
|
||||
//
|
||||
this.debuglogID.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
|
||||
this.debuglogID.Location = new System.Drawing.Point(29, 386);
|
||||
this.debuglogID.Location = new System.Drawing.Point(29, 436);
|
||||
this.debuglogID.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.debuglogID.Name = "debuglogID";
|
||||
this.debuglogID.Size = new System.Drawing.Size(285, 48);
|
||||
@@ -252,7 +254,7 @@
|
||||
this.DebugID.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.DebugID.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold);
|
||||
this.DebugID.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.DebugID.Location = new System.Drawing.Point(29, 357);
|
||||
this.DebugID.Location = new System.Drawing.Point(29, 407);
|
||||
this.DebugID.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.DebugID.Name = "DebugID";
|
||||
this.DebugID.ReadOnly = true;
|
||||
@@ -265,7 +267,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
|
||||
this.label2.Location = new System.Drawing.Point(29, 457);
|
||||
this.label2.Location = new System.Drawing.Point(29, 507);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(284, 86);
|
||||
@@ -282,7 +284,7 @@
|
||||
this.textBox1.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Bold);
|
||||
this.textBox1.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.textBox1.Location = new System.Drawing.Point(29, 440);
|
||||
this.textBox1.Location = new System.Drawing.Point(29, 490);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
@@ -297,21 +299,47 @@
|
||||
this.CblindBox.AutoSize = true;
|
||||
this.CblindBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.CblindBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.CblindBox.Location = new System.Drawing.Point(12, 146);
|
||||
this.CblindBox.Location = new System.Drawing.Point(12, 145);
|
||||
this.CblindBox.Name = "CblindBox";
|
||||
this.CblindBox.Size = new System.Drawing.Size(175, 21);
|
||||
this.CblindBox.Size = new System.Drawing.Size(182, 22);
|
||||
this.CblindBox.TabIndex = 9;
|
||||
this.CblindBox.Text = "Enable colorblind mode";
|
||||
this.CblindBox.UseVisualStyleBackColor = true;
|
||||
this.CblindBox.CheckedChanged += new System.EventHandler(this.CblindBox_CheckedChanged);
|
||||
this.CblindBox.Click += new System.EventHandler(this.CblindBox_Click);
|
||||
//
|
||||
// nodevicemodeBox
|
||||
//
|
||||
this.nodevicemodeBox.AutoSize = true;
|
||||
this.nodevicemodeBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.nodevicemodeBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.nodevicemodeBox.Location = new System.Drawing.Point(12, 196);
|
||||
this.nodevicemodeBox.Name = "nodevicemodeBox";
|
||||
this.nodevicemodeBox.Size = new System.Drawing.Size(181, 22);
|
||||
this.nodevicemodeBox.TabIndex = 9;
|
||||
this.nodevicemodeBox.Text = "Enable no device mode";
|
||||
this.nodevicemodeBox.UseVisualStyleBackColor = true;
|
||||
this.nodevicemodeBox.CheckedChanged += new System.EventHandler(this.nodevicemodeBox_CheckedChanged);
|
||||
//
|
||||
// bmbfBox
|
||||
//
|
||||
this.bmbfBox.AutoSize = true;
|
||||
this.bmbfBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.bmbfBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.bmbfBox.Location = new System.Drawing.Point(12, 170);
|
||||
this.bmbfBox.Name = "bmbfBox";
|
||||
this.bmbfBox.Size = new System.Drawing.Size(281, 22);
|
||||
this.bmbfBox.TabIndex = 9;
|
||||
this.bmbfBox.Text = "Enable BMBF song zips drag and drop";
|
||||
this.bmbfBox.UseVisualStyleBackColor = true;
|
||||
this.bmbfBox.CheckedChanged += new System.EventHandler(this.bmbfBox_CheckedChanged);
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.ClientSize = new System.Drawing.Size(342, 535);
|
||||
this.ClientSize = new System.Drawing.Size(342, 606);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.DebugID);
|
||||
this.Controls.Add(this.crashlogID);
|
||||
@@ -320,6 +348,8 @@
|
||||
this.Controls.Add(this.BandwithComboBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.BandwithTextbox);
|
||||
this.Controls.Add(this.bmbfBox);
|
||||
this.Controls.Add(this.nodevicemodeBox);
|
||||
this.Controls.Add(this.CblindBox);
|
||||
this.Controls.Add(this.userJsonOnGameInstall);
|
||||
this.Controls.Add(this.updateConfigCheckBox);
|
||||
@@ -366,5 +396,7 @@
|
||||
public System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.CheckBox CblindBox;
|
||||
private System.Windows.Forms.CheckBox nodevicemodeBox;
|
||||
private System.Windows.Forms.CheckBox bmbfBox;
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,9 @@ namespace AndroidSideloader
|
||||
deleteAfterInstallCheckBox.Checked = Properties.Settings.Default.deleteAllAfterInstall;
|
||||
updateConfigCheckBox.Checked = Properties.Settings.Default.autoUpdateConfig;
|
||||
userJsonOnGameInstall.Checked = Properties.Settings.Default.userJsonOnGameInstall;
|
||||
nodevicemodeBox.Checked = Properties.Settings.Default.nodevicemode;
|
||||
bmbfBox.Checked = Properties.Settings.Default.BMBFchecked;
|
||||
|
||||
if (Properties.Settings.Default.BandwithLimit.Length > 1)
|
||||
{
|
||||
BandwithTextbox.Text = Properties.Settings.Default.BandwithLimit.Remove(Properties.Settings.Default.BandwithLimit.Length - 1);
|
||||
@@ -208,6 +211,18 @@ namespace AndroidSideloader
|
||||
if (CblindBox.Checked)
|
||||
MessageBox.Show("You must restart Rookie's Sideloader OR click Refresh Updates List for changes to take effect.\n\nNOTE: Colors in the legend at the top right of the main window of Rookie won't update until you restart the program.");
|
||||
}
|
||||
|
||||
private void nodevicemodeBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.nodevicemode = nodevicemodeBox.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void bmbfBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.BMBFchecked = nodevicemodeBox.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
{
|
||||
Program.form.ChangeTitle($"Running {cmd}");
|
||||
Logger.Log($"Logging command: {cmd} from file: {path}");
|
||||
output += ADB.RunCommandToString(cmd, path);
|
||||
ADB.RunCommandToString(cmd, path);
|
||||
}
|
||||
if (cmd.StartsWith("adb"))
|
||||
{
|
||||
@@ -170,6 +170,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
//Extracts apk from device, saves it by package name to sideloader folder
|
||||
public static ProcessOutput getApk(string GameName)
|
||||
{
|
||||
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
@@ -182,16 +183,18 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
apkPath = apkPath.Remove(apkPath.Length - 1);
|
||||
apkPath = apkPath.Remove(0, 8); //remove package:
|
||||
apkPath = apkPath.Remove(apkPath.Length - 1);
|
||||
|
||||
if (File.Exists($"{Properties.Settings.Default.ADBFolder}\\base.apk"))
|
||||
File.Delete($"{Properties.Settings.Default.ADBFolder}\\base.apk");
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk"))
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
output += ADB.RunAdbCommandToString("pull " + apkPath); //pull apk
|
||||
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}"))
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}", true);
|
||||
|
||||
Directory.CreateDirectory($"{Properties.Settings.Default.MainDir}\\{packageName}");
|
||||
|
||||
if (File.Exists(Properties.Settings.Default.MainDir + "\\" + packageName + ".apk"))
|
||||
File.Delete(Properties.Settings.Default.MainDir + "\\" + packageName + ".apk");
|
||||
|
||||
MessageBox.Show("APK is named" + packageName + ".apk. Opening containing folder now.");
|
||||
File.Move(Properties.Settings.Default.ADBFolder + "\\base.apk", Environment.CurrentDirectory + "\\" + packageName + ".apk");
|
||||
|
||||
File.Move($"{Properties.Settings.Default.ADBFolder}\\base.apk", $"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -229,6 +232,17 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string PackageNameToSimpleName(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Contains(game[SideloaderRCLONE.PackageNameIndex]))
|
||||
return game[SideloaderRCLONE.GameNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
|
||||
//Downloads the required files
|
||||
public static void downloadFiles()
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
gameProperties.Clear();
|
||||
games.Clear();
|
||||
string tempGameList = RCLONE.runRcloneCommand($"cat \"{remote}:{RcloneGamesFolder}/GameList.txt\"").Output;
|
||||
string tempGameList = RCLONE.runRcloneCommand($"cat \"{remote}:{RcloneGamesFolder}/GameList.txt\"").Output;
|
||||
if (MainForm.debugMode)
|
||||
File.WriteAllText("GamesList.txt", tempGameList);
|
||||
string gamePropertiesLine = Utilities.StringUtilities.RemoveEverythingAfterFirst(tempGameList, "\n");
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -13,5 +17,47 @@ namespace AndroidSideloader
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public static string UUID()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_Processor");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
sb.Append(queryObj["NumberOfCores"]);
|
||||
sb.Append(queryObj["ProcessorId"]);
|
||||
sb.Append(queryObj["Name"]);
|
||||
sb.Append(queryObj["SocketDesignation"]);
|
||||
}
|
||||
|
||||
searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_BIOS");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
sb.Append(queryObj["Manufacturer"]);
|
||||
sb.Append(queryObj["Name"]);
|
||||
sb.Append(queryObj["Version"]);
|
||||
|
||||
}
|
||||
|
||||
searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_BaseBoard");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
sb.Append(queryObj["Product"]);
|
||||
}
|
||||
|
||||
var bytes = Encoding.ASCII.GetBytes(sb.ToString());
|
||||
SHA256Managed sha = new SHA256Managed();
|
||||
|
||||
byte[] hash = sha.ComputeHash(bytes);
|
||||
|
||||
return BitConverter.ToString(hash).Replace("-", "");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AndroidSideloader
|
||||
private static string RawGitHubUrl;
|
||||
private static string GitHubUrl;
|
||||
|
||||
static readonly public string LocalVersion = "2.4.7";
|
||||
static readonly public string LocalVersion = "2.7.1";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
|
||||
1299
changelog.txt
1299
changelog.txt
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user