jkvhguyghkijhijbklbkhjlhiulj
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\Sideloader.cs",
|
||||
"SelectedNode": "\\AndroidSideloader.sln",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
||||
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
212
ADB.cs
212
ADB.cs
@@ -12,20 +12,18 @@ namespace AndroidSideloader
|
||||
class ADB
|
||||
{
|
||||
static Process adb = new Process();
|
||||
public static string adbFolderPath = "C:\\RSL\\2.1.1\\ADB";
|
||||
public static string adbFolderPath = "C:\\RSL\\2.14HF5\\ADB";
|
||||
public static string adbFilePath = 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();
|
||||
|
||||
if (DeviceID.Length > 1)
|
||||
command = $" -s {DeviceID} {command}";
|
||||
Logger.Log($"Running command {command}");
|
||||
adb.StartInfo.FileName = adbFilePath;
|
||||
adb.StartInfo.FileName = @adbFilePath;
|
||||
adb.StartInfo.Arguments = command;
|
||||
adb.StartInfo.RedirectStandardError = true;
|
||||
adb.StartInfo.RedirectStandardInput = true;
|
||||
@@ -57,26 +55,16 @@ namespace AndroidSideloader
|
||||
}
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS"))
|
||||
{
|
||||
MessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.");
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
if (error.Contains("not enough storage space"))
|
||||
{
|
||||
MessageBox.Show("There is not enough room on your device to install this package. Please clear AT LEAST 2x the amount of the app you are trying to install.");
|
||||
}
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
public static ProcessOutput RunAdbCommandToStringWOADB(string result, string file)
|
||||
public static ProcessOutput RunAdbCommandToStringWOADB(string result, string path)
|
||||
{
|
||||
string command = result;
|
||||
Properties.Settings.Default.ADBFolder = adbFolderPath;
|
||||
Properties.Settings.Default.ADBPath = adbFilePath;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +75,7 @@ namespace AndroidSideloader
|
||||
adb.StartInfo.RedirectStandardOutput = true;
|
||||
adb.StartInfo.CreateNoWindow = true;
|
||||
adb.StartInfo.UseShellExecute = false;
|
||||
adb.StartInfo.WorkingDirectory = Path.GetDirectoryName(file);
|
||||
adb.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
|
||||
adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
@@ -114,21 +102,16 @@ namespace AndroidSideloader
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS"))
|
||||
{
|
||||
MessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.");
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
|
||||
public static ProcessOutput RunCommandToString(string result, string file = "")
|
||||
public static ProcessOutput RunCommandToString(string result, string path)
|
||||
{
|
||||
string command = result;
|
||||
Properties.Settings.Default.ADBFolder = adbFolderPath;
|
||||
Properties.Settings.Default.ADBPath = adbFilePath;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
|
||||
Logger.Log($"Running command {command}");
|
||||
adb.StartInfo.FileName = @"C:\windows\system32\cmd.exe";
|
||||
@@ -138,7 +121,7 @@ namespace AndroidSideloader
|
||||
adb.StartInfo.RedirectStandardOutput = true;
|
||||
adb.StartInfo.CreateNoWindow = true;
|
||||
adb.StartInfo.UseShellExecute = false;
|
||||
adb.StartInfo.WorkingDirectory = Path.GetDirectoryName(file);
|
||||
adb.StartInfo.WorkingDirectory = Path.GetDirectoryName(path);
|
||||
adb.Start();
|
||||
adb.StandardInput.WriteLine(command);
|
||||
adb.StandardInput.Flush();
|
||||
@@ -165,10 +148,7 @@ namespace AndroidSideloader
|
||||
else
|
||||
adb.WaitForExit();
|
||||
if (error.Contains("ADB_VENDOR_KEYS"))
|
||||
{
|
||||
MessageBox.Show("Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.");
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
Logger.Log(output);
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
@@ -191,7 +171,6 @@ namespace AndroidSideloader
|
||||
long usedSize = 0;
|
||||
|
||||
long freeSize = 0;
|
||||
WakeDevice();
|
||||
var output = RunAdbCommandToString("shell df").Output.Split('\n');
|
||||
|
||||
foreach (string currLine in output)
|
||||
@@ -229,111 +208,84 @@ namespace AndroidSideloader
|
||||
return $"Total space: {String.Format("{0:0.00}", (double)totalSize / 1000)}GB\nUsed space: {String.Format("{0:0.00}", (double)usedSize / 1000)}GB\nFree space: {String.Format("{0:0.00}", (double)freeSize / 1000)}GB";
|
||||
}
|
||||
|
||||
private static bool dialogisup = false;
|
||||
public static void WakeDevice()
|
||||
{
|
||||
string output = RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP").Error;
|
||||
RunAdbCommandToString("Devices");
|
||||
if (output.Contains("found"))
|
||||
if (Properties.Settings.Default.IPAddress.Contains("connect"))
|
||||
{
|
||||
if (Properties.Settings.Default.IPAddress.Contains("connect"))
|
||||
RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
string response = ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress).Output;
|
||||
|
||||
RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
|
||||
if (response.Contains("cannot"))
|
||||
{
|
||||
ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
string response = ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress).Error;
|
||||
|
||||
if (response.Contains("cannot"))
|
||||
if (!dialogisup)
|
||||
DialogResult dialogResult = MessageBox.Show("Either your Quest is idle or you have rebooted the device.\nRSL's wireless ADB will persist on PC reboot but not on Quest reboot.\n\nNOTE: If you haven't rebooted your Quest it may be idle.\n\nTo prevent this press the HOLD button 2x prior to launching RSL. Or\nkeep your Quest plugged into power to keep it permanently \"awake\".\n\nHave you assigned your Quest a static IP in your router configuration?\n\nIf you no longer want to use Wireless ADB or your device was idle please hit CANCEL.", "DEVICE REBOOTED\\IDLE?", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
DialogResult dialogResult2 = MessageBox.Show("Press OK to remove your stored IP address.\nIf your Quest went idle press the HOLD button on the device twice then press CANCEL to reconnect.", "REMOVE STORED IP?", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult2 == DialogResult.Cancel)
|
||||
ADB.WakeDevice();
|
||||
if (dialogResult2 == DialogResult.OK)
|
||||
{
|
||||
{
|
||||
dialogisup = true;
|
||||
DialogResult dialogResult = MessageBox.Show("Either your Quest is idle or you have rebooted the device.\nRSL's wireless ADB will persist on PC reboot but not on Quest reboot.\n\nNOTE: If you haven't rebooted your Quest it may be idle.\n\nTo prevent this press the HOLD button 2x prior to launching RSL. Or\nkeep your Quest plugged into power to keep it permanently \"awake\".\n\nHave you assigned your Quest a static IP in your router configuration?\n\nIf you no longer want to use Wireless ADB or your device was idle please hit CANCEL.", "DEVICE REBOOTED\\IDLE?", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult == DialogResult.Cancel)
|
||||
{
|
||||
DialogResult dialogResult2 = MessageBox.Show("Press OK to remove your stored IP address.\nIf your Quest went idle press the HOLD button on the device twice then press CANCEL to reconnect.", "REMOVE STORED IP?", MessageBoxButtons.OKCancel);
|
||||
if (dialogResult2 == DialogResult.Cancel)
|
||||
ADB.WakeDevice();
|
||||
dialogisup = false;
|
||||
if (dialogResult2 == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.IPAddress = "";
|
||||
Properties.Settings.Default.Save();
|
||||
ADB.WakeDevice();
|
||||
dialogisup = false;
|
||||
}
|
||||
|
||||
}
|
||||
else if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
dialogisup = false;
|
||||
MessageBox.Show("Connect your Quest to USB so we can reconnect to your saved IP address!");
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
Thread.Sleep(250);
|
||||
ADB.RunAdbCommandToString("disconnect");
|
||||
Thread.Sleep(50);
|
||||
ADB.RunAdbCommandToString("connect");
|
||||
Thread.Sleep(50);
|
||||
ADB.RunAdbCommandToString("tcpip 5555");
|
||||
Thread.Sleep(500);
|
||||
ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
|
||||
MessageBox.Show($"Connected! We can now automatically enable wake on wifi. This makes it so Rookie can work wirelessly even if the device has entered \"sleep mode\". This setting is NOT permanent and resets upon Quest reboot just like wireless ADB functionality.\n\n After testing with this setting off and on the difference in battery usage seems nonexistent. We recommend this setting for the majority of users for ease of use purposes. If you click NO you must keep your Quest connected to a charger OR wake your device and then put it back on hold before using Rookie wirelessly. Do you want to enable wake on wifi?", "Enable Wake on Wifi?", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
if (dialogResult == DialogResult.No)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (dialogResult == DialogResult.No)
|
||||
{
|
||||
dialogisup = false;
|
||||
MessageBox.Show("You must repeat the entire connection process, press OK to begin.", "Reconfigure Wireless ADB", MessageBoxButtons.OK);
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
ADB.RunAdbCommandToString("tcpip 5555");
|
||||
MessageBox.Show("Press OK to get your Quest's local IP address.", "Obtain local IP address", MessageBoxButtons.OK);
|
||||
Thread.Sleep(1000);
|
||||
string input = ADB.RunAdbCommandToString("shell ip route").Output;
|
||||
|
||||
Properties.Settings.Default.WirelessADB = true;
|
||||
Properties.Settings.Default.Save();
|
||||
string[] strArrayOne = new string[] { "" };
|
||||
strArrayOne = input.Split(' ');
|
||||
if (strArrayOne[0].Length > 7)
|
||||
{
|
||||
string IPaddr = strArrayOne[8];
|
||||
string IPcmnd = "connect " + IPaddr + ":5555";
|
||||
MessageBox.Show($"Your Quest's local IP address is: {IPaddr}\n\nPlease disconnect your Quest then wait 2 seconds.\nOnce it is disconnected hit OK", "", MessageBoxButtons.OK);
|
||||
Thread.Sleep(2000);
|
||||
ADB.RunAdbCommandToString(IPcmnd);
|
||||
Properties.Settings.Default.IPAddress = IPcmnd;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
MessageBox.Show($"Connected! We can now automatically disable the Quest wifi chip from falling asleep. This makes it so Rookie can work wirelessly even if the device has entered \"sleep mode\". This setting is NOT permanent and resets upon Quest reboot, just like wireless ADB functionality.\n\nNOTE: This may cause the device battery to drain while it is in sleep mode at a very slightly increased rate. We recommend this setting for the majority of users for ease of use purposes. If you click NO you must keep your Quest connected to a charger or wake your device and then put it back on hold before using Rookie wirelessly. Do you want us to stop sleep mode from disabling wireless ADB?", "", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Properties.Settings.Default.IPAddress = "";
|
||||
Properties.Settings.Default.Save();
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
|
||||
}
|
||||
else if (dialogResult == DialogResult.Yes)
|
||||
{
|
||||
MessageBox.Show("Connect your Quest to USB so we can reconnect to your saved IP address!");
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
Thread.Sleep(250);
|
||||
ADB.RunAdbCommandToString("disconnect");
|
||||
Thread.Sleep(50);
|
||||
ADB.RunAdbCommandToString("connect");
|
||||
Thread.Sleep(50);
|
||||
ADB.RunAdbCommandToString("tcpip 5555");
|
||||
Thread.Sleep(500);
|
||||
ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
}
|
||||
else if (dialogResult == DialogResult.No)
|
||||
{
|
||||
MessageBox.Show("You must repeat the entire connection process, press OK to begin.", "Reconfigure Wireless ADB", MessageBoxButtons.OK);
|
||||
ADB.RunAdbCommandToString("devices");
|
||||
ADB.RunAdbCommandToString("tcpip 5555");
|
||||
MessageBox.Show("Press OK to get your Quest's local IP address.", "Obtain local IP address", MessageBoxButtons.OK);
|
||||
Thread.Sleep(1000);
|
||||
string input = ADB.RunAdbCommandToString("shell ip route").Output;
|
||||
|
||||
|
||||
string[] strArrayOne = new string[] { "" };
|
||||
strArrayOne = input.Split(' ');
|
||||
if (strArrayOne[0].Length > 7)
|
||||
{
|
||||
string IPaddr = strArrayOne[8];
|
||||
string IPcmnd = "connect " + IPaddr + ":5555";
|
||||
MessageBox.Show($"Your Quest's local IP address is: {IPaddr}\n\nPlease disconnect your Quest then wait 2 seconds.\nOnce it is disconnected hit OK", "", MessageBoxButtons.OK);
|
||||
Thread.Sleep(2000);
|
||||
ADB.RunAdbCommandToString(IPcmnd);
|
||||
Properties.Settings.Default.IPAddress = IPcmnd;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
MessageBox.Show($"Connected!!", "", MessageBoxButtons.OK);
|
||||
Program.form.ChangeTitlebarToDevice();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static ProcessOutput Sideload(string path = "", string packagename = "")
|
||||
public static ProcessOutput Sideload(string path, string packagename = "")
|
||||
{
|
||||
|
||||
WakeDevice();
|
||||
|
||||
ProcessOutput ret = new ProcessOutput();
|
||||
package = packagename;
|
||||
|
||||
Program.form.ChangeTitle($"Sideloading {path}");
|
||||
ret += RunAdbCommandToString($"install -g -r \"{path}\"");
|
||||
string out2 = ret.Output + ret.Error;
|
||||
@@ -342,7 +294,7 @@ namespace AndroidSideloader
|
||||
string BackupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
if (out2.Contains("offline"))
|
||||
{
|
||||
DialogResult dialogResult2 = MessageBox.Show("Device is offline. Press Yes to reconnect, or if you don't wish to connect and just want to download the game (requires unchecking \"Delete games after install\" from settings menu) then press No.", "Device offline.", MessageBoxButtons.YesNoCancel);
|
||||
DialogResult dialogResult2 = MessageBox.Show("Device is offline. Press Yes to reconnect, or if you don't wish to connect and just want to download the game (we suggest unchecking delete games after install from settings menu) then press No.", "Device offline.", MessageBoxButtons.YesNoCancel);
|
||||
if (dialogResult2 == DialogResult.Yes)
|
||||
ADB.WakeDevice();
|
||||
}
|
||||
@@ -384,11 +336,11 @@ namespace AndroidSideloader
|
||||
{
|
||||
|
||||
|
||||
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");
|
||||
Program.form.ChangeTitle("Pushing Custom QU s3 Patch JSON.");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{package}"))
|
||||
RunAdbCommandToString($"shell mkdir /sdcard/android/data/{package}");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{package}/private"))
|
||||
RunAdbCommandToString($"shell mkdir /sdcard/android/data/{package}/private");
|
||||
|
||||
Random r = new Random();
|
||||
int x = r.Next(999999999);
|
||||
@@ -404,11 +356,11 @@ namespace AndroidSideloader
|
||||
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);
|
||||
File.WriteAllText("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");
|
||||
File.WriteAllText("delete_settings", blank);
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\delete_settings\" /sdcard/android/data/{package}/private/delete_settings");
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Environment.CurrentDirectory}\\config.json\" /sdcard/android/data/{package}/private/config.json");
|
||||
|
||||
}
|
||||
Program.form.ChangeTitle("Sideload done");
|
||||
|
||||
@@ -113,12 +113,6 @@
|
||||
<setting name="CurrPckg" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ADBFolder" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="WirelessADB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ListViewColumnSorter : IComparer
|
||||
ColumnToSort = 0;
|
||||
|
||||
// Initialize the sort order to 'none'
|
||||
OrderOfSort = SortOrder.Ascending;
|
||||
OrderOfSort = SortOrder.None;
|
||||
|
||||
// Initialize the CaseInsensitiveComparer object
|
||||
ObjectCompare = new CaseInsensitiveComparer();
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace AndroidSideloader
|
||||
string adbDir = "C:\\RSL\\2.1.1\\adb";
|
||||
string fileName = "";
|
||||
string destFile = "";
|
||||
string date_time = DateTime.Today.ToString("dddd, MMMM dd @ hh:mmtt");
|
||||
string date_time = DateTime.UtcNow.ToString("dddd, MMMM dd @ hhhh:mmtt UTC");
|
||||
Logger.Log($"\n\n##############\n##############\n##############\n\nAPP LAUNCH DATE/TIME: " + date_time + "\n\n##############\n##############\n##############\n\n");
|
||||
Properties.Settings.Default.MainDir = Environment.CurrentDirectory;
|
||||
Properties.Settings.Default.Save();
|
||||
@@ -79,7 +79,7 @@ namespace AndroidSideloader
|
||||
Properties.Settings.Default.Save();
|
||||
if (File.Exists(Sideloader.CrashLogPath))
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, $"Sideloader crashed during your last use.\nPlease report issue @ https://github.com/nerdunit/androidsideloader/issues + send the crashlog to a mod or dev.\n\n(Crashlog.txt is located here: {Path.GetFullPath(Sideloader.CrashLogPath)})\n\nIf you've already sent it press YES to delete it and prevent this message. Press NO if you'd still like to send it.", "Crash Detected", MessageBoxButtons.YesNo);
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, $"Sideloader crashed during your last use.\nPlease report issue @ https://github.com/nerdunit/androidsideloader/issues OR send the crashlog to a mod or dev.\n\n(Crashlog.txt is located here: {Path.GetFullPath(Sideloader.CrashLogPath)})\n\nIf you've already sent it press YES to delete it and prevent this message. Press NO if you'd still like to send it.", "Crash Detected", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
File.Delete(Sideloader.CrashLogPath);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ namespace AndroidSideloader
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// The main entry point for the appli
|
||||
///
|
||||
///
|
||||
/// ion.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
|
||||
@@ -28,7 +31,7 @@ namespace AndroidSideloader
|
||||
static void MyHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
Exception e = (Exception)args.ExceptionObject;
|
||||
string date_time = DateTime.Today.ToString("dddd, MMMM dd @ hh:mmtt");
|
||||
string date_time = DateTime.UtcNow.ToString("dddd, MMMM dd @ hh:mmtt UTC");
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"\n\n################\nDate/Time of crash: {date_time}################\n\nMessage: {e.Message}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}");
|
||||
}
|
||||
}
|
||||
|
||||
26
Properties/Settings.Designer.cs
generated
26
Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -430,29 +430,5 @@ namespace AndroidSideloader.Properties {
|
||||
this["CurrPckg"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string ADBFolder {
|
||||
get {
|
||||
return ((string)(this["ADBFolder"]));
|
||||
}
|
||||
set {
|
||||
this["ADBFolder"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool WirelessADB {
|
||||
get {
|
||||
return ((bool)(this["WirelessADB"]));
|
||||
}
|
||||
set {
|
||||
this["WirelessADB"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,11 +104,5 @@
|
||||
<Setting Name="CurrPckg" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ADBFolder" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="WirelessADB" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -166,9 +166,9 @@ namespace AndroidSideloader
|
||||
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", "");
|
||||
File.WriteAllText("delete_settings", "");
|
||||
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\config.json", boff);
|
||||
File.WriteAllText("config.json", boff);
|
||||
}
|
||||
|
||||
|
||||
@@ -282,8 +282,8 @@ namespace AndroidSideloader
|
||||
private void questVids_Click(object sender, EventArgs e)
|
||||
{
|
||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
if (!Directory.Exists($"{path}\\Quest VideoShots"))
|
||||
Directory.CreateDirectory($"{path}\\Quest VideoShots");
|
||||
if (!Directory.Exists($"{path}\\Quest ScreenShots"))
|
||||
Directory.CreateDirectory($"{path}\\Quest ScreenShots");
|
||||
MessageBox.Show("Please wait until you get the message that the transfer has finished.");
|
||||
ADB.WakeDevice();
|
||||
Program.form.ChangeTitle("Pulling files...");
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace AndroidSideloader
|
||||
prcoutput.Output = output;
|
||||
prcoutput.Error = error;
|
||||
}
|
||||
if (!output.Contains("Game Name;Release APK Path;"))
|
||||
if (!prcoutput.Output.Contains("Game Name;Release Name;Release APK Path;Package Name;Version Code;Version Name"))
|
||||
Logger.Log($"Rclone error: {error}\nRclone Output: {output}");
|
||||
if (error.Contains("There is not enough space"))
|
||||
MessageBox.Show("There isn't enough space on your PC to properly install this game. Please have at least 2x the size of the game you are trying to download/install available on the drive where Rookie is installed.", "NOT ENOUGH SPACE");
|
||||
|
||||
@@ -34,6 +34,10 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
}
|
||||
}
|
||||
|
||||
//List of all installed package names from connected device
|
||||
public static Dictionary<string, string> InstalledPackages = new Dictionary<string, string>(); //Packagename and Version
|
||||
//public static List<string> InstalledPackageNames = new List<string>();
|
||||
|
||||
//Remove folder from device
|
||||
public static ProcessOutput RemoveFolder(string path)
|
||||
{
|
||||
@@ -47,18 +51,18 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
}
|
||||
|
||||
//For games that require manual install, like having another folder that isnt an obb
|
||||
public static ProcessOutput RunADBCommandsFromFile(string file)
|
||||
public static ProcessOutput RunADBCommandsFromFile(string path)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
ProcessOutput output = new ProcessOutput();
|
||||
var commands = File.ReadAllLines(file);
|
||||
var commands = File.ReadAllLines(path);
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
if (cmd.Contains("7z.exe"))
|
||||
{
|
||||
Program.form.ChangeTitle($"Running {cmd}");
|
||||
Logger.Log($"Logging command: {cmd} from file: {file}");
|
||||
output += ADB.RunCommandToString(cmd, file);
|
||||
Logger.Log($"Logging command: {cmd} from file: {path}");
|
||||
output += ADB.RunCommandToString(cmd, path);
|
||||
}
|
||||
if (cmd.StartsWith("adb"))
|
||||
{
|
||||
@@ -71,8 +75,8 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(cmd, replacement);
|
||||
Program.form.ChangeTitle($"Running {result}");
|
||||
Logger.Log($"Logging command: {result} from file: {file}");
|
||||
output += ADB.RunAdbCommandToStringWOADB(result, file);
|
||||
Logger.Log($"Logging command: {result} from file: {path}");
|
||||
output += ADB.RunAdbCommandToStringWOADB(result, path);
|
||||
if (output.Error.Contains("mkdir"))
|
||||
output.Error = "";
|
||||
if (output.Output.Contains("reserved"))
|
||||
@@ -170,6 +174,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
string packageName = Sideloader.gameNameToPackageName(GameName);
|
||||
|
||||
output = ADB.RunAdbCommandToString("shell pm path " + packageName);
|
||||
|
||||
string apkPath = output.Output; //Get apk
|
||||
@@ -180,10 +185,14 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
|
||||
output += ADB.RunAdbCommandToString("pull " + apkPath); //pull apk
|
||||
|
||||
if (File.Exists(Properties.Settings.Default.MainDir + "\\" + packageName + ".apk"))
|
||||
File.Delete(Properties.Settings.Default.MainDir + "\\" + packageName + ".apk");
|
||||
string currApkPath = apkPath;
|
||||
while (currApkPath.Contains("/"))
|
||||
currApkPath = currApkPath.Substring(currApkPath.IndexOf("/") + 1);
|
||||
|
||||
File.Move(Properties.Settings.Default.ADBFolder + "\\base.apk", Properties.Settings.Default.MainDir + "\\" + packageName + ".apk");
|
||||
if (File.Exists(Environment.CurrentDirectory + "\\" + packageName + ".apk"))
|
||||
File.Delete(Environment.CurrentDirectory + "\\" + packageName + ".apk");
|
||||
|
||||
File.Move(Environment.CurrentDirectory + "\\adb\\" + currApkPath, Environment.CurrentDirectory + "\\" + packageName + ".apk");
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -192,7 +201,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
{
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
if (gameName.Contains(game[SideloaderRCLONE.GameNameIndex]) || gameName.Contains(game[SideloaderRCLONE.PackageNameIndex]))
|
||||
if (gameName.Equals(game[SideloaderRCLONE.GameNameIndex]))
|
||||
return game[SideloaderRCLONE.PackageNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AndroidSideloader
|
||||
private static string RawGitHubUrl;
|
||||
private static string GitHubUrl;
|
||||
|
||||
static readonly public string LocalVersion = "2.1.1HF1";
|
||||
static readonly public string LocalVersion = "2.1HF5";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -8,11 +9,19 @@ namespace AndroidSideloader
|
||||
|
||||
public static bool Log(string text, bool ret = true)
|
||||
{
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
try { File.AppendAllText(logfile, text + newline); } catch { }
|
||||
return ret;
|
||||
if (text.Length > 0)
|
||||
{
|
||||
string time = DateTime.UtcNow.ToString("hh:mmtt(UTC): ");
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
text = time += text;
|
||||
try { File.AppendAllText(logfile, text + newline); } catch { }
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
return ret;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
RSL 2.1.1HF1
|
||||
|
||||
+ Prepended each line of debuglog.txt with Hour and Minute in UTC time.
|
||||
+ Added DATE + TIME to Debuglog.txt each time user launches RSL.
|
||||
+ Added DATE + TIME to CrashLog.txt each time program crashes.
|
||||
= Simplified crashlog.txt delete message on boot.
|
||||
= Fixed unhandled exception crashes (I hope).
|
||||
= Fixed rare QU settings error.
|
||||
= Cleaned up code order.
|
||||
= Cleaned up Install.txt logic.
|
||||
= Other bugfixes.
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmDl8XUACgkQx/Rql1Vo
|
||||
czfl3w//QQmRaVj8IGyevA3fKBB3jdKVZDCbKrRsxTS8MfvVxLeCczDwCJemmu1u
|
||||
oF+8TXj0knOLA2FmgVtJAuBjTQLzlL3KGFdZjctfV+7II+LnwvNO01agxfVITAUh
|
||||
nivRDsGqu7p3pDQly3dAOAjuUNl9qEy5iI3g1bVHUNK0qk+zI1DFi2AP2q3309df
|
||||
O4bE14erPzDz+ELY1PA5oki7T5CyKUakcoYsA6ee4la1ClE2gYBmZym0NdlCu2ay
|
||||
9iq+K47D7yHi2J5lIks/RHvmWQwAnrii9J6Ftcl+AsB3DzT8nPgDUx6empDzKgN6
|
||||
8XhjF4sxGWVRbxUZe00f5QGLGS0FZjwCCXS2TjZJ3s9+mdHqQuWybYG+oO0Nk6XP
|
||||
IOWXsvzMoyo8c8S7oatUuOAPaIx94BdiVS9WOJvQLEk7/HLzsT2jafJBacb/mM2y
|
||||
HmLi4VFjhjxvptek+nCFgtiA+zt79/DX11luSfFNA8P2jdV7ECwRMebg0rc05SI3
|
||||
DKD35f00yAsIDt/GJjP3PhiUgmlBwkmJ7GiQPNRwif6J7t3LRootA03FWTI3kHbM
|
||||
MdNkI0QV6qOZFK+j6T/Xwt8J3EhJR0MNFUuzKg+9pfzeGAPiPXaCbr6BajgPiEPe
|
||||
z1m2udFCNYt+bYKvbxc1ALpfkKiegwlh40IF/eAz3iPH4lLOlRs=
|
||||
=dL8Y
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
|
||||
|
||||
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
|
||||
Reference in New Issue
Block a user