Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ccf7811e5 | ||
|
|
93d606bcac | ||
|
|
8d0eb4a84d | ||
|
|
6f20154599 | ||
|
|
bbe84000b7 | ||
|
|
30ead79ed1 | ||
|
|
97b6da3abe | ||
|
|
6c2a7413b4 |
139
ADB.cs
139
ADB.cs
@@ -12,11 +12,7 @@ namespace AndroidSideloader
|
||||
class ADB
|
||||
{
|
||||
static Process adb = new Process();
|
||||
<<<<<<< HEAD
|
||||
public static string adbFolderPath = "C:\\RSL\\2.1.1\\ADB";
|
||||
=======
|
||||
public static string adbFolderPath = "C:\\RSL\\2.1HF5\\ADB";
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
public static string adbFilePath = adbFolderPath + "\\adb.exe";
|
||||
public static string DeviceID = "";
|
||||
public static string package = "";
|
||||
@@ -126,12 +122,7 @@ namespace AndroidSideloader
|
||||
Logger.Log(error);
|
||||
return new ProcessOutput(output, error);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public static ProcessOutput RunCommandToString(string result, string file = "")
|
||||
=======
|
||||
public static ProcessOutput RunCommandToString(string result, string path = "")
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
public static ProcessOutput RunCommandToString(string result, string path = "", string file = "")
|
||||
{
|
||||
string command = result;
|
||||
Properties.Settings.Default.ADBFolder = adbFolderPath;
|
||||
@@ -146,7 +137,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();
|
||||
@@ -237,102 +228,8 @@ 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()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
string output = RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP").Error;
|
||||
RunAdbCommandToString("Devices");
|
||||
if (output.Contains("found"))
|
||||
{
|
||||
if (Properties.Settings.Default.IPAddress.Contains("connect"))
|
||||
{
|
||||
ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
string response = ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress).Error;
|
||||
|
||||
if (response.Contains("cannot"))
|
||||
if (!dialogisup)
|
||||
{
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
=======
|
||||
RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
|
||||
string devicesout = RunAdbCommandToString("devices").Output;
|
||||
if (!devicesout.Contains("found"))
|
||||
@@ -341,7 +238,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
|
||||
RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
string response = ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress).Output;
|
||||
string response = RunAdbCommandToString(Properties.Settings.Default.IPAddress).Output;
|
||||
|
||||
if (response.Contains("cannot"))
|
||||
{
|
||||
@@ -350,33 +247,33 @@ namespace AndroidSideloader
|
||||
{
|
||||
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();
|
||||
WakeDevice();
|
||||
if (dialogResult2 == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.IPAddress = "";
|
||||
Properties.Settings.Default.Save();
|
||||
ADB.WakeDevice();
|
||||
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");
|
||||
RunAdbCommandToString("devices");
|
||||
Thread.Sleep(250);
|
||||
ADB.RunAdbCommandToString("disconnect");
|
||||
RunAdbCommandToString("disconnect");
|
||||
Thread.Sleep(50);
|
||||
ADB.RunAdbCommandToString("connect");
|
||||
RunAdbCommandToString("connect");
|
||||
Thread.Sleep(50);
|
||||
ADB.RunAdbCommandToString("tcpip 5555");
|
||||
RunAdbCommandToString("tcpip 5555");
|
||||
Thread.Sleep(500);
|
||||
ADB.RunAdbCommandToString(Properties.Settings.Default.IPAddress);
|
||||
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");
|
||||
RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
if (dialogResult == DialogResult.No)
|
||||
{
|
||||
@@ -388,11 +285,11 @@ namespace AndroidSideloader
|
||||
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");
|
||||
RunAdbCommandToString("devices");
|
||||
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 input = RunAdbCommandToString("shell ip route").Output;
|
||||
|
||||
Properties.Settings.Default.WirelessADB = true;
|
||||
Properties.Settings.Default.Save();
|
||||
@@ -420,7 +317,6 @@ namespace AndroidSideloader
|
||||
|
||||
}
|
||||
}
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
|
||||
}
|
||||
}
|
||||
@@ -480,9 +376,10 @@ namespace AndroidSideloader
|
||||
}
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\Config.Json"))
|
||||
{
|
||||
string gameName = packagename;
|
||||
packagename = Sideloader.gameNameToPackageName(gameName);
|
||||
|
||||
|
||||
Program.form.ChangeTitle("Pushing Custom QU S3 Config.JSON.");
|
||||
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"))
|
||||
|
||||
@@ -252,6 +252,7 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<None Include="version" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
@@ -259,6 +260,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="changelog.txt" />
|
||||
<Content Include="icon.ico" />
|
||||
<None Include="Resources\greenkey.png" />
|
||||
<None Include="Resources\orangekey.png" />
|
||||
<None Include="Resources\SearchGlass.PNG" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
|
||||
|
||||
@@ -119,6 +119,9 @@
|
||||
<setting name="WirelessADB" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CurrentGamename" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
|
||||
224
MainForm.Designer.cs
generated
224
MainForm.Designer.cs
generated
@@ -68,7 +68,6 @@
|
||||
this.remotesList = new System.Windows.Forms.ComboBox();
|
||||
this.gamesListView = new System.Windows.Forms.ListView();
|
||||
this.searchTextBox = new System.Windows.Forms.TextBox();
|
||||
this.gamesPictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.gamesQueueLabel = new System.Windows.Forms.Label();
|
||||
this.MountButton = new System.Windows.Forms.Button();
|
||||
this.ProgressText = new System.Windows.Forms.Label();
|
||||
@@ -76,12 +75,26 @@
|
||||
this.DragDropLbl = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.gamesPictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.panel1.SuspendLayout();
|
||||
this.otherContainer.SuspendLayout();
|
||||
this.backupContainer.SuspendLayout();
|
||||
this.sideloadContainer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// m_combo
|
||||
@@ -97,7 +110,7 @@
|
||||
this.m_combo.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.m_combo.Location = new System.Drawing.Point(227, 8);
|
||||
this.m_combo.Name = "m_combo";
|
||||
this.m_combo.Size = new System.Drawing.Size(745, 24);
|
||||
this.m_combo.Size = new System.Drawing.Size(353, 24);
|
||||
this.m_combo.TabIndex = 0;
|
||||
this.m_combo.Text = "Select an app to uninstall...";
|
||||
//
|
||||
@@ -312,13 +325,14 @@
|
||||
this.downloadInstallGameButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.downloadInstallGameButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.downloadInstallGameButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.downloadInstallGameButton.Location = new System.Drawing.Point(601, 498);
|
||||
this.downloadInstallGameButton.Location = new System.Drawing.Point(601, 504);
|
||||
this.downloadInstallGameButton.Name = "downloadInstallGameButton";
|
||||
this.downloadInstallGameButton.Size = new System.Drawing.Size(371, 30);
|
||||
this.downloadInstallGameButton.TabIndex = 8;
|
||||
this.downloadInstallGameButton.Text = "Download and Install Game/Add to Queue";
|
||||
this.downloadInstallGameButton.UseVisualStyleBackColor = false;
|
||||
this.downloadInstallGameButton.Click += new System.EventHandler(this.downloadInstallGameButton_Click);
|
||||
this.downloadInstallGameButton.Enter += new System.EventHandler(this.downloadInstallGameButton_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
@@ -341,7 +355,7 @@
|
||||
this.panel1.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "ButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(218, 775);
|
||||
this.panel1.TabIndex = 73;
|
||||
@@ -424,7 +438,7 @@
|
||||
this.otherContainer.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.otherContainer.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.otherContainer.Location = new System.Drawing.Point(0, 401);
|
||||
this.otherContainer.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.otherContainer.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.otherContainer.Name = "otherContainer";
|
||||
this.otherContainer.Size = new System.Drawing.Size(218, 167);
|
||||
this.otherContainer.TabIndex = 80;
|
||||
@@ -568,7 +582,7 @@
|
||||
this.otherDrop.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.otherDrop.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.otherDrop.Location = new System.Drawing.Point(0, 373);
|
||||
this.otherDrop.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.otherDrop.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.otherDrop.Name = "otherDrop";
|
||||
this.otherDrop.Padding = new System.Windows.Forms.Padding(7, 0, 0, 0);
|
||||
this.otherDrop.Size = new System.Drawing.Size(218, 28);
|
||||
@@ -586,7 +600,7 @@
|
||||
this.backupContainer.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.backupContainer.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.backupContainer.Location = new System.Drawing.Point(0, 313);
|
||||
this.backupContainer.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.backupContainer.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.backupContainer.Name = "backupContainer";
|
||||
this.backupContainer.Size = new System.Drawing.Size(218, 60);
|
||||
this.backupContainer.TabIndex = 76;
|
||||
@@ -604,7 +618,7 @@
|
||||
this.backupDrop.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.backupDrop.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.backupDrop.Location = new System.Drawing.Point(0, 285);
|
||||
this.backupDrop.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.backupDrop.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.backupDrop.Name = "backupDrop";
|
||||
this.backupDrop.Padding = new System.Windows.Forms.Padding(7, 0, 0, 0);
|
||||
this.backupDrop.Size = new System.Drawing.Size(218, 28);
|
||||
@@ -628,7 +642,7 @@
|
||||
this.sideloadContainer.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.sideloadContainer.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.sideloadContainer.Location = new System.Drawing.Point(0, 56);
|
||||
this.sideloadContainer.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.sideloadContainer.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.sideloadContainer.Name = "sideloadContainer";
|
||||
this.sideloadContainer.Size = new System.Drawing.Size(218, 229);
|
||||
this.sideloadContainer.TabIndex = 74;
|
||||
@@ -688,7 +702,7 @@
|
||||
this.sideloadDrop.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.sideloadDrop.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.sideloadDrop.Location = new System.Drawing.Point(0, 28);
|
||||
this.sideloadDrop.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.sideloadDrop.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.sideloadDrop.Name = "sideloadDrop";
|
||||
this.sideloadDrop.Padding = new System.Windows.Forms.Padding(7, 0, 0, 0);
|
||||
this.sideloadDrop.Size = new System.Drawing.Size(218, 28);
|
||||
@@ -771,7 +785,7 @@
|
||||
this.gamesQueListBox.FormattingEnabled = true;
|
||||
this.gamesQueListBox.ItemHeight = 16;
|
||||
this.gamesQueListBox.Location = new System.Drawing.Point(601, 530);
|
||||
this.gamesQueListBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.gamesQueListBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gamesQueListBox.Name = "gamesQueListBox";
|
||||
this.gamesQueListBox.Size = new System.Drawing.Size(372, 114);
|
||||
this.gamesQueListBox.TabIndex = 9;
|
||||
@@ -790,9 +804,9 @@
|
||||
this.devicesComboBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.devicesComboBox.FormattingEnabled = true;
|
||||
this.devicesComboBox.Location = new System.Drawing.Point(227, 39);
|
||||
this.devicesComboBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.devicesComboBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.devicesComboBox.Name = "devicesComboBox";
|
||||
this.devicesComboBox.Size = new System.Drawing.Size(206, 24);
|
||||
this.devicesComboBox.Size = new System.Drawing.Size(161, 24);
|
||||
this.devicesComboBox.TabIndex = 1;
|
||||
this.devicesComboBox.Text = "Select your device";
|
||||
this.devicesComboBox.SelectedIndexChanged += new System.EventHandler(this.devicesComboBox_SelectedIndexChanged);
|
||||
@@ -808,12 +822,11 @@
|
||||
this.remotesList.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.remotesList.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.remotesList.FormattingEnabled = true;
|
||||
this.remotesList.Location = new System.Drawing.Point(530, 39);
|
||||
this.remotesList.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.remotesList.Location = new System.Drawing.Point(527, 39);
|
||||
this.remotesList.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.remotesList.Name = "remotesList";
|
||||
this.remotesList.Size = new System.Drawing.Size(206, 24);
|
||||
this.remotesList.Size = new System.Drawing.Size(53, 24);
|
||||
this.remotesList.TabIndex = 3;
|
||||
this.remotesList.Text = "Select a mirror";
|
||||
this.remotesList.SelectedIndexChanged += new System.EventHandler(this.remotesList_SelectedIndexChanged);
|
||||
//
|
||||
// gamesListView
|
||||
@@ -826,13 +839,14 @@
|
||||
this.gamesListView.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.gamesListView.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.gamesListView.HideSelection = false;
|
||||
this.gamesListView.Location = new System.Drawing.Point(227, 71);
|
||||
this.gamesListView.Location = new System.Drawing.Point(234, 71);
|
||||
this.gamesListView.Name = "gamesListView";
|
||||
this.gamesListView.Size = new System.Drawing.Size(745, 423);
|
||||
this.gamesListView.TabIndex = 6;
|
||||
this.gamesListView.UseCompatibleStateImageBehavior = false;
|
||||
this.gamesListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
|
||||
this.gamesListView.SelectedIndexChanged += new System.EventHandler(this.gamesListView_SelectedIndexChanged);
|
||||
this.gamesListView.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.gamesListView_KeyPress);
|
||||
this.gamesListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.gamesListView_MouseDoubleClick);
|
||||
//
|
||||
// searchTextBox
|
||||
@@ -845,22 +859,15 @@
|
||||
this.searchTextBox.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.searchTextBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.searchTextBox.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.searchTextBox.Location = new System.Drawing.Point(741, 40);
|
||||
this.searchTextBox.Location = new System.Drawing.Point(481, 274);
|
||||
this.searchTextBox.Name = "searchTextBox";
|
||||
this.searchTextBox.Size = new System.Drawing.Size(231, 22);
|
||||
this.searchTextBox.TabIndex = 5;
|
||||
this.searchTextBox.Text = "Search";
|
||||
this.searchTextBox.Visible = false;
|
||||
this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged);
|
||||
//
|
||||
// gamesPictureBox
|
||||
//
|
||||
this.gamesPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.gamesPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.gamesPictureBox.Location = new System.Drawing.Point(228, 529);
|
||||
this.gamesPictureBox.Name = "gamesPictureBox";
|
||||
this.gamesPictureBox.Size = new System.Drawing.Size(367, 214);
|
||||
this.gamesPictureBox.TabIndex = 84;
|
||||
this.gamesPictureBox.TabStop = false;
|
||||
this.searchTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.searchTextBox_KeyPress);
|
||||
this.searchTextBox.Leave += new System.EventHandler(this.searchTextBox_Leave);
|
||||
//
|
||||
// gamesQueueLabel
|
||||
//
|
||||
@@ -888,9 +895,9 @@
|
||||
this.MountButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.MountButton.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.MountButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.MountButton.Location = new System.Drawing.Point(438, 39);
|
||||
this.MountButton.Location = new System.Drawing.Point(393, 39);
|
||||
this.MountButton.Name = "MountButton";
|
||||
this.MountButton.Size = new System.Drawing.Size(87, 26);
|
||||
this.MountButton.Size = new System.Drawing.Size(66, 26);
|
||||
this.MountButton.TabIndex = 2;
|
||||
this.MountButton.Text = "Mount";
|
||||
this.MountButton.UseVisualStyleBackColor = false;
|
||||
@@ -941,7 +948,6 @@
|
||||
this.DragDropLbl.TabIndex = 25;
|
||||
this.DragDropLbl.Text = "DragDropLBL";
|
||||
this.DragDropLbl.Visible = false;
|
||||
this.DragDropLbl.Click += new System.EventHandler(this.DragDropLbl_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@@ -967,13 +973,134 @@
|
||||
this.pictureBox1.ErrorImage = null;
|
||||
this.pictureBox1.ImageLocation = global::AndroidSideloader.Properties.Settings.Default.BackPicturePath;
|
||||
this.pictureBox1.InitialImage = null;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(217, -1);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(217, -2);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(764, 772);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 74;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.label2.Location = new System.Drawing.Point(460, 223);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(271, 110);
|
||||
this.label2.TabIndex = 89;
|
||||
this.label2.Visible = false;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label3.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label3.Location = new System.Drawing.Point(494, 231);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(204, 34);
|
||||
this.label3.TabIndex = 90;
|
||||
this.label3.Text = "Start typing to search.\r\nEsc = Close, Enter = Install\r\n";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.label3.Visible = false;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label4.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label4.Location = new System.Drawing.Point(531, 303);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(132, 17);
|
||||
this.label4.TabIndex = 90;
|
||||
this.label4.Text = "Shorcut: CTRL+F";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
this.label4.Visible = false;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label5.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label5.Location = new System.Drawing.Point(616, 15);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(117, 17);
|
||||
this.label5.TabIndex = 90;
|
||||
this.label5.Text = "Search app list";
|
||||
this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
this.pictureBox3.Image = global::AndroidSideloader.Properties.Resources.orangekey;
|
||||
this.pictureBox3.Location = new System.Drawing.Point(767, 10);
|
||||
this.pictureBox3.Name = "pictureBox3";
|
||||
this.pictureBox3.Size = new System.Drawing.Size(21, 20);
|
||||
this.pictureBox3.TabIndex = 92;
|
||||
this.pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
this.pictureBox2.Image = global::AndroidSideloader.Properties.Resources.SearchGlass;
|
||||
this.pictureBox2.Location = new System.Drawing.Point(666, 41);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(28, 24);
|
||||
this.pictureBox2.TabIndex = 91;
|
||||
this.pictureBox2.TabStop = false;
|
||||
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
|
||||
//
|
||||
// gamesPictureBox
|
||||
//
|
||||
this.gamesPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.gamesPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.gamesPictureBox.Location = new System.Drawing.Point(228, 529);
|
||||
this.gamesPictureBox.Name = "gamesPictureBox";
|
||||
this.gamesPictureBox.Size = new System.Drawing.Size(367, 214);
|
||||
this.gamesPictureBox.TabIndex = 84;
|
||||
this.gamesPictureBox.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
this.pictureBox4.Image = global::AndroidSideloader.Properties.Resources.greenkey;
|
||||
this.pictureBox4.Location = new System.Drawing.Point(767, 39);
|
||||
this.pictureBox4.Name = "pictureBox4";
|
||||
this.pictureBox4.Size = new System.Drawing.Size(21, 20);
|
||||
this.pictureBox4.TabIndex = 92;
|
||||
this.pictureBox4.TabStop = false;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label6.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label6.Location = new System.Drawing.Point(792, 12);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(145, 17);
|
||||
this.label6.TabIndex = 90;
|
||||
this.label6.Text = "= Update Available";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label7.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label7.Location = new System.Drawing.Point(792, 41);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(98, 17);
|
||||
this.label7.TabIndex = 90;
|
||||
this.label7.Text = "= Up to date";
|
||||
this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
|
||||
this.label8.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.label8.Location = new System.Drawing.Point(459, 42);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(65, 17);
|
||||
this.label8.TabIndex = 90;
|
||||
this.label8.Text = "Mirror #";
|
||||
this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
@@ -981,14 +1108,22 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.ClientSize = new System.Drawing.Size(980, 775);
|
||||
this.Controls.Add(this.pictureBox4);
|
||||
this.Controls.Add(this.pictureBox3);
|
||||
this.Controls.Add(this.pictureBox2);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.searchTextBox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.freeDisclaimer);
|
||||
this.Controls.Add(this.DragDropLbl);
|
||||
this.Controls.Add(this.MountButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.gamesQueueLabel);
|
||||
this.Controls.Add(this.gamesPictureBox);
|
||||
this.Controls.Add(this.searchTextBox);
|
||||
this.Controls.Add(this.gamesListView);
|
||||
this.Controls.Add(this.remotesList);
|
||||
this.Controls.Add(this.devicesComboBox);
|
||||
this.Controls.Add(this.gamesQueListBox);
|
||||
@@ -998,6 +1133,8 @@
|
||||
this.Controls.Add(this.m_combo);
|
||||
this.Controls.Add(this.notesRichTextBox);
|
||||
this.Controls.Add(this.ProgressText);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.gamesListView);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.MaximizeBox = false;
|
||||
@@ -1016,8 +1153,11 @@
|
||||
this.otherContainer.ResumeLayout(false);
|
||||
this.backupContainer.ResumeLayout(false);
|
||||
this.sideloadContainer.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -1072,6 +1212,16 @@
|
||||
private System.Windows.Forms.Button removeQUSetting;
|
||||
private System.Windows.Forms.Button InstallQUset;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.PictureBox pictureBox3;
|
||||
private System.Windows.Forms.PictureBox pictureBox4;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
348
MainForm.cs
348
MainForm.cs
@@ -36,21 +36,20 @@ namespace AndroidSideloader
|
||||
public MainForm()
|
||||
|
||||
{
|
||||
InitializeComponent();
|
||||
System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
t.Interval = 840000; // 14 mins between wakeup commands
|
||||
t.Tick += new EventHandler(timer_Tick);
|
||||
t.Start();
|
||||
InitializeComponent();
|
||||
lvwColumnSorter = new ListViewColumnSorter();
|
||||
this.gamesListView.ListViewItemSorter = lvwColumnSorter;
|
||||
if (searchTextBox.Visible)
|
||||
searchTextBox.Focus();
|
||||
|
||||
}
|
||||
|
||||
private string oldTitle = "";
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -58,7 +57,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.Now.ToString("dddd, MMMM dd @ hh: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();
|
||||
@@ -80,6 +79,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
}
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
Properties.Settings.Default.ADBPath = adbFile;
|
||||
Properties.Settings.Default.Save();
|
||||
if (File.Exists(Sideloader.CrashLogPath))
|
||||
@@ -87,6 +87,8 @@ namespace AndroidSideloader
|
||||
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);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
File.Delete(Sideloader.CrashLogPath);
|
||||
else
|
||||
Process.Start("explorer.exe", Properties.Settings.Default.MainDir);
|
||||
}
|
||||
CheckForInternet();
|
||||
|
||||
@@ -132,9 +134,9 @@ namespace AndroidSideloader
|
||||
|
||||
try
|
||||
{
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
ADB.WakeDevice();
|
||||
await CheckForDevice();
|
||||
ChangeTitlebarToDevice();
|
||||
|
||||
}
|
||||
catch { }
|
||||
@@ -224,20 +226,12 @@ namespace AndroidSideloader
|
||||
|
||||
|
||||
|
||||
=======
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
void timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ADB.RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
|
||||
}
|
||||
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
=======
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
public async void ChangeTitle(string txt, bool reset = true)
|
||||
{
|
||||
this.Invoke(() => { oldTitle = txt; this.Text = "Rookie's Sideloader | " + txt; });
|
||||
@@ -262,7 +256,6 @@ namespace AndroidSideloader
|
||||
|
||||
|
||||
|
||||
|
||||
private async void startsideloadbutton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
@@ -328,12 +321,8 @@ namespace AndroidSideloader
|
||||
ADB.DeviceID = GetDeviceID();
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
output = ADB.RunAdbCommandToString("devices").Output;
|
||||
|
||||
=======
|
||||
output = ADB.RunAdbCommandToString("devices").Output;
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
output = ADB.RunAdbCommandToString("devices").Output;
|
||||
});
|
||||
|
||||
|
||||
@@ -363,12 +352,7 @@ namespace AndroidSideloader
|
||||
|
||||
if (devicesComboBox.Items.Count > 0)
|
||||
devicesComboBox.SelectedIndex = 0;
|
||||
foreach(var item in devicesComboBox.Items)
|
||||
{
|
||||
string result = $"{Properties.Settings.Default.ADBPath} shell -s {item} getprop ro.product.system.manufacturer";
|
||||
if (ADB.RunCommandToString(result).Output.Contains("Oculus"))
|
||||
devicesComboBox.SelectedItem = item;
|
||||
}
|
||||
|
||||
return devicesComboBox.SelectedIndex;
|
||||
}
|
||||
|
||||
@@ -420,9 +404,8 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeTitlebarToDevice()
|
||||
public void ChangeTitlebarToDevice()
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
if (!Devices.Contains("unauthorized"))
|
||||
{
|
||||
if (Devices[0].Length > 1 && Devices[0].Contains("unauthorized"))
|
||||
@@ -516,92 +499,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
catch { HasInternet = false; }
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
string adbFile = "C:\\RSL\\2.1HF5\\adb\\adb.exe";
|
||||
string adbDir = "C:\\RSL\\2.1HF5\\adb";
|
||||
string fileName = "";
|
||||
string destFile = "";
|
||||
Properties.Settings.Default.MainDir = Environment.CurrentDirectory;
|
||||
Properties.Settings.Default.Save();
|
||||
if (!File.Exists(adbFile))
|
||||
{
|
||||
Directory.CreateDirectory(adbDir);
|
||||
if (System.IO.Directory.Exists($"{Environment.CurrentDirectory}\\adb"))
|
||||
{
|
||||
string[] ADBfiles = System.IO.Directory.GetFiles($"{Properties.Settings.Default.MainDir}\\adb");
|
||||
|
||||
// Copy the files and overwrite destination files if they already exist.
|
||||
foreach (string s in ADBfiles)
|
||||
{
|
||||
fileName = System.IO.Path.GetFileName(s);
|
||||
destFile = System.IO.Path.Combine(adbDir, fileName);
|
||||
System.IO.File.Copy(s, destFile, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Properties.Settings.Default.ADBPath = adbFile;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
if (File.Exists(Sideloader.CrashLogPath))
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, $@"Looks like sideloader crashed last time, please make an issue at https://github.com/nerdunit/androidsideloader/issues
|
||||
Please don't forget to post the crash.log and fill in any details you can
|
||||
Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this message will not appear when you start the sideloader but please first report this issue)", "Crash Detected", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
File.Delete(Sideloader.CrashLogPath);
|
||||
}
|
||||
CheckForInternet();
|
||||
|
||||
if (HasInternet == true)
|
||||
Sideloader.downloadFiles();
|
||||
else
|
||||
FlexibleMessageBox.Show("Cannot connect to google dns, your internet may be down, won't use rclone or online features!");
|
||||
await Task.Delay(100);
|
||||
|
||||
if (!Directory.Exists(BackupFolder))
|
||||
Directory.CreateDirectory(BackupFolder);
|
||||
|
||||
if (Directory.Exists(Sideloader.TempFolder))
|
||||
{
|
||||
Directory.Delete(Sideloader.TempFolder, true);
|
||||
Directory.CreateDirectory(Sideloader.TempFolder);
|
||||
}
|
||||
|
||||
//Delete the Debug file if it is more than 5MB
|
||||
if (File.Exists(Logger.logfile))
|
||||
{
|
||||
long length = new System.IO.FileInfo(Logger.logfile).Length;
|
||||
if (length > 5000000) File.Delete(Logger.logfile);
|
||||
}
|
||||
|
||||
RCLONE.Init();
|
||||
try { Spoofer.spoofer.Init(); } catch { }
|
||||
|
||||
if (Properties.Settings.Default.CallUpgrade)
|
||||
{
|
||||
Properties.Settings.Default.Upgrade();
|
||||
Properties.Settings.Default.CallUpgrade = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
this.CenterToScreen();
|
||||
gamesListView.View = View.Details;
|
||||
gamesListView.FullRowSelect = true;
|
||||
gamesListView.GridLines = true;
|
||||
etaLabel.Text = "";
|
||||
speedLabel.Text = "";
|
||||
diskLabel.Text = "";
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
|
||||
|
||||
|
||||
|
||||
public static string BackupFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups");
|
||||
|
||||
public static string taa = "";
|
||||
@@ -675,22 +573,30 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
|
||||
public void listappsbtn()
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
m_combo.Invoke(() => { m_combo.Items.Clear(); });
|
||||
|
||||
var line = listapps().Split('\n');
|
||||
|
||||
string forsettings = String.Join("", line);
|
||||
Properties.Settings.Default.InstalledApps = forsettings;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
for (int i = 0; i < line.Length; i++)
|
||||
{
|
||||
if (line[i].Length > 9)
|
||||
{
|
||||
line[i] = line[i].Remove(0, 8);
|
||||
line[i] = line[i].Remove(line[i].Length - 1);
|
||||
if (!Sideloader.InstalledPackages.ContainsKey(line[i]))
|
||||
Sideloader.InstalledPackages.Add(line[i], "");
|
||||
foreach (var game in SideloaderRCLONE.games)
|
||||
if (line[i].Length > 0 && game[3].Contains(line[i]))
|
||||
line[i] = game[0];
|
||||
}
|
||||
}
|
||||
|
||||
File.WriteAllText("installedPackages.json", JsonConvert.SerializeObject(Sideloader.InstalledPackages));
|
||||
|
||||
Array.Sort(line);
|
||||
|
||||
foreach (string game in line)
|
||||
@@ -715,7 +621,7 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
|
||||
string GameName = m_combo.SelectedItem.ToString();
|
||||
ProcessOutput output = new ProcessOutput("", "");
|
||||
|
||||
ChangeTitle("Extracting APK....");
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
output = Sideloader.getApk(GameName);
|
||||
@@ -726,7 +632,8 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
|
||||
ChangeTitle("APK Extracted to " + Properties.Settings.Default.MainDir +". Opening folder now.");
|
||||
Process.Start("explorer.exe", Properties.Settings.Default.MainDir);
|
||||
ShowPrcOutput(output);
|
||||
}
|
||||
|
||||
@@ -968,6 +875,10 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
{
|
||||
gamesListView.Items.Clear();
|
||||
gamesListView.Columns.Clear();
|
||||
if (!File.Exists("installedPackages.json"))
|
||||
File.Create("installedPackages.json");
|
||||
if (File.Exists("instlledPackages.json"))
|
||||
Sideloader.InstalledPackages = JsonConvert.DeserializeObject<Dictionary<string, string>>(File.ReadAllText("installedPackages.json"));
|
||||
foreach (string column in SideloaderRCLONE.gameProperties)
|
||||
{
|
||||
gamesListView.Columns.Add(column, 150);
|
||||
@@ -993,13 +904,18 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
{
|
||||
Game.BackColor = Color.Green;
|
||||
string InstalledVersionCode;
|
||||
if (Sideloader.InstalledPackages.ContainsKey(packagename) && Sideloader.InstalledPackages[packagename] != "")
|
||||
{
|
||||
InstalledVersionCode = Sideloader.InstalledPackages[packagename];
|
||||
}
|
||||
else
|
||||
{
|
||||
InstalledVersionCode = ADB.RunAdbCommandToString($"shell \"dumpsys package {packagename} | grep versionCode -F\"").Output;
|
||||
|
||||
|
||||
InstalledVersionCode = ADB.RunAdbCommandToString($"shell \"dumpsys package {packagename} | grep versionCode -F\"").Output;
|
||||
|
||||
InstalledVersionCode = Utilities.StringUtilities.RemoveEverythingBeforeFirst(InstalledVersionCode, "versionCode=");
|
||||
InstalledVersionCode = Utilities.StringUtilities.RemoveEverythingAfterFirst(InstalledVersionCode, " ");
|
||||
|
||||
InstalledVersionCode = Utilities.StringUtilities.RemoveEverythingBeforeFirst(InstalledVersionCode, "versionCode=");
|
||||
InstalledVersionCode = Utilities.StringUtilities.RemoveEverythingAfterFirst(InstalledVersionCode, " ");
|
||||
Sideloader.InstalledPackages[packagename] = InstalledVersionCode;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1021,6 +937,7 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
}
|
||||
}
|
||||
}
|
||||
File.WriteAllText("installedPackages.json", JsonConvert.SerializeObject(Sideloader.InstalledPackages));
|
||||
GameList.Add(Game);
|
||||
}
|
||||
|
||||
@@ -1030,62 +947,7 @@ Do you want to delete the {Sideloader.CrashLogPath} (if you press yes, this mess
|
||||
gamesListView.EndUpdate();
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
private async void Form1_Shown(object sender, EventArgs e)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(10000);
|
||||
freeDisclaimer.Invoke(() => { freeDisclaimer.Dispose(); });
|
||||
}).Start();
|
||||
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
if (!debugMode && Properties.Settings.Default.checkForUpdates)
|
||||
{
|
||||
Updater.AppName = "AndroidSideloader";
|
||||
Updater.Repostory = "nerdunit/androidsideloader";
|
||||
Updater.Update();
|
||||
}
|
||||
progressBar.Invoke(() => { progressBar.Style = ProgressBarStyle.Marquee; });
|
||||
ChangeTitle("Initializing Mirrors");
|
||||
initMirrors(true);
|
||||
ChangeTitle("Initializing Games");
|
||||
SideloaderRCLONE.initGames(currentRemote);
|
||||
if (!Directory.Exists(SideloaderRCLONE.ThumbnailsFolder) || !Directory.Exists(SideloaderRCLONE.NotesFolder))
|
||||
{
|
||||
MessageBox.Show("It seems you are missing the thumbnails and/or notes database, the first start of the sideloader takes a bit more time, so dont worry if it looks stuck!");
|
||||
}
|
||||
ChangeTitle("Syncing Game Photos");
|
||||
SideloaderRCLONE.UpdateGamePhotos(currentRemote);
|
||||
ChangeTitle("Checking for Updates on server...");
|
||||
SideloaderRCLONE.UpdateGameNotes(currentRemote);
|
||||
listappsbtn();
|
||||
});
|
||||
t1.SetApartmentState(ApartmentState.STA);
|
||||
t1.IsBackground = false;
|
||||
if (HasInternet)
|
||||
t1.Start();
|
||||
|
||||
showAvailableSpace();
|
||||
|
||||
intToolTips();
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
ChangeTitle("GREEN = Up to date, ORANGE = Out of date - Checking installed app versions, please wait...");
|
||||
|
||||
initListView();
|
||||
ChangeTitle("Loaded");
|
||||
downloadInstallGameButton.Enabled = true;
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
private void initMirrors(bool random)
|
||||
{
|
||||
int index = 0;
|
||||
@@ -1157,7 +1019,7 @@ without him none of this would be possible
|
||||
- Thanks to Serge Weinstock for developing SergeUtils, which is used to search the combo box
|
||||
- Thanks to Mike Gold https://www.c-sharpcorner.com/members/mike-gold2 for the scrollable message box
|
||||
|
||||
- HFP Thanks to: Roma/Rookie, Pmow, Flow, Sarah, Kaladin, and the mod staff!";
|
||||
- HFP Thanks to: Roma/Rookie, Pmow, Flow, Kaladin, and the mod staff!";
|
||||
|
||||
FlexibleMessageBox.Show(about);
|
||||
}
|
||||
@@ -1193,28 +1055,23 @@ without him none of this would be possible
|
||||
Program.form.showAvailableSpace();
|
||||
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)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
=======
|
||||
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
Program.form.ChangeTitlebarToDevice();
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
else
|
||||
MessageBox.Show("No device connected!");
|
||||
|
||||
}
|
||||
|
||||
private async void listApkButton_Click(object sender, EventArgs e)
|
||||
private async void listApkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ADB.WakeDevice();
|
||||
|
||||
@@ -1269,6 +1126,7 @@ without him none of this would be possible
|
||||
|
||||
private async void downloadInstallGameButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChangeTitle("Checking filesize...");
|
||||
long selectedGamesSize = 0;
|
||||
int count = 0;
|
||||
string[] GameSizeGame = new string[1];
|
||||
@@ -1313,8 +1171,10 @@ without him none of this would be possible
|
||||
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show($"Are you sure you want to download the selected game(s)? The size is {String.Format("{0:0.00}", (double)selectedGamesSize)} MB", "Are you sure?", MessageBoxButtons.YesNo);
|
||||
if (dialogResult != DialogResult.Yes)
|
||||
{
|
||||
ChangeTitle("");
|
||||
return;
|
||||
|
||||
}
|
||||
//Add games to the queue
|
||||
if (gamesToAddList.Count > 0)
|
||||
gamesQueueList.AddRange(gamesToAddList);
|
||||
@@ -1457,8 +1317,6 @@ without him none of this would be possible
|
||||
string[] files = Directory.GetFiles(Environment.CurrentDirectory + "\\" + gameName);
|
||||
|
||||
Debug.WriteLine("Game Folder is: " + Environment.CurrentDirectory + "\\" + gameName);
|
||||
string packagename = Sideloader.gameNameToPackageName(gameName);
|
||||
|
||||
Debug.WriteLine("FILES IN GAME FOLDER: ");
|
||||
foreach (string file in files)
|
||||
{
|
||||
@@ -1542,6 +1400,7 @@ without him none of this would be possible
|
||||
gamesAreDownloading = false;
|
||||
ShowPrcOutput(output);
|
||||
listappsbtn();
|
||||
initListView();
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -1613,6 +1472,17 @@ without him none of this would be possible
|
||||
private void remotesList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
remotesList.Invoke(() => { currentRemote = remotesList.SelectedItem.ToString(); });
|
||||
if (remotesList.Text.Contains("VRP"))
|
||||
{
|
||||
string lines = remotesList.Text;
|
||||
string pattern = "VRP-mirror";
|
||||
string replacement = "";
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(lines, replacement);
|
||||
char[] delims = new[] { '\r', '\n' };
|
||||
string[] strings = result.Split(delims, StringSplitOptions.RemoveEmptyEntries);
|
||||
remotesList.Text = result;
|
||||
}
|
||||
}
|
||||
|
||||
private void QuestOptionsButton_Click(object sender, EventArgs e)
|
||||
@@ -1655,15 +1525,65 @@ without him none of this would be possible
|
||||
this.gamesListView.Sort();
|
||||
}
|
||||
|
||||
private void CheckEnter(object sender, System.Windows.Forms.KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Enter)
|
||||
{
|
||||
searchTextBox.Visible = false;
|
||||
label2.Visible = false;
|
||||
label3.Visible = false;
|
||||
label4.Visible = false;
|
||||
}
|
||||
if (e.KeyChar == (char)Keys.Escape)
|
||||
{
|
||||
searchTextBox.Visible = false;
|
||||
label2.Visible = false;
|
||||
label3.Visible = false;
|
||||
label4.Visible = false;
|
||||
}
|
||||
}
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
if (keyData == (Keys.Control | Keys.F))
|
||||
{
|
||||
|
||||
//show search
|
||||
searchTextBox.Clear();
|
||||
searchTextBox.Visible = true;
|
||||
label2.Visible = true;
|
||||
label3.Visible = true;
|
||||
label4.Visible = true;
|
||||
searchTextBox.Focus();
|
||||
}
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
private void searchTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
gamesListView.SelectedItems.Clear();
|
||||
this.searchTextBox.KeyPress += new
|
||||
System.Windows.Forms.KeyPressEventHandler(CheckEnter);
|
||||
if (gamesListView.Items.Count > 0)
|
||||
{
|
||||
ListViewItem foundItem = gamesListView.FindItemWithText(searchTextBox.Text, true, 0, true);
|
||||
if (foundItem != null)
|
||||
{
|
||||
gamesListView.TopItem = foundItem;
|
||||
if (foundItem == gamesListView.TopItem)
|
||||
{
|
||||
gamesListView.TopItem.Selected = true;
|
||||
}
|
||||
else
|
||||
gamesListView.SelectedItems.Clear();
|
||||
|
||||
if (searchTextBox.Text.Length == 0)
|
||||
gamesListView.SelectedItems.Clear();
|
||||
|
||||
searchTextBox.Focus();
|
||||
this.searchTextBox.KeyPress += new
|
||||
System.Windows.Forms.KeyPressEventHandler(CheckEnter);
|
||||
}
|
||||
else
|
||||
gamesListView.SelectedItems.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1730,10 +1650,6 @@ without him none of this would be possible
|
||||
Process.Start("https://github.com/nerdunit/androidsideloader");
|
||||
}
|
||||
|
||||
private void DragDropLbl_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Visible = false;
|
||||
}
|
||||
|
||||
private async void removeQUSetting_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1818,6 +1734,42 @@ without him none of this would be possible
|
||||
listappsbtn();
|
||||
initListView();
|
||||
}
|
||||
|
||||
private void pictureBox2_Click(object sender, EventArgs e)
|
||||
{
|
||||
searchTextBox.Clear();
|
||||
searchTextBox.Visible = true;
|
||||
label2.Visible = true;
|
||||
label3.Visible = true;
|
||||
label4.Visible = true;
|
||||
searchTextBox.Focus();
|
||||
}
|
||||
|
||||
private void searchTextBox_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (searchTextBox.Visible)
|
||||
searchTextBox.Focus();
|
||||
else
|
||||
gamesListView.Focus();
|
||||
}
|
||||
|
||||
private void gamesListView_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Enter)
|
||||
{
|
||||
if (gamesListView.SelectedItems.Count > 0)
|
||||
downloadInstallGameButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
private void searchTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar == (char)Keys.Enter)
|
||||
{
|
||||
if (gamesListView.SelectedItems.Count > 0)
|
||||
downloadInstallGameButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ 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");
|
||||
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}");
|
||||
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}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
Properties/Resources.Designer.cs
generated
30
Properties/Resources.Designer.cs
generated
@@ -59,5 +59,35 @@ namespace AndroidSideloader.Properties {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap greenkey {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("greenkey", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap orangekey {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("orangekey", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap SearchGlass {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SearchGlass", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,4 +117,14 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="orangekey" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\orangekey.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="SearchGlass" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SearchGlass.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="greenkey" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\greenkey.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
12
Properties/Settings.Designer.cs
generated
12
Properties/Settings.Designer.cs
generated
@@ -454,5 +454,17 @@ namespace AndroidSideloader.Properties {
|
||||
this["WirelessADB"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string CurrentGamename {
|
||||
get {
|
||||
return ((string)(this["CurrentGamename"]));
|
||||
}
|
||||
set {
|
||||
this["CurrentGamename"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,5 +110,8 @@
|
||||
<Setting Name="WirelessADB" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="CurrentGamename" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -103,7 +103,7 @@ namespace AndroidSideloader
|
||||
prcoutput.Output = output;
|
||||
prcoutput.Error = error;
|
||||
}
|
||||
if (!output.Contains("Game Name;Release APK Path;"))
|
||||
if (!output.Contains("Game Name;Release 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");
|
||||
|
||||
BIN
Resources/SearchGlass.PNG
Normal file
BIN
Resources/SearchGlass.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
BIN
Resources/greenkey.png
Normal file
BIN
Resources/greenkey.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
Resources/orangekey.png
Normal file
BIN
Resources/orangekey.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -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,32 +51,32 @@ 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"))
|
||||
{
|
||||
string replacement = "";
|
||||
string pattern = "adb";
|
||||
if (ADB.DeviceID.Length > 1)
|
||||
replacement = $"{Properties.Settings.Default.ADBPath} -s {ADB.DeviceID}";
|
||||
replacement = $"{Properties.Settings.Default.ADBPath} -s {ADB.DeviceID}";
|
||||
else
|
||||
replacement = $"{Properties.Settings.Default.ADBPath}";
|
||||
replacement = $"{Properties.Settings.Default.ADBPath}";
|
||||
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"))
|
||||
@@ -82,7 +86,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
output.Output += "Custom install successful!";
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +99,7 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(FolderPath))
|
||||
{
|
||||
if (Path.GetExtension(f)==".apk")
|
||||
if (Path.GetExtension(f) == ".apk")
|
||||
|
||||
RecursiveOutput += ADB.Sideload(f);
|
||||
}
|
||||
@@ -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,11 @@ 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");
|
||||
|
||||
File.Move(Properties.Settings.Default.ADBFolder + "\\base.apk", Properties.Settings.Default.MainDir + "\\" + packageName + ".apk");
|
||||
if (File.Exists(Properties.Settings.Default.ADBFolder + "\\" + packageName + ".apk"))
|
||||
File.Delete(Properties.Settings.Default.ADBFolder + "\\" + packageName + ".apk");
|
||||
|
||||
File.Move(Properties.Settings.Default.ADBFolder + "\\base.apk", Environment.CurrentDirectory + "\\" + packageName + ".apk");
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -192,7 +198,9 @@ 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];
|
||||
if (gameName.Equals(game[SideloaderRCLONE.ReleaseNameIndex]))
|
||||
return game[SideloaderRCLONE.PackageNameIndex];
|
||||
}
|
||||
return gameName;
|
||||
@@ -250,5 +258,5 @@ And all of them added to PATH, without ANY of them, the spoofer won't work!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
14
Updater.cs
14
Updater.cs
@@ -16,16 +16,10 @@ namespace AndroidSideloader
|
||||
public static string Repostory { get; set; }
|
||||
private static string RawGitHubUrl;
|
||||
private static string GitHubUrl;
|
||||
|
||||
<<<<<<< HEAD
|
||||
static readonly public string LocalVersion = "2.1.1HF1";
|
||||
=======
|
||||
static readonly public string LocalVersion = "2.1.1";
|
||||
>>>>>>> + Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
static readonly public string LocalVersion = "2.1.3";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
//Check if there is a new version of the sideloader
|
||||
private static bool IsUpdateAvailable()
|
||||
{
|
||||
HttpClient client = new HttpClient();
|
||||
@@ -38,8 +32,6 @@ namespace AndroidSideloader
|
||||
catch { return false; }
|
||||
return LocalVersion != currentVersion;
|
||||
}
|
||||
|
||||
//Call this to ask the user if they want to update
|
||||
public static void Update()
|
||||
{
|
||||
RawGitHubUrl = $"https://raw.githubusercontent.com/nerdunit/androidsideloader";
|
||||
@@ -48,14 +40,11 @@ namespace AndroidSideloader
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
//If the user wants to update
|
||||
private static void doUpdate()
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show($"There is a new update you have version {LocalVersion}, do you want to update?\nCHANGELOG\n{changelog}", $"Version {currentVersion} is available", MessageBoxButtons.YesNo);
|
||||
if (dialogResult != DialogResult.Yes)
|
||||
return;
|
||||
|
||||
//Download new sideloader with version appended to file name so there is no chance of overwriting the current exe
|
||||
try
|
||||
{
|
||||
var fileClient = new WebClient();
|
||||
@@ -67,7 +56,6 @@ namespace AndroidSideloader
|
||||
|
||||
Logger.Log($"Starting {AppName} v{currentVersion}.exe");
|
||||
Process.Start($"{AppName} v{currentVersion}.exe");
|
||||
//Delete current version
|
||||
AndroidSideloader.Utilities.GeneralUtilities.Melt();
|
||||
}
|
||||
catch { }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -8,10 +9,16 @@ 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 { }
|
||||
string time = DateTime.Now.ToString("hh:mmtt(UTC): ");
|
||||
if (text.Length > 5)
|
||||
{
|
||||
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
try { File.AppendAllText(logfile, time + text + newline); } catch { }
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
RSL 2.1.2
|
||||
|
||||
+ Added quick search (ctrl+f or click magnifying glass), Automatically selects whatever game it finds, user can press ENTER to start DL+Install
|
||||
= Fixed massive issues caused by accidental branch merge.
|
||||
= UI Improvements
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmDpZykACgkQx/Rql1Vo
|
||||
czckmxAAl1my1ZUALewOuh1JQbDQhdSDrtRDo9Bx2z9u6FXfp4BKC3w7O8p6B+cT
|
||||
wcWruppIiC2MkN11Ls8i7OjE3f6xYnRo8E8FDH5UMcful/SFJ3XjD9CMf+2e1Mxu
|
||||
VYVGXWRltYdklGy4IOWfvRXbaYUYYlznVUz1lDxsp8w4h4Csz5IiLKWlivsFoPSl
|
||||
tQgcDC1FPKxH0HwSxxBLsygqNFi5GXawF85SyRMB3EpWySWrkYKjMfxub965f2by
|
||||
zP3mn5HigPgS26tOq1u9zVC7TktwJotoPxjgarsBm0IMXggMFZZ2xuCanMXoZ1xK
|
||||
gEw/Ni6tlM8N/CkpZJuQnPajIOHa7TYWOP8cQM38VPmS3cT0ifmqqGpTKMUYEJ8W
|
||||
Hx/QhABpUnhNeIUIAHj0q9BX0zOdebne831SWO8aMUE1+xw0n6ljuVwam/AyiOtJ
|
||||
1uCL+axDpWN8TncOqvoPIrFFSS4Ya8Ml5DQzs7/qI7EXM4lK3/m34Vhekh/ctnY7
|
||||
HAa+io1phPyBb89zgdjfODFVyoadS5pokBs0VUIV78NlZjMx8Dsfh95tVuAhZHYr
|
||||
1smOeqAVZhDsUR5R2hNRH7z1LfY7YKKF+XAFT+XeecG/qK0CuRnrYdrBh8zHmkhV
|
||||
U2ZH6JayNiZ9Eq2QgTYY8M9bo9J+CK2hCTFoXozk8a+eHD1aqk4=
|
||||
=Pdkb
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
|
||||
Reference in New Issue
Block a user