Compare commits
321 Commits
v2.21
...
v3.0-beta3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b770b30a8 | ||
|
|
e6d178cb2a | ||
|
|
c2f5b20e83 | ||
|
|
952251be35 | ||
|
|
385fe45d5d | ||
|
|
5db0ea301d | ||
|
|
523efba81c | ||
|
|
06dc91f130 | ||
|
|
252955da0a | ||
|
|
bd193c0d3f | ||
|
|
630fe98d31 | ||
|
|
0edc1deed0 | ||
|
|
6aa5c7baea | ||
|
|
da09545168 | ||
|
|
e07e9a09fa | ||
|
|
49deba5771 | ||
|
|
56947d0648 | ||
|
|
f2c285c141 | ||
|
|
b4b2a42db5 | ||
|
|
3195116fdf | ||
|
|
5df51cfcba | ||
|
|
a6525bf885 | ||
|
|
516618bd5a | ||
|
|
098c0a07a3 | ||
|
|
74fcf91572 | ||
|
|
1fb77054d1 | ||
|
|
c53db4bfc3 | ||
|
|
19909a82cb | ||
|
|
46196d128b | ||
|
|
f32bd15d98 | ||
|
|
ce4cd9ad46 | ||
|
|
d91c41b19c | ||
|
|
b38b8d1771 | ||
|
|
51941f2b73 | ||
|
|
5907e48018 | ||
|
|
8d4d2c9711 | ||
|
|
2c513ac7a8 | ||
|
|
9a17dd70c1 | ||
|
|
72d2db3fcc | ||
|
|
05cff37dd5 | ||
|
|
094d996249 | ||
|
|
c079f87fc6 | ||
|
|
288da1736e | ||
|
|
1160c24ad2 | ||
|
|
b2c8dd7d10 | ||
|
|
59674fe781 | ||
|
|
4b3b9b0558 | ||
|
|
866f8821a5 | ||
|
|
2b4ec9af38 | ||
|
|
6527a7ce31 | ||
|
|
aa9babfb18 | ||
|
|
6e9b8a19f5 | ||
|
|
62515ef59c | ||
|
|
1d3830e0b2 | ||
|
|
b62307310c | ||
|
|
6b2841cd0c | ||
|
|
a5b0e60acc | ||
|
|
c084cf9bfb | ||
|
|
005918aec0 | ||
|
|
5eaf7d5498 | ||
|
|
b3ca9bcd66 | ||
|
|
9aed677d3a | ||
|
|
1b66beb957 | ||
|
|
0e092df064 | ||
|
|
d80dc1c465 | ||
|
|
eed21ff56f | ||
|
|
1471b6bb0b | ||
|
|
f85d43d701 | ||
|
|
73f0a840e9 | ||
|
|
a09e469491 | ||
|
|
1db593c634 | ||
|
|
eb88d746c1 | ||
|
|
f7b5c94136 | ||
|
|
58aa1be7c5 | ||
|
|
426d99e519 | ||
|
|
8dec5d906a | ||
|
|
ae02b5c135 | ||
|
|
fe94119627 | ||
|
|
ee13bd08cb | ||
|
|
6a464ad3e7 | ||
|
|
f0d2a42ee3 | ||
|
|
b18ce51e4c | ||
|
|
535b3826f8 | ||
|
|
f1a884e200 | ||
|
|
072e2246a8 | ||
|
|
2c3ecf654a | ||
|
|
8699136d6d | ||
|
|
35803b7014 | ||
|
|
af358f8f99 | ||
|
|
138183798c | ||
|
|
8b3066cf99 | ||
|
|
91e21f59af | ||
|
|
85144e339f | ||
|
|
dbd9b145ea | ||
|
|
287181622d | ||
|
|
7f76bba866 | ||
|
|
4b791fe86b | ||
|
|
e17a582ae7 | ||
|
|
a271088e9a | ||
|
|
712d686559 | ||
|
|
481dd1b3e2 | ||
|
|
bd435094b6 | ||
|
|
16fa08d952 | ||
|
|
aa89953bf5 | ||
|
|
06cba22ad8 | ||
|
|
5923ce5ebc | ||
|
|
01eac1aec6 | ||
|
|
46189dcd43 | ||
|
|
1d9f304735 | ||
|
|
362b74e6a5 | ||
|
|
ee68e3f01b | ||
|
|
09e2de0390 | ||
|
|
12c9972b24 | ||
|
|
df32f93095 | ||
|
|
70d95b353e | ||
|
|
13eba3b3a6 | ||
|
|
1afdc9e7e3 | ||
|
|
38a113b5fb | ||
|
|
25f478e265 | ||
|
|
6a25662566 | ||
|
|
55af990071 | ||
|
|
927a4bbaa4 | ||
|
|
a101c621ec | ||
|
|
e25338e817 | ||
|
|
ecb1751cf5 | ||
|
|
aa54047d44 | ||
|
|
e02f82ee31 | ||
|
|
e8ff31d8d9 | ||
|
|
072805dd8f | ||
|
|
5626e0f5bc | ||
|
|
9fee7dc787 | ||
|
|
f86d97a96f | ||
|
|
6b0e8efadc | ||
|
|
7dba65c2cc | ||
|
|
497c670a98 | ||
|
|
d77790c6fa | ||
|
|
2c8311a0ff | ||
|
|
7bf5a8eaec | ||
|
|
bdffbc0757 | ||
|
|
c085eaa0a3 | ||
|
|
5580e0b29e | ||
|
|
3b174c6b4b | ||
|
|
d5acdde3c4 | ||
|
|
a1afa2ddee | ||
|
|
66d2c04834 | ||
|
|
81559b6a8f | ||
|
|
3d8c06e726 | ||
|
|
32d30df8a3 | ||
|
|
1b0746df6d | ||
|
|
a0b9a43e15 | ||
|
|
58f770cb6d | ||
|
|
0db624c3c6 | ||
|
|
79718d6ade | ||
|
|
2bcad00193 | ||
|
|
b22893eb54 | ||
|
|
9a8a97dbac | ||
|
|
9d1f05eab4 | ||
|
|
cb74756752 | ||
|
|
2ea00d12f3 | ||
|
|
b59a816a8b | ||
|
|
9363b2e26c | ||
|
|
0932602bbb | ||
|
|
85ad2c0097 | ||
|
|
19916388f2 | ||
|
|
d604107b7f | ||
|
|
f329965b3b | ||
|
|
c4e8c9048d | ||
|
|
da8e1d1183 | ||
|
|
b1bf8462da | ||
|
|
665a288af5 | ||
|
|
ec3e0ccf6d | ||
|
|
ea8e16c418 | ||
|
|
0b8ca66692 | ||
|
|
921b8340f0 | ||
|
|
873be55e78 | ||
|
|
772fa9a4df | ||
|
|
121d9e2c58 | ||
|
|
bca3488748 | ||
|
|
0af6a30347 | ||
|
|
d38d775cc9 | ||
|
|
5fc1151e90 | ||
|
|
737a61a3e9 | ||
|
|
4c8caec6bc | ||
|
|
9cccc9f0cc | ||
|
|
7cfee896b1 | ||
|
|
1dddf5c41a | ||
|
|
dc75776d3f | ||
|
|
018c30b73f | ||
|
|
0d8f776e8d | ||
|
|
df0a8b10d1 | ||
|
|
aeaec5465b | ||
|
|
8f15d65c5b | ||
|
|
7e19403aa9 | ||
|
|
bd18acc6a1 | ||
|
|
7046458db6 | ||
|
|
beab57218c | ||
|
|
46cd27c012 | ||
|
|
18123b2755 | ||
|
|
bbda0f33bd | ||
|
|
1edd364a33 | ||
|
|
89d6acb623 | ||
|
|
ff2f648379 | ||
|
|
0d9cf1cd91 | ||
|
|
40505f7628 | ||
|
|
3dee5372f2 | ||
|
|
6ee5b1014b | ||
|
|
189ba62385 | ||
|
|
b09e7ff2bc | ||
|
|
31492a0af3 | ||
|
|
f3d81252f0 | ||
|
|
e795b85ab8 | ||
|
|
3c4e4677d4 | ||
|
|
9f584da9ab | ||
|
|
a440848584 | ||
|
|
2301aa6425 | ||
|
|
263f2bf4c1 | ||
|
|
59d0c9a7ce | ||
|
|
19432a6362 | ||
|
|
97ec1cd385 | ||
|
|
162d60bbdc | ||
|
|
3bcdc7871d | ||
|
|
1f845a3682 | ||
|
|
a0a97a9451 | ||
|
|
c6261687b3 | ||
|
|
6deb311ecc | ||
|
|
0c6c8d5546 | ||
|
|
4e391c0e56 | ||
|
|
9788aa494a | ||
|
|
4f0cc7ab71 | ||
|
|
0bf9a00af2 | ||
|
|
fa9baced7a | ||
|
|
1f51f41954 | ||
|
|
bc8599315e | ||
|
|
1c49a33651 | ||
|
|
13ab8a74d6 | ||
|
|
51155f105c | ||
|
|
af46aa7c78 | ||
|
|
a7d46753aa | ||
|
|
161f257985 | ||
|
|
223de0ba4a | ||
|
|
2fa9c34e98 | ||
|
|
5d5011e409 | ||
|
|
fd4357bdad | ||
|
|
1a073f9661 | ||
|
|
e73c204d1c | ||
|
|
80cb0b46bc | ||
|
|
680a5f256a | ||
|
|
2b02d04219 | ||
|
|
7a61d73e65 | ||
|
|
972116ee96 | ||
|
|
d780607363 | ||
|
|
236004aef9 | ||
|
|
07bc133096 | ||
|
|
50427ef2d3 | ||
|
|
63eef42ca0 | ||
|
|
8723b195df | ||
|
|
ae86b47268 | ||
|
|
9901a0d770 | ||
|
|
da48607154 | ||
|
|
35f3a80eb1 | ||
|
|
0da1bf7a3b | ||
|
|
c027fca339 | ||
|
|
5ac98f5ef8 | ||
|
|
3cb0cca801 | ||
|
|
b4fd4c76a0 | ||
|
|
ecf19115c6 | ||
|
|
d475936bbb | ||
|
|
c404d69b54 | ||
|
|
6edc9cf7e9 | ||
|
|
71d89284f1 | ||
|
|
39473ba15c | ||
|
|
3f3fa3dc11 | ||
|
|
3f06099d38 | ||
|
|
450cf282aa | ||
|
|
804c452f6d | ||
|
|
c576f62d28 | ||
|
|
73651723dd | ||
|
|
82cc713372 | ||
|
|
6d0788268d | ||
|
|
c183cb6d7a | ||
|
|
3b83db0177 | ||
|
|
03f4dcb687 | ||
|
|
9415daba07 | ||
|
|
553571027d | ||
|
|
273ddda076 | ||
|
|
3c8f08a380 | ||
|
|
b5ac8175dc | ||
|
|
d765a9b6eb | ||
|
|
409afd8eac | ||
|
|
d7640d4c5d | ||
|
|
3828da4864 | ||
|
|
a45f7db85c | ||
|
|
df6a9e9286 | ||
|
|
c516f80dc1 | ||
|
|
0ef2f296f5 | ||
|
|
48597983e2 | ||
|
|
a6a4a057fe | ||
|
|
c7cfc07c9b | ||
|
|
51ad390584 | ||
|
|
b4c7795d25 | ||
|
|
78ef2a0355 | ||
|
|
4530424dec | ||
|
|
3543314ff0 | ||
|
|
4ade18bd31 | ||
|
|
951a899705 | ||
|
|
6d678a2e6e | ||
|
|
8b912e68ee | ||
|
|
8059834e91 | ||
|
|
4349603f51 | ||
|
|
160f254e57 | ||
|
|
45497396d1 | ||
|
|
d041ea6b6a | ||
|
|
a2e601ced0 | ||
|
|
35277ca729 | ||
|
|
f3ffe5d037 | ||
|
|
38866547ec | ||
|
|
f4cd9b3b9f | ||
|
|
e687c3f2ba | ||
|
|
97cbfdea4e | ||
|
|
af97e8aef1 | ||
|
|
2094ecb0ba |
216
ADB.cs
@@ -1,4 +1,5 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using AndroidSideloader.Utilities;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@@ -8,16 +9,20 @@ namespace AndroidSideloader
|
||||
{
|
||||
internal class ADB
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
private static readonly Process adb = new Process();
|
||||
public static string adbFolderPath = $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools";
|
||||
public static string adbFilePath = adbFolderPath + "\\adb.exe";
|
||||
public static string adbFolderPath = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools");
|
||||
public static string adbFilePath = Path.Combine(adbFolderPath, "adb.exe");
|
||||
public static string DeviceID = "";
|
||||
public static string package = "";
|
||||
public static ProcessOutput RunAdbCommandToString(string command)
|
||||
{
|
||||
Properties.Settings.Default.ADBFolder = adbFolderPath;
|
||||
Properties.Settings.Default.ADBPath = adbFilePath;
|
||||
Properties.Settings.Default.Save();
|
||||
// Replacing "adb" from command if the user added it
|
||||
command = command.Replace("adb", "");
|
||||
|
||||
settings.ADBFolder = adbFolderPath;
|
||||
settings.ADBPath = adbFilePath;
|
||||
settings.Save();
|
||||
if (DeviceID.Length > 1)
|
||||
{
|
||||
command = $" -s {DeviceID} {command}";
|
||||
@@ -65,7 +70,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && !Properties.Settings.Default.adbdebugwarned)
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && !settings.AdbDebugWarned)
|
||||
{
|
||||
ADBDebugWarning();
|
||||
}
|
||||
@@ -122,19 +127,19 @@ namespace AndroidSideloader
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
adb.WaitForExit();
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
else if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
adb.Kill();
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && Properties.Settings.Default.adbdebugwarned)
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && settings.AdbDebugWarned)
|
||||
{
|
||||
ADBDebugWarning();
|
||||
}
|
||||
@@ -151,66 +156,82 @@ namespace AndroidSideloader
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
}
|
||||
|
||||
_ = Logger.Log($"Running command: {logcmd}");
|
||||
adb.StartInfo.FileName = $@"{Path.GetPathRoot(Environment.SystemDirectory)}\Windows\System32\cmd.exe";
|
||||
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 = Path.GetDirectoryName(path);
|
||||
_ = adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
adb.StandardInput.Close();
|
||||
|
||||
|
||||
string output = "";
|
||||
string error = "";
|
||||
Logger.Log($"Running command: {logcmd}");
|
||||
|
||||
try
|
||||
{
|
||||
output += adb.StandardOutput.ReadToEnd();
|
||||
error += adb.StandardError.ReadToEnd();
|
||||
}
|
||||
catch { }
|
||||
if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
if (!graceful)
|
||||
using (var adb = new Process())
|
||||
{
|
||||
adb.Kill();
|
||||
adb.WaitForExit();
|
||||
adb.StartInfo.FileName = $@"{Path.GetPathRoot(Environment.SystemDirectory)}\Windows\System32\cmd.exe";
|
||||
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 = Path.GetDirectoryName(path);
|
||||
|
||||
adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
adb.StandardInput.Close();
|
||||
|
||||
string output = adb.StandardOutput.ReadToEnd();
|
||||
string error = adb.StandardError.ReadToEnd();
|
||||
|
||||
if (command.Contains("connect"))
|
||||
{
|
||||
bool graceful = adb.WaitForExit(3000);
|
||||
if (!graceful)
|
||||
{
|
||||
adb.Kill();
|
||||
adb.WaitForExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
adb.WaitForExit();
|
||||
}
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && settings.AdbDebugWarned)
|
||||
{
|
||||
ADBDebugWarning();
|
||||
}
|
||||
|
||||
if (error.Contains("Asset path") && error.Contains("is neither a directory nor file"))
|
||||
{
|
||||
Logger.Log("Asset path error detected. The specified path might not exist or be accessible.", LogLevel.WARNING);
|
||||
// You might want to handle this specific error differently
|
||||
}
|
||||
|
||||
Logger.Log(output);
|
||||
Logger.Log(error, LogLevel.ERROR);
|
||||
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
}
|
||||
|
||||
if (error.Contains("ADB_VENDOR_KEYS") && Properties.Settings.Default.adbdebugwarned)
|
||||
catch (Exception ex)
|
||||
{
|
||||
ADBDebugWarning();
|
||||
Logger.Log($"Error in RunCommandToString: {ex.Message}", LogLevel.ERROR);
|
||||
return new ProcessOutput("", $"Exception occurred: {ex.Message}");
|
||||
}
|
||||
_ = Logger.Log(output);
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
|
||||
public static void ADBDebugWarning()
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "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)
|
||||
Program.form.Invoke(() =>
|
||||
{
|
||||
Properties.Settings.Default.adbdebugwarned = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "On your headset, click on the Notifications Bell, and then select the USB Detected notification to enable Connections.", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
// settings.adbdebugwarned = true;
|
||||
settings.Save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static ProcessOutput UninstallPackage(string package)
|
||||
{
|
||||
WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
output += RunAdbCommandToString($"shell pm uninstall {package}");
|
||||
return output;
|
||||
@@ -222,7 +243,6 @@ namespace AndroidSideloader
|
||||
long usedSize = 0;
|
||||
long freeSize = 0;
|
||||
|
||||
WakeDevice();
|
||||
string[] output = RunAdbCommandToString("shell df").Output.Split('\n');
|
||||
|
||||
foreach (string currLine in output)
|
||||
@@ -244,21 +264,8 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
public static bool wirelessadbON;
|
||||
|
||||
public static void WakeDevice()
|
||||
{
|
||||
_ = RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.IPAddress) && !Properties.Settings.Default.Wired)
|
||||
{
|
||||
_ = RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static ProcessOutput Sideload(string path, string packagename = "")
|
||||
{
|
||||
|
||||
WakeDevice();
|
||||
ProcessOutput ret = new ProcessOutput();
|
||||
ret += RunAdbCommandToString($"install -g \"{path}\"");
|
||||
string out2 = ret.Output + ret.Error;
|
||||
@@ -266,24 +273,19 @@ namespace AndroidSideloader
|
||||
{
|
||||
_ = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
_ = Logger.Log(out2);
|
||||
if (out2.Contains("offline") && !Properties.Settings.Default.nodevicemode)
|
||||
if (out2.Contains("offline") && !settings.NodeviceMode)
|
||||
{
|
||||
DialogResult dialogResult2 = FlexibleMessageBox.Show(Program.form, "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($"signatures do not match previously") || 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;
|
||||
ADB.WakeDevice();
|
||||
if (!Properties.Settings.Default.AutoReinstall)
|
||||
if (!settings.AutoReinstall)
|
||||
{
|
||||
bool cancelClicked = false;
|
||||
|
||||
if (!Properties.Settings.Default.AutoReinstall)
|
||||
if (!settings.AutoReinstall)
|
||||
{
|
||||
Program.form.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
@@ -300,62 +302,25 @@ namespace AndroidSideloader
|
||||
Program.form.changeTitle("Performing reinstall, please wait...");
|
||||
_ = ADB.RunAdbCommandToString("kill-server");
|
||||
_ = ADB.RunAdbCommandToString("devices");
|
||||
_ = ADB.RunAdbCommandToString($"pull /sdcard/Android/data/{MainForm.CurrPCKG} \"{Environment.CurrentDirectory}\"");
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Android/data/{MainForm.CurrPCKG}\" \"{Environment.CurrentDirectory}\"");
|
||||
Program.form.changeTitle("Uninstalling game...");
|
||||
_ = Sideloader.UninstallGame(MainForm.CurrPCKG);
|
||||
Program.form.changeTitle("Reinstalling Game");
|
||||
ret += ADB.RunAdbCommandToString($"install -g \"{path}\"");
|
||||
_ = ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}\" /sdcard/Android/data/");
|
||||
if (Directory.Exists($"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}"))
|
||||
string directoryToDelete = Path.Combine(Environment.CurrentDirectory, MainForm.CurrPCKG);
|
||||
if (Directory.Exists(directoryToDelete))
|
||||
{
|
||||
Directory.Delete($"{Environment.CurrentDirectory}\\{MainForm.CurrPCKG}", true);
|
||||
if (directoryToDelete != Environment.CurrentDirectory)
|
||||
{
|
||||
Directory.Delete(directoryToDelete, true);
|
||||
}
|
||||
}
|
||||
|
||||
Program.form.changeTitle(" \n\n");
|
||||
Program.form.changeTitle(" \n\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
string gamenameforQU = Sideloader.PackageNametoGameName(packagename);
|
||||
if (Properties.Settings.Default.QUturnedon)
|
||||
{
|
||||
if (gamenameforQU.Contains("-QU") || path.Contains("-QU"))
|
||||
{
|
||||
string gameName = packagename;
|
||||
packagename = Sideloader.gameNameToPackageName(gameName);
|
||||
|
||||
Program.form.changeTitle("Pushing Custom QU S3 Config.JSON.");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{packagename}"))
|
||||
{
|
||||
_ = RunAdbCommandToString($"shell mkdir /sdcard/android/data/{packagename}");
|
||||
}
|
||||
|
||||
if (!Directory.Exists($"/sdcard/android/data/{packagename}/private"))
|
||||
{
|
||||
_ = RunAdbCommandToString($"shell mkdir /sdcard/android/data/{packagename}/private");
|
||||
}
|
||||
|
||||
Random r = new Random();
|
||||
int x = r.Next(999999999);
|
||||
int y = r.Next(9999999);
|
||||
|
||||
long sum = (y * (long)1000000000) + x;
|
||||
|
||||
int x2 = r.Next(999999999);
|
||||
int y2 = r.Next(9999999);
|
||||
|
||||
long sum2 = (y2 * (long)1000000000) + x2;
|
||||
ADB.WakeDevice();
|
||||
Properties.Settings.Default.QUStringF = $"{{\"user_id\":{sum},\"app_id\":\"{sum2}\",";
|
||||
Properties.Settings.Default.Save();
|
||||
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\config.json", boff);
|
||||
string blank = "";
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\delete_settings", blank);
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\delete_settings\" /sdcard/android/data/{packagename}/private/delete_settings");
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\config.json\" /sdcard/android/data/{packagename}/private/config.json");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Program.form.changeTitle(string.Empty);
|
||||
return ret;
|
||||
@@ -363,12 +328,11 @@ namespace AndroidSideloader
|
||||
|
||||
public static ProcessOutput CopyOBB(string path)
|
||||
{
|
||||
WakeDevice();
|
||||
|
||||
string folder = Path.GetFileName(path);
|
||||
return !folder.Contains("+") && !folder.Contains("_") && folder.Contains(".")
|
||||
? RunAdbCommandToString($"push \"{path}\" \"/sdcard/Android/obb\"")
|
||||
: new ProcessOutput();
|
||||
string lastFolder = Path.GetFileName(path);
|
||||
return folder.Contains(".")
|
||||
? RunAdbCommandToString($"shell rm -rf \"/sdcard/Android/obb/{lastFolder}\" && mkdir \"/sdcard/Android/obb/{lastFolder}\"") + RunAdbCommandToString($"push \"{path}\" \"/sdcard/Android/obb\"")
|
||||
: new ProcessOutput("No OBB Folder found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
72
AddDefenderExceptions.ps1
Normal file
@@ -0,0 +1,72 @@
|
||||
# Run this script as Administrator
|
||||
# powershell -ExecutionPolicy Bypass -File "C:\RSL\Rookie\AddDefenderExceptions.ps1"
|
||||
|
||||
|
||||
################################################################
|
||||
## Auto Elevate to Admin if not running as admin
|
||||
################################################################
|
||||
|
||||
# Get the ID and security principal of the current user account
|
||||
$WindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$WindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal ($WindowsID)
|
||||
|
||||
# Get the security principal for the Administrator role
|
||||
$AdminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
|
||||
|
||||
# Check to see if we are currently running "as Administrator"
|
||||
if ($WindowsPrincipal.IsInRole($AdminRole)) {
|
||||
# We are running "as Administrator" - so change the title and background color to indicate this
|
||||
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + " (Elevated)"
|
||||
$Host.UI.RawUI.BackgroundColor = "DarkBlue"
|
||||
Clear-Host
|
||||
} else {
|
||||
# We are not running "as Administrator" - so relaunch as administrator
|
||||
# Create a new process object that starts PowerShell
|
||||
$NewProcess = New-Object System.Diagnostics.ProcessStartInfo "PowerShell";
|
||||
# Specify the current script path and name as a parameter
|
||||
$NewProcess.Arguments = $myInvocation.MyCommand.Definition;
|
||||
# Indicate that the process should be elevated
|
||||
$NewProcess.Verb = "runas";
|
||||
# Start the new process
|
||||
[System.Diagnostics.Process]::Start($NewProcess);
|
||||
# Exit from the current unelevated process
|
||||
exit
|
||||
}
|
||||
|
||||
write-host "Run this script from the directory root with which Rookie will be run"
|
||||
start-sleep -s 5
|
||||
|
||||
$paths = @(
|
||||
"$PSScriptRoot", # Replaces 'C:\RSL' with the script's root directory
|
||||
"$PSScriptRoot\rclone",
|
||||
"$PSScriptRoot\Sideloader Launcher.exe",
|
||||
"$PSScriptRoot\AndroidSideloader*.exe",
|
||||
"$PSScriptRoot\rclone\rclone.exe"
|
||||
)
|
||||
|
||||
foreach ($path in $paths) {
|
||||
try {
|
||||
Add-MpPreference -ExclusionPath $Path -ErrorAction Stop
|
||||
Write-Host "Successfully added exclusion for: $path" -ForegroundColor Green
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to add exclusion for: $path " -ForegroundColor Red
|
||||
Write-Host "Error: $_" -ForegroundColor Red
|
||||
Start-Sleep -s 5
|
||||
Pause
|
||||
}
|
||||
}
|
||||
|
||||
# Verify the exclusions
|
||||
Write-Host "`nCurrent exclusions:" -ForegroundColor Cyan
|
||||
$defenderPreferences = Get-MpPreference
|
||||
$paths | ForEach-Object {
|
||||
if ($defenderPreferences.ExclusionPath -contains $_) {
|
||||
Write-Host "$_ is already excluded from Defender."
|
||||
} else {
|
||||
Write-Host "$_ is NOT excluded from Defender."
|
||||
}
|
||||
}
|
||||
Pause
|
||||
|
||||
Start-Sleep -s 5
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
|
||||
<Import Project="packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -136,37 +136,43 @@
|
||||
<ManifestKeyFile>AndroidSideloader_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
|
||||
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.1072.54, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.1072.54\lib\net45\Microsoft.Web.WebView2.Core.dll</HintPath>
|
||||
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.2478.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.2478.35\lib\net45\Microsoft.Web.WebView2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.1072.54, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.1072.54\lib\net45\Microsoft.Web.WebView2.WinForms.dll</HintPath>
|
||||
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.2478.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.2478.35\lib\net45\Microsoft.Web.WebView2.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.1072.54, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.1072.54\lib\net45\Microsoft.Web.WebView2.Wpf.dll</HintPath>
|
||||
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.2478.35, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.WebView2.1.0.2478.35\lib\net45\Microsoft.Web.WebView2.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SergeUtils">
|
||||
<HintPath>.\SergeUtils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll</HintPath>
|
||||
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Drawing.dll</HintPath>
|
||||
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
@@ -188,6 +194,8 @@
|
||||
</Compile>
|
||||
<Compile Include="FlexibleMessageBox.cs" />
|
||||
<Compile Include="RoundedRectangleF.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Sideloader\GetDependencies.cs" />
|
||||
<Compile Include="Splash.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -242,11 +250,13 @@
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SelectFolder.cs" />
|
||||
<Compile Include="Utilities\SettingsManager.cs" />
|
||||
<Compile Include="Utilities\StringUtilities.cs" />
|
||||
<Compile Include="Utilities\GeneralUtilities.cs" />
|
||||
<Compile Include="Utilities\UpdateGameData.cs" />
|
||||
<Compile Include="Utilities\UploadGame.cs" />
|
||||
<Compile Include="Utilities\Zip.cs" />
|
||||
<Compile Include="Utilities\Metrics.cs" />
|
||||
<EmbeddedResource Include="DonorsListView.resx">
|
||||
<DependentUpon>DonorsListView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -285,6 +295,7 @@
|
||||
<DependentUpon>UsernameForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="codenames" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\DataSources\AndroidSideloader.Properties.Resources.datasource" />
|
||||
<None Include="Properties\DataSources\AndroidSideloader.Properties.Settings.datasource" />
|
||||
@@ -300,6 +311,12 @@
|
||||
<None Include="Rookie Offline.cmd">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="CleanupInstall.cmd">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="AddDefenderExceptions.ps1">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="version" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -309,12 +326,13 @@
|
||||
<Content Include="changelog.txt" />
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="ChangelogHistory.txt" />
|
||||
<Content Include="Resources\pattern_cubes-1_1_1_0-0_0_1__000000_212121.png" />
|
||||
<Content Include="Resources\pattern_herringbone-2_1_3_0-0_90_1__000000_1c1c1c.png" />
|
||||
<Content Include="Resources\splash.jpg" />
|
||||
<None Include="Resources\battery11.png" />
|
||||
<Content Include="Resources\pattern_cubes.png" />
|
||||
<Content Include="Resources\pattern_herringbone.png" />
|
||||
<Content Include="Resources\splashimage.png" />
|
||||
<Content Include="Resources\splashimage_deps.png" />
|
||||
<Content Include="Resources\splashimage_offline.png" />
|
||||
<Content Include="Resources\splashimage_rclone.png" />
|
||||
<None Include="Resources\battery.png" />
|
||||
<None Include="Resources\battery1.png" />
|
||||
<None Include="Resources\ajax-loader.gif" />
|
||||
<None Include="Resources\SearchGlass.PNG" />
|
||||
</ItemGroup>
|
||||
@@ -332,14 +350,14 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="packages\Fody.6.0.0\build\Fody.targets" Condition="Exists('packages\Fody.6.0.0\build\Fody.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\Fody.6.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.0.0\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets'))" />
|
||||
<Error Condition="!Exists('packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets'))" />
|
||||
<Error Condition="!Exists('packages\Fody.6.8.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.8.1\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
@@ -349,5 +367,7 @@
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets" Condition="Exists('packages\Microsoft.Web.WebView2.1.0.1072.54\build\Microsoft.Web.WebView2.targets')" />
|
||||
<Import Project="packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets" Condition="Exists('packages\Microsoft.Web.WebView2.1.0.2478.35\build\Microsoft.Web.WebView2.targets')" />
|
||||
<Import Project="packages\Fody.6.8.1\build\Fody.targets" Condition="Exists('packages\Fody.6.8.1\build\Fody.targets')" />
|
||||
<Import Project="packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
|
||||
</Project>
|
||||
525
App.config
@@ -1,270 +1,255 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AndroidSideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<section name="AndroidADB.Sideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<AndroidSideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="enableMessageBoxes" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="firstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="deleteAllAfterInstall" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="autoUpdateConfig" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="userJsonOnGameInstall" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CallUpgrade" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="FontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 11.25pt</value>
|
||||
</setting>
|
||||
<setting name="BackPicturePath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SpoofGames" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="BigFontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 14pt</value>
|
||||
</setting>
|
||||
<setting name="ResignAPKs" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="IPAddress" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="InstalledApps" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ADBPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUsett" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="QuChecked" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUhz" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUres" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUy" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUx" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="QUname" serializeAs="String">
|
||||
<value>Change Me</value>
|
||||
</setting>
|
||||
<setting name="QUString" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="MainDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUStringF" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="delsh" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrPckg" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ADBFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="WirelessADB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrentGamename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="PackageNameToCB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="EnterKeyInstall" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="DownUpHeld" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrentLogPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CurrentLogName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CurrentCrashPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CurrentCrashName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUturnedon" 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>True</value>
|
||||
</setting>
|
||||
<setting name="GamesList" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UploadedGameList" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="GlobalUsername" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastTimeShared" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="AutoReinstall" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="NonAppPackages" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="LastLaunch" serializeAs="String">
|
||||
<value>04/20/1969 16:20:00</value>
|
||||
</setting>
|
||||
<setting name="SubmittedUpdates" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ListUpped" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="LastLaunch2" serializeAs="String">
|
||||
<value>04/20/1969 16:20:00</value>
|
||||
</setting>
|
||||
<setting name="Wired" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="FontColor" serializeAs="String">
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="ComboBoxColor" serializeAs="String">
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="SubButtonColor" serializeAs="String">
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="TextBoxColor" serializeAs="String">
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="ButtonColor" serializeAs="String">
|
||||
<value>Black</value>
|
||||
</setting>
|
||||
<setting name="BackColor" serializeAs="String">
|
||||
<value>1, 1, 1</value>
|
||||
</setting>
|
||||
<setting name="AppPackages" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="TrailersOn" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="downloadDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="customDownloadDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="customBackupDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="backupDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="singleThreadMode" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="virtualFilesystemCompatibility" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="enableMessageBoxes" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="logRclone" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="firstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="deleteAllAfterInstall" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="autoUpdateConfig" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="userJsonOnGameInstall" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CallUpgrade" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="BackColor" serializeAs="String">
|
||||
<value>45, 45, 45</value>
|
||||
</setting>
|
||||
<setting name="PanelColor" serializeAs="String">
|
||||
<value>ActiveCaptionText</value>
|
||||
</setting>
|
||||
<setting name="ButtonColor" serializeAs="String">
|
||||
<value>ActiveCaptionText</value>
|
||||
</setting>
|
||||
<setting name="SubButtonColor" serializeAs="String">
|
||||
<value>64, 64, 64</value>
|
||||
</setting>
|
||||
<setting name="TextBoxColor" serializeAs="String">
|
||||
<value>45, 45, 45</value>
|
||||
</setting>
|
||||
<setting name="ComboBoxColor" serializeAs="String">
|
||||
<value>45, 45, 45</value>
|
||||
</setting>
|
||||
<setting name="FontColor" serializeAs="String">
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="FontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 11.25pt</value>
|
||||
</setting>
|
||||
<setting name="BackPicturePath" serializeAs="String">
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SpoofGames" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidADB.Sideloader.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AndroidSideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<section name="AndroidADB.Sideloader.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<AndroidSideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="enableMessageBoxes" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="firstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="deleteAllAfterInstall" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="autoUpdateConfig" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="userJsonOnGameInstall" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CallUpgrade" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="FontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 11.25pt</value>
|
||||
</setting>
|
||||
<setting name="BackPicturePath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SpoofGames" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="BigFontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 14pt</value>
|
||||
</setting>
|
||||
<setting name="ResignAPKs" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="IPAddress" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="InstalledApps" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ADBPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="MainDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="delsh" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrPckg" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ADBFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="WirelessADB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrentGamename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="PackageNameToCB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="DownUpHeld" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrentLogPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CurrentLogName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CurrentCrashPath" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="CurrentCrashName" serializeAs="String">
|
||||
<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>True</value>
|
||||
</setting>
|
||||
<setting name="GamesList" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UploadedGameList" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="GlobalUsername" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastTimeShared" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="AutoReinstall" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="NonAppPackages" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="LastLaunch" serializeAs="String">
|
||||
<value>04/20/1969 16:20:00</value>
|
||||
</setting>
|
||||
<setting name="SubmittedUpdates" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ListUpped" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="LastLaunch2" serializeAs="String">
|
||||
<value>04/20/1969 16:20:00</value>
|
||||
</setting>
|
||||
<setting name="Wired" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="FontColor" serializeAs="String">
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="ComboBoxColor" serializeAs="String">
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="SubButtonColor" serializeAs="String">
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="TextBoxColor" serializeAs="String">
|
||||
<value>25, 25, 25</value>
|
||||
</setting>
|
||||
<setting name="ButtonColor" serializeAs="String">
|
||||
<value>Black</value>
|
||||
</setting>
|
||||
<setting name="BackColor" serializeAs="String">
|
||||
<value>1, 1, 1</value>
|
||||
</setting>
|
||||
<setting name="AppPackages" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="TrailersOn" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="downloadDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="customDownloadDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="customBackupDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="backupDir" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="singleThreadMode" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="virtualFilesystemCompatibility" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UpdateSettings" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="UUID" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="createPubMirrorFile" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="useDownloadedFiles" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="bandwidthLimit" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="enableMessageBoxes" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="logRclone" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="firstRun" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="deleteAllAfterInstall" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="autoUpdateConfig" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="singleThreadMode" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="userJsonOnGameInstall" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CallUpgrade" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="BackColor" serializeAs="String">
|
||||
<value>45, 45, 45</value>
|
||||
</setting>
|
||||
<setting name="PanelColor" serializeAs="String">
|
||||
<value>ActiveCaptionText</value>
|
||||
</setting>
|
||||
<setting name="ButtonColor" serializeAs="String">
|
||||
<value>ActiveCaptionText</value>
|
||||
</setting>
|
||||
<setting name="SubButtonColor" serializeAs="String">
|
||||
<value>64, 64, 64</value>
|
||||
</setting>
|
||||
<setting name="TextBoxColor" serializeAs="String">
|
||||
<value>45, 45, 45</value>
|
||||
</setting>
|
||||
<setting name="ComboBoxColor" serializeAs="String">
|
||||
<value>45, 45, 45</value>
|
||||
</setting>
|
||||
<setting name="FontColor" serializeAs="String">
|
||||
<value>White</value>
|
||||
</setting>
|
||||
<setting name="FontStyle" serializeAs="String">
|
||||
<value>Microsoft Sans Serif, 11.25pt</value>
|
||||
</setting>
|
||||
<setting name="BackPicturePath" serializeAs="String">
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SpoofGames" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidADB.Sideloader.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -1,4 +1,200 @@
|
||||
RSL 2.20
|
||||
RSL 2.34
|
||||
|
||||
- Feature: Allow users to favorite games (right click on game)
|
||||
- Fix: Release Notes not showing with trailers enabled
|
||||
- Fix: Correct Discord Invite link on connection error
|
||||
|
||||
RSL 2.33
|
||||
|
||||
- Feature: Allow users to cancel backups
|
||||
- QoL: Lower ADB Version
|
||||
- QoL: Revert Add saving the ColumnWidths, Window Sizes/Position
|
||||
|
||||
RSL 2.32
|
||||
|
||||
- Feature: Allow switching between Public and Private configs
|
||||
- Feature: Switch to Offline Mode when unable to connect
|
||||
- Feature: Save window position and column sizes
|
||||
- Fix: An issue that caused the VIP mirror to fail
|
||||
- Fix: Make video window flexible
|
||||
- Fix: Issue when saving Settings file
|
||||
- Fix: Change Label position to avoid overlapping Queue/Notes windows
|
||||
- Chore: Bump aapt/aapt2/adb to latest
|
||||
- Chore: Bump 7z to 24.09
|
||||
- Chore: Add AddDefenderExceptions.ps1
|
||||
|
||||
RSL 2.31.1
|
||||
|
||||
- Fix: Filtering when Adult Content is shown
|
||||
|
||||
RSL 2.31
|
||||
|
||||
- Feature: Preserve download.config during rclone update
|
||||
- Feature: Added toggle to hide Adult Content
|
||||
- Fix: Changed settings configuration to settings.json
|
||||
- Fix: Always create debuglog on first-launch
|
||||
- Fix: Fixed numeric sorting
|
||||
- Fix: Wrap ADB commands to prevent crash
|
||||
- Fix: Update CleanupInstall to use UserProfile instead of Username
|
||||
- Fix: Fix to OBB pushing when Dragging and Dropping
|
||||
- Fix: Do not show ShowPrcOutput messages when "Enable Message Boxes" is disabled
|
||||
- Fix: Add safeguard to prevent deletion of current directory
|
||||
- Fix: Case insensitive package matching
|
||||
- Chore: Add build batch
|
||||
- Chore: Bump rclone to 1.68.2 (from 1.67.0)
|
||||
|
||||
RSL 2.30
|
||||
|
||||
- Feature: Added Download Metrics
|
||||
-- Upon downloading a game, Rookie will attempt to log the download count with our server
|
||||
-- No additional data is collected except for the Package Name and VersionCode of the Game being downloaded
|
||||
- Feature: Added Downloads column to Gamelist
|
||||
-- Downloads counts are updated nightly
|
||||
- Feature: Added "Send Command" button to ADB Commands prompt (Enter still works)
|
||||
- Feature: Small changes to how the Upload Mirror works
|
||||
-- Rookie can now verify game uploads are successful
|
||||
- Feature: Add Cleanup Install script
|
||||
- Feature: Added additional Splashes to indicate loading status
|
||||
- Feature: Added setting to supress Re-Download prompt
|
||||
- Feature: Added "Disable Checking for New Apps" argument (for Testers sanity)
|
||||
- Feature: Added Bandwidth Limiter to Settings
|
||||
- Fix: Fixes for using Sponsored Mirrors
|
||||
-- Eliminated downloading of vrp.download.config from the wiki
|
||||
-- Fixed issue where Rookie would check for the mirror before it was loaded in
|
||||
- Fix: Add quotes around all ADB path commands
|
||||
- Fix: Public Mirror label not displaying
|
||||
- Fix: Allow spaces when setting username
|
||||
- Fix: Prevent Rookie from constantly prompting for the Public Config
|
||||
- Fix: Fixed issue where the Game List doesn't copy/export properly
|
||||
- Fix: Fixed issue where dropping an entire folder doesn't read the install.txt
|
||||
- Chore: Remove random mirror picker (no longer used)
|
||||
- Chore: Changed unable to connect message
|
||||
- Chore: Remove Offline Mode popup
|
||||
- Chore: Remove unused dependencies
|
||||
- Chore: Rename random assets
|
||||
- Chore: Bump rclone to 1.67.0 (from 1.66.0)
|
||||
|
||||
RSL 2.29
|
||||
|
||||
- Feature: Prompt to keep temporary files and allow resuming of downloads
|
||||
- Feature: Fixed progress bar jump-back
|
||||
- Feature: Added part tracking during download
|
||||
- Fix: Change UUID calculation. No longer uses system details (caused virus flags)
|
||||
- Fix: Added rclone fallback download
|
||||
- Fix: Additional connect/startup troubleshooting steps
|
||||
- Chore: Bump rclone to 1.66.0
|
||||
|
||||
RSL 2.29.1
|
||||
- Fix: Correct initilization sequence to prevent crashes
|
||||
- Chore: bump package dependencies
|
||||
- Chore: Fix initial GUI name
|
||||
|
||||
RSL 2.29.2
|
||||
- Fix: Fix for failed uploads using new rclone version
|
||||
- Fix: Changes to initilization order to prevent crashes and display splash
|
||||
|
||||
|
||||
RSL 2.28
|
||||
|
||||
- Feature: Added ADB-Backup Support. Now supports creation and restoration of .AB backups
|
||||
- Feature: Added OS-Updates toggle to ADB-Command window (Click to toggle on/off)
|
||||
- Feature: Allow ADB Commands with or without prefix
|
||||
- Fix: Left-Navigation UI Reorganization
|
||||
- Fix: 7zip crash, empty device list crash
|
||||
- Fix: Update settings after version update
|
||||
- Fix: Crashlog naming
|
||||
- Fix: Disable searchbar until Rookie is fully loaded
|
||||
- Chore: Add public mirror as a default to Git-downloads
|
||||
- Chore: Readme Updates
|
||||
- Chore: Code Cleanup / Beautification
|
||||
- Chore: Change from _adb dependency files to dependencies.7z file
|
||||
- Chore: Remove unused files
|
||||
- Chore: Default to Single-Thread Mode
|
||||
|
||||
RSL 2.27.2
|
||||
|
||||
- Feature: Searchbar can now also search release names
|
||||
- Feature: Rookie will now download 64 bit 7zip binaries for faster extractions (when possible)
|
||||
- Fix: 7zip error handler
|
||||
- Fix: Crash when downloading without enough space
|
||||
- Fix: Rookie will no longer deny game donations.
|
||||
- Chore: Cleanup code
|
||||
|
||||
RSL 2.26
|
||||
|
||||
- Feature: Top right update labels will now show the amount of games per state
|
||||
- Feature: Open Download Dir and Run ADB Commands added to left sidebar
|
||||
- Feature: Toggle sideloading button
|
||||
- Feature: Show progress of extraction
|
||||
- Fix: Crash when failing to write to the StoredIP.txt
|
||||
- Fix: Drag and drop + Copy OBB for Quest 3 users
|
||||
- Fix: Properly kill off WebView2 instances
|
||||
- Fix: Added parents to dialogs
|
||||
- Fix: GUI freezing on launch
|
||||
- Fix: No Device Mode output
|
||||
- Chore: Make missing space message more user-friendly
|
||||
- Chore: Remove QU Settings
|
||||
|
||||
RSL 2.25.1
|
||||
|
||||
- Fix: Device not authorized prompt showing up after authorization.
|
||||
|
||||
RSL 2.25
|
||||
|
||||
- Fix: Fix to unauthorized device bug
|
||||
- Chore: Update Wiki URL
|
||||
|
||||
|
||||
RSL 2.24
|
||||
|
||||
- Feature: Added "Open Download" and "Open Backup" Directory buttons to Settings Menu
|
||||
- Fix: OBB Pushes for Quest 3 Devices
|
||||
- Fix: Crash when attempting to backup
|
||||
- Fix: Searchbar Anchoring when resizing
|
||||
- Fix: Remove instances where OBBs are pushed multiple times
|
||||
- Fix: Additional Logging and Startup Optimizations
|
||||
|
||||
RSL 2.23
|
||||
|
||||
- Fix: Rookie should now only prompt for newer versions of all games
|
||||
- Fix: Crash when attempting to delete invalid directories or files
|
||||
- Feature: Enable Maximize Button
|
||||
|
||||
RSL 2.22
|
||||
|
||||
- Fix: Crash on failed extractions.
|
||||
- Fix: Trailers controls not functioning properly.
|
||||
- Fix: No Device Mode having the wrong output message.
|
||||
- Chore: Remove ADB.WakeDevice() due to being non-functional.
|
||||
- Chore: Make changeTitlebarToDevice less prone to crashes and more robust.
|
||||
|
||||
RSL 2.21
|
||||
|
||||
- Feature: Search now shows all results found
|
||||
- Feature: Add --no-rclone-updating launch flag
|
||||
- Feature: Add lime-green color to various after download jobs
|
||||
- Feature: Update Sideloader Launcher to check for Rookie
|
||||
- Feature: Add the ability to download into virtual filesystems (Settings)
|
||||
- Feature: Add stacktrace & innerexception to crashlog
|
||||
- Feature: Add CallerInfo to debuglog
|
||||
- Feature: Rookie will now tell the user when there's a running RCLONE Job
|
||||
- Fix: Rookie will no longer repeat "All tasks finished." in No Device Mode
|
||||
- Fix: Rookie should no longer delete the entire OBB/Data folder when uninstalling a game
|
||||
- Fix: Rookie should no longer freeze on the OBB Comparison
|
||||
- Fix: The free disclaimer on launch is no longer broken
|
||||
- Fix: Use new process for every ADB command
|
||||
- Fix: Do not delete game files on an OBB Mismatch anymore
|
||||
- Fix: Change all hardcoded C:/ paths to dynamically grab the system drive for further compatability
|
||||
- Fix: Rookie should now function on 32 Bit again
|
||||
- Fix: Fix crash on failed extraction
|
||||
- Chore: Update quota message to be up to date
|
||||
- Chore: Code rewrites for logging system, obb comparison, updater
|
||||
- Chore: Several redundant code removals
|
||||
- Chore: Change Install w/ Enter Key to Download w/ Enter Key
|
||||
- Chore: Several code cleanups & optimizations
|
||||
~ Chax
|
||||
|
||||
RSL 2.20
|
||||
|
||||
- Feature: Added manual IP on Wireless ADB
|
||||
- Feature: Rookie will now delete old OBB Folders before pushing new obb folders
|
||||
|
||||
26
CleanupInstall.cmd
Normal file
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
echo Killing AndroidSideloader processes...
|
||||
taskkill /F /FI "IMAGENAME eq AndroidSideloader*" /T
|
||||
|
||||
echo Killing adb.exe processes...
|
||||
taskkill /F /FI "IMAGENAME eq adb.exe" /T
|
||||
|
||||
|
||||
set "folderPath=%userprofile%\AppData\Local\Rookie.WTF\"
|
||||
echo Deleting contents of %folderPath%...
|
||||
for /D %%i in ("%folderPath%\*") do (
|
||||
rd /s /q "%%i"
|
||||
)
|
||||
del /q "%folderPath%\*.*"
|
||||
|
||||
|
||||
set "folderPath=%userprofile%\AppData\Local\Rookie.AndroidSideloader\"
|
||||
echo Deleting contents of %folderPath%...
|
||||
for /D %%i in ("%folderPath%\*") do (
|
||||
rd /s /q "%%i"
|
||||
)
|
||||
del /q "%folderPath%\*.*"
|
||||
|
||||
echo Cleanup complete.
|
||||
pause
|
||||
@@ -2,90 +2,102 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
/// <summary>
|
||||
/// This class is an implementation of the 'IComparer' interface.
|
||||
/// A custom comparer for sorting ListView columns, implementing the 'IComparer' interface.
|
||||
/// </summary>
|
||||
public class ListViewColumnSorter : IComparer
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Case insensitive comparer object
|
||||
/// Case-insensitive comparer object used for comparing strings.
|
||||
/// </summary>
|
||||
private readonly CaseInsensitiveComparer ObjectCompare;
|
||||
|
||||
/// <summary>
|
||||
/// Class constructor. Initializes various elements
|
||||
/// Initializes a new instance of the ListViewColumnSorter class and sets default sorting parameters.
|
||||
/// </summary>
|
||||
public ListViewColumnSorter()
|
||||
{
|
||||
// Initialize the column to '0'
|
||||
// Default column index for sorting
|
||||
SortColumn = 0;
|
||||
|
||||
// Initialize the sort order to 'none'
|
||||
// Default sorting order
|
||||
Order = SortOrder.Ascending;
|
||||
|
||||
// Initialize the CaseInsensitiveComparer object
|
||||
// Initialize the case-insensitive comparer
|
||||
ObjectCompare = new CaseInsensitiveComparer();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is inherited from the IComparer interface. It compares the two objects passed using a case insensitive comparison.
|
||||
/// Compares two ListViewItem objects based on the specified column index and sorting order.
|
||||
/// </summary>
|
||||
/// <param name="x">First object to be compared</param>
|
||||
/// <param name="y">Second object to be compared</param>
|
||||
/// <returns>The result of the comparison. "0" if equal, negative if 'x' is less than 'y' and positive if 'x' is greater than 'y'</returns>
|
||||
/// <param name="x">First ListViewItem object to compare.</param>
|
||||
/// <param name="y">Second ListViewItem object to compare.</param>
|
||||
/// <returns>
|
||||
/// A signed integer indicating the relative values of x and y:
|
||||
/// "0" if equal, a negative number if x is less than y, and a positive number if x is greater than y.
|
||||
/// </returns>
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
int compareResult;
|
||||
ListViewItem listviewX, listviewY;
|
||||
ListViewItem listviewX = (ListViewItem)x;
|
||||
ListViewItem listviewY = (ListViewItem)y;
|
||||
|
||||
// Cast the objects to be compared to ListViewItem objects
|
||||
listviewX = (ListViewItem)x;
|
||||
listviewY = (ListViewItem)y;
|
||||
if (SortColumn == 5)
|
||||
// Determine if the column requires numeric comparison
|
||||
if (SortColumn == 3 || SortColumn == 5) // Numeric columns: VersionCodeIndex, VersionNameIndex
|
||||
{
|
||||
try
|
||||
{
|
||||
int yNum = int.Parse(cleanNumber(listviewY.SubItems[SortColumn].Text));
|
||||
int xNum = int.Parse(cleanNumber(listviewX.SubItems[SortColumn].Text));
|
||||
return xNum == yNum ? 0 : xNum > yNum && Order == SortOrder.Ascending ? -1 : 1;
|
||||
// Parse and compare numeric values directly
|
||||
int xNum = ParseNumber(listviewX.SubItems[SortColumn].Text);
|
||||
int yNum = ParseNumber(listviewY.SubItems[SortColumn].Text);
|
||||
|
||||
// Compare numerically
|
||||
compareResult = xNum.CompareTo(yNum);
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
// Fallback to string comparison if parsing fails
|
||||
compareResult = ObjectCompare.Compare(listviewX.SubItems[SortColumn].Text, listviewY.SubItems[SortColumn].Text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default to string comparison for non-numeric columns
|
||||
compareResult = ObjectCompare.Compare(listviewX.SubItems[SortColumn].Text, listviewY.SubItems[SortColumn].Text);
|
||||
}
|
||||
|
||||
// Compare the two items
|
||||
compareResult = ObjectCompare.Compare(listviewX.SubItems[SortColumn].Text, listviewY.SubItems[SortColumn].Text);
|
||||
|
||||
// Calculate correct return value based on object comparison
|
||||
// Determine the return value based on the specified sort order
|
||||
if (Order == SortOrder.Ascending)
|
||||
{
|
||||
// Ascending sort is selected, return normal result of compare operation
|
||||
return compareResult;
|
||||
}
|
||||
else if (Order == SortOrder.Descending)
|
||||
{
|
||||
// Descending sort is selected, return negative result of compare operation
|
||||
return -compareResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return '0' to indicate they are equal
|
||||
return 0;
|
||||
return 0; // Indicate equality
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
|
||||
/// Parses a numeric value from a string for accurate numeric comparison.
|
||||
/// </summary>
|
||||
public int SortColumn { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the order of sorting to apply (for example, 'Ascending' or 'Descending').
|
||||
/// </summary>
|
||||
public SortOrder Order { set; get; }
|
||||
|
||||
private string cleanNumber(string number)
|
||||
/// <param name="text">The string representation of the number.</param>
|
||||
/// <returns>The parsed integer value; returns 0 if parsing fails.</returns>
|
||||
private int ParseNumber(string text)
|
||||
{
|
||||
return number.Substring(0);
|
||||
// Directly attempt to parse the string as an integer
|
||||
return int.TryParse(text, out int result) ? result : 0;
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the column to be sorted (default is '0').
|
||||
/// </summary>
|
||||
public int SortColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the order of sorting (Ascending or Descending).
|
||||
/// </summary>
|
||||
public SortOrder Order { get; set; }
|
||||
}
|
||||
|
||||
64
DonorsListView.Designer.cs
generated
@@ -49,9 +49,9 @@ namespace AndroidSideloader
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// DonorsListView
|
||||
//
|
||||
//
|
||||
this.DonorsListView.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
|
||||
this.DonorsListView.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.DonorsListView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
@@ -84,34 +84,34 @@ namespace AndroidSideloader
|
||||
this.DonorsListView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.DonorsListView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.DonorsListView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// GameNameIndex
|
||||
//
|
||||
//
|
||||
this.GameNameIndex.Text = "Game Name";
|
||||
this.GameNameIndex.Width = 219;
|
||||
//
|
||||
//
|
||||
// PackageNameIndex
|
||||
//
|
||||
//
|
||||
this.PackageNameIndex.DisplayIndex = 2;
|
||||
this.PackageNameIndex.Text = "Packagename";
|
||||
this.PackageNameIndex.Width = 0;
|
||||
//
|
||||
//
|
||||
// VersionCodeIndex
|
||||
//
|
||||
//
|
||||
this.VersionCodeIndex.DisplayIndex = 3;
|
||||
this.VersionCodeIndex.Text = "Version";
|
||||
this.VersionCodeIndex.Width = 113;
|
||||
//
|
||||
//
|
||||
// UpdateOrNew
|
||||
//
|
||||
//
|
||||
this.UpdateOrNew.DisplayIndex = 1;
|
||||
this.UpdateOrNew.Text = "Donation Type";
|
||||
this.UpdateOrNew.Width = 85;
|
||||
//
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
//
|
||||
this.panel1.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.panel1.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.panel1.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes;
|
||||
this.panel1.Controls.Add(this.SkipButton);
|
||||
this.panel1.Controls.Add(this.DonateButton);
|
||||
this.panel1.Controls.Add(this.panel2);
|
||||
@@ -128,9 +128,9 @@ namespace AndroidSideloader
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// SkipButton
|
||||
//
|
||||
//
|
||||
this.SkipButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.SkipButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.SkipButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -154,9 +154,9 @@ namespace AndroidSideloader
|
||||
this.SkipButton.Text = "Skip";
|
||||
this.SkipButton.Transparency = false;
|
||||
this.SkipButton.Click += new System.EventHandler(this.SkipButton_Click);
|
||||
//
|
||||
//
|
||||
// DonateButton
|
||||
//
|
||||
//
|
||||
this.DonateButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.DonateButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.DonateButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@@ -180,9 +180,9 @@ namespace AndroidSideloader
|
||||
this.DonateButton.Text = "Automatically share selected apps";
|
||||
this.DonateButton.Transparency = false;
|
||||
this.DonateButton.Click += new System.EventHandler(this.DonateButton_Click);
|
||||
//
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
//
|
||||
this.panel2.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.panel2.Controls.Add(this.DonorsListView);
|
||||
this.panel2.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
@@ -190,9 +190,9 @@ namespace AndroidSideloader
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(430, 230);
|
||||
this.panel2.TabIndex = 2;
|
||||
//
|
||||
//
|
||||
// bothdet
|
||||
//
|
||||
//
|
||||
this.bothdet.AutoSize = true;
|
||||
this.bothdet.BackColor = System.Drawing.Color.Transparent;
|
||||
this.bothdet.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold);
|
||||
@@ -206,9 +206,9 @@ namespace AndroidSideloader
|
||||
this.bothdet.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.bothdet.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.bothdet.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// newdet
|
||||
//
|
||||
//
|
||||
this.newdet.AutoSize = true;
|
||||
this.newdet.BackColor = System.Drawing.Color.Transparent;
|
||||
this.newdet.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold);
|
||||
@@ -222,9 +222,9 @@ namespace AndroidSideloader
|
||||
this.newdet.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.newdet.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.newdet.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// upddet
|
||||
//
|
||||
//
|
||||
this.upddet.AutoSize = true;
|
||||
this.upddet.BackColor = System.Drawing.Color.Transparent;
|
||||
this.upddet.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold);
|
||||
@@ -238,9 +238,9 @@ namespace AndroidSideloader
|
||||
this.upddet.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.upddet.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.upddet.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// label2
|
||||
//
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
@@ -253,9 +253,9 @@ namespace AndroidSideloader
|
||||
this.label2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.label2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.label2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// TimerDesc
|
||||
//
|
||||
//
|
||||
this.TimerDesc.AutoSize = true;
|
||||
this.TimerDesc.BackColor = System.Drawing.Color.Transparent;
|
||||
this.TimerDesc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
@@ -268,9 +268,9 @@ namespace AndroidSideloader
|
||||
this.TimerDesc.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseDown);
|
||||
this.TimerDesc.MouseMove += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseMove);
|
||||
this.TimerDesc.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DonorsListViewForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// DonorsListViewForm
|
||||
//
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Gainsboro;
|
||||
@@ -311,4 +311,4 @@ namespace AndroidSideloader
|
||||
private RoundButton DonateButton;
|
||||
private RoundButton SkipButton;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3211
MainForm.Designer.cs
generated
3542
MainForm.cs
@@ -118,66 +118,72 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="speedLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>219, 17</value>
|
||||
<value>798, 17</value>
|
||||
</metadata>
|
||||
<metadata name="etaLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>178, 56</value>
|
||||
</metadata>
|
||||
<metadata name="EnterInstallBox_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>514, 95</value>
|
||||
<value>428, 56</value>
|
||||
</metadata>
|
||||
<metadata name="startsideloadbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<value>596, 17</value>
|
||||
</metadata>
|
||||
<metadata name="devicesbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 95</value>
|
||||
<value>539, 95</value>
|
||||
</metadata>
|
||||
<metadata name="obbcopybutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
<value>359, 95</value>
|
||||
</metadata>
|
||||
<metadata name="backupadbbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="backupbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1454, 56</value>
|
||||
<value>187, 95</value>
|
||||
</metadata>
|
||||
<metadata name="restorebutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1284, 56</value>
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="getApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1113, 56</value>
|
||||
<value>1363, 56</value>
|
||||
</metadata>
|
||||
<metadata name="uninstallAppButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>913, 56</value>
|
||||
<value>1163, 56</value>
|
||||
</metadata>
|
||||
<metadata name="pullAppToDesktopBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>698, 56</value>
|
||||
<value>948, 56</value>
|
||||
</metadata>
|
||||
<metadata name="copyBulkObbButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>493, 56</value>
|
||||
<value>743, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aboutBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>369, 95</value>
|
||||
<value>711, 95</value>
|
||||
</metadata>
|
||||
<metadata name="settingsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>319, 56</value>
|
||||
</metadata>
|
||||
<metadata name="InstallQUset_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="removeQUSetting_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1365, 17</value>
|
||||
<value>569, 56</value>
|
||||
</metadata>
|
||||
<metadata name="QuestOptionsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1158, 17</value>
|
||||
<value>221, 56</value>
|
||||
</metadata>
|
||||
<metadata name="btnOpenDownloads_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>392, 17</value>
|
||||
</metadata>
|
||||
<metadata name="btnRunAdbCmd_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>209, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ADBWirelessDisable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>954, 17</value>
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="ADBWirelessEnable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>754, 17</value>
|
||||
<value>1333, 17</value>
|
||||
</metadata>
|
||||
<metadata name="UpdateGamesButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>545, 17</value>
|
||||
<value>1124, 17</value>
|
||||
</metadata>
|
||||
<metadata name="listApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>376, 17</value>
|
||||
<value>955, 17</value>
|
||||
</metadata>
|
||||
<metadata name="favoriteGame.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>855, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>161</value>
|
||||
</metadata>
|
||||
</root>
|
||||
32
NewApps.Designer.cs
generated
@@ -38,9 +38,9 @@ namespace AndroidSideloader
|
||||
this.NewAppsButton = new AndroidSideloader.RoundButton();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// NewAppsListView
|
||||
//
|
||||
//
|
||||
this.NewAppsListView.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
|
||||
this.NewAppsListView.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.NewAppsListView.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
@@ -64,18 +64,18 @@ namespace AndroidSideloader
|
||||
this.NewAppsListView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.label2_MouseDown);
|
||||
this.NewAppsListView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label2_MouseMove);
|
||||
this.NewAppsListView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label2_MouseUp);
|
||||
//
|
||||
//
|
||||
// GameNameIndex
|
||||
//
|
||||
//
|
||||
this.GameNameIndex.Text = "Game Name";
|
||||
this.GameNameIndex.Width = 284;
|
||||
//
|
||||
//
|
||||
// PackageNameIndex
|
||||
//
|
||||
//
|
||||
this.PackageNameIndex.Width = 0;
|
||||
//
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
//
|
||||
this.panel2.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.panel2.Controls.Add(this.NewAppsListView);
|
||||
this.panel2.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
@@ -83,9 +83,9 @@ namespace AndroidSideloader
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(295, 175);
|
||||
this.panel2.TabIndex = 8;
|
||||
//
|
||||
//
|
||||
// label2
|
||||
//
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold);
|
||||
@@ -99,9 +99,9 @@ namespace AndroidSideloader
|
||||
this.label2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.label2_MouseDown);
|
||||
this.label2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label2_MouseMove);
|
||||
this.label2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label2_MouseUp);
|
||||
//
|
||||
//
|
||||
// NewAppsButton
|
||||
//
|
||||
//
|
||||
this.NewAppsButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.NewAppsButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.NewAppsButton.BackColor = System.Drawing.Color.Transparent;
|
||||
@@ -120,13 +120,13 @@ namespace AndroidSideloader
|
||||
this.NewAppsButton.Text = "Accept";
|
||||
this.NewAppsButton.Transparency = false;
|
||||
this.NewAppsButton.Click += new System.EventHandler(this.DonateButton_Click);
|
||||
//
|
||||
//
|
||||
// NewApps
|
||||
//
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
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.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes;
|
||||
this.ClientSize = new System.Drawing.Size(313, 248);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.NewAppsButton);
|
||||
@@ -156,4 +156,4 @@ namespace AndroidSideloader
|
||||
private System.Windows.Forms.ColumnHeader PackageNameIndex;
|
||||
private RoundButton NewAppsButton;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
91
Program.cs
@@ -1,45 +1,46 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Permissions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
|
||||
private static void Main()
|
||||
{
|
||||
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(CrashHandler);
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
form = new MainForm();
|
||||
Application.Run(form);
|
||||
//form.Show();
|
||||
}
|
||||
public static MainForm form;
|
||||
|
||||
private static void CrashHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
// Capture unhandled exceptions and write to file.
|
||||
Exception e = (Exception)args.ExceptionObject;
|
||||
string innerExceptionMessage = (e.InnerException != null)
|
||||
? e.InnerException.Message
|
||||
: "None";
|
||||
string date_time = DateTime.Now.ToString("dddd, MMMM dd @ hh:mmtt (UTC)");
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"Date/Time of crash: {date_time}\nMessage: {e.Message}\nInner Message: {innerExceptionMessage}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}\nStack Trace: \n{e.StackTrace}\n\n\nDebuglog: \n\n\n");
|
||||
// If a debuglog exists we append it to the crashlog.
|
||||
if (File.Exists(Properties.Settings.Default.CurrentLogPath))
|
||||
{
|
||||
File.AppendAllText(Sideloader.CrashLogPath, File.ReadAllText($"{Properties.Settings.Default.CurrentLogPath}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using AndroidSideloader.Utilities;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Permissions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
|
||||
private static void Main()
|
||||
{
|
||||
|
||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(CrashHandler);
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
form = new MainForm();
|
||||
Application.Run(form);
|
||||
//form.Show();
|
||||
}
|
||||
public static MainForm form;
|
||||
|
||||
private static void CrashHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
// Capture unhandled exceptions and write to file.
|
||||
Exception e = (Exception)args.ExceptionObject;
|
||||
string innerExceptionMessage = (e.InnerException != null)
|
||||
? e.InnerException.Message
|
||||
: "None";
|
||||
string date_time = DateTime.Now.ToString("dddd, MMMM dd @ hh:mmtt (UTC)");
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"Date/Time of crash: {date_time}\nMessage: {e.Message}\nInner Message: {innerExceptionMessage}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}\nStack Trace: \n{e.StackTrace}\n\n\nDebuglog: \n\n\n");
|
||||
// If a debuglog exists we append it to the crashlog.
|
||||
if (File.Exists(settings.CurrentLogPath))
|
||||
{
|
||||
File.AppendAllText(Sideloader.CrashLogPath, File.ReadAllText($"{settings.CurrentLogPath}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("AndroidSideloader")]
|
||||
[assembly: AssemblyDescription("Rookie Sideloader")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Rookie.WTF")]
|
||||
[assembly: AssemblyCompany("Rookie.AndroidSideloader")]
|
||||
[assembly: AssemblyProduct("AndroidSideloader")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
||||
58
Properties/Resources.Designer.cs
generated
@@ -80,26 +80,6 @@ namespace AndroidSideloader.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap battery1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("battery1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap battery11 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("battery11", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@@ -113,9 +93,9 @@ namespace AndroidSideloader.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap pattern_cubes_1_1_1_0_0_0_1__000000_212121 {
|
||||
public static System.Drawing.Bitmap pattern_cubes {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("pattern_cubes-1_1_1_0-0_0_1__000000_212121", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("pattern_cubes", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -123,9 +103,9 @@ namespace AndroidSideloader.Properties {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap pattern_herringbone_2_1_3_0_0_90_1__000000_1c1c1c {
|
||||
public static System.Drawing.Bitmap pattern_herringbone {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("pattern_herringbone_2_1_3_0_0_90_1__000000_1c1c1c", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("pattern_herringbone", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
@@ -149,5 +129,35 @@ namespace AndroidSideloader.Properties {
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap splashimage_deps {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("splashimage_deps", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap splashimage_offline {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("splashimage_offline", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap splashimage_rclone {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("splashimage_rclone", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,18 +121,6 @@
|
||||
<data name="battery" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="battery1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pattern_herringbone_2_1_3_0_0_90_1__000000_1c1c1c" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\pattern_herringbone-2_1_3_0-0_90_1__000000_1c1c1c.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="splashimage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splashimage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="battery11" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\battery1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ajax-loader" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ajax-loader.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -142,7 +130,22 @@
|
||||
<data name="Pattern" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Pattern.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pattern_cubes-1_1_1_0-0_0_1__000000_212121" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pattern_cubes-1_1_1_0-0_0_1__000000_212121.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="splashimage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splashimage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="splashimage_deps" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splashimage_deps.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="splashimage_rclone" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splashimage_rclone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pattern_cubes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pattern_cubes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="pattern_herringbone" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pattern_herringbone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="splashimage_offline" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\splashimage_offline.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
1562
Properties/Settings.Designer.cs
generated
@@ -47,36 +47,9 @@
|
||||
<Setting Name="ADBPath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUsett" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="QuChecked" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUhz" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUres" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUy" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUx" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUname" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Change Me</Value>
|
||||
</Setting>
|
||||
<Setting Name="QUString" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="MainDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUStringF" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="delsh" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
@@ -95,9 +68,6 @@
|
||||
<Setting Name="PackageNameToCB" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="EnterKeyInstall" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="DownUpHeld" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
@@ -113,9 +83,6 @@
|
||||
<Setting Name="CurrentCrashName" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUturnedon" 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>
|
||||
@@ -195,10 +162,25 @@
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="singleThreadMode" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="virtualFilesystemCompatibility" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="UpdateSettings" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="UUID" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="createPubMirrorFile" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="useDownloadedFiles" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="bandwidthLimit" Type="System.Single" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
1240
QuestForm.Designer.cs
generated
215
QuestForm.cs
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using AndroidSideloader.Utilities;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -6,10 +7,10 @@ namespace AndroidSideloader
|
||||
{
|
||||
public partial class QuestForm : Form
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
public static int length = 0;
|
||||
public static string[] result;
|
||||
public bool settingsexist = false;
|
||||
public static bool QUSon = false;
|
||||
public bool delsh = false;
|
||||
public QuestForm()
|
||||
{
|
||||
@@ -17,14 +18,13 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
private void btnApplyTempSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool ChangesMade = false;
|
||||
|
||||
//Quest 2 settings, might remove them in the future since some of them are broken
|
||||
if (RefreshRateComboBox.SelectedIndex != -1)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.refreshRate {RefreshRateComboBox.SelectedItem}");
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global 90hz_global {RefreshRateComboBox.SelectedIndex}");
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global 90hzglobal {RefreshRateComboBox.SelectedIndex}");
|
||||
@@ -33,7 +33,6 @@ namespace AndroidSideloader
|
||||
|
||||
if (TextureResTextBox.Text.Length > 0)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
_ = int.TryParse(TextureResTextBox.Text, out _);
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global texture_size_Global {TextureResTextBox.Text}");
|
||||
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureWidth {TextureResTextBox.Text}");
|
||||
@@ -66,68 +65,11 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ResetQU_click(object sender, EventArgs e)
|
||||
{
|
||||
ResBox.Text = "0";
|
||||
UsrBox.Text = "Change Me";
|
||||
FOVx.Text = "0";
|
||||
FOVy.Text = "0";
|
||||
QURfrRt.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void DeleteShots_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
delsh = DeleteShots.Checked;
|
||||
}
|
||||
private void QUon_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (QUon.Checked)
|
||||
{
|
||||
ResBox.Visible = true;
|
||||
UsrBox.Visible = true;
|
||||
FOVx.Visible = true;
|
||||
FOVy.Visible = true;
|
||||
QURfrRt.Visible = true;
|
||||
ResetQU.Visible = true;
|
||||
QUEnable.Visible = true;
|
||||
label5.Visible = true;
|
||||
label6.Visible = true;
|
||||
label7.Visible = true;
|
||||
label8.Visible = true;
|
||||
label9.Visible = true;
|
||||
label10.Visible = true;
|
||||
deleteButton.Visible = true;
|
||||
ResBox.Text = Properties.Settings.Default.QUres;
|
||||
UsrBox.Text = Properties.Settings.Default.QUname;
|
||||
FOVy.Text = Properties.Settings.Default.QUy;
|
||||
FOVx.Text = Properties.Settings.Default.QUx;
|
||||
QURfrRt.SelectedValue = Properties.Settings.Default.QUhz;
|
||||
Properties.Settings.Default.QUturnedon = true;
|
||||
}
|
||||
else if (!QUon.Checked)
|
||||
{
|
||||
ResBox.Visible = false;
|
||||
UsrBox.Visible = false;
|
||||
FOVx.Visible = false;
|
||||
FOVy.Visible = false;
|
||||
QURfrRt.Visible = false;
|
||||
ResetQU.Visible = false;
|
||||
QUEnable.Visible = false;
|
||||
label5.Visible = false;
|
||||
label6.Visible = false;
|
||||
label7.Visible = false;
|
||||
label8.Visible = false;
|
||||
label9.Visible = false;
|
||||
label10.Visible = false;
|
||||
deleteButton.Visible = false;
|
||||
Properties.Settings.Default.QUturnedon = false;
|
||||
_ = MessageBox.Show("Ok, Deleted your custom settings file.\nIf you would like to re-enable return here and apply settings again");
|
||||
File.Delete($"{Environment.CurrentDirectory}\\Config.Json");
|
||||
File.Delete($"{Environment.CurrentDirectory}\\delete_settings");
|
||||
}
|
||||
|
||||
}
|
||||
private static readonly Random random = new Random();
|
||||
private static readonly object syncLock = new object();
|
||||
public static int RandomNumber(int min, int max)
|
||||
@@ -137,127 +79,34 @@ namespace AndroidSideloader
|
||||
return random.Next(min, max);
|
||||
}
|
||||
}
|
||||
private void QUEnable_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
settingsexist = true;
|
||||
_ = MessageBox.Show("OK, any -QU packages installed will have these settings applied!\nTo delete settings: goto main app window, select a game with top menu, and click \"Remove QU Setting\"");
|
||||
if (QUon.Checked)
|
||||
{
|
||||
Properties.Settings.Default.QUturnedon = true;
|
||||
Random r = new Random();
|
||||
|
||||
int x = r.Next(999999999);
|
||||
int y = r.Next(9999999);
|
||||
|
||||
long sum = (y * (long)1000000000) + x;
|
||||
|
||||
int x2 = r.Next(999999999);
|
||||
int y2 = r.Next(9999999);
|
||||
|
||||
long sum2 = (y2 * (long)1000000000) + x2;
|
||||
|
||||
QUSon = true;
|
||||
|
||||
string selected = QURfrRt.GetItemText(QURfrRt.SelectedItem);
|
||||
|
||||
Properties.Settings.Default.QUString = $"\"refresh_rate\":{selected},\"eye_texture_width\":{ResBox.Text},\"fov_x\":{FOVx.Text},\"fov_y\":{FOVy.Text},\"username\":\"{UsrBox.Text}\"}}";
|
||||
Properties.Settings.Default.QUStringF = $"{{\"user_id\":{sum},\"app_id\":\"{sum2}\",";
|
||||
Properties.Settings.Default.Save();
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\delete_settings", "");
|
||||
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\config.json", boff);
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default.QUturnedon = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void QuestForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if (QUon.Checked)
|
||||
{
|
||||
Properties.Settings.Default.QUsett = true;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if (!QUon.Checked)
|
||||
{
|
||||
Properties.Settings.Default.QUsett = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if (DeleteShots.Checked)
|
||||
{
|
||||
Properties.Settings.Default.delsh = true;
|
||||
Properties.Settings.Default.Save();
|
||||
settings.Delsh = true;
|
||||
settings.Save();
|
||||
}
|
||||
if (!DeleteShots.Checked)
|
||||
{
|
||||
Properties.Settings.Default.delsh = false;
|
||||
Properties.Settings.Default.Save();
|
||||
settings.Delsh = false;
|
||||
settings.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void QuestForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
DeleteShots.Checked = Properties.Settings.Default.delsh;
|
||||
if (Properties.Settings.Default.QUsett)
|
||||
{
|
||||
ResBox.Text = Properties.Settings.Default.QUres;
|
||||
UsrBox.Text = Properties.Settings.Default.QUname;
|
||||
FOVy.Text = Properties.Settings.Default.QUy;
|
||||
FOVx.Text = Properties.Settings.Default.QUx;
|
||||
QURfrRt.Text = Properties.Settings.Default.QUhz;
|
||||
QUon.Checked = true;
|
||||
if (settingsexist)
|
||||
{
|
||||
QUSon = true;
|
||||
}
|
||||
}
|
||||
GlobalUsername.Text = Properties.Settings.Default.GlobalUsername;
|
||||
DeleteShots.Checked = settings.Delsh;
|
||||
GlobalUsername.Text = settings.GlobalUsername;
|
||||
}
|
||||
|
||||
private void ResBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUres = ResBox.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
}
|
||||
|
||||
private void UsrBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUname = UsrBox.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void FOVx_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUx = FOVx.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void FOVy_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.QUy = FOVy.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void QURfrRt_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string selected = QURfrRt.GetItemText(QURfrRt.SelectedItem);
|
||||
Properties.Settings.Default.QUhz = selected;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
private void DeleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
_ = MessageBox.Show("Ok, Deleted your custom settings file.\nIf you would like to re-enable return here and apply settings again");
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\Config.Json");
|
||||
File.Delete($"{settings.MainDir}\\Config.Json");
|
||||
}
|
||||
private void questPics_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -269,7 +118,6 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
ADB.WakeDevice();
|
||||
Program.form.changeTitle("Pulling files...");
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Screenshots\" \"{path}\\Quest ScreenShots\"");
|
||||
if (delsh)
|
||||
@@ -287,15 +135,14 @@ namespace AndroidSideloader
|
||||
private void questVids_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
if (!Directory.Exists($"{path}\\Quest VideoShots"))
|
||||
if (!Directory.Exists($"{path}\\Quest Recordings"))
|
||||
{
|
||||
_ = Directory.CreateDirectory($"{path}\\Quest VideoShots");
|
||||
_ = Directory.CreateDirectory($"{path}\\Quest Recordings");
|
||||
}
|
||||
|
||||
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
ADB.WakeDevice();
|
||||
Program.form.changeTitle("Pulling files...");
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Videoshots\" \"{path}\\Quest VideoShots\"");
|
||||
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Videoshots\" \"{path}\\Quest Recordings\"");
|
||||
if (delsh)
|
||||
{
|
||||
DialogResult dialogResult = MessageBox.Show("You have chosen to delete files from headset after transferring, so be sure to move them from your desktop to somewhere safe!", "Warning!", MessageBoxButtons.OKCancel);
|
||||
@@ -305,22 +152,15 @@ namespace AndroidSideloader
|
||||
_ = ADB.RunAdbCommandToString("shell mkdir /sdcard/Oculus/Videoshots");
|
||||
}
|
||||
}
|
||||
_ = MessageBox.Show("Transfer finished! VideoShots can be found in a folder named Quest VideoShots on your desktop!");
|
||||
_ = MessageBox.Show("Transfer finished! Recordings can be found in a folder named Quest Recordings on your desktop!");
|
||||
Program.form.changeTitle("Done!");
|
||||
}
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GlobalUsername.Text.Contains(" "))
|
||||
{
|
||||
_ = MessageBox.Show("Usernames with a space are not permitted.", "Detected a space in username!");
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global username {GlobalUsername.Text}");
|
||||
_ = MessageBox.Show($"Username set as {GlobalUsername.Text}", "Success");
|
||||
}
|
||||
}
|
||||
|
||||
private void btnApplyUsername_Click(object sender, EventArgs e)
|
||||
{
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global username {GlobalUsername.Text}");
|
||||
_ = MessageBox.Show($"Username set as {GlobalUsername.Text}", "Success");
|
||||
}
|
||||
|
||||
private void Form_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
@@ -339,18 +179,11 @@ namespace AndroidSideloader
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void WifiWake_Click(object sender, EventArgs e)
|
||||
{
|
||||
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
_ = MessageBox.Show("Wake on Wifi enabled!\n\nNOTE: This requires having wireless ADB enabled to work. (Obviously)");
|
||||
}
|
||||
|
||||
private void GlobalUsername_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
button3.Enabled = GlobalUsername.TextLength > 0;
|
||||
Properties.Settings.Default.GlobalUsername = GlobalUsername.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
btnApplyUsername.Enabled = GlobalUsername.TextLength > 0;
|
||||
settings.GlobalUsername = GlobalUsername.Text;
|
||||
settings.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
61
RCLONE.cs
@@ -1,4 +1,5 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using AndroidSideloader.Utilities;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@@ -10,6 +11,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
internal class RCLONE
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
// Kill RCLONE Processes that were started from Rookie by looking for child processes.
|
||||
public static void killRclone()
|
||||
{
|
||||
@@ -75,6 +77,8 @@ namespace AndroidSideloader
|
||||
command += $" --config {downloadConfigPath}";
|
||||
}
|
||||
|
||||
command += $" --inplace";
|
||||
|
||||
// set rclonepw
|
||||
if (rclonepw.Length > 0)
|
||||
{
|
||||
@@ -82,9 +86,9 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
string logcmd = Utilities.StringUtilities.RemoveEverythingBeforeFirst(command, "rclone.exe");
|
||||
if (logcmd.Contains($"\"{Properties.Settings.Default.CurrentLogPath}\""))
|
||||
if (logcmd.Contains($"\"{settings.CurrentLogPath}\""))
|
||||
{
|
||||
logcmd = logcmd.Replace($"\"{Properties.Settings.Default.CurrentLogPath}\"", $"\"{Properties.Settings.Default.CurrentLogName}\"");
|
||||
logcmd = logcmd.Replace($"\"{settings.CurrentLogPath}\"", $"\"{settings.CurrentLogName}\"");
|
||||
}
|
||||
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
@@ -94,12 +98,12 @@ namespace AndroidSideloader
|
||||
|
||||
_ = Logger.Log($"Running Rclone command: {logcmd}");
|
||||
|
||||
rclone.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
|
||||
rclone.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
rclone.StartInfo.Arguments = command;
|
||||
rclone.StartInfo.RedirectStandardInput = true;
|
||||
rclone.StartInfo.RedirectStandardError = true;
|
||||
rclone.StartInfo.RedirectStandardOutput = true;
|
||||
rclone.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
|
||||
rclone.StartInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
rclone.StartInfo.CreateNoWindow = true;
|
||||
// Display RCLONE Window if the binary is being run in Debug Mode.
|
||||
if (MainForm.debugMode)
|
||||
@@ -109,7 +113,6 @@ namespace AndroidSideloader
|
||||
rclone.StartInfo.UseShellExecute = false;
|
||||
_ = rclone.Start();
|
||||
rclone.StandardInput.WriteLine(command);
|
||||
rclone.StandardInput.Flush();
|
||||
rclone.StandardInput.Close();
|
||||
|
||||
string output = rclone.StandardOutput.ReadToEnd();
|
||||
@@ -118,10 +121,13 @@ namespace AndroidSideloader
|
||||
|
||||
if (error.Contains("There is not enough space"))
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"There isn't enough disk space to download this game.\r\nPlease ensure you have at least 200MB more the game size available in {Environment.CurrentDirectory} and try again.",
|
||||
Program.form.Invoke(() =>
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"There isn't enough disk space to download this game.\r\nPlease ensure you have at least 200MB more the game size available in {settings.DownloadDir} and try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
});
|
||||
return new ProcessOutput("Download failed.", "");
|
||||
}
|
||||
|
||||
@@ -129,16 +135,19 @@ namespace AndroidSideloader
|
||||
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"))
|
||||
{
|
||||
string oldRemote = MainForm.currentRemote;
|
||||
bool retSM = false;
|
||||
try
|
||||
{
|
||||
Program.form.SwitchMirrors();
|
||||
|
||||
retSM = Program.form.SwitchMirrors();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new ProcessOutput("All mirrors are on quota or down...", "All mirrors are on quota or down...");
|
||||
}
|
||||
prcoutput = runRcloneCommand_DownloadConfig(originalCommand.Replace(oldRemote, MainForm.currentRemote));
|
||||
if (retSM)
|
||||
{
|
||||
prcoutput = runRcloneCommand_DownloadConfig(originalCommand.Replace(oldRemote, MainForm.currentRemote));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -150,7 +159,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
_ = Logger.Log($"Rclone error: {error}\n", LogLevel.ERROR);
|
||||
_ = Logger.Log($"Rclone error: {error}\n", LogLevel.ERROR);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(output))
|
||||
@@ -174,9 +183,9 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
string logcmd = Utilities.StringUtilities.RemoveEverythingBeforeFirst(command, "rclone.exe");
|
||||
if (logcmd.Contains($"\"{Properties.Settings.Default.CurrentLogPath}\""))
|
||||
if (logcmd.Contains($"\"{settings.CurrentLogPath}\""))
|
||||
{
|
||||
logcmd = logcmd.Replace($"\"{Properties.Settings.Default.CurrentLogPath}\"", $"\"{Properties.Settings.Default.CurrentLogName}\"");
|
||||
logcmd = logcmd.Replace($"\"{settings.CurrentLogPath}\"", $"\"{settings.CurrentLogName}\"");
|
||||
}
|
||||
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
@@ -186,14 +195,14 @@ namespace AndroidSideloader
|
||||
|
||||
_ = Logger.Log($"Running Rclone command: {logcmd}");
|
||||
|
||||
command += " --checkers 0 --no-check-dest --retries 1";
|
||||
command += " --checkers 1 --retries 2 --inplace";
|
||||
|
||||
rclone.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
|
||||
rclone.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
rclone.StartInfo.Arguments = command;
|
||||
rclone.StartInfo.RedirectStandardInput = true;
|
||||
rclone.StartInfo.RedirectStandardError = true;
|
||||
rclone.StartInfo.RedirectStandardOutput = true;
|
||||
rclone.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
|
||||
rclone.StartInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
rclone.StartInfo.CreateNoWindow = true;
|
||||
// Display RCLONE Window if the binary is being run in Debug Mode.
|
||||
if (MainForm.debugMode)
|
||||
@@ -249,9 +258,9 @@ namespace AndroidSideloader
|
||||
rclone.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||
|
||||
string logcmd = Utilities.StringUtilities.RemoveEverythingBeforeFirst(command, "rclone.exe");
|
||||
if (logcmd.Contains($"\"{Properties.Settings.Default.CurrentLogPath}\""))
|
||||
if (logcmd.Contains($"\"{settings.CurrentLogPath}\""))
|
||||
{
|
||||
logcmd = logcmd.Replace($"\"{Properties.Settings.Default.CurrentLogPath}\"", $"\"{Properties.Settings.Default.CurrentLogName}\"");
|
||||
logcmd = logcmd.Replace($"\"{settings.CurrentLogPath}\"", $"\"{settings.CurrentLogName}\"");
|
||||
}
|
||||
|
||||
if (logcmd.Contains(Environment.CurrentDirectory))
|
||||
@@ -259,17 +268,18 @@ namespace AndroidSideloader
|
||||
logcmd = logcmd.Replace($"{Environment.CurrentDirectory}", $"CurrentDirectory");
|
||||
}
|
||||
|
||||
command += $" --inplace";
|
||||
|
||||
_ = Logger.Log($"Running Rclone command: {logcmd}");
|
||||
|
||||
//set http source & args
|
||||
command += $" --http-url {MainForm.PublicConfigFile.BaseUri} {MainForm.PublicMirrorExtraArgs}";
|
||||
|
||||
rclone.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
|
||||
rclone.StartInfo.FileName = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
|
||||
rclone.StartInfo.Arguments = command;
|
||||
rclone.StartInfo.RedirectStandardInput = true;
|
||||
rclone.StartInfo.RedirectStandardError = true;
|
||||
rclone.StartInfo.RedirectStandardOutput = true;
|
||||
rclone.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
|
||||
rclone.StartInfo.WorkingDirectory = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
rclone.StartInfo.CreateNoWindow = true;
|
||||
// Display RCLONE Window if the binary is being run in Debug Mode.
|
||||
if (MainForm.debugMode)
|
||||
@@ -288,18 +298,21 @@ namespace AndroidSideloader
|
||||
|
||||
if (error.Contains("There is not enough space"))
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"There isn't enough disk space to download this game.\r\nPlease ensure you have at least 2x the game size available in {Environment.CurrentDirectory} and try again.",
|
||||
Program.form.Invoke(() =>
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"There isn't enough disk space to download this game.\r\nPlease ensure you have at least 2x the game size available in {settings.DownloadDir} and try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
});
|
||||
return new ProcessOutput("Download failed.", string.Empty);
|
||||
}
|
||||
|
||||
if (error.Contains("Only one usage of each socket address (protocol/network address/port) is normally permitted")) {
|
||||
if (error.Contains("Only one usage of each socket address (protocol/network address/port) is normally permitted"))
|
||||
{
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
return new ProcessOutput("Failed to fetch from public mirror.", "Failed to fetch from public mirror.\nYou may have a running RCLONE Task!\nCheck your Task Manager, Sort by Network Usage, and kill the process Rsync for Cloud Storage/Rclone");
|
||||
}
|
||||
|
||||
else if (error.Contains("400 Bad Request")
|
||||
|| error.Contains("cannot fetch token")
|
||||
|| error.Contains("authError")
|
||||
|
||||
32
README.md
@@ -1,15 +1,33 @@
|
||||
# androidsideloader
|
||||
# AndroidSideloader
|
||||
|
||||

|
||||

|
||||
[](https://github.com/VRPirates/rookie/releases)
|
||||

|
||||
|
||||
androidsideloader uses the GPL license, any forks of it must have their source code made public on the internet.
|
||||
## Disclaimer
|
||||
This application might get flagged as malware by some antivirus software; however, both the Sideloader and the Sideloader Launcher are open source.
|
||||
|
||||
## !IMPORTANT!
|
||||
To run properly, Rookie must be extracted to a non-Protected folder on your drive. We recommend running Rookie from C:\RSL\Rookie
|
||||
Do Not use folders such as- C:\Users; C:\Users\Desktop; C:\Program Files; OneDrive; Google Drive; etc...
|
||||
Rookie will cleanup its own folder. We are not responsible if you run Rookie from a folder containing other files as Rookie may delete them.
|
||||
|
||||
This app may be buggy and have problems.
|
||||
|
||||
### This app might get detected as malware, however both the sideloader and the sideloader launcher are open source. And obviously, it isn't.
|
||||
See:
|
||||
https://www.virustotal.com/gui/file/46b6e24a03a6670dfbbde6e6f06caac05f2f9486115ef7bd77e0b568df7e5342/detection
|
||||
## Support
|
||||
For any assistance or questions, please utilize our support channels available at [Live Chats](https://vrpirates.wiki/en/general_information/live-chats).
|
||||
|
||||
## Build Instructions
|
||||
This project is developed using C# with WinForms targeting the .NET Framework 4.5.2. To build the project successfully in Visual Studio 2022, follow these steps:
|
||||
|
||||
1. Clone this repository to your local machine.
|
||||
2. Ensure you have the .NET Framework 4.5.2 installed on your machine.
|
||||
3. Open the solution file (`*.sln`) in Visual Studio 2022.
|
||||
4. Sometimes the building process can fail due to the packages.config, you should migrate it to PackageReference, do this by right clicking on References in the Solution Explorer, and pressing "Migrate packages.config to PackageReference"
|
||||
5. Build the solution by selecting "Build" > "Build Solution" from the Visual Studio menu or pressing `Ctrl + Shift + B`. (or right click the solution in the solution explorer, then press Build)
|
||||
6. Run the application.
|
||||
|
||||
## Contributing
|
||||
We welcome contributions from the community. If you would like to contribute, please fork the repository, branch from the newest beta branch from this repository, make your changes, and submit a pull request.
|
||||
|
||||
## License
|
||||
AndroidSideloader is distributed under the GPL license, meaning any forks of it must have their source code made public on the internet. See the [LICENSE](LICENSE) file for details.
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
6801
Resources/nouns.txt
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 18 KiB |
BIN
Resources/splashimage_deps.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
Resources/splashimage_offline.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
Resources/splashimage_rclone.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
28
Settings.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace AndroidSideloader.Properties {
|
||||
|
||||
|
||||
// This class allows you to handle specific events on the settings class:
|
||||
// The SettingChanging event is raised before a setting's value is changed.
|
||||
// The PropertyChanged event is raised after a setting's value is changed.
|
||||
// The SettingsLoaded event is raised after the setting values are loaded.
|
||||
// The SettingsSaving event is raised before the setting values are saved.
|
||||
internal sealed partial class Settings {
|
||||
|
||||
public Settings() {
|
||||
// // To add event handlers for saving and changing settings, uncomment the lines below:
|
||||
//
|
||||
// this.SettingChanging += this.SettingChangingEventHandler;
|
||||
//
|
||||
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
||||
//
|
||||
}
|
||||
|
||||
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
|
||||
// Add code to handle the SettingChangingEvent event here.
|
||||
}
|
||||
|
||||
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
|
||||
// Add code to handle the SettingsSaving event here.
|
||||
}
|
||||
}
|
||||
}
|
||||
1017
SettingsForm.Designer.cs
generated
571
SettingsForm.cs
@@ -1,250 +1,321 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public partial class SettingsForm : Form
|
||||
{
|
||||
public SettingsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SettingsForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
CenterToParent();
|
||||
intSettings();
|
||||
intToolTips();
|
||||
}
|
||||
|
||||
//Init form objects with values from settings
|
||||
private void intSettings()
|
||||
{
|
||||
checkForUpdatesCheckBox.Checked = Properties.Settings.Default.checkForUpdates;
|
||||
enableMessageBoxesCheckBox.Checked = Properties.Settings.Default.enableMessageBoxes;
|
||||
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;
|
||||
AutoReinstBox.Checked = Properties.Settings.Default.AutoReinstall;
|
||||
trailersOn.Checked = Properties.Settings.Default.TrailersOn;
|
||||
singleThread.Checked = Properties.Settings.Default.singleThreadMode;
|
||||
virtualFilesystemCompatibilityCheckbox.Checked = Properties.Settings.Default.virtualFilesystemCompatibility;
|
||||
if (nodevicemodeBox.Checked)
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = false;
|
||||
deleteAfterInstallCheckBox.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void intToolTips()
|
||||
{
|
||||
ToolTip checkForUpdatesToolTip = new ToolTip();
|
||||
checkForUpdatesToolTip.SetToolTip(checkForUpdatesCheckBox, "If this is checked, the software will check for available updates");
|
||||
ToolTip enableMessageBoxesToolTip = new ToolTip();
|
||||
enableMessageBoxesToolTip.SetToolTip(enableMessageBoxesCheckBox, "If this is checked, the software will display message boxes after every completed task");
|
||||
ToolTip deleteAfterInstallToolTip = new ToolTip();
|
||||
deleteAfterInstallToolTip.SetToolTip(deleteAfterInstallCheckBox, "If this is checked, the software will delete all game files after downloading and installing a game from a remote server");
|
||||
}
|
||||
|
||||
public void btnUploadDebug_click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{Properties.Settings.Default.CurrentLogPath}"))
|
||||
{
|
||||
string UUID = SideloaderUtilities.UUID();
|
||||
string debugLogPath = $"{Environment.CurrentDirectory}\\{UUID}.log";
|
||||
System.IO.File.Copy("debuglog.txt", debugLogPath);
|
||||
|
||||
Clipboard.SetText(UUID);
|
||||
|
||||
_ = RCLONE.runRcloneCommand_UploadConfig($"copy \"{debugLogPath}\" RSL-gameuploads:DebugLogs");
|
||||
_ = MessageBox.Show($"Your debug log has been copied to the server. ID: {UUID}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void btnResetDebug_click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{Properties.Settings.Default.CurrentLogPath}"))
|
||||
{
|
||||
File.Delete($"{Properties.Settings.Default.CurrentLogPath}");
|
||||
}
|
||||
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
{
|
||||
File.Delete($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
}
|
||||
}
|
||||
|
||||
//Apply settings
|
||||
private void applyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.Save();
|
||||
_ = FlexibleMessageBox.Show(this, "Settings applied!");
|
||||
}
|
||||
|
||||
private void checkForUpdatesCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.checkForUpdates = checkForUpdatesCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void enableMessageBoxesCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.enableMessageBoxes = enableMessageBoxesCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void resetSettingsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.Reset();
|
||||
Properties.Settings.Default.customDownloadDir = false;
|
||||
Properties.Settings.Default.customBackupDir = false;
|
||||
MainForm.backupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
Properties.Settings.Default.downloadDir = Environment.CurrentDirectory.ToString();
|
||||
intSettings();
|
||||
}
|
||||
|
||||
private void deleteAfterInstallCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.deleteAllAfterInstall = deleteAfterInstallCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void updateConfigCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.autoUpdateConfig = updateConfigCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void userJsonOnGameInstall_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.userJsonOnGameInstall = userJsonOnGameInstall.Checked;
|
||||
}
|
||||
|
||||
private void SettingsForm_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void SettingsForm_Leave(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Form_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void nodevicemodeBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.nodevicemode = nodevicemodeBox.Checked;
|
||||
if (!nodevicemodeBox.Checked)
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = true;
|
||||
Properties.Settings.Default.deleteAllAfterInstall = true;
|
||||
deleteAfterInstallCheckBox.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = false;
|
||||
Properties.Settings.Default.deleteAllAfterInstall = false;
|
||||
deleteAfterInstallCheckBox.Enabled = false;
|
||||
}
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void bmbfBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.BMBFchecked = bmbfBox.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void AutoReinstBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.AutoReinstall = AutoReinstBox.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void trailersOn_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.TrailersOn = trailersOn.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void AutoReinstBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (AutoReinstBox.Checked)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, "WARNING: This box enables automatic reinstall when installs fail,\ndue to some games not allowing " +
|
||||
"access to their save data (less than 5%) this\noption can lead to losing your progress." +
|
||||
" However with this option\nchecked when installs fail you won't have to agree to a prompt to perform\nthe reinstall. " +
|
||||
"(ideal when installing from a queue).\n\nNOTE: If your usb/wireless adb connection is extremely slow this option can\ncause larger" +
|
||||
"apk file installations to fail. Enable anyway?", "WARNING", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
AutoReinstBox.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnOpenDebug_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
{
|
||||
_ = Process.Start($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
}
|
||||
}
|
||||
|
||||
private void setDownloadDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (downloadDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.customDownloadDir = true;
|
||||
Properties.Settings.Default.downloadDir = downloadDirectorySetter.SelectedPath;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void setBackupDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (backupDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.customBackupDir = true;
|
||||
Properties.Settings.Default.backupDir = backupDirectorySetter.SelectedPath;
|
||||
MainForm.backupFolder = Properties.Settings.Default.backupDir;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void singleThread_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.singleThreadMode = singleThread.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void virtualFilesystemCompatibilityCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.virtualFilesystemCompatibility = virtualFilesystemCompatibilityCheckbox.Checked;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using AndroidSideloader.Utilities;
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public partial class SettingsForm : Form
|
||||
{
|
||||
private static readonly SettingsManager _settings = SettingsManager.Instance;
|
||||
public SettingsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SettingsForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
CenterToParent();
|
||||
initSettings();
|
||||
initToolTips();
|
||||
}
|
||||
|
||||
private void initSettings()
|
||||
{
|
||||
checkForUpdatesCheckBox.Checked = _settings.CheckForUpdates;
|
||||
enableMessageBoxesCheckBox.Checked = _settings.EnableMessageBoxes;
|
||||
deleteAfterInstallCheckBox.Checked = _settings.DeleteAllAfterInstall;
|
||||
updateConfigCheckBox.Checked = _settings.AutoUpdateConfig;
|
||||
userJsonOnGameInstall.Checked = _settings.UserJsonOnGameInstall;
|
||||
nodevicemodeBox.Checked = _settings.NodeviceMode;
|
||||
bmbfBox.Checked = _settings.BMBFChecked;
|
||||
AutoReinstBox.Checked = _settings.AutoReinstall;
|
||||
trailersOn.Checked = _settings.TrailersOn;
|
||||
chkSingleThread.Checked = _settings.SingleThreadMode;
|
||||
virtualFilesystemCompatibilityCheckbox.Checked = _settings.VirtualFilesystemCompatibility;
|
||||
hideAdultContentCheckBox.Checked = _settings.HideAdultContent;
|
||||
bandwidthLimitTextBox.Text = _settings.BandwidthLimit.ToString();
|
||||
if (nodevicemodeBox.Checked)
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = false;
|
||||
deleteAfterInstallCheckBox.Enabled = false;
|
||||
}
|
||||
chkUseDownloadedFiles.Checked = _settings.UseDownloadedFiles;
|
||||
}
|
||||
|
||||
private void initToolTips()
|
||||
{
|
||||
ToolTip checkForUpdatesToolTip = new ToolTip();
|
||||
checkForUpdatesToolTip.SetToolTip(checkForUpdatesCheckBox, "If this is checked, the software will check for available updates");
|
||||
ToolTip enableMessageBoxesToolTip = new ToolTip();
|
||||
enableMessageBoxesToolTip.SetToolTip(enableMessageBoxesCheckBox, "If this is checked, the software will display message boxes after every completed task");
|
||||
ToolTip deleteAfterInstallToolTip = new ToolTip();
|
||||
deleteAfterInstallToolTip.SetToolTip(deleteAfterInstallCheckBox, "If this is checked, the software will delete all game files after downloading and installing a game from a remote server");
|
||||
ToolTip chkUseDownloadedFilesTooltip = new ToolTip();
|
||||
chkUseDownloadedFilesTooltip.SetToolTip(chkUseDownloadedFiles, "If this is checked, Rookie will always install Downloaded files without Re-Downloading or Asking to Re-Download");
|
||||
}
|
||||
|
||||
public void btnUploadDebug_click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{_settings.CurrentLogPath}"))
|
||||
{
|
||||
string UUID = SideloaderUtilities.UUID();
|
||||
string debugLogPath = $"{Environment.CurrentDirectory}\\{UUID}.log";
|
||||
System.IO.File.Copy("debuglog.txt", debugLogPath);
|
||||
|
||||
Clipboard.SetText(UUID);
|
||||
|
||||
_ = RCLONE.runRcloneCommand_UploadConfig($"copy \"{debugLogPath}\" RSL-gameuploads:DebugLogs");
|
||||
_ = MessageBox.Show($"Your debug log has been copied to the server. ID: {UUID}");
|
||||
}
|
||||
}
|
||||
|
||||
public void btnResetDebug_click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{_settings.CurrentLogPath}"))
|
||||
{
|
||||
File.Delete($"{_settings.CurrentLogPath}");
|
||||
}
|
||||
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
{
|
||||
File.Delete($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
}
|
||||
}
|
||||
|
||||
private void applyButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string input = bandwidthLimitTextBox.Text;
|
||||
Regex regex = new Regex(@"^\d+(\.\d+)?$");
|
||||
|
||||
if (regex.IsMatch(input) && float.TryParse(input, out float bandwidthLimit))
|
||||
{
|
||||
_settings.BandwidthLimit = bandwidthLimit;
|
||||
_settings.Save();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please enter a valid number for the bandwidth limit.");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkForUpdatesCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.CheckForUpdates = checkForUpdatesCheckBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void chkUseDownloadedFiles_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.UseDownloadedFiles = chkUseDownloadedFiles.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void enableMessageBoxesCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.EnableMessageBoxes = enableMessageBoxesCheckBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void resetSettingsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Reset the specific properties
|
||||
_settings.CustomDownloadDir = false;
|
||||
_settings.CustomBackupDir = false;
|
||||
|
||||
// Set backup folder and download directory
|
||||
MainForm.backupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Rookie Backups");
|
||||
_settings.DownloadDir = Environment.CurrentDirectory;
|
||||
_settings.CreatePubMirrorFile = true;
|
||||
|
||||
// Optionally, call initSettings if it needs to initialize anything based on these settings
|
||||
initSettings();
|
||||
|
||||
// Save the updated settings
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void deleteAfterInstallCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.DeleteAllAfterInstall = deleteAfterInstallCheckBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void updateConfigCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.AutoUpdateConfig = updateConfigCheckBox.Checked;
|
||||
if (_settings.AutoUpdateConfig)
|
||||
{
|
||||
_settings.CreatePubMirrorFile = true;
|
||||
}
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void userJsonOnGameInstall_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.UserJsonOnGameInstall = userJsonOnGameInstall.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void SettingsForm_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void SettingsForm_Leave(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Form_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (Form.ModifierKeys == Keys.None && keyData == Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void nodevicemodeBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.NodeviceMode = nodevicemodeBox.Checked;
|
||||
if (!nodevicemodeBox.Checked)
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = true;
|
||||
_settings.DeleteAllAfterInstall = true;
|
||||
deleteAfterInstallCheckBox.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteAfterInstallCheckBox.Checked = false;
|
||||
_settings.DeleteAllAfterInstall = false;
|
||||
deleteAfterInstallCheckBox.Enabled = false;
|
||||
}
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void bmbfBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.BMBFChecked = bmbfBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void AutoReinstBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.AutoReinstall = AutoReinstBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void AutoReinstBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (AutoReinstBox.Checked)
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, "WARNING: This box enables automatic reinstall when installs fail,\ndue to some games not allowing " +
|
||||
"access to their save data (less than 5%) this\noption can lead to losing your progress." +
|
||||
" However with this option\nchecked when installs fail you won't have to agree to a prompt to perform\nthe reinstall. " +
|
||||
"(ideal when installing from a queue).\n\nNOTE: If your usb/wireless adb connection is extremely slow this option can\ncause larger" +
|
||||
"apk file installations to fail. Enable anyway?", "WARNING", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
AutoReinstBox.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void trailersOn_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.TrailersOn = trailersOn.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void btnOpenDebug_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
{
|
||||
_ = Process.Start($"{Environment.CurrentDirectory}\\debuglog.txt");
|
||||
}
|
||||
}
|
||||
|
||||
private void setDownloadDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (downloadDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_settings.CustomDownloadDir = true;
|
||||
_settings.DownloadDir = downloadDirectorySetter.SelectedPath;
|
||||
_settings.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void setBackupDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (backupDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_settings.CustomBackupDir = true;
|
||||
_settings.BackupDir = backupDirectorySetter.SelectedPath;
|
||||
MainForm.backupFolder = _settings.BackupDir;
|
||||
_settings.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void chkSingleThread_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.SingleThreadMode = chkSingleThread.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void virtualFilesystemCompatibilityCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.VirtualFilesystemCompatibility = virtualFilesystemCompatibilityCheckbox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
|
||||
private void openDownloadDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pathToOpen = _settings.CustomDownloadDir ? _settings.DownloadDir : Environment.CurrentDirectory;
|
||||
MainForm.OpenDirectory(pathToOpen);
|
||||
}
|
||||
|
||||
private void openBackupDirectory_Click(object sender, EventArgs e)
|
||||
{
|
||||
string pathToOpen = _settings.CustomBackupDir
|
||||
? Path.Combine(_settings.BackupDir, "Rookie Backups")
|
||||
: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Rookie Backups");
|
||||
MainForm.OpenDirectory(pathToOpen);
|
||||
}
|
||||
|
||||
private void bandwidthLimitTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && (e.KeyChar != '.'))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
if ((e.KeyChar == '.') && ((sender as TextBox).Text.IndexOf('.') > -1))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void hideAdultContentCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.HideAdultContent = hideAdultContentCheckBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
1885
SettingsForm.resx
193
Sideloader.cs
@@ -2,21 +2,51 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using AndroidSideloader.Utilities;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
internal class Sideloader
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
public static string TempFolder = Path.Combine(Environment.CurrentDirectory, "temp");
|
||||
public static string CrashLogPath = "crashlog.txt";
|
||||
|
||||
public static void killWebView2()
|
||||
{
|
||||
var parentProcessId = Process.GetCurrentProcess().Id;
|
||||
var processes = Process.GetProcessesByName("msedgewebview2");
|
||||
|
||||
foreach (var process in processes)
|
||||
{
|
||||
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)
|
||||
{
|
||||
_ = Logger.Log($"Exception occured while attempting to shut down WebView2 with exception message: {ex.Message}", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//push user.json to device (required for some devices like oculus quest)
|
||||
public static void PushUserJsons()
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
foreach (string userJson in UsernameForm.userJsons)
|
||||
{
|
||||
UsernameForm.createUserJsonByName(Utilities.GeneralUtilities.randomString(16), userJson);
|
||||
@@ -29,23 +59,21 @@ namespace AndroidSideloader
|
||||
//public static List<string> InstalledPackageNames = new List<string>(); //Remove folder from device
|
||||
public static ProcessOutput RemoveFolder(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
if (path == "/sdcard/Android/obb/" || path == "sdcard/Android/data/")
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ADB.RunAdbCommandToString($"shell rm -r {path}");
|
||||
return ADB.RunAdbCommandToString($"shell rm -r \"{path}\"");
|
||||
}
|
||||
|
||||
public static ProcessOutput RemoveFile(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
return ADB.RunAdbCommandToString($"shell rm -f {path}");
|
||||
return ADB.RunAdbCommandToString($"shell rm -f \"{path}\"");
|
||||
}
|
||||
|
||||
//For games that require manual install, like having another folder that isnt an obb
|
||||
public static ProcessOutput RunADBCommandsFromFile(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput();
|
||||
string[] commands = File.ReadAllLines(path);
|
||||
string currfolder = Path.GetDirectoryName(path);
|
||||
@@ -61,8 +89,8 @@ namespace AndroidSideloader
|
||||
string replacement = "";
|
||||
string pattern = "adb";
|
||||
replacement = ADB.DeviceID.Length > 1
|
||||
? $"{Properties.Settings.Default.ADBPath} -s {ADB.DeviceID}"
|
||||
: $"{Properties.Settings.Default.ADBPath}";
|
||||
? $"{settings.ADBPath} -s {ADB.DeviceID}"
|
||||
: $"{settings.ADBPath}";
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(cmd, replacement);
|
||||
Program.form.changeTitle($"Running {result}");
|
||||
@@ -139,15 +167,14 @@ namespace AndroidSideloader
|
||||
|
||||
public static void BackupGame(string packagename)
|
||||
{
|
||||
if (!Properties.Settings.Default.customBackupDir)
|
||||
if (!settings.CustomBackupDir)
|
||||
{
|
||||
MainForm.backupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
}
|
||||
else
|
||||
{
|
||||
MainForm.backupFolder = Path.Combine((Properties.Settings.Default.backupDir), $"Rookie Backups");
|
||||
MainForm.backupFolder = Path.Combine((settings.BackupDir), $"Rookie Backups");
|
||||
}
|
||||
ADB.WakeDevice();
|
||||
if (!Directory.Exists(MainForm.backupFolder))
|
||||
{
|
||||
_ = Directory.CreateDirectory(MainForm.backupFolder);
|
||||
@@ -165,7 +192,6 @@ namespace AndroidSideloader
|
||||
|
||||
public static ProcessOutput DeleteFile(string GameName)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
@@ -184,8 +210,6 @@ namespace AndroidSideloader
|
||||
//Extracts apk from device, saves it by package name to sideloader folder
|
||||
public static ProcessOutput getApk(string GameName)
|
||||
{
|
||||
|
||||
ADB.WakeDevice();
|
||||
_ = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
@@ -197,26 +221,26 @@ namespace AndroidSideloader
|
||||
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"))
|
||||
if (File.Exists($"{settings.ADBFolder}\\base.apk"))
|
||||
{
|
||||
File.Delete($"{Properties.Settings.Default.ADBFolder}\\base.apk");
|
||||
File.Delete($"{settings.ADBFolder}\\base.apk");
|
||||
}
|
||||
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk"))
|
||||
if (File.Exists($"{settings.MainDir}\\{packageName}\\{packageName}.apk"))
|
||||
{
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
File.Delete($"{settings.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
}
|
||||
|
||||
output += ADB.RunAdbCommandToString("pull " + apkPath); //pull apk
|
||||
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\{packageName}"))
|
||||
if (Directory.Exists($"{settings.MainDir}\\{packageName}"))
|
||||
{
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{packageName}", true);
|
||||
Directory.Delete($"{settings.MainDir}\\{packageName}", true);
|
||||
}
|
||||
|
||||
_ = Directory.CreateDirectory($"{Properties.Settings.Default.MainDir}\\{packageName}");
|
||||
_ = Directory.CreateDirectory($"{settings.MainDir}\\{packageName}");
|
||||
|
||||
File.Move($"{Properties.Settings.Default.ADBFolder}\\base.apk", $"{Properties.Settings.Default.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
File.Move($"{settings.ADBFolder}\\base.apk", $"{settings.MainDir}\\{packageName}\\{packageName}.apk");
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -230,6 +254,16 @@ namespace AndroidSideloader
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string gameNameToVersionCode(string gameName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Equals(game[SideloaderRCLONE.GameNameIndex]) || gameName.Equals(game[SideloaderRCLONE.ReleaseNameIndex]))
|
||||
return game[SideloaderRCLONE.VersionCodeIndex];
|
||||
}
|
||||
return gameName;
|
||||
}
|
||||
|
||||
public static string PackageNametoGameName(string packageName)
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
@@ -259,120 +293,5 @@ namespace AndroidSideloader
|
||||
}
|
||||
return packageName;
|
||||
}
|
||||
|
||||
// Download required dependencies.
|
||||
public static void downloadFiles()
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
var currentAccessedWebsite = "";
|
||||
try
|
||||
{
|
||||
if (!File.Exists("Sideloader Launcher.exe"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Sideloader%20Launcher.exe", "Sideloader Launcher.exe");
|
||||
}
|
||||
|
||||
if (!File.Exists("Rookie Offline.cmd"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Rookie%20Offline.cmd", "Rookie Offline.cmd");
|
||||
}
|
||||
|
||||
if (!File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\aug2021.txt") || !File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
|
||||
{
|
||||
if (Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\2.8.2"))
|
||||
{
|
||||
Directory.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\2.8.2", true);
|
||||
}
|
||||
|
||||
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\adb"))
|
||||
{
|
||||
Directory.Delete($"{Properties.Settings.Default.MainDir}\\adb", true);
|
||||
}
|
||||
|
||||
if (!Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools"))
|
||||
{
|
||||
_ = Directory.CreateDirectory($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools");
|
||||
}
|
||||
|
||||
currentAccessedWebsite = "github";
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/adb2.zip", "Ad.7z");
|
||||
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\Ad.7z", $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools");
|
||||
File.Delete("Ad.7z");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(Environment.CurrentDirectory + "\\rclone"))
|
||||
{
|
||||
currentAccessedWebsite = "rclone";
|
||||
string url = Environment.Is64BitOperatingSystem
|
||||
? "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");
|
||||
|
||||
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\rclone.zip", Environment.CurrentDirectory);
|
||||
|
||||
File.Delete("rclone.zip");
|
||||
|
||||
string[] folders = Directory.GetDirectories(Environment.CurrentDirectory);
|
||||
foreach (string folder in folders)
|
||||
{
|
||||
if (folder.Contains("rclone"))
|
||||
{
|
||||
Directory.Move(folder, "rclone");
|
||||
break; //only 1 rclone folder
|
||||
}
|
||||
}
|
||||
}
|
||||
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 (!MainForm.noRcloneUpdating)
|
||||
{
|
||||
if (version != "1.62.2")
|
||||
{
|
||||
Logger.Log("RCLONE Version not matching! Downloading required version.", LogLevel.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)
|
||||
{
|
||||
if (currentAccessedWebsite == "github")
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access the raw.githubusercontent.com page with the Exception: {ex.Message}\nSome files may be missing (ADB, Offline Script, Launcher)");
|
||||
_ = FlexibleMessageBox.Show("These required files were unable to be downloaded\nRookie will now close, please use Offline Mode for manual sideloading if needed");
|
||||
Application.Exit();
|
||||
}
|
||||
if (currentAccessedWebsite == "rclone")
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access the rclone page with the Exception: {ex.Message}\nSome files may be missing (RCLONE)");
|
||||
_ = FlexibleMessageBox.Show("Rclone was unable to be downloaded\nRookie will now close, please use Offline Mode for manual sideloading if needed");
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
254
Sideloader/GetDependencies.cs
Normal file
@@ -0,0 +1,254 @@
|
||||
using JR.Utils.GUI.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
internal class GetDependencies
|
||||
{
|
||||
public static void updatePublicConfig()
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
|
||||
_ = Logger.Log("Attempting to update public config from main.");
|
||||
|
||||
string configUrl = "https://raw.githubusercontent.com/vrpyou/quest/main/vrp-public.json";
|
||||
string fallbackUrl = "https://vrpirates.wiki/downloads/vrp-public.json";
|
||||
|
||||
try
|
||||
{
|
||||
string resultString;
|
||||
|
||||
// Try fetching raw JSON data from the provided link
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
resultString = responseReader.ReadToEnd();
|
||||
_ = Logger.Log($"Retrieved updated config from main: {configUrl}.");
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "vrp-public.json"), resultString);
|
||||
_ = Logger.Log("Public config updated successfully from main.");
|
||||
}
|
||||
}
|
||||
catch (Exception mainException)
|
||||
{
|
||||
_ = Logger.Log($"Failed to update public config from main: {mainException.Message}, trying fallback.", LogLevel.ERROR);
|
||||
try
|
||||
{
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(fallbackUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
string resultString = responseReader.ReadToEnd();
|
||||
_ = Logger.Log($"Retrieved updated config from fallback: {fallbackUrl}.");
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "vrp-public.json"), resultString);
|
||||
_ = Logger.Log("Public config updated successfully from fallback.");
|
||||
}
|
||||
}
|
||||
catch (Exception fallbackException)
|
||||
{
|
||||
_ = Logger.Log($"Failed to update public config from fallback: {fallbackException.Message}.", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Download required dependencies.
|
||||
public static void downloadFiles()
|
||||
{
|
||||
MainForm.SplashScreen.UpdateBackgroundImage(AndroidSideloader.Properties.Resources.splashimage_deps);
|
||||
|
||||
WebClient client = new WebClient();
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
var currentAccessedWebsite = "";
|
||||
try
|
||||
{
|
||||
if (!File.Exists("Sideloader Launcher.exe"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'Sideloader Launcher.exe'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Sideloader%20Launcher.exe", "Sideloader Launcher.exe");
|
||||
_ = Logger.Log($"'Sideloader Launcher.exe' download successful");
|
||||
}
|
||||
|
||||
if (!File.Exists("Rookie Offline.cmd"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'Rookie Offline.cmd'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Rookie%20Offline.cmd", "Rookie Offline.cmd");
|
||||
_ = Logger.Log($"'Rookie Offline.cmd' download successful");
|
||||
}
|
||||
|
||||
if (!File.Exists("CleanupInstall.cmd"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'CleanupInstall.cmd'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/CleanupInstall.cmd", "CleanupInstall.cmd");
|
||||
_ = Logger.Log($"'CleanupInstall.cmd' download successful");
|
||||
}
|
||||
|
||||
if (!File.Exists("AddDefenderExceptions.ps1"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'AddDefenderExceptions.ps1'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/AddDefenderExceptions.ps1", "AddDefenderExceptions.ps1");
|
||||
_ = Logger.Log($"'AddDefenderExceptions.ps1' download successful");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access raw.githubusercontent.com with the Exception:\n{ex.Message}\n\nSome files may be missing (Offline/Cleanup Script, Launcher)");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
|
||||
{
|
||||
if (!Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools"))
|
||||
{
|
||||
_ = Directory.CreateDirectory($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
|
||||
}
|
||||
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing adb within {Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/dependencies.7z", "dependencies.7z");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "dependencies.7z"), $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
|
||||
File.Delete("dependencies.7z");
|
||||
_ = Logger.Log($"adb download successful");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access raw.githubusercontent.com page with the Exception:\n{ex.Message}\n\nSome files may be missing (ADB)");
|
||||
_ = FlexibleMessageBox.Show("ADB was unable to be downloaded\nRookie will now close.");
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
string wantedRcloneVersion = "1.68.2";
|
||||
bool rcloneSuccess = false;
|
||||
|
||||
rcloneSuccess = downloadRclone(wantedRcloneVersion, false);
|
||||
if (!rcloneSuccess) {
|
||||
rcloneSuccess = downloadRclone(wantedRcloneVersion, true);
|
||||
}
|
||||
if (!rcloneSuccess) {
|
||||
_ = Logger.Log($"Unable to download rclone", LogLevel.ERROR);
|
||||
_ = FlexibleMessageBox.Show("Rclone was unable to be downloaded\nRookie will now close, please use Offline Mode for manual sideloading if needed");
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool downloadRclone(string wantedRcloneVersion, bool useFallback = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool updateRclone = false;
|
||||
string currentRcloneVersion = "0.0.0";
|
||||
|
||||
WebClient client = new WebClient();
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
_ = Logger.Log($"Checking for Local rclone...");
|
||||
string dirRclone = Path.Combine(Environment.CurrentDirectory, "rclone");
|
||||
string pathToRclone = Path.Combine(dirRclone, "rclone.exe");
|
||||
if (File.Exists(pathToRclone))
|
||||
{
|
||||
var versionInfo = FileVersionInfo.GetVersionInfo(pathToRclone);
|
||||
currentRcloneVersion = versionInfo.ProductVersion;
|
||||
Logger.Log($"Current RCLONE Version {currentRcloneVersion}");
|
||||
if (!MainForm.noRcloneUpdating)
|
||||
{
|
||||
if (currentRcloneVersion != wantedRcloneVersion)
|
||||
{
|
||||
updateRclone = true;
|
||||
_ = Logger.Log($"RCLONE Version does not match ({currentRcloneVersion})! Downloading required version ({wantedRcloneVersion})");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
updateRclone = true;
|
||||
_ = Logger.Log($"RCLONE exe does not exist, attempting to download");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(dirRclone)) {
|
||||
updateRclone = true;
|
||||
_ = Logger.Log($"Missing RCLONE Folder, attempting to download");
|
||||
|
||||
Directory.CreateDirectory(dirRclone);
|
||||
}
|
||||
|
||||
if (updateRclone == true)
|
||||
{
|
||||
// Preserve vrp.download.config if it exists
|
||||
string configPath = Path.Combine(dirRclone, "vrp.download.config");
|
||||
string tempConfigPath = Path.Combine(Environment.CurrentDirectory, "vrp.download.config.bak");
|
||||
bool hasConfig = false;
|
||||
|
||||
if (File.Exists(configPath))
|
||||
{
|
||||
_ = Logger.Log("Preserving vrp.download.config before update");
|
||||
File.Copy(configPath, tempConfigPath, true);
|
||||
hasConfig = true;
|
||||
}
|
||||
|
||||
MainForm.SplashScreen.UpdateBackgroundImage(AndroidSideloader.Properties.Resources.splashimage_rclone);
|
||||
|
||||
string architecture = Environment.Is64BitOperatingSystem ? "amd64" : "386";
|
||||
string url = $"https://downloads.rclone.org/v{wantedRcloneVersion}/rclone-v{wantedRcloneVersion}-windows-{architecture}.zip";
|
||||
if (useFallback == true) {
|
||||
_ = Logger.Log($"Using git fallback for rclone download");
|
||||
url = $"https://raw.githubusercontent.com/VRPirates/rookie/master/dep/rclone-v{wantedRcloneVersion}-windows-{architecture}.zip";
|
||||
}
|
||||
_ = Logger.Log($"Downloading rclone from {url}");
|
||||
|
||||
_ = Logger.Log("Begin download rclone");
|
||||
client.DownloadFile(url, "rclone.zip");
|
||||
_ = Logger.Log("Complete download rclone");
|
||||
|
||||
_ = Logger.Log($"Extract {Environment.CurrentDirectory}\\rclone.zip");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "rclone.zip"), Environment.CurrentDirectory);
|
||||
string dirExtractedRclone = Path.Combine(Environment.CurrentDirectory, $"rclone-v{wantedRcloneVersion}-windows-{architecture}");
|
||||
File.Delete("rclone.zip");
|
||||
_ = Logger.Log("rclone extracted. Moving files");
|
||||
|
||||
foreach (string file in Directory.GetFiles(dirExtractedRclone))
|
||||
{
|
||||
string fileName = Path.GetFileName(file);
|
||||
string destFile = Path.Combine(dirRclone, fileName);
|
||||
if (File.Exists(destFile))
|
||||
{
|
||||
File.Delete(destFile);
|
||||
}
|
||||
File.Move(file, destFile);
|
||||
}
|
||||
Directory.Delete(dirExtractedRclone, true);
|
||||
|
||||
// Restore vrp.download.config if it was backed up
|
||||
if (hasConfig && File.Exists(tempConfigPath))
|
||||
{
|
||||
_ = Logger.Log("Restoring vrp.download.config after update");
|
||||
File.Move(tempConfigPath, configPath);
|
||||
}
|
||||
|
||||
_ = Logger.Log($"rclone download successful");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = Logger.Log($"Unable to download rclone: {ex}", LogLevel.ERROR);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using AndroidSideloader.Utilities;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -30,6 +31,7 @@ namespace AndroidSideloader
|
||||
public static int VersionCodeIndex = 3;
|
||||
public static int ReleaseAPKPathIndex = 4;
|
||||
public static int VersionNameIndex = 5;
|
||||
public static int DownloadsIndex = 6;
|
||||
|
||||
public static List<string> gameProperties = new List<string>();
|
||||
/* Game Name
|
||||
@@ -41,9 +43,9 @@ namespace AndroidSideloader
|
||||
*/
|
||||
public static List<string[]> games = new List<string[]>();
|
||||
|
||||
public static string Nouns = Environment.CurrentDirectory + "\\nouns";
|
||||
public static string ThumbnailsFolder = Environment.CurrentDirectory + "\\thumbnails";
|
||||
public static string NotesFolder = Environment.CurrentDirectory + "\\notes";
|
||||
public static string Nouns = Path.Combine(Environment.CurrentDirectory, "nouns");
|
||||
public static string ThumbnailsFolder = Path.Combine(Environment.CurrentDirectory, "thumbnails");
|
||||
public static string NotesFolder = Path.Combine(Environment.CurrentDirectory, "notes");
|
||||
|
||||
public static void UpdateNouns(string remote)
|
||||
{
|
||||
@@ -54,7 +56,7 @@ namespace AndroidSideloader
|
||||
public static void UpdateGamePhotos(string remote)
|
||||
{
|
||||
_ = Logger.Log($"Updating Thumbnails");
|
||||
_ = RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/thumbnails\" \"{ThumbnailsFolder}\"");
|
||||
_ = RCLONE.runRcloneCommand_DownloadConfig($"sync \"{remote}:{RcloneGamesFolder}/.meta/thumbnails\" \"{ThumbnailsFolder}\" --transfers 10");
|
||||
}
|
||||
|
||||
public static void UpdateGameNotes(string remote)
|
||||
@@ -76,7 +78,7 @@ namespace AndroidSideloader
|
||||
try
|
||||
{
|
||||
_ = Logger.Log($"Extracting Metadata");
|
||||
Zip.ExtractFile($"{Environment.CurrentDirectory}\\meta.7z", $"{Environment.CurrentDirectory}\\meta",
|
||||
Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "meta.7z"), Path.Combine(Environment.CurrentDirectory, "meta"),
|
||||
MainForm.PublicConfigFile.Password);
|
||||
|
||||
_ = Logger.Log($"Updating Metadata");
|
||||
@@ -96,12 +98,12 @@ namespace AndroidSideloader
|
||||
Directory.Delete(NotesFolder, true);
|
||||
}
|
||||
|
||||
Directory.Move($"{Environment.CurrentDirectory}\\meta\\.meta\\nouns", Nouns);
|
||||
Directory.Move($"{Environment.CurrentDirectory}\\meta\\.meta\\thumbnails", ThumbnailsFolder);
|
||||
Directory.Move($"{Environment.CurrentDirectory}\\meta\\.meta\\notes", NotesFolder);
|
||||
Directory.Move(Path.Combine(Environment.CurrentDirectory, "meta", ".meta", "nouns"), Nouns);
|
||||
Directory.Move(Path.Combine(Environment.CurrentDirectory, "meta", ".meta", "thumbnails"), ThumbnailsFolder);
|
||||
Directory.Move(Path.Combine(Environment.CurrentDirectory, "meta", ".meta", "notes"), NotesFolder);
|
||||
|
||||
_ = Logger.Log($"Initializing Games List");
|
||||
string gameList = File.ReadAllText($"{Environment.CurrentDirectory}\\meta\\VRP-GameList.txt");
|
||||
string gameList = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "meta", "VRP-GameList.txt"));
|
||||
|
||||
string[] splitList = gameList.Split('\n');
|
||||
splitList = splitList.Skip(1).ToArray();
|
||||
@@ -114,7 +116,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
Directory.Delete($"{Environment.CurrentDirectory}\\meta", true);
|
||||
Directory.Delete(Path.Combine(Environment.CurrentDirectory, "meta"), true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -177,9 +179,12 @@ namespace AndroidSideloader
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
_ = Logger.Log($"Attempting to Update Download Config");
|
||||
|
||||
string downloadConfigFilename = "vrp.download.config";
|
||||
|
||||
try
|
||||
{
|
||||
string configUrl = "https://wiki.vrpirates.club/downloads/vrp.download.config";
|
||||
string configUrl = $"https://vrpirates.wiki/downloads/{downloadConfigFilename}";
|
||||
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
@@ -188,23 +193,23 @@ namespace AndroidSideloader
|
||||
|
||||
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
|
||||
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new"))
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new")))
|
||||
{
|
||||
File.Delete(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new");
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new"));
|
||||
}
|
||||
|
||||
File.Create(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new").Close();
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new", resultString);
|
||||
File.Create(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new")).Close();
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new"), resultString);
|
||||
|
||||
if (!File.Exists(Environment.CurrentDirectory + "\\rclone\\hash.txt"))
|
||||
if (!File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt")))
|
||||
{
|
||||
File.Create(Environment.CurrentDirectory + "\\rclone\\hash.txt").Close();
|
||||
File.Create(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt")).Close();
|
||||
}
|
||||
|
||||
string newConfig = CalculateMD5(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new");
|
||||
string oldConfig = File.ReadAllText(Environment.CurrentDirectory + "\\rclone\\hash.txt");
|
||||
string newConfig = CalculateMD5(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new"));
|
||||
string oldConfig = File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt"));
|
||||
|
||||
if (!File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config"))
|
||||
if (!File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}")))
|
||||
{
|
||||
oldConfig = "Config Doesnt Exist!";
|
||||
}
|
||||
@@ -215,23 +220,23 @@ namespace AndroidSideloader
|
||||
{
|
||||
_ = Logger.Log($"Updated Config Hash is different than the current Config. Updating Configuration File.");
|
||||
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config"))
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}")))
|
||||
{
|
||||
File.Delete(Environment.CurrentDirectory + "\\rclone\\vrp.download.config");
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}"));
|
||||
}
|
||||
|
||||
File.Move(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new", Environment.CurrentDirectory + "\\rclone\\vrp.download.config");
|
||||
File.Move(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new"), Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}"));
|
||||
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\hash.txt", string.Empty);
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\hash.txt", newConfig);
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt"), string.Empty);
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "hash.txt"), newConfig);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = Logger.Log($"Updated Config Hash matches last download. Not updating.");
|
||||
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new"))
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}_new")))
|
||||
{
|
||||
File.Delete(Environment.CurrentDirectory + "\\rclone\\vrp.download.config_new");
|
||||
File.Delete(Path.Combine(Environment.CurrentDirectory, "rclone", $"{downloadConfigFilename}g_new"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,7 +253,7 @@ namespace AndroidSideloader
|
||||
_ = Logger.Log($"Attempting to Update Upload Config");
|
||||
try
|
||||
{
|
||||
string configUrl = "https://wiki.vrpirates.club/downloads/vrp.upload.config";
|
||||
string configUrl = "https://vrpirates.wiki/downloads/vrp.upload.config";
|
||||
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
@@ -257,7 +262,7 @@ namespace AndroidSideloader
|
||||
|
||||
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
|
||||
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\rclone\\vrp.upload.config", resultString);
|
||||
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "rclone", "vrp.upload.config"), resultString);
|
||||
|
||||
_ = Logger.Log("Upload config updated successfully.");
|
||||
}
|
||||
@@ -268,35 +273,6 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
public static void updatePublicConfig()
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12
|
||||
| SecurityProtocolType.Ssl3;
|
||||
_ = Logger.Log($"Attempting to Update Public Config");
|
||||
try
|
||||
{
|
||||
string configUrl = "https://wiki.vrpirates.club/downloads/vrp-public.json";
|
||||
|
||||
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
|
||||
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
|
||||
{
|
||||
string resultString = responseReader.ReadToEnd();
|
||||
|
||||
_ = Logger.Log($"Retrieved updated config from: {configUrl}");
|
||||
|
||||
File.WriteAllText(Environment.CurrentDirectory + "\\vrp-public.json", resultString);
|
||||
|
||||
_ = Logger.Log("Public config updated successfully.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_ = Logger.Log($"Failed to update Public config: {e.Message}", LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
private static string CalculateMD5(string filename)
|
||||
{
|
||||
using (MD5 md5 = MD5.Create())
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using AndroidSideloader.Utilities;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Security.Cryptography;
|
||||
@@ -8,6 +9,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
internal class SideloaderUtilities
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
public static bool CheckFolderIsObb(string path)
|
||||
{
|
||||
string[] files = Directory.GetFiles(path);
|
||||
@@ -26,49 +28,23 @@ namespace AndroidSideloader
|
||||
private static string uuid = null;
|
||||
public static string UUID()
|
||||
{
|
||||
if (uuid != null)
|
||||
uuid = settings.UUID;
|
||||
if (string.IsNullOrEmpty(uuid) != true)
|
||||
{
|
||||
return uuid;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_Processor");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
var bytes = new byte[16];
|
||||
using (var rng = new RNGCryptoServiceProvider())
|
||||
{
|
||||
_ = sb.Append(queryObj["NumberOfCores"]);
|
||||
_ = sb.Append(queryObj["ProcessorId"]);
|
||||
_ = sb.Append(queryObj["Name"]);
|
||||
_ = sb.Append(queryObj["SocketDesignation"]);
|
||||
rng.GetBytes(bytes);
|
||||
}
|
||||
|
||||
searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_BIOS");
|
||||
uuid = BitConverter.ToString(bytes).Replace("-", "");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
_ = sb.Append(queryObj["Manufacturer"]);
|
||||
_ = sb.Append(queryObj["Name"]);
|
||||
_ = sb.Append(queryObj["Version"]);
|
||||
settings.UUID = uuid;
|
||||
settings.Save();
|
||||
|
||||
}
|
||||
|
||||
searcher = new ManagementObjectSearcher("root\\CIMV2",
|
||||
"SELECT * FROM Win32_BaseBoard");
|
||||
|
||||
foreach (ManagementObject queryObj in searcher.Get())
|
||||
{
|
||||
_ = sb.Append(queryObj["Product"]);
|
||||
}
|
||||
|
||||
byte[] bytes = Encoding.ASCII.GetBytes(sb.ToString());
|
||||
SHA256Managed sha = new SHA256Managed();
|
||||
|
||||
byte[] hash = sha.ComputeHash(bytes);
|
||||
|
||||
uuid = BitConverter.ToString(hash).Replace("-", "");
|
||||
return uuid;
|
||||
}
|
||||
|
||||
|
||||
6
Splash.Designer.cs
generated
@@ -30,9 +30,9 @@
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Splash));
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// Splash
|
||||
//
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
@@ -56,4 +56,4 @@
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Windows.Forms;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -8,5 +10,10 @@ namespace AndroidSideloader
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void UpdateBackgroundImage(Image newImage)
|
||||
{
|
||||
this.BackgroundImage = newImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
36
UpdateForm.Designer.cs
generated
@@ -40,11 +40,11 @@ namespace AndroidSideloader
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
//
|
||||
this.panel1.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.panel1.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
|
||||
this.panel1.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes;
|
||||
this.panel1.Controls.Add(this.YesUpdate);
|
||||
this.panel1.Controls.Add(this.panel3);
|
||||
this.panel1.Controls.Add(this.UpdateVerLabel);
|
||||
@@ -58,9 +58,9 @@ namespace AndroidSideloader
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseDown);
|
||||
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseMove);
|
||||
this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// YesUpdate
|
||||
//
|
||||
//
|
||||
this.YesUpdate.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.YesUpdate.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.YesUpdate.BackColor = System.Drawing.Color.Transparent;
|
||||
@@ -79,9 +79,9 @@ namespace AndroidSideloader
|
||||
this.YesUpdate.Text = "Update Now";
|
||||
this.YesUpdate.Transparency = false;
|
||||
this.YesUpdate.Click += new System.EventHandler(this.YesUpdate_Click);
|
||||
//
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
//
|
||||
this.panel3.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
|
||||
this.panel3.Controls.Add(this.UpdateTextBox);
|
||||
this.panel3.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
@@ -89,9 +89,9 @@ namespace AndroidSideloader
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(432, 218);
|
||||
this.panel3.TabIndex = 0;
|
||||
//
|
||||
//
|
||||
// UpdateTextBox
|
||||
//
|
||||
//
|
||||
this.UpdateTextBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.ComboBoxColor;
|
||||
this.UpdateTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.UpdateTextBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ComboBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
@@ -109,9 +109,9 @@ namespace AndroidSideloader
|
||||
this.UpdateTextBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseDown);
|
||||
this.UpdateTextBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseMove);
|
||||
this.UpdateTextBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.UpdateForm_MouseUp);
|
||||
//
|
||||
//
|
||||
// UpdateVerLabel
|
||||
//
|
||||
//
|
||||
this.UpdateVerLabel.AutoSize = true;
|
||||
this.UpdateVerLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.UpdateVerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
@@ -121,9 +121,9 @@ namespace AndroidSideloader
|
||||
this.UpdateVerLabel.Size = new System.Drawing.Size(94, 15);
|
||||
this.UpdateVerLabel.TabIndex = 3;
|
||||
this.UpdateVerLabel.Text = "Update Version:";
|
||||
//
|
||||
//
|
||||
// CurVerLabel
|
||||
//
|
||||
//
|
||||
this.CurVerLabel.AutoSize = true;
|
||||
this.CurVerLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.CurVerLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
@@ -133,9 +133,9 @@ namespace AndroidSideloader
|
||||
this.CurVerLabel.Size = new System.Drawing.Size(94, 15);
|
||||
this.CurVerLabel.TabIndex = 2;
|
||||
this.CurVerLabel.Text = "Current Version:";
|
||||
//
|
||||
//
|
||||
// SkipUpdate
|
||||
//
|
||||
//
|
||||
this.SkipUpdate.AutoSize = true;
|
||||
this.SkipUpdate.BackColor = System.Drawing.Color.Transparent;
|
||||
this.SkipUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
@@ -147,9 +147,9 @@ namespace AndroidSideloader
|
||||
this.SkipUpdate.TabIndex = 4;
|
||||
this.SkipUpdate.Text = "𝖲𝖪𝖨𝖯 𝖥𝖮𝖱 𝖭𝖮𝖶";
|
||||
this.SkipUpdate.Click += new System.EventHandler(this.SkipUpdate_Click);
|
||||
//
|
||||
//
|
||||
// UpdateForm
|
||||
//
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
|
||||
@@ -181,4 +181,4 @@ namespace AndroidSideloader
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private RoundButton YesUpdate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace AndroidSideloader
|
||||
private static readonly string RawGitHubUrl = "https://raw.githubusercontent.com/VRPirates/rookie";
|
||||
private static readonly string GitHubUrl = "https://github.com/VRPirates/rookie";
|
||||
|
||||
public static readonly string LocalVersion = "2.21";
|
||||
public static readonly string LocalVersion = "2.34.1";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
ServicePointManager.Expect100Continue = true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
|
||||
Logger.Log($"Downloading update from {GitHubUrl}/releases/download/v{currentVersion}/{AppName}.exe to {AppName} v{currentVersion}.exe");
|
||||
fileClient.DownloadFile($"{GitHubUrl}/releases/download/v{currentVersion}/{AppName}.exe", $"{AppName} v{currentVersion}.exe");
|
||||
|
||||
|
||||
196
UsernameForm.Designer.cs
generated
@@ -1,98 +1,98 @@
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
partial class UsernameForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UsernameForm));
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new AndroidSideloader.RoundButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.textBox1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.textBox1.ForeColor = System.Drawing.Color.White;
|
||||
this.textBox1.Location = new System.Drawing.Point(13, 13);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(418, 24);
|
||||
this.textBox1.TabIndex = 0;
|
||||
this.textBox1.Text = "Enter your username here";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Location = new System.Drawing.Point(13, 51);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Radius = 5;
|
||||
this.button1.Size = new System.Drawing.Size(418, 34);
|
||||
this.button1.Stroke = true;
|
||||
this.button1.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Create User.Json";
|
||||
this.button1.Transparency = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// UsernameForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
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(443, 100);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximumSize = new System.Drawing.Size(459, 139);
|
||||
this.MinimumSize = new System.Drawing.Size(459, 139);
|
||||
this.Name = "UsernameForm";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "USER.JSON";
|
||||
this.Load += new System.EventHandler(this.usernameForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private RoundButton button1;
|
||||
}
|
||||
}
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
partial class UsernameForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UsernameForm));
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new AndroidSideloader.RoundButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
|
||||
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.textBox1.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.textBox1.ForeColor = System.Drawing.Color.White;
|
||||
this.textBox1.Location = new System.Drawing.Point(13, 13);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(418, 24);
|
||||
this.textBox1.TabIndex = 0;
|
||||
this.textBox1.Text = "Enter your username here";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.button1.Location = new System.Drawing.Point(13, 51);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Radius = 5;
|
||||
this.button1.Size = new System.Drawing.Size(418, 34);
|
||||
this.button1.Stroke = true;
|
||||
this.button1.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Create User.Json";
|
||||
this.button1.Transparency = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// UsernameForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes;
|
||||
this.ClientSize = new System.Drawing.Size(443, 100);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.ForeColor = System.Drawing.Color.White;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximumSize = new System.Drawing.Size(459, 139);
|
||||
this.MinimumSize = new System.Drawing.Size(459, 139);
|
||||
this.Name = "UsernameForm";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "USER.JSON";
|
||||
this.Load += new System.EventHandler(this.usernameForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private RoundButton button1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace AndroidSideloader
|
||||
|
||||
public static void createUserJson(string username)
|
||||
{
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global username {username}");
|
||||
_ = ADB.RunAdbCommandToString($"shell settings put global username \"{username}\"");
|
||||
foreach (string jsonFileName in userJsons)
|
||||
{
|
||||
createUserJsonByName(username, jsonFileName);
|
||||
|
||||
@@ -1,62 +1,109 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public enum LogLevel
|
||||
{
|
||||
DEBUG,
|
||||
INFO,
|
||||
WARNING,
|
||||
ERROR,
|
||||
TRACE,
|
||||
FATAL
|
||||
}
|
||||
|
||||
public static class Logger
|
||||
{
|
||||
private static readonly object lockObject = new object();
|
||||
private static string logFilePath = Properties.Settings.Default.CurrentLogPath;
|
||||
|
||||
public static bool Log(string text, LogLevel logLevel = LogLevel.INFO, bool ret = true)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(text) || text.Length <= 5)
|
||||
return ret;
|
||||
|
||||
string time = DateTime.UtcNow.ToString("hh:mm:ss.fff tt (UTC): ");
|
||||
string newline = text.Length > 40 && text.Contains("\n") ? "\n\n" : "\n";
|
||||
string logEntry = time + "[" + logLevel.ToString().ToUpper() + "] [" + GetCallerInfo() + "] " + text + newline;
|
||||
|
||||
try
|
||||
{
|
||||
lock (lockObject)
|
||||
{
|
||||
File.AppendAllText(logFilePath, logEntry);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Handle the exception if necessary
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string GetCallerInfo()
|
||||
{
|
||||
System.Diagnostics.StackTrace stackTrace = new System.Diagnostics.StackTrace(true);
|
||||
if (stackTrace.FrameCount >= 3)
|
||||
{
|
||||
var frame = stackTrace.GetFrame(2);
|
||||
var method = frame.GetMethod();
|
||||
string className = method.DeclaringType?.Name;
|
||||
string methodName = method.Name;
|
||||
string callerInfo = $"{className}.{methodName}";
|
||||
return callerInfo;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
using AndroidSideloader.Utilities;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
public enum LogLevel
|
||||
{
|
||||
DEBUG,
|
||||
INFO,
|
||||
WARNING,
|
||||
ERROR,
|
||||
TRACE,
|
||||
FATAL
|
||||
}
|
||||
|
||||
public static class Logger
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
private static readonly object lockObject = new object();
|
||||
private static string logFilePath = settings.CurrentLogPath;
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Set default log path if not already set
|
||||
if (string.IsNullOrEmpty(logFilePath))
|
||||
{
|
||||
logFilePath = Path.Combine(Environment.CurrentDirectory, "debuglog.txt");
|
||||
}
|
||||
|
||||
// Create directory if it doesn't exist
|
||||
string logDirectory = Path.GetDirectoryName(logFilePath);
|
||||
if (!string.IsNullOrEmpty(logDirectory) && !Directory.Exists(logDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(logDirectory);
|
||||
}
|
||||
|
||||
// Create log file if it doesn't exist
|
||||
if (!File.Exists(logFilePath))
|
||||
{
|
||||
using (FileStream fs = File.Create(logFilePath))
|
||||
{
|
||||
// Create empty file
|
||||
}
|
||||
}
|
||||
|
||||
// Update settings with log path
|
||||
settings.CurrentLogPath = logFilePath;
|
||||
settings.Save();
|
||||
|
||||
// Initial log entry
|
||||
Log($"Logger initialized at: {DateTime.Now:hh:mmtt(UTC)}", LogLevel.INFO);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error initializing logger: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Log(string text, LogLevel logLevel = LogLevel.INFO, bool ret = true)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(text) || text.Length <= 5)
|
||||
return ret;
|
||||
|
||||
// Initialize logger if not already initialized
|
||||
if (string.IsNullOrEmpty(logFilePath))
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
string time = DateTime.UtcNow.ToString("hh:mm:ss.fff tt (UTC): ");
|
||||
string newline = text.Length > 40 && text.Contains("\n") ? "\n\n" : "\n";
|
||||
string logEntry = time + "[" + logLevel.ToString().ToUpper() + "] [" + GetCallerInfo() + "] " + text + newline;
|
||||
|
||||
try
|
||||
{
|
||||
lock (lockObject)
|
||||
{
|
||||
File.AppendAllText(logFilePath, logEntry);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error writing to log: {ex.Message}");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static string GetCallerInfo()
|
||||
{
|
||||
System.Diagnostics.StackTrace stackTrace = new System.Diagnostics.StackTrace(true);
|
||||
if (stackTrace.FrameCount >= 3)
|
||||
{
|
||||
var frame = stackTrace.GetFrame(2);
|
||||
var method = frame.GetMethod();
|
||||
string className = method.DeclaringType?.Name;
|
||||
string methodName = method.Name;
|
||||
string callerInfo = $"{className}.{methodName}";
|
||||
return callerInfo;
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
81
Utilities/Metrics.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
internal class Metrics
|
||||
{
|
||||
public static async void CountDownload(string packageName, string versionCode)
|
||||
{
|
||||
try
|
||||
{
|
||||
var apiUrl = "https://api.vrpirates.wiki/metrics/add";
|
||||
|
||||
var requestBody = new
|
||||
{
|
||||
packagename = packageName,
|
||||
versioncode = versionCode
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(requestBody);
|
||||
string res = await Task.Run(() => sendToApi(apiUrl, json, "post"));
|
||||
_ = Logger.Log(res);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log($"Unable to log download: {ex.Message}", LogLevel.WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static async Task<string> sendToApi(string apiUrl, string requestBody = null, string type = "get")
|
||||
{
|
||||
string token = "cm9va2llOkN0UHlyTE9oUGoxWXg1cE9KdDNBSkswZ25n";
|
||||
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
var request = new HttpRequestMessage();
|
||||
|
||||
// Set the HTTP method
|
||||
request.Method = type.ToLower() == "post" ? HttpMethod.Post : HttpMethod.Get;
|
||||
|
||||
// For GET requests with parameters, append them to the URL
|
||||
if (request.Method == HttpMethod.Get && !string.IsNullOrEmpty(requestBody))
|
||||
{
|
||||
var uriBuilder = new UriBuilder(apiUrl);
|
||||
uriBuilder.Query = requestBody;
|
||||
request.RequestUri = uriBuilder.Uri;
|
||||
}
|
||||
else
|
||||
{
|
||||
request.RequestUri = new Uri(apiUrl);
|
||||
}
|
||||
|
||||
// For POST requests, set the content
|
||||
if (request.Method == HttpMethod.Post && !string.IsNullOrEmpty(requestBody))
|
||||
{
|
||||
request.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
|
||||
}
|
||||
|
||||
// Add headers to the request
|
||||
request.Headers.Add("Authorization", token);
|
||||
request.Headers.Add("Origin", "rookie");
|
||||
|
||||
string responseContent = "";
|
||||
try
|
||||
{
|
||||
HttpResponseMessage response = await client.SendAsync(request);
|
||||
responseContent = await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log($"Unable to get Metrics Data: {ex.Message}", LogLevel.WARNING);
|
||||
}
|
||||
|
||||
return responseContent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
292
Utilities/SettingsManager.cs
Normal file
@@ -0,0 +1,292 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
public class SettingsManager : IDisposable
|
||||
{
|
||||
private static readonly Lazy<SettingsManager> _instance = new Lazy<SettingsManager>(() => new SettingsManager());
|
||||
private static readonly string settingsFilePath = Path.Combine(
|
||||
Environment.CurrentDirectory,
|
||||
"settings.json");
|
||||
|
||||
// Custom converters for special types
|
||||
public class FontConverter : JsonConverter<Font>
|
||||
{
|
||||
public override Font ReadJson(JsonReader reader, Type objectType, Font existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
var jo = JObject.Load(reader);
|
||||
string fontFamily = jo["FontFamily"]?.Value<string>() ?? "Microsoft Sans Serif";
|
||||
float fontSize = jo["Size"]?.Value<float>() ?? 11.25f;
|
||||
return new Font(fontFamily, fontSize);
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, Font value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
writer.WritePropertyName("FontFamily");
|
||||
writer.WriteValue(value.FontFamily.Name);
|
||||
writer.WritePropertyName("Size");
|
||||
writer.WriteValue(value.Size);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
|
||||
public class ColorConverter : JsonConverter<Color>
|
||||
{
|
||||
public override Color ReadJson(JsonReader reader, Type objectType, Color existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
var jo = JObject.Load(reader);
|
||||
int a = jo["A"]?.Value<int>() ?? 255;
|
||||
int r = jo["R"]?.Value<int>() ?? 0;
|
||||
int g = jo["G"]?.Value<int>() ?? 0;
|
||||
int b = jo["B"]?.Value<int>() ?? 0;
|
||||
return Color.FromArgb(a, r, g, b);
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, Color value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteStartObject();
|
||||
writer.WritePropertyName("A");
|
||||
writer.WriteValue(value.A);
|
||||
writer.WritePropertyName("R");
|
||||
writer.WriteValue(value.R);
|
||||
writer.WritePropertyName("G");
|
||||
writer.WriteValue(value.G);
|
||||
writer.WritePropertyName("B");
|
||||
writer.WriteValue(value.B);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(FontConverter))]
|
||||
public Font FontStyle { get; set; } = new Font("Microsoft Sans Serif", 11.25f);
|
||||
[JsonConverter(typeof(FontConverter))]
|
||||
public Font BigFontStyle { get; set; } = new Font("Microsoft Sans Serif", 14f);
|
||||
[JsonConverter(typeof(ColorConverter))]
|
||||
public Color FontColor { get; set; } = Color.White;
|
||||
[JsonConverter(typeof(ColorConverter))]
|
||||
public Color ComboBoxColor { get; set; } = Color.FromArgb(25, 25, 25);
|
||||
[JsonConverter(typeof(ColorConverter))]
|
||||
public Color SubButtonColor { get; set; } = Color.FromArgb(25, 25, 25);
|
||||
[JsonConverter(typeof(ColorConverter))]
|
||||
public Color TextBoxColor { get; set; } = Color.FromArgb(25, 25, 25);
|
||||
[JsonConverter(typeof(ColorConverter))]
|
||||
public Color ButtonColor { get; set; } = Color.Black;
|
||||
[JsonConverter(typeof(ColorConverter))]
|
||||
public Color BackColor { get; set; } = Color.FromArgb(1, 1, 1);
|
||||
public bool CheckForUpdates { get; set; } = true;
|
||||
public bool EnableMessageBoxes { get; set; } = true;
|
||||
public bool FirstRun { get; set; } = true;
|
||||
public bool DeleteAllAfterInstall { get; set; } = true;
|
||||
public bool AutoUpdateConfig { get; set; } = true;
|
||||
public bool UserJsonOnGameInstall { get; set; } = false;
|
||||
public bool CallUpgrade { get; set; } = true;
|
||||
public string BackPicturePath { get; set; } = string.Empty;
|
||||
public bool SpoofGames { get; set; } = false;
|
||||
public bool ResignAPKs { get; set; } = false;
|
||||
public string IPAddress { get; set; } = string.Empty;
|
||||
public string InstalledApps { get; set; } = string.Empty;
|
||||
public string ADBPath { get; set; } = string.Empty;
|
||||
public string MainDir { get; set; } = string.Empty;
|
||||
public bool Delsh { get; set; } = false;
|
||||
public string CurrPckg { get; set; } = string.Empty;
|
||||
public string ADBFolder { get; set; } = string.Empty;
|
||||
public bool WirelessADB { get; set; } = false;
|
||||
public string CurrentGamename { get; set; } = string.Empty;
|
||||
public bool PackageNameToCB { get; set; } = false;
|
||||
public bool DownUpHeld { get; set; } = false;
|
||||
public string CurrentLogPath { get; set; } = string.Empty;
|
||||
public string CurrentLogName { get; set; } = string.Empty;
|
||||
public string CurrentCrashPath { get; set; } = string.Empty;
|
||||
public string CurrentCrashName { get; set; } = string.Empty;
|
||||
public bool AdbDebugWarned { get; set; } = false;
|
||||
public bool NodeviceMode { get; set; } = false;
|
||||
public bool BMBFChecked { get; set; } = true;
|
||||
public string GamesList { get; set; } = string.Empty;
|
||||
public bool UploadedGameList { get; set; } = false;
|
||||
public string GlobalUsername { get; set; } = string.Empty;
|
||||
public DateTime LastTimeShared { get; set; } = new DateTime(1969, 4, 20, 16, 20, 0);
|
||||
public bool AutoReinstall { get; set; } = false;
|
||||
public string NonAppPackages { get; set; } = string.Empty;
|
||||
public DateTime LastLaunch { get; set; } = new DateTime(1969, 4, 20, 16, 20, 0);
|
||||
public string SubmittedUpdates { get; set; } = string.Empty;
|
||||
public bool ListUpped { get; set; } = false;
|
||||
public DateTime LastLaunch2 { get; set; } = new DateTime(1969, 4, 20, 16, 20, 0);
|
||||
public bool Wired { get; set; } = false;
|
||||
public string AppPackages { get; set; } = string.Empty;
|
||||
public bool TrailersOn { get; set; } = false;
|
||||
public string DownloadDir { get; set; } = string.Empty;
|
||||
public bool CustomDownloadDir { get; set; } = false;
|
||||
public bool CustomBackupDir { get; set; } = false;
|
||||
public string BackupDir { get; set; } = string.Empty;
|
||||
public bool SingleThreadMode { get; set; } = true;
|
||||
public bool VirtualFilesystemCompatibility { get; set; } = false;
|
||||
public bool UpdateSettings { get; set; } = true;
|
||||
public string UUID { get; set; } = Guid.NewGuid().ToString();
|
||||
public bool CreatePubMirrorFile { get; set; } = true;
|
||||
public bool UseDownloadedFiles { get; set; } = false;
|
||||
public float BandwidthLimit { get; set; } = 0f;
|
||||
public bool HideAdultContent { get; set; } = false;
|
||||
public string[] FavoritedGames { get; set; } = new string[0];
|
||||
|
||||
private SettingsManager()
|
||||
{
|
||||
Load();
|
||||
Save();
|
||||
}
|
||||
|
||||
public static SettingsManager Instance => _instance.Value;
|
||||
|
||||
public void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||
};
|
||||
|
||||
var json = JsonConvert.SerializeObject(this, settings);
|
||||
File.WriteAllText(settingsFilePath, json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error saving settings: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private void Load()
|
||||
{
|
||||
Debug.WriteLine("Loading settings...");
|
||||
if (!File.Exists(settingsFilePath))
|
||||
{
|
||||
CreateDefaultSettings();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(settingsFilePath);
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
Error = (sender, args) =>
|
||||
{
|
||||
Debug.WriteLine($"Error deserializing setting: {args.ErrorContext.Error.Message}");
|
||||
args.ErrorContext.Handled = true;
|
||||
}
|
||||
};
|
||||
|
||||
JsonConvert.PopulateObject(json, this, settings);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"Error loading settings: {ex.Message}");
|
||||
CreateDefaultSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateDefaultSettings()
|
||||
{
|
||||
FontStyle = new Font("Microsoft Sans Serif", 11.25f);
|
||||
BigFontStyle = new Font("Microsoft Sans Serif", 14f);
|
||||
FontColor = Color.White;
|
||||
ComboBoxColor = Color.FromArgb(25, 25, 25);
|
||||
SubButtonColor = Color.FromArgb(25, 25, 25);
|
||||
TextBoxColor = Color.FromArgb(25, 25, 25);
|
||||
ButtonColor = Color.Black;
|
||||
BackColor = Color.FromArgb(1, 1, 1);
|
||||
CheckForUpdates = true;
|
||||
EnableMessageBoxes = true;
|
||||
FirstRun = true;
|
||||
DeleteAllAfterInstall = true;
|
||||
AutoUpdateConfig = true;
|
||||
UserJsonOnGameInstall = false;
|
||||
CallUpgrade = true;
|
||||
BackPicturePath = string.Empty;
|
||||
SpoofGames = false;
|
||||
ResignAPKs = false;
|
||||
IPAddress = string.Empty;
|
||||
InstalledApps = string.Empty;
|
||||
ADBPath = string.Empty;
|
||||
MainDir = string.Empty;
|
||||
Delsh = false;
|
||||
CurrPckg = string.Empty;
|
||||
ADBFolder = string.Empty;
|
||||
WirelessADB = false;
|
||||
CurrentGamename = string.Empty;
|
||||
PackageNameToCB = false;
|
||||
DownUpHeld = false;
|
||||
CurrentLogPath = string.Empty;
|
||||
CurrentLogName = string.Empty;
|
||||
CurrentCrashPath = string.Empty;
|
||||
CurrentCrashName = string.Empty;
|
||||
AdbDebugWarned = false;
|
||||
NodeviceMode = false;
|
||||
BMBFChecked = true;
|
||||
GamesList = string.Empty;
|
||||
UploadedGameList = false;
|
||||
GlobalUsername = string.Empty;
|
||||
LastTimeShared = new DateTime(1969, 4, 20, 16, 20, 0);
|
||||
AutoReinstall = false;
|
||||
NonAppPackages = string.Empty;
|
||||
LastLaunch = new DateTime(1969, 4, 20, 16, 20, 0);
|
||||
SubmittedUpdates = string.Empty;
|
||||
ListUpped = false;
|
||||
LastLaunch2 = new DateTime(1969, 4, 20, 16, 20, 0);
|
||||
Wired = false;
|
||||
AppPackages = string.Empty;
|
||||
TrailersOn = false;
|
||||
DownloadDir = string.Empty;
|
||||
CustomDownloadDir = false;
|
||||
CustomBackupDir = false;
|
||||
BackupDir = string.Empty;
|
||||
SingleThreadMode = true;
|
||||
VirtualFilesystemCompatibility = false;
|
||||
UpdateSettings = true;
|
||||
UUID = Guid.NewGuid().ToString();
|
||||
CreatePubMirrorFile = true;
|
||||
UseDownloadedFiles = false;
|
||||
BandwidthLimit = 0f;
|
||||
HideAdultContent = false;
|
||||
FavoritedGames = new string[0];
|
||||
|
||||
Save();
|
||||
Debug.WriteLine("Default settings created.");
|
||||
}
|
||||
|
||||
public void AddFavoriteGame(string packageName)
|
||||
{
|
||||
if (!FavoritedGames.Contains(packageName))
|
||||
{
|
||||
var list = FavoritedGames.ToList();
|
||||
list.Add(packageName);
|
||||
FavoritedGames = list.ToArray();
|
||||
Save();
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveFavoriteGame(string packageName)
|
||||
{
|
||||
if (FavoritedGames.Contains(packageName))
|
||||
{
|
||||
var list = FavoritedGames.ToList();
|
||||
list.Remove(packageName);
|
||||
FavoritedGames = list.ToArray();
|
||||
Save();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
FontStyle?.Dispose();
|
||||
BigFontStyle?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
102
Utilities/Zip.cs
@@ -4,34 +4,56 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
public class ExtractionException : Exception
|
||||
{
|
||||
public ExtractionException(string message) : base(message) { }
|
||||
}
|
||||
|
||||
internal class Zip
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
public static void ExtractFile(string sourceArchive, string destination)
|
||||
{
|
||||
string args = $"x \"{sourceArchive}\" -y -o\"{destination}\"";
|
||||
string args = $"x \"{sourceArchive}\" -y -o\"{destination}\" -bsp1";
|
||||
DoExtract(args);
|
||||
}
|
||||
|
||||
public static void ExtractFile(string sourceArchive, string destination, string password)
|
||||
{
|
||||
string args = $"x \"{sourceArchive}\" -y -o\"{destination}\" -p\"{password}\"";
|
||||
string args = $"x \"{sourceArchive}\" -y -o\"{destination}\" -p\"{password}\" -bsp1";
|
||||
DoExtract(args);
|
||||
}
|
||||
|
||||
private static string extractionError = null;
|
||||
private static bool errorMessageShown = false;
|
||||
private static void DoExtract(string args)
|
||||
{
|
||||
if (!File.Exists(Environment.CurrentDirectory + "\\7z.exe") || !File.Exists(Environment.CurrentDirectory + "\\7z.dll"))
|
||||
if (!File.Exists(Path.Combine(Environment.CurrentDirectory, "7z.exe")) || !File.Exists(Path.Combine(Environment.CurrentDirectory, "7z.dll")))
|
||||
{
|
||||
_ = Logger.Log("Begin download 7-zip");
|
||||
WebClient client = new WebClient();
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/7z.exe", "7z.exe");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/7z.dll", "7z.dll");
|
||||
string architecture = Environment.Is64BitOperatingSystem ? "64" : "";
|
||||
try
|
||||
{
|
||||
client.DownloadFile($"https://github.com/VRPirates/rookie/raw/master/7z{architecture}.exe", $"7z.exe");
|
||||
client.DownloadFile($"https://github.com/VRPirates/rookie/raw/master/7z{architecture}.dll", $"7z.dll");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access the GitHub page with the Exception: {ex.Message}\nSome files may be missing (7z)");
|
||||
_ = FlexibleMessageBox.Show("7z was unable to be downloaded\nRookie will now close");
|
||||
Application.Exit();
|
||||
}
|
||||
_ = Logger.Log("Complete download 7-zip");
|
||||
}
|
||||
|
||||
ProcessStartInfo pro = new ProcessStartInfo
|
||||
{
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
@@ -46,23 +68,67 @@ namespace AndroidSideloader.Utilities
|
||||
|
||||
_ = Logger.Log($"Extract: 7z {string.Join(" ", args.Split(' ').Where(a => !a.StartsWith("-p")))}");
|
||||
|
||||
Process x = Process.Start(pro);
|
||||
x.WaitForExit();
|
||||
if (x.ExitCode != 0)
|
||||
using (Process x = new Process())
|
||||
{
|
||||
string error = x.StandardError.ReadToEnd();
|
||||
x.StartInfo = pro;
|
||||
|
||||
if (error.Contains("There is not enough space on the disk"))
|
||||
if (MainForm.isInDownloadExtract && x != null)
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"Not enough space to extract archive.\r\nCheck free space in {Environment.CurrentDirectory} and try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
x.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data != null)
|
||||
{
|
||||
var match = Regex.Match(e.Data, @"(\d+)%");
|
||||
if (match.Success)
|
||||
{
|
||||
int progress = int.Parse(match.Groups[1].Value);
|
||||
MainForm mainForm = (MainForm)Application.OpenForms[0];
|
||||
if (mainForm != null)
|
||||
{
|
||||
mainForm.Invoke((Action)(() => mainForm.SetProgress(progress)));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
_ = Logger.Log(x.StandardOutput.ReadToEnd());
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
throw new ApplicationException($"Extracting failed, status code {x.ExitCode}");
|
||||
|
||||
x.ErrorDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data != null)
|
||||
{
|
||||
var error = e.Data;
|
||||
if (error.Contains("There is not enough space on the disk") && !errorMessageShown)
|
||||
{
|
||||
errorMessageShown = true;
|
||||
Program.form.Invoke(new Action(() =>
|
||||
{
|
||||
_ = FlexibleMessageBox.Show(Program.form, $"Not enough space to extract archive.\r\nMake sure your {Path.GetPathRoot(settings.DownloadDir)} drive has at least double the space of the game, then try again.",
|
||||
"NOT ENOUGH SPACE",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
return;
|
||||
}));
|
||||
}
|
||||
_ = Logger.Log(error, LogLevel.ERROR);
|
||||
extractionError = $"Extracting failed: {error}"; // Store the error message directly
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
x.Start();
|
||||
x.BeginOutputReadLine();
|
||||
x.BeginErrorReadLine();
|
||||
x.WaitForExit();
|
||||
errorMessageShown = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(extractionError))
|
||||
{
|
||||
string errorMessage = extractionError;
|
||||
extractionError = null; // Reset the error message
|
||||
throw new ExtractionException(errorMessage);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
build.cmd
Normal file
@@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
REM Default to Release if no argument is provided
|
||||
SET CONFIG=Release
|
||||
IF NOT "%1"=="" (
|
||||
IF /I "%1"=="debug" SET CONFIG=Debug
|
||||
)
|
||||
|
||||
REM Windows Batch script version
|
||||
REM Attempts to find MSBuild from common Visual Studio 2022 installation paths
|
||||
IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
SET MSBUILD="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
|
||||
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
SET MSBUILD="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe"
|
||||
) ELSE IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
SET MSBUILD="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
|
||||
) ELSE (
|
||||
echo MSBuild not found! Please check your Visual Studio installation.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Building in %CONFIG% configuration...
|
||||
%MSBUILD% AndroidSideloader.sln /t:AndroidSideloader /p:Configuration=%CONFIG%
|
||||
@@ -1,26 +1,3 @@
|
||||
RSL 2.21
|
||||
RSL 2.34.1
|
||||
|
||||
- Feature: Search now shows all results found
|
||||
- Feature: Add --no-rclone-updating launch flag
|
||||
- Feature: Add lime-green color to various after download jobs
|
||||
- Feature: Update Sideloader Launcher to check for Rookie
|
||||
- Feature: Add the ability to download into virtual filesystems (Settings)
|
||||
- Feature: Add stacktrace & innerexception to crashlog
|
||||
- Feature: Add CallerInfo to debuglog
|
||||
- Feature: Rookie will now tell the user when there's a running RCLONE Job
|
||||
- Fix: Rookie will no longer repeat "All tasks finished." in No Device Mode
|
||||
- Fix: Rookie should no longer delete the entire OBB/Data folder when uninstalling a game
|
||||
- Fix: Rookie should no longer freeze on the OBB Comparison
|
||||
- Fix: The free disclaimer on launch is no longer broken
|
||||
- Fix: Use new process for every ADB command
|
||||
- Fix: Do not delete game files on an OBB Mismatch anymore
|
||||
- Fix: Change all hardcoded C:/ paths to dynamically grab the system drive for further compatability
|
||||
- Fix: Rookie should now function on 32 Bit again
|
||||
- Fix: Fix crash on failed extraction
|
||||
- Chore: Update quota message to be up to date
|
||||
- Chore: Code rewrites for logging system, obb comparison, updater
|
||||
- Chore: Several redundant code removals
|
||||
- Chore: Change Install w/ Enter Key to Download w/ Enter Key
|
||||
- Chore: Several code cleanups & optimizations
|
||||
|
||||
~ Chax
|
||||
- Fix: Rookie crashing with "Cannto add or insert the item"
|
||||
34708
debuglog.txt
BIN
dep/rclone-v1.67.0-windows-386.zip
Normal file
BIN
dep/rclone-v1.67.0-windows-amd64.zip
Normal file
BIN
dependencies.7z
Normal file
12
donators.txt
@@ -1,12 +0,0 @@
|
||||
CC0E0834BFEBFBFF000906E9;5000;ROOKIE.WTF
|
||||
184204E0178BFBFF00870F10;0;Flow
|
||||
E5148390BFEBFBFF000906EA;250;Gotard
|
||||
5ECC5497178BFBFF00870F10;1024;Saidis21
|
||||
B0374BE2BFEBFBFF00040651;0;ecirbaf
|
||||
926C60A8178BFBFF00800F82;250;ThePhantomPickaxe
|
||||
2A8C5999BFEBFBFF0001067A;0;karl
|
||||
80ACB80FBFEBFBFF000206C2;4096;JJ-4
|
||||
9AA172C9BFEBFBFF000906ED;1024;Clayton Bigsby
|
||||
645C9EADBFEBFBFF000906EA;5000;Heracide
|
||||
1C51D0CD178BFBFF00870F10;0;Mr.Tibby
|
||||
287B5C6CBFEBFBFF000906EA;0;videobeer
|
||||
@@ -1,7 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="4.1.0" targetFramework="net452" />
|
||||
<package id="Fody" version="6.0.0" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="Microsoft.Web.WebView2" version="1.0.1072.54" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net452" />
|
||||
<package id="Costura.Fody" version="5.7.0" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="Fody" version="6.8.1" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="7.0.4" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.WebView2" version="1.0.2478.35" targetFramework="net452" />
|
||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net452" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Globalization" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Linq" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net452" />
|
||||
<package id="System.Net.Primitives" version="4.3.1" targetFramework="net452" />
|
||||
<package id="System.ObjectModel" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Reflection" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Runtime" version="4.3.1" targetFramework="net452" />
|
||||
<package id="System.Runtime.Extensions" version="4.3.1" targetFramework="net452" />
|
||||
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Text.RegularExpressions" version="4.3.1" targetFramework="net452" />
|
||||
<package id="System.Threading" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net452" />
|
||||
<package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="net452" />
|
||||
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net452" />
|
||||
</packages>
|
||||
0
vrp-public.json
Normal file
@@ -1 +0,0 @@
|
||||
ignore this, it is for backward compatibility
|
||||