Compare commits

...

50 Commits
v2.21 ... v2.25

Author SHA1 Message Date
Fenopy
3f3fa3dc11 Merge pull request #39 from VRPirates/beta/RSL-2.25
Beta/rsl 2.25
2023-11-03 12:54:10 -05:00
fenopy
3f06099d38 chore: version bump 2023-11-03 12:46:14 -05:00
Fenopy
450cf282aa Merge pull request #35 from Chax1/fix/UnauthFreeze
fix: fix unauthorized bug
2023-11-02 14:12:09 -05:00
fenopy
804c452f6d chore: update wiki url 2023-11-02 10:00:29 -05:00
Chax
c576f62d28 Fix the unauthorized bug, hopefully. 2023-10-31 09:35:12 +01:00
Fenopy
73651723dd Merge pull request #29 from VRPirates/beta/RSL-2.24
RSL 2.24
2023-10-13 18:22:18 -05:00
fenopy
82cc713372 version bump 2023-10-13 18:21:35 -05:00
Fenopy
6d0788268d Merge pull request #28 from Chax1/fix/searchbar
Fix searchbar not being anchored properly
2023-10-13 11:11:39 -05:00
Chax
c183cb6d7a Fix searchbar not being anchored properly 2023-10-13 16:55:06 +02:00
Fenopy
3b83db0177 Merge pull request #27 from Chax1/fix/Quest3Support
Quest 3 stuff
2023-10-12 14:12:16 -05:00
Chax
03f4dcb687 Fix Quest 3 stuff 2023-10-12 21:02:24 +02:00
Chax
9415daba07 Fix Rookie pushing OBB several times.
add installTxtPath
2023-10-12 21:02:21 +02:00
Chax
553571027d Revert changeTitlebarToDevice() changes
Change this too.
2023-10-12 21:02:16 +02:00
Fenopy
273ddda076 Merge pull request #25 from Chax1/fix/CrashOnBackup
Fix crash when trying to backup
2023-10-09 08:35:25 -05:00
Chax
3c8f08a380 Fix crash when trying to backup 2023-10-09 15:19:44 +02:00
Fenopy
b5ac8175dc Merge pull request #24 from Chax1/QoL/CloseOnApply
Close Settings Form when applying changes
2023-10-09 08:02:59 -05:00
Fenopy
d765a9b6eb Merge pull request #23 from Chax1/feature/DirectoryButtons
Add Open Directory Buttons
2023-10-09 08:02:49 -05:00
Chax
409afd8eac Add Open Directory Buttons
Remove console writelines
2023-10-09 14:50:35 +02:00
Chax
d7640d4c5d Close Settings Form when applying changes 2023-10-09 14:45:31 +02:00
fenopy
3828da4864 chore: reorder startup tasks 2023-10-06 07:55:34 -05:00
fenopy
a45f7db85c chore: additional logging to startup 2023-10-06 07:54:44 -05:00
Fenopy
df6a9e9286 Merge pull request #19 from Chax1/feature/ImproveSearch
fix: improve search functionality
2023-09-18 08:28:52 -05:00
Fenopy
c516f80dc1 Merge pull request #17 from Chax1/fix/OutputMessage
Handle remote write failed
2023-09-18 08:27:47 -05:00
Fenopy
0ef2f296f5 Merge pull request #16 from Chax1/QoL/CodeCleanup
Move startup tasks into seperate methods for cleaner code.
2023-09-18 08:27:35 -05:00
Chax
48597983e2 Remove the sorting to top as its not needed. 2023-09-15 15:21:22 +02:00
Chax
a6a4a057fe Improve search drastically. 2023-09-15 11:56:44 +02:00
Fenopy
c7cfc07c9b Merge pull request #12 from VRPirates/beta/RSL-2.23
rsl 2.23
2023-09-06 12:13:45 -05:00
fenopy
51ad390584 chore: version bump 2023-09-06 12:12:11 -05:00
Chax
b4c7795d25 Handle remote write failed 2023-09-01 16:10:39 +02:00
Fenopy
78ef2a0355 Merge pull request #11 from Chax1/fix/UploadCrash
Fix upload crash
2023-08-31 06:14:13 -05:00
Chax
4530424dec fix crash when trying to delete non existant directory and make sure the files exist before attempting to delete them too 2023-08-31 12:37:03 +02:00
Fenopy
3543314ff0 Merge pull request #10 from Chax1/fix/Fullscreen
Fullscreen Fix
2023-08-30 11:32:07 -05:00
fenopy
4ade18bd31 fix: only donate newest versions 2023-08-30 11:18:59 -05:00
Chax
951a899705 Move startup tasks into seperate methods for cleaner code. 2023-08-13 19:27:44 +02:00
Chax
6d678a2e6e Enable maximize button 2023-08-11 19:26:31 +02:00
Chax
8b912e68ee Fix controls not having proper anchor 2023-08-11 19:25:28 +02:00
Fenopy
8059834e91 Merge pull request #8 from VRPirates/beta/RSL-2.22
merge 2.22 changes to master
2023-08-04 07:16:14 -05:00
fenopy
4349603f51 fix: fix double-escape on \\RSL paths 2023-08-04 07:15:34 -05:00
fenopy
160f254e57 chore: update to 2.22 2023-08-04 07:15:29 -05:00
Fenopy
45497396d1 Merge pull request #6 from VRPirates/beta/RSL-2.21
Merge pull request #5 from VRPirates/master
2023-08-04 06:19:11 -05:00
Fenopy
d041ea6b6a Merge pull request #5 from VRPirates/master
beta2.21-master-merge
2023-08-04 06:18:05 -05:00
Fenopy
a2e601ced0 Merge pull request #3 from Chax1/remove/WakeDevice
Remove ADB.WakeDevice due to it being nonfunctional.
2023-08-04 06:15:08 -05:00
Fenopy
35277ca729 Merge pull request #4 from Chax1/fix/changeTitlebarCrash
Make changeTitlebarToDevice less prone to crashes and more robust.
2023-08-04 06:14:38 -05:00
Chax
f3ffe5d037 Make changeTitlebarToDevice less prone to crashes and more robust. 2023-07-28 22:49:49 +02:00
Chax
38866547ec Resolve syntax issue 2023-07-25 20:16:55 +02:00
Fenopy
f4cd9b3b9f Merge pull request #2 from Chax1/fix/NoDeviceModeOutput
Fix No Device Mode output.
2023-07-25 12:53:13 -05:00
Fenopy
e687c3f2ba Merge pull request #1 from Chax1/fix/TrailerControls
Fix trailer controls
2023-07-25 12:53:05 -05:00
Chax
97cbfdea4e Remove ADB.WakeDevice due to redundancy. 2023-07-20 11:57:00 +02:00
Chax
af97e8aef1 Fix No Device Mode having the wrong output message with repeats 2023-07-20 11:44:52 +02:00
Chax
2094ecb0ba Fix trailer controls 2023-07-19 02:14:37 +02:00
13 changed files with 2286 additions and 331 deletions

41
ADB.cs
View File

@@ -9,7 +9,7 @@ namespace AndroidSideloader
internal class ADB
{
private static readonly Process adb = new Process();
public static string adbFolderPath = $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools";
public static string adbFolderPath = $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools";
public static string adbFilePath = adbFolderPath + "\\adb.exe";
public static string DeviceID = "";
public static string package = "";
@@ -196,21 +196,19 @@ namespace AndroidSideloader
public static void ADBDebugWarning()
{
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
if (dialogResult == DialogResult.Cancel)
Program.form.Invoke(() =>
{
Properties.Settings.Default.adbdebugwarned = true;
Properties.Settings.Default.Save();
}
else
{
ADB.WakeDevice();
}
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "Please check inside your headset for ADB DEBUGGING prompt, check box to \"Always allow from this computer.\" and hit OK.\nPlease note that even if you have done this\nbefore it will reset itself from time to time.\n\nPress CANCEL if you want to disable this prompt (FOR DEBUGGING ONLY, NOT RECOMMENDED).", "ADB Debugging not enabled.", MessageBoxButtons.OKCancel);
if (dialogResult == DialogResult.Cancel)
{
Properties.Settings.Default.adbdebugwarned = true;
Properties.Settings.Default.Save();
}
});
}
public static ProcessOutput UninstallPackage(string package)
{
WakeDevice();
ProcessOutput output = new ProcessOutput("", "");
output += RunAdbCommandToString($"shell pm uninstall {package}");
return output;
@@ -222,7 +220,6 @@ namespace AndroidSideloader
long usedSize = 0;
long freeSize = 0;
WakeDevice();
string[] output = RunAdbCommandToString("shell df").Output.Split('\n');
foreach (string currLine in output)
@@ -244,21 +241,9 @@ namespace AndroidSideloader
}
public static bool wirelessadbON;
public static void WakeDevice()
{
_ = RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
if (!string.IsNullOrEmpty(Properties.Settings.Default.IPAddress) && !Properties.Settings.Default.Wired)
{
_ = RunAdbCommandToString(Properties.Settings.Default.IPAddress);
}
}
public static ProcessOutput Sideload(string path, string packagename = "")
{
WakeDevice();
ProcessOutput ret = new ProcessOutput();
ret += RunAdbCommandToString($"install -g \"{path}\"");
string out2 = ret.Output + ret.Error;
@@ -269,16 +254,11 @@ namespace AndroidSideloader
if (out2.Contains("offline") && !Properties.Settings.Default.nodevicemode)
{
DialogResult dialogResult2 = FlexibleMessageBox.Show(Program.form, "Device is offline. Press Yes to reconnect, or if you don't wish to connect and just want to download the game (requires unchecking \"Delete games after install\" from settings menu) then press No.", "Device offline.", MessageBoxButtons.YesNoCancel);
if (dialogResult2 == DialogResult.Yes)
{
ADB.WakeDevice();
}
}
if (out2.Contains($"signatures do not match previously") || out2.Contains("INSTALL_FAILED_VERSION_DOWNGRADE") || out2.Contains("signatures do not match") || out2.Contains("failed to install"))
{
ret.Error = string.Empty;
ret.Output = string.Empty;
ADB.WakeDevice();
if (!Properties.Settings.Default.AutoReinstall)
{
bool cancelClicked = false;
@@ -344,7 +324,6 @@ namespace AndroidSideloader
int y2 = r.Next(9999999);
long sum2 = (y2 * (long)1000000000) + x2;
ADB.WakeDevice();
Properties.Settings.Default.QUStringF = $"{{\"user_id\":{sum},\"app_id\":\"{sum2}\",";
Properties.Settings.Default.Save();
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
@@ -363,8 +342,6 @@ namespace AndroidSideloader
public static ProcessOutput CopyOBB(string path)
{
WakeDevice();
string folder = Path.GetFileName(path);
return !folder.Contains("+") && !folder.Contains("_") && folder.Contains(".")
? RunAdbCommandToString($"push \"{path}\" \"/sdcard/Android/obb\"")

View File

@@ -1,4 +1,53 @@
RSL 2.20
RSL 2.24
- Feature: Added "Open Download" and "Open Backup" Directory buttons to Settings Menu
- Fix: OBB Pushes for Quest 3 Devices
- Fix: Crash when attempting to backup
- Fix: Searchbar Anchoring when resizing
- Fix: Remove instances where OBBs are pushed multiple times
- Fix: Additional Logging and Startup Optimizations
RSL 2.23
- Fix: Rookie should now only prompt for newer versions of all games
- Fix: Crash when attempting to delete invalid directories or files
- Feature: Enable Maximize Button
RSL 2.22
- Fix: Crash on failed extractions.
- Fix: Trailers controls not functioning properly.
- Fix: No Device Mode having the wrong output message.
- Chore: Remove ADB.WakeDevice() due to being non-functional.
- Chore: Make changeTitlebarToDevice less prone to crashes and more robust.
RSL 2.21
- Feature: Search now shows all results found
- Feature: Add --no-rclone-updating launch flag
- Feature: Add lime-green color to various after download jobs
- Feature: Update Sideloader Launcher to check for Rookie
- Feature: Add the ability to download into virtual filesystems (Settings)
- Feature: Add stacktrace & innerexception to crashlog
- Feature: Add CallerInfo to debuglog
- Feature: Rookie will now tell the user when there's a running RCLONE Job
- Fix: Rookie will no longer repeat "All tasks finished." in No Device Mode
- Fix: Rookie should no longer delete the entire OBB/Data folder when uninstalling a game
- Fix: Rookie should no longer freeze on the OBB Comparison
- Fix: The free disclaimer on launch is no longer broken
- Fix: Use new process for every ADB command
- Fix: Do not delete game files on an OBB Mismatch anymore
- Fix: Change all hardcoded C:/ paths to dynamically grab the system drive for further compatability
- Fix: Rookie should now function on 32 Bit again
- Fix: Fix crash on failed extraction
- Chore: Update quota message to be up to date
- Chore: Code rewrites for logging system, obb comparison, updater
- Chore: Several redundant code removals
- Chore: Change Install w/ Enter Key to Download w/ Enter Key
- Chore: Several code cleanups & optimizations
~ Chax
RSL 2.20
- Feature: Added manual IP on Wireless ADB
- Feature: Rookie will now delete old OBB Folders before pushing new obb folders

56
MainForm.Designer.cs generated
View File

@@ -59,7 +59,6 @@ namespace AndroidSideloader
this.label2 = new System.Windows.Forms.Label();
this.lblSearchHelp = new System.Windows.Forms.Label();
this.lblShortcutsF2 = new System.Windows.Forms.Label();
this.lblQuickSearch = new System.Windows.Forms.Label();
this.lblUpdateAvailable = new System.Windows.Forms.Label();
this.lblUpToDate = new System.Windows.Forms.Label();
this.lblMirror = new System.Windows.Forms.Label();
@@ -69,7 +68,6 @@ namespace AndroidSideloader
this.lblAdbCommand = new System.Windows.Forms.Label();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.lblNeedsDonate = new System.Windows.Forms.Label();
this.btnSearch = new System.Windows.Forms.PictureBox();
this.gamesPictureBox = new System.Windows.Forms.PictureBox();
this.startsideloadbutton_Tooltip = new System.Windows.Forms.ToolTip(this.components);
this.startsideloadbutton = new System.Windows.Forms.Button();
@@ -130,7 +128,6 @@ namespace AndroidSideloader
this.MountButton = new AndroidSideloader.RoundButton();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.btnSearch)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.webView21)).BeginInit();
@@ -204,6 +201,7 @@ namespace AndroidSideloader
//
// freeDisclaimer
//
this.freeDisclaimer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.freeDisclaimer.AutoSize = true;
this.freeDisclaimer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.freeDisclaimer.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
@@ -289,10 +287,10 @@ namespace AndroidSideloader
this.gamesListView.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
this.gamesListView.HideSelection = false;
this.gamesListView.ImeMode = System.Windows.Forms.ImeMode.Off;
this.gamesListView.Location = new System.Drawing.Point(224, 70);
this.gamesListView.Location = new System.Drawing.Point(224, 98);
this.gamesListView.Name = "gamesListView";
this.gamesListView.ShowGroups = false;
this.gamesListView.Size = new System.Drawing.Size(798, 352);
this.gamesListView.Size = new System.Drawing.Size(798, 324);
this.gamesListView.TabIndex = 6;
this.gamesListView.UseCompatibleStateImageBehavior = false;
this.gamesListView.View = System.Windows.Forms.View.Details;
@@ -336,8 +334,7 @@ namespace AndroidSideloader
//
// searchTextBox
//
this.searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.searchTextBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
this.searchTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -346,14 +343,13 @@ namespace AndroidSideloader
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(484, 250);
this.searchTextBox.MaximumSize = new System.Drawing.Size(231, 26);
this.searchTextBox.Location = new System.Drawing.Point(224, 70);
this.searchTextBox.MinimumSize = new System.Drawing.Size(231, 26);
this.searchTextBox.Name = "searchTextBox";
this.searchTextBox.Size = new System.Drawing.Size(231, 24);
this.searchTextBox.Size = new System.Drawing.Size(798, 24);
this.searchTextBox.TabIndex = 5;
this.searchTextBox.Text = "Search";
this.searchTextBox.Visible = false;
this.searchTextBox.Click += new System.EventHandler(this.searchTextBox_Click);
this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged);
this.searchTextBox.Leave += new System.EventHandler(this.searchTextBox_Leave);
//
@@ -492,19 +488,6 @@ namespace AndroidSideloader
this.lblShortcutsF2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.lblShortcutsF2.Visible = false;
//
// lblQuickSearch
//
this.lblQuickSearch.AutoSize = true;
this.lblQuickSearch.BackColor = System.Drawing.Color.Transparent;
this.lblQuickSearch.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
this.lblQuickSearch.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.lblQuickSearch.Location = new System.Drawing.Point(738, 11);
this.lblQuickSearch.Name = "lblQuickSearch";
this.lblQuickSearch.Size = new System.Drawing.Size(105, 17);
this.lblQuickSearch.TabIndex = 90;
this.lblQuickSearch.Text = "Quick Search";
this.lblQuickSearch.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// lblUpdateAvailable
//
this.lblUpdateAvailable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -660,19 +643,6 @@ namespace AndroidSideloader
this.lblNeedsDonate.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.lblNeedsDonate.Click += new System.EventHandler(this.lblNeedsDonate_Click);
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.Transparent;
this.btnSearch.BackgroundImage = global::AndroidSideloader.Properties.Resources.SearchGlass;
this.btnSearch.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.btnSearch.Location = new System.Drawing.Point(773, 37);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(28, 24);
this.btnSearch.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.btnSearch.TabIndex = 91;
this.btnSearch.TabStop = false;
this.btnSearch.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)));
@@ -1118,7 +1088,6 @@ namespace AndroidSideloader
this.webView21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.webView21.CreationProperties = null;
this.webView21.DefaultBackgroundColor = System.Drawing.Color.White;
this.webView21.Enabled = false;
this.webView21.Location = new System.Drawing.Point(224, 467);
this.webView21.Name = "webView21";
this.webView21.Size = new System.Drawing.Size(374, 214);
@@ -1288,6 +1257,7 @@ namespace AndroidSideloader
//
// ULGif
//
this.ULGif.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ULGif.Enabled = false;
this.ULGif.Location = new System.Drawing.Point(178, 699);
this.ULGif.Name = "ULGif";
@@ -1298,6 +1268,7 @@ namespace AndroidSideloader
//
// ULLabel
//
this.ULLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ULLabel.AutoSize = true;
this.ULLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ULLabel.ForeColor = System.Drawing.Color.Snow;
@@ -1310,6 +1281,7 @@ namespace AndroidSideloader
//
// verLabel
//
this.verLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.verLabel.AutoSize = true;
this.verLabel.BackColor = System.Drawing.Color.Transparent;
this.verLabel.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold);
@@ -1381,24 +1353,22 @@ namespace AndroidSideloader
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
this.ClientSize = new System.Drawing.Size(1040, 721);
this.Controls.Add(this.webView21);
this.Controls.Add(this.panel2);
this.Controls.Add(this.MountButton);
this.Controls.Add(this.lblShortcutsF2);
this.Controls.Add(this.EnterInstallBox);
this.Controls.Add(this.ProgressText);
this.Controls.Add(this.btnSearch);
this.Controls.Add(this.lblNeedsDonate);
this.Controls.Add(this.lblUpToDate);
this.Controls.Add(this.lblUpdateAvailable);
this.Controls.Add(this.lblMirror);
this.Controls.Add(this.lblQuickSearch);
this.Controls.Add(this.lblShortcutCtrlR);
this.Controls.Add(this.ADBcommandbox);
this.Controls.Add(this.searchTextBox);
this.Controls.Add(this.lblAdbCommand);
this.Controls.Add(this.lblSearchHelp);
this.Controls.Add(this.freeDisclaimer);
this.Controls.Add(this.webView21);
this.Controls.Add(this.DragDropLbl);
this.Controls.Add(this.lblNotes);
this.Controls.Add(this.gamesQueueLabel);
@@ -1415,7 +1385,6 @@ namespace AndroidSideloader
this.Controls.Add(this.pictureBox7);
this.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "BackColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.DoubleBuffered = true;
this.MaximizeBox = false;
this.MinimumSize = new System.Drawing.Size(1048, 760);
this.Name = "MainForm";
this.ShowIcon = false;
@@ -1429,7 +1398,6 @@ namespace AndroidSideloader
this.DragLeave += new System.EventHandler(this.Form1_DragLeave);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.btnSearch)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
@@ -1466,8 +1434,6 @@ namespace AndroidSideloader
private System.Windows.Forms.Label lblSearchHelp;
private System.Windows.Forms.Label lblShortcutsF2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblQuickSearch;
private System.Windows.Forms.PictureBox btnSearch;
private System.Windows.Forms.Label lblUpdateAvailable;
private System.Windows.Forms.Label lblUpToDate;
private System.Windows.Forms.Label lblMirror;

View File

@@ -65,7 +65,45 @@ namespace AndroidSideloader
private List<ListViewItem> _allItems;
public MainForm()
{
InitializeComponent();
// Check for Offline Mode or No RCLONE Updating
CheckCommandLineArguments();
// Initialize debounce timer for search
_debounceTimer = new System.Windows.Forms.Timer
{
Interval = 1000, // 1 second delay
Enabled = false
};
_debounceTimer.Tick += async (sender, e) => await RunSearch();
// Set data source for games queue list
gamesQueListBox.DataSource = gamesQueueList;
InitializeTimeReferences();
// Log program launch time
InitializeLogger();
// Set current log path if not already set
SetCurrentLogPath();
StartTimers();
// Setup list view column sorting
lvwColumnSorter = new ListViewColumnSorter();
gamesListView.ListViewItemSorter = lvwColumnSorter;
// Focus on search text box if visible
if (searchTextBox.Visible)
{
_ = searchTextBox.Focus();
}
}
private void CheckCommandLineArguments()
{
string[] args = Environment.GetCommandLineArgs();
foreach (string arg in args)
{
@@ -82,69 +120,79 @@ namespace AndroidSideloader
{
_ = FlexibleMessageBox.Show(Program.form, "Offline mode activated. You can't download games in this mode, only do local stuff.");
}
}
InitializeComponent();
_debounceTimer = new System.Windows.Forms.Timer
{
Interval = 1000, // 1 second delay
Enabled = false
};
_debounceTimer.Tick += async (sender, e) => await RunSearch();
gamesQueListBox.DataSource = gamesQueueList;
//Time between asking for new apps if user clicks No. 96,0,0 DEFAULT
TimeSpan newDayReference = new TimeSpan(96, 0, 0);
//Time between asking for updates after uploading. 72,0,0 DEFAULT
TimeSpan newDayReference2 = new TimeSpan(72, 0, 0);
TimeSpan comparison;
TimeSpan comparison2;
private void InitializeTimeReferences()
{
// Initialize time references
TimeSpan newDayReference = new TimeSpan(96, 0, 0); // Time between asking for new apps if user clicks No. (DEFAULT: 96 hours)
TimeSpan newDayReference2 = new TimeSpan(72, 0, 0); // Time between asking for updates after uploading. (DEFAULT: 72 hours)
//These two variables set to show difference.
// Calculate time differences
DateTime A = Properties.Settings.Default.LastLaunch;
DateTime B = DateTime.Now;
DateTime C = Properties.Settings.Default.LastLaunch2;
comparison = B - A;
comparison2 = B - C;
// If enough time has passed reset property containing packagenames
TimeSpan comparison = B - A;
TimeSpan comparison2 = B - C;
// Reset properties if enough time has passed
if (comparison > newDayReference)
{
Properties.Settings.Default.ListUpped = false;
Properties.Settings.Default.NonAppPackages = String.Empty;
Properties.Settings.Default.AppPackages = String.Empty;
Properties.Settings.Default.LastLaunch = DateTime.Now;
Properties.Settings.Default.Save();
ResetPropertiesAfterTimePassed();
}
if (comparison2 > newDayReference2)
{
Properties.Settings.Default.LastLaunch2 = DateTime.Now;
Properties.Settings.Default.SubmittedUpdates = String.Empty;
Properties.Settings.Default.Save();
ResetProperties2AfterTimePassed();
}
// Launch time used within debuglog.
}
private void ResetPropertiesAfterTimePassed()
{
Properties.Settings.Default.ListUpped = false;
Properties.Settings.Default.NonAppPackages = String.Empty;
Properties.Settings.Default.AppPackages = String.Empty;
Properties.Settings.Default.LastLaunch = DateTime.Now;
Properties.Settings.Default.Save();
}
private void ResetProperties2AfterTimePassed()
{
Properties.Settings.Default.LastLaunch2 = DateTime.Now;
Properties.Settings.Default.SubmittedUpdates = String.Empty;
Properties.Settings.Default.Save();
}
private void InitializeLogger()
{
// Log program launch time
string launchtime = DateTime.Now.ToString("hh:mmtt(UTC)");
_ = Logger.Log($"\n------\n------\nProgram Launched at: {launchtime}\n------\n------");
}
private void SetCurrentLogPath()
{
if (string.IsNullOrEmpty(Properties.Settings.Default.CurrentLogPath))
{
Properties.Settings.Default.CurrentLogPath = $"{Environment.CurrentDirectory}\\debuglog.txt";
}
}
private void StartTimers()
{
// Start timers
System.Windows.Forms.Timer t = new System.Windows.Forms.Timer
{
Interval = 840000 // 14 mins between wakeup commands
};
t.Tick += new EventHandler(timer_Tick);
t.Start();
System.Windows.Forms.Timer t2 = new System.Windows.Forms.Timer
{
Interval = 300 // 30ms
};
t2.Tick += new EventHandler(timer_Tick2);
t2.Start();
lvwColumnSorter = new ListViewColumnSorter();
gamesListView.ListViewItemSorter = lvwColumnSorter;
if (searchTextBox.Visible)
{
_ = searchTextBox.Focus();
}
}
public static string donorApps = String.Empty;
@@ -154,6 +202,8 @@ namespace AndroidSideloader
private async void Form1_Load(object sender, EventArgs e)
{
_ = Logger.Log("Starting AndroidSideloader Application");
Splash splash = new Splash();
splash.Show();
@@ -191,7 +241,7 @@ namespace AndroidSideloader
}
if (!hasPublicConfig)
{
_ = FlexibleMessageBox.Show(Program.form, "Failed to fetch public mirror config, and the current one is unreadable.\r\nPlease ensure you can access https://wiki.vrpirates.club/ in your browser.", "Config Update Failed", MessageBoxButtons.OK);
_ = FlexibleMessageBox.Show(Program.form, "Failed to fetch public mirror config, and the current one is unreadable.\r\nPlease ensure you can access https://vrpirates.wiki/ in your browser.", "Config Update Failed", MessageBoxButtons.OK);
}
if (Directory.Exists($@"{Path.GetPathRoot(Environment.SystemDirectory)}\RSL\EBWebView"))
@@ -201,14 +251,12 @@ namespace AndroidSideloader
}
}
if (File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\adb.exe"))
{
_ = ADB.RunAdbCommandToString("kill-server");
_ = ADB.RunAdbCommandToString("start-server");
}
// download dependencies
Sideloader.downloadFiles();
Properties.Settings.Default.MainDir = Environment.CurrentDirectory;
Properties.Settings.Default.Save();
Sideloader.downloadFiles();
await Task.Delay(100);
if (Directory.Exists(Sideloader.TempFolder))
@@ -290,6 +338,13 @@ namespace AndroidSideloader
remotesList.Size = Size.Empty;
}
_ = Logger.Log("Attempting to Initalize ADB Server");
if (File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe"))
{
_ = ADB.RunAdbCommandToString("kill-server");
_ = ADB.RunAdbCommandToString("start-server");
}
splash.Close();
}
@@ -300,8 +355,12 @@ namespace AndroidSideloader
new Thread(() =>
{
Thread.Sleep(10000);
webView21.Invoke(() => { webView21.Enabled = true; });
freeDisclaimer.Invoke(() => { freeDisclaimer.Dispose(); });
freeDisclaimer.Invoke(() => {
freeDisclaimer.Dispose();
});
freeDisclaimer.Invoke(() => {
freeDisclaimer.Enabled = false;
});
}).Start();
progressBar.Style = ProgressBarStyle.Marquee;
@@ -357,8 +416,8 @@ namespace AndroidSideloader
{
if (!string.IsNullOrEmpty(Properties.Settings.Default.IPAddress))
{
string path = $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\adb.exe";
ProcessOutput wakeywakey = ADB.RunCommandToString($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\adb.exe shell input keyevent KEYCODE_WAKEUP", path);
string path = $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe";
ProcessOutput wakeywakey = ADB.RunCommandToString($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe shell input keyevent KEYCODE_WAKEUP", path);
if (wakeywakey.Output.Contains("more than one"))
{
Properties.Settings.Default.Wired = true;
@@ -366,7 +425,6 @@ namespace AndroidSideloader
}
else if (wakeywakey.Output.Contains("found"))
{
ADB.WakeDevice();
Properties.Settings.Default.Wired = false;
Properties.Settings.Default.Save();
}
@@ -383,7 +441,7 @@ namespace AndroidSideloader
_ = FlexibleMessageBox.Show(Program.form, "Attempt to connect to saved IP has failed. This is usually due to rebooting the device or not having a STATIC IP set in your router.\nYou must enable Wireless ADB again!");
Properties.Settings.Default.IPAddress = "";
Properties.Settings.Default.Save();
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\StoredIP.txt");
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\StoredIP.txt");
}
else
{
@@ -585,7 +643,6 @@ namespace AndroidSideloader
private async void startsideloadbutton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
ProcessOutput output = new ProcessOutput("", "");
string path = string.Empty;
using (OpenFileDialog openFileDialog = new OpenFileDialog())
@@ -690,15 +747,10 @@ namespace AndroidSideloader
battery = Utilities.StringUtilities.KeepOnlyNumbers(battery);
BatteryLbl.Text = battery + "%";
return devicesComboBox.SelectedIndex;
}
public async void devicesbutton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
_ = await CheckForDevice();
changeTitlebarToDevice();
@@ -726,7 +778,6 @@ namespace AndroidSideloader
Title = "Select OBB folder (must be direct OBB folder, E.G: com.Company.AppName)"
};
ADB.WakeDevice();
if (dialog.Show(Handle))
{
progressBar.Style = ProgressBarStyle.Marquee;
@@ -757,56 +808,50 @@ namespace AndroidSideloader
{
if (!Devices.Contains("unauthorized"))
{
if (Devices[0].Length > 1 && Devices[0].Contains("unauthorized"))
DeviceConnected = false;
this.Invoke(() =>
{
Text = "Device Not Authorized";
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "Device not authorized, be sure to authorize computer on device.", "Not Authorized", MessageBoxButtons.RetryCancel);
if (dialogResult == DialogResult.Retry)
{
devicesbutton.PerformClick();
}
else
{
return;
}
});
}
else if (Devices[0].Length > 1)
{
this.Invoke(() => { Text = "Device Connected with ID | " + Devices[0].Replace("device", String.Empty); });
DeviceConnected = true;
}
else
{
this.Invoke(() =>
{
DeviceConnected = false;
this.Invoke(() =>
Text = "No Device Connected";
if (!Properties.Settings.Default.nodevicemode)
{
Text = "Device Not Authorized";
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "Device not authorized, be sure to authorize computer on device.", "Not Authorized", MessageBoxButtons.RetryCancel);
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "No device found. Please ensure the following: \n\n -Developer mode is enabled. \n -ADB drivers are installed. \n -ADB connection is enabled on your device (this can reset). \n -Your device is plugged in.\n\nThen press \"Retry\"", "No device found.", MessageBoxButtons.RetryCancel);
if (dialogResult == DialogResult.Retry)
{
devicesbutton.PerformClick();
;
}
else
{
return;
}
});
}
else if (Devices[0].Length > 1)
{
this.Invoke(() => { Text = "Device Connected with ID | " + Devices[0].Replace("device", String.Empty); });
DeviceConnected = true;
}
else
{
this.Invoke(() =>
{
DeviceConnected = false;
Text = "No Device Connected";
if (!Properties.Settings.Default.nodevicemode)
{
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "No device found. Please ensure the following: \n\n -Developer mode is enabled. \n -ADB drivers are installed. \n -ADB connection is enabled on your device (this can reset). \n -Your device is plugged in.\n\nThen press \"Retry\"", "No device found.", MessageBoxButtons.RetryCancel);
if (dialogResult == DialogResult.Retry)
{
devicesbutton.PerformClick();
}
else
{
return;
}
}
}
});
}
});
}
}
public async void showAvailableSpace()
{
string AvailableSpace = string.Empty;
@@ -867,10 +912,12 @@ namespace AndroidSideloader
ProcessOutput output = new ProcessOutput(String.Empty, String.Empty);
Thread t1 = new Thread(() =>
{
ADB.WakeDevice();
string date_str = DateTime.Today.ToString("yyyy.MM.dd");
string CurrBackups = Path.Combine(backupFolder, date_str);
_ = FlexibleMessageBox.Show(Program.form, $"This may take up to a minute. Backing up gamesaves to {backupFolder}\\{date_str} (year.month.date)");
Program.form.Invoke(new Action(() =>
{
FlexibleMessageBox.Show(Program.form, $"This may take up to a minute. Backing up gamesaves to {backupFolder}\\{date_str} (year.month.date)");
}));
_ = Directory.CreateDirectory(CurrBackups);
output = ADB.RunAdbCommandToString($"pull \"/sdcard/Android/data\" \"{CurrBackups}\"");
changeTitle("Backing up gamedatas...");
@@ -898,8 +945,6 @@ namespace AndroidSideloader
private async void restorebutton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
ProcessOutput output = new ProcessOutput("", "");
FolderSelectDialog dialog = new FolderSelectDialog
{
@@ -986,8 +1031,6 @@ namespace AndroidSideloader
public static bool isworking = false;
private async void getApkButton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
if (isOffline)
{
notify("You are not connected to the Internet!");
@@ -1144,7 +1187,6 @@ namespace AndroidSideloader
backupFolder = Path.Combine((Properties.Settings.Default.backupDir), $"Rookie Backups");
}
string packagename;
ADB.WakeDevice();
if (m_combo.SelectedIndex == -1)
{
_ = FlexibleMessageBox.Show(Program.form, "Please select an app first");
@@ -1184,8 +1226,6 @@ namespace AndroidSideloader
private async void copyBulkObbButton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
FolderSelectDialog dialog = new FolderSelectDialog
{
Title = "Select your folder with OBBs"
@@ -1229,7 +1269,6 @@ namespace AndroidSideloader
DragDropLbl.Visible = false;
ProcessOutput output = new ProcessOutput(String.Empty, String.Empty);
ADB.WakeDevice();
ADB.DeviceID = GetDeviceID();
progressBar.Style = ProgressBarStyle.Marquee;
CurrPCKG = String.Empty;
@@ -1278,7 +1317,7 @@ namespace AndroidSideloader
string pathname = Path.GetDirectoryName(file2);
string filename = file2.Replace($"{pathname}\\", String.Empty);
string cmd = $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\aapt.exe\" dump badging \"{file2}\" | findstr -i \"package: name\"";
string cmd = $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe\" dump badging \"{file2}\" | findstr -i \"package: name\"";
_ = Logger.Log($"Running adb command-{cmd}");
string cmdout = ADB.RunCommandToString(cmd, file2).Output;
cmdout = Utilities.StringUtilities.RemoveEverythingBeforeFirst(cmdout, "=");
@@ -1425,7 +1464,7 @@ namespace AndroidSideloader
{
string pathname = Path.GetDirectoryName(data);
string dataname = data.Replace($"{pathname}\\", "");
string cmd = $"\"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\aapt.exe\" dump badging \"{data}\" | findstr -i \"package: name\"";
string cmd = $"\"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe\" dump badging \"{data}\" | findstr -i \"package: name\"";
_ = Logger.Log($"Running adb command-{cmd}");
string cmdout = ADB.RunCommandToString(cmd, data).Output;
cmdout = Utilities.StringUtilities.RemoveEverythingBeforeFirst(cmdout, "=");
@@ -1608,6 +1647,8 @@ namespace AndroidSideloader
public static int updint = 0;
public static bool nodeviceonstart = false;
public static bool either = false;
private bool _allItemsInitialized = false;
private async void initListView()
{
@@ -1679,7 +1720,20 @@ namespace AndroidSideloader
try
{
ulong installedVersionInt = ulong.Parse(Utilities.StringUtilities.KeepOnlyNumbers(InstalledVersionCode));
ulong cloudVersionInt = ulong.Parse(Utilities.StringUtilities.KeepOnlyNumbers(release[SideloaderRCLONE.VersionCodeIndex]));
ulong cloudVersionInt = 0;
foreach (string[] releaseGame in SideloaderRCLONE.games)
{
if (string.Equals(releaseGame[SideloaderRCLONE.PackageNameIndex], packagename))
{
ulong releaseGameVersionCode = ulong.Parse(Utilities.StringUtilities.KeepOnlyNumbers(releaseGame[SideloaderRCLONE.VersionCodeIndex]));
if (releaseGameVersionCode > cloudVersionInt)
{
Console.WriteLine($"Updated cloudVersionInt for {packagename} from {cloudVersionInt} to {releaseGameVersionCode}");
cloudVersionInt = releaseGameVersionCode;
}
}
}
//ulong cloudVersionInt = ulong.Parse(Utilities.StringUtilities.KeepOnlyNumbers(release[SideloaderRCLONE.VersionCodeIndex]));
_ = Logger.Log($"Checked game {release[SideloaderRCLONE.GameNameIndex]}; cloudversion={cloudVersionInt} localversion={installedVersionInt}");
if (installedVersionInt < cloudVersionInt)
@@ -1857,19 +1911,19 @@ namespace AndroidSideloader
string apppath = ADB.RunAdbCommandToString($"shell pm path {newGamesToUpload}").Output;
apppath = Utilities.StringUtilities.RemoveEverythingBeforeFirst(apppath, "/");
apppath = Utilities.StringUtilities.RemoveEverythingAfterFirst(apppath, "\r\n");
if (File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\base.apk"))
if (File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\base.apk"))
{
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\base.apk");
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\base.apk");
}
_ = ADB.RunAdbCommandToString($"pull \"{apppath}\"");
string cmd = $"\"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\aapt.exe\" dump badging \"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\base.apk\" | findstr -i \"application-label\"";
string workingpath = $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\aapt.exe";
string cmd = $"\"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe\" dump badging \"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\base.apk\" | findstr -i \"application-label\"";
string workingpath = $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe";
string ReleaseName = ADB.RunCommandToString(cmd, workingpath).Output;
ReleaseName = Utilities.StringUtilities.RemoveEverythingBeforeFirst(ReleaseName, "'");
ReleaseName = Utilities.StringUtilities.RemoveEverythingAfterFirst(ReleaseName, "\r\n");
ReleaseName = ReleaseName.Replace("'", "");
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\base.apk");
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\base.apk");
if (ReleaseName.Contains("Microsoft Windows"))
{
ReleaseName = RlsName;
@@ -1913,6 +1967,11 @@ namespace AndroidSideloader
gamesListView.Items.AddRange(arr);
gamesListView.EndUpdate();
changeTitle(" \n\n");
if (!_allItemsInitialized)
{
_allItems = gamesListView.Items.Cast<ListViewItem>().ToList();
_allItemsInitialized = true; // Set the flag to true after initialization
}
loaded = true;
}
@@ -1948,7 +2007,10 @@ namespace AndroidSideloader
string cmd = $"7z a -mx1 \"{Properties.Settings.Default.MainDir}\\{gameZipName}\" .\\{game.Pckgcommand}\\*";
Program.form.changeTitle("Zipping extracted application...");
_ = ADB.RunCommandToString(cmd, path);
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{game.Pckgcommand}", true);
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\{game.Pckgcommand}"))
{
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{game.Pckgcommand}", true);
}
Program.form.changeTitle("Uploading to server, you may continue to use Rookie while it uploads.");
// Get size of pending zip upload and write to text file
@@ -1966,8 +2028,14 @@ namespace AndroidSideloader
}
// Delete files once uploaded.
File.Delete($"{Properties.Settings.Default.MainDir}\\{gameName}.txt");
File.Delete($"{Properties.Settings.Default.MainDir}\\{gameZipName}");
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{gameName}.txt"))
{
File.Delete($"{Properties.Settings.Default.MainDir}\\{gameName}.txt");
}
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{gameZipName}"))
{
File.Delete($"{Properties.Settings.Default.MainDir}\\{gameZipName}");
}
})
{
@@ -2175,7 +2243,6 @@ namespace AndroidSideloader
}
else
{
ADB.WakeDevice();
DialogResult dialogResult = FlexibleMessageBox.Show(Program.form, "Make sure your Quest is plugged in VIA USB then press OK, if you need a moment press Cancel and come back when you're ready.", "Connect Quest now.", MessageBoxButtons.OKCancel);
if (dialogResult == DialogResult.Cancel)
{
@@ -2205,7 +2272,7 @@ namespace AndroidSideloader
Program.form.showAvailableSpace();
Properties.Settings.Default.IPAddress = IPcmnd;
Properties.Settings.Default.Save();
File.WriteAllText($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\StoredIP.txt", IPcmnd);
File.WriteAllText($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\StoredIP.txt", IPcmnd);
ADB.wirelessadbON = true;
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
@@ -2219,7 +2286,6 @@ namespace AndroidSideloader
private async void listApkButton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
changeTitle("Refreshing connected devices, installed apps and update list...");
if (isLoading)
{
@@ -2327,7 +2393,7 @@ Things you can try:
1) Move the Rookie directory (Folder containing AndroidSideloader.exe) into {Path.GetPathRoot(Environment.SystemDirectory)}RSL
2) Try changing your systems DNS to either Cloudflare/Google/OpenDNS
3) Try using a systemwide VPN like ProtonVPN
4) Sponsor a private server (https://wiki.vrpirates.club/en/Howto/sponsored-mirrors)
4) Sponsor a private server (https://vrpirates.wiki/en/Howto/sponsored-mirrors)
";
_ = FlexibleMessageBox.Show(Program.form, errorMessage, "Unable to connect to Remote Server");
@@ -2580,6 +2646,7 @@ Things you can try:
{
//Quota Errors
bool isinstalltxt = false;
string installTxtPath = null;
bool quotaError = false;
bool otherError = false;
if (gameDownloadOutput.Error.Length > 0 && !isOffline)
@@ -2646,7 +2713,6 @@ Things you can try:
if (quotaError == false && otherError == false)
{
ADB.WakeDevice();
ADB.DeviceID = GetDeviceID();
quotaTries = 0;
progressBar.Value = 0;
@@ -2654,57 +2720,51 @@ Things you can try:
changeTitle("Installing game apk " + gameName, false);
etaLabel.Text = "ETA: Wait for install...";
speedLabel.Text = "DLS: Finished";
if (File.Exists(Properties.Settings.Default.downloadDir + "\\" + gameName + "\\install.txt"))
if (File.Exists(Path.Combine(Properties.Settings.Default.downloadDir, gameName, "install.txt")))
{
isinstalltxt = true;
installTxtPath = Path.Combine(Properties.Settings.Default.downloadDir, gameName, "install.txt");
}
if (File.Exists(Properties.Settings.Default.downloadDir + "\\" + gameName + "\\Install.txt"))
else if (File.Exists(Path.Combine(Properties.Settings.Default.downloadDir, gameName, "Install.txt")))
{
isinstalltxt = true;
installTxtPath = Path.Combine(Properties.Settings.Default.downloadDir, gameName, "Install.txt");
}
string[] files = Directory.GetFiles(Properties.Settings.Default.downloadDir + "\\" + gameName);
Debug.WriteLine("Game Folder is: " + Properties.Settings.Default.downloadDir + "\\" + gameName);
Debug.WriteLine("FILES IN GAME FOLDER: ");
foreach (string file in files)
if (isinstalltxt)
{
Debug.WriteLine(file);
string extension = Path.GetExtension(file);
if (extension == ".txt")
{
if (!Properties.Settings.Default.nodevicemode | !nodeviceonstart & DeviceConnected)
{
string fullname = Path.GetFileName(file);
if (fullname.Equals("install.txt") || fullname.Equals("Install.txt"))
if (!Properties.Settings.Default.nodevicemode || !nodeviceonstart && DeviceConnected)
{
Thread installtxtThread = new Thread(() =>
{
output += Sideloader.RunADBCommandsFromFile(file);
output += Sideloader.RunADBCommandsFromFile(installTxtPath);
changeTitle(" \n\n");
});
installtxtThread.Start();
while (installtxtThread.IsAlive)
{
await Task.Delay(100);
}
}
}
else
{
output.Output += "All tasks finished. \n";
output.Output = "\n--- NO DEVICE MODE ---\nAll tasks finished.\n--- NO DEVICE MODE --";
}
}
if (!isinstalltxt)
else
{
if (!Properties.Settings.Default.nodevicemode | !nodeviceonstart & DeviceConnected)
if (!Properties.Settings.Default.nodevicemode || !nodeviceonstart && DeviceConnected)
{
if (extension == ".apk")
// Find the APK file to install
string apkFile = files.FirstOrDefault(file => Path.GetExtension(file) == ".apk");
if (apkFile != null)
{
CurrAPK = file;
CurrAPK = apkFile;
CurrPCKG = packagename;
System.Windows.Forms.Timer t = new System.Windows.Forms.Timer
{
@@ -2715,7 +2775,7 @@ Things you can try:
Thread apkThread = new Thread(() =>
{
Program.form.changeTitle($"Sideloading apk...");
output += ADB.Sideload(file, packagename);
output += ADB.Sideload(apkFile, packagename);
})
{
IsBackground = true
@@ -2725,27 +2785,23 @@ Things you can try:
{
await Task.Delay(100);
}
t.Stop();
}
Debug.WriteLine(wrDelimiter);
if (Directory.Exists($"{Properties.Settings.Default.downloadDir}\\{gameName}\\{packagename}"))
{
if (!Properties.Settings.Default.nodevicemode | !nodeviceonstart & DeviceConnected)
{
deleteOBB(packagename);
Thread obbThread = new Thread(() =>
{
changeTitle($"Copying {packagename} obb to device...");
output += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.downloadDir}\\{gameName}\\{packagename}\" \"/sdcard/Android/obb\"");
ADB.RunAdbCommandToString($"shell mkdir /sdcard/Android/obb/{packagename}");
output += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.downloadDir}\\{gameName}\\{packagename}\" \"/sdcard/Android/obb\"");
Program.form.changeTitle("");
})
{
IsBackground = true
};
obbThread.Start();
while (obbThread.IsAlive)
{
await Task.Delay(100);
@@ -2762,12 +2818,10 @@ Things you can try:
}
}
}
}
}
else
{
output.Output += "All tasks finished. \n";
output.Output = "\n--- NO DEVICE MODE ---\nAll tasks finished.\n--- NO DEVICE MODE --";
}
}
changeTitle($"Installation of {gameName} completed.");
@@ -2813,10 +2867,8 @@ Things you can try:
private void deleteOBB(string packagename)
{
ADB.WakeDevice();
changeTitle("Deleting old OBB Folder...");
Logger.Log("Attempting to delete old OBB Folder");
ADB.WakeDevice();
ADB.RunAdbCommandToString($"shell rm -rf /sdcard/Android/obb/{packagename}");
}
@@ -2837,8 +2889,6 @@ Things you can try:
changeTitle("Comparing obbs...");
Logger.Log("Comparing OBBs");
ADB.WakeDevice();
DirectoryInfo localFolder = new DirectoryInfo(localFolderPath);
long totalLocalFolderSize = localFolderSize(localFolder) / (1024 * 1024);
@@ -3084,9 +3134,9 @@ Things you can try:
_ = Program.form.GetDeviceID();
Program.form.changeTitlebarToDevice();
_ = FlexibleMessageBox.Show(Program.form, "Relaunch Rookie to complete the process and switch back to USB adb.");
if (File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\StoredIP.txt"))
if (File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\StoredIP.txt"))
{
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\StoredIP.txt");
File.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\StoredIP.txt");
}
}
}
@@ -3113,7 +3163,6 @@ Things you can try:
private void devicesComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
ADB.WakeDevice();
showAvailableSpace();
}
@@ -3277,7 +3326,6 @@ Things you can try:
}
if (keyData == Keys.F5)
{
ADB.WakeDevice();
_ = GetDeviceID();
_ = FlexibleMessageBox.Show(Program.form, "If your device is not Connected, hit reconnect first or it won't work!\nNOTE: THIS MAY TAKE UP TO 60 SECONDS.\nThere will be a Popup text window with all updates available when it is done!", "Is device connected?", MessageBoxButtons.OKCancel);
listAppsBtn();
@@ -3308,7 +3356,7 @@ Things you can try:
private void searchTextBox_TextChanged(object sender, EventArgs e)
private async void searchTextBox_TextChanged(object sender, EventArgs e)
{
_debounceTimer.Stop();
_debounceTimer.Start();
@@ -3321,29 +3369,26 @@ Things you can try:
// Cancel any ongoing searches
_cts?.Cancel();
_allItems = gamesListView.Items.Cast<ListViewItem>().ToList();
string searchTerm = searchTextBox.Text;
if (!string.IsNullOrEmpty(searchTerm))
{
_cts = new CancellationTokenSource();
try
{
var matches = await Task.Run(() =>
_allItems
.Where(i => i.Text.IndexOf(searchTerm, StringComparison.CurrentCultureIgnoreCase) >= 0)
.ToList(),
_cts.Token);
var matches = _allItems
.Where(i => i.Text.IndexOf(searchTerm, StringComparison.CurrentCultureIgnoreCase) >= 0)
.ToList();
// Update UI on UI thread
Invoke(new Action(() =>
gamesListView.BeginUpdate(); // Improve UI performance
gamesListView.Items.Clear();
foreach (var match in matches)
{
gamesListView.Items.Clear();
foreach (var match in matches)
{
gamesListView.Items.Add(match);
}
}));
gamesListView.Items.Add(match);
}
gamesListView.EndUpdate(); // End the update to refresh the UI
}
catch (OperationCanceledException)
{
@@ -3352,7 +3397,6 @@ Things you can try:
}
else
{
// No matching items found, restore the original list
initListView();
}
}
@@ -3475,6 +3519,7 @@ Things you can try:
}
else
{
webView21.Enabled = true;
if (!Directory.Exists(Environment.CurrentDirectory + "\\runtimes"))
{
WebClient client = new WebClient();
@@ -3482,7 +3527,7 @@ Things you can try:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
try
{
client.DownloadFile("https://wiki.vrpirates.club/downloads/runtimes.7z", "runtimes.7z");
client.DownloadFile("https://vrpirates.wiki/downloads/runtimes.7z", "runtimes.7z");
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\runtimes.7z", Environment.CurrentDirectory);
File.Delete("runtimes.7z");
}
@@ -3521,7 +3566,6 @@ Things you can try:
public void UpdateGamesButton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
_ = GetDeviceID();
_ = FlexibleMessageBox.Show(Program.form, "If your device is not Connected, hit reconnect first or it won't work!\nNOTE: THIS MAY TAKE UP TO 60 SECONDS.\nThere will be a Popup text window with all updates available when it is done!", "Is device connected?", MessageBoxButtons.OKCancel);
listAppsBtn();
@@ -3549,8 +3593,6 @@ Things you can try:
private void MountButton_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
_ = ADB.RunAdbCommandToString("shell svc usb setFunctions mtp true");
}
@@ -3567,7 +3609,6 @@ Things you can try:
_ = FlexibleMessageBox.Show(Program.form, "Please select an app first");
return;
}
ADB.WakeDevice();
ProcessOutput output = new ProcessOutput(String.Empty, String.Empty);
progressBar.Style = ProgressBarStyle.Marquee;
@@ -3601,7 +3642,6 @@ Things you can try:
_ = FlexibleMessageBox.Show(Program.form, "Please select an app first");
return;
}
ADB.WakeDevice();
ProcessOutput output = new ProcessOutput(String.Empty, String.Empty);
progressBar.Style = ProgressBarStyle.Marquee;
@@ -3648,21 +3688,10 @@ Things you can try:
initListView();
}
private void pictureBox2_Click(object sender, EventArgs e)
{
searchTextBox.Clear();
searchTextBox.Visible = true;
label2.Visible = true;
lblSearchHelp.Visible = true;
lblShortcutsF2.Visible = true;
_ = searchTextBox.Focus();
}
private void searchTextBox_Leave(object sender, EventArgs e)
{
if (searchTextBox.Visible)
{
searchTextBox.Visible = false;
label2.Visible = false;
lblSearchHelp.Visible = false;
lblShortcutsF2.Visible = false;
@@ -3858,7 +3887,7 @@ Things you can try:
Program.form.showAvailableSpace();
Properties.Settings.Default.IPAddress = IPcmnd;
Properties.Settings.Default.Save();
File.WriteAllText($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\StoredIP.txt", IPcmnd);
File.WriteAllText($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\StoredIP.txt", IPcmnd);
ADB.wirelessadbON = true;
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
@@ -3922,8 +3951,6 @@ Things you can try:
private async void pullAppToDesktopBtn_Click(object sender, EventArgs e)
{
ADB.WakeDevice();
if (m_combo.SelectedIndex == -1)
{
notify("Please select an app first");
@@ -4296,6 +4323,12 @@ Things you can try:
lblUpdateAvailable.Click += updateAvailable_Click;
lblNeedsDonate.Click += lblNeedsDonate_Click;
}
private void searchTextBox_Click(object sender, EventArgs e)
{
searchTextBox.Clear();
_ = searchTextBox.Focus();
}
}
public static class ControlExtensions

View File

@@ -24,7 +24,6 @@ namespace AndroidSideloader
//Quest 2 settings, might remove them in the future since some of them are broken
if (RefreshRateComboBox.SelectedIndex != -1)
{
ADB.WakeDevice();
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.refreshRate {RefreshRateComboBox.SelectedItem}");
_ = ADB.RunAdbCommandToString($"shell settings put global 90hz_global {RefreshRateComboBox.SelectedIndex}");
_ = ADB.RunAdbCommandToString($"shell settings put global 90hzglobal {RefreshRateComboBox.SelectedIndex}");
@@ -33,7 +32,6 @@ namespace AndroidSideloader
if (TextureResTextBox.Text.Length > 0)
{
ADB.WakeDevice();
_ = int.TryParse(TextureResTextBox.Text, out _);
_ = ADB.RunAdbCommandToString($"shell settings put global texture_size_Global {TextureResTextBox.Text}");
_ = ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureWidth {TextureResTextBox.Text}");
@@ -269,7 +267,6 @@ namespace AndroidSideloader
}
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");
ADB.WakeDevice();
Program.form.changeTitle("Pulling files...");
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Screenshots\" \"{path}\\Quest ScreenShots\"");
if (delsh)
@@ -292,8 +289,7 @@ namespace AndroidSideloader
_ = Directory.CreateDirectory($"{path}\\Quest VideoShots");
}
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");
ADB.WakeDevice();
_ = MessageBox.Show("Please wait until you get the message that the transfer has finished.");;
Program.form.changeTitle("Pulling files...");
_ = ADB.RunAdbCommandToString($"pull \"/sdcard/Oculus/Videoshots\" \"{path}\\Quest VideoShots\"");
if (delsh)

View File

@@ -51,6 +51,8 @@ namespace AndroidSideloader
this.resetSettingsButton = new AndroidSideloader.RoundButton();
this.applyButton = new AndroidSideloader.RoundButton();
this.virtualFilesystemCompatibilityCheckbox = new System.Windows.Forms.CheckBox();
this.openBackupDirectory = new AndroidSideloader.RoundButton();
this.openDownloadDirectory = new AndroidSideloader.RoundButton();
this.SuspendLayout();
//
// checkForUpdatesCheckBox
@@ -375,13 +377,57 @@ namespace AndroidSideloader
this.virtualFilesystemCompatibilityCheckbox.UseVisualStyleBackColor = true;
this.virtualFilesystemCompatibilityCheckbox.CheckedChanged += new System.EventHandler(this.virtualFilesystemCompatibilityCheckbox_CheckedChanged);
//
// openBackupDirectory
//
this.openBackupDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.openBackupDirectory.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.openBackupDirectory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.openBackupDirectory.DialogResult = System.Windows.Forms.DialogResult.OK;
this.openBackupDirectory.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
this.openBackupDirectory.ForeColor = System.Drawing.Color.White;
this.openBackupDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.openBackupDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.openBackupDirectory.Location = new System.Drawing.Point(27, 616);
this.openBackupDirectory.Name = "openBackupDirectory";
this.openBackupDirectory.Radius = 5;
this.openBackupDirectory.Size = new System.Drawing.Size(285, 31);
this.openBackupDirectory.Stroke = true;
this.openBackupDirectory.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
this.openBackupDirectory.TabIndex = 28;
this.openBackupDirectory.Text = "Open Backup Directory";
this.openBackupDirectory.Transparency = false;
this.openBackupDirectory.Click += new System.EventHandler(this.openBackupDirectory_Click);
//
// openDownloadDirectory
//
this.openDownloadDirectory.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.openDownloadDirectory.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.openDownloadDirectory.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.openDownloadDirectory.DialogResult = System.Windows.Forms.DialogResult.OK;
this.openDownloadDirectory.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
this.openDownloadDirectory.ForeColor = System.Drawing.Color.White;
this.openDownloadDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.openDownloadDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
this.openDownloadDirectory.Location = new System.Drawing.Point(27, 579);
this.openDownloadDirectory.Name = "openDownloadDirectory";
this.openDownloadDirectory.Radius = 5;
this.openDownloadDirectory.Size = new System.Drawing.Size(285, 31);
this.openDownloadDirectory.Stroke = true;
this.openDownloadDirectory.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
this.openDownloadDirectory.TabIndex = 27;
this.openDownloadDirectory.Text = "Open Download Directory";
this.openDownloadDirectory.Transparency = false;
this.openDownloadDirectory.Click += new System.EventHandler(this.openDownloadDirectory_Click);
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes_1_1_1_0_0_0_1__000000_212121;
this.ClientSize = new System.Drawing.Size(339, 586);
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(339, 665);
this.Controls.Add(this.openBackupDirectory);
this.Controls.Add(this.openDownloadDirectory);
this.Controls.Add(this.virtualFilesystemCompatibilityCheckbox);
this.Controls.Add(this.singleThread);
this.Controls.Add(this.setBackupDirectory);
@@ -441,5 +487,7 @@ namespace AndroidSideloader
private System.Windows.Forms.FolderBrowserDialog backupDirectorySetter;
private System.Windows.Forms.CheckBox singleThread;
private System.Windows.Forms.CheckBox virtualFilesystemCompatibilityCheckbox;
private RoundButton openBackupDirectory;
private RoundButton openDownloadDirectory;
}
}

View File

@@ -84,7 +84,7 @@ namespace AndroidSideloader
private void applyButton_Click(object sender, EventArgs e)
{
Properties.Settings.Default.Save();
_ = FlexibleMessageBox.Show(this, "Settings applied!");
this.Close();
}
private void checkForUpdatesCheckBox_CheckedChanged(object sender, EventArgs e)
@@ -245,6 +245,34 @@ namespace AndroidSideloader
Properties.Settings.Default.virtualFilesystemCompatibility = virtualFilesystemCompatibilityCheckbox.Checked;
Properties.Settings.Default.Save();
}
private void openDownloadDirectory_Click(object sender, EventArgs e)
{
string pathToOpen = Properties.Settings.Default.customDownloadDir ? $"{Properties.Settings.Default.downloadDir}" : $"{Environment.CurrentDirectory}";
if (Directory.Exists(pathToOpen))
{
ProcessStartInfo p = new ProcessStartInfo
{
Arguments = pathToOpen,
FileName = "explorer.exe"
};
Process.Start(p);
}
}
private void openBackupDirectory_Click(object sender, EventArgs e)
{
string pathToOpen = Properties.Settings.Default.customBackupDir ? $"{Path.Combine((Properties.Settings.Default.backupDir), $"Rookie Backups")}" : $"{Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), $"Rookie Backups")}";
if (Directory.Exists(pathToOpen))
{
ProcessStartInfo p = new ProcessStartInfo
{
Arguments = pathToOpen,
FileName = "explorer.exe"
};
Process.Start(p);
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,6 @@ namespace AndroidSideloader
//push user.json to device (required for some devices like oculus quest)
public static void PushUserJsons()
{
ADB.WakeDevice();
foreach (string userJson in UsernameForm.userJsons)
{
UsernameForm.createUserJsonByName(Utilities.GeneralUtilities.randomString(16), userJson);
@@ -29,23 +28,21 @@ namespace AndroidSideloader
//public static List<string> InstalledPackageNames = new List<string>(); //Remove folder from device
public static ProcessOutput RemoveFolder(string path)
{
ADB.WakeDevice();
if (path == "/sdcard/Android/obb/" || path == "sdcard/Android/data/")
{
return null;
}
return ADB.RunAdbCommandToString($"shell rm -r {path}");
}
public static ProcessOutput RemoveFile(string path)
{
ADB.WakeDevice();
return ADB.RunAdbCommandToString($"shell rm -f {path}");
}
//For games that require manual install, like having another folder that isnt an obb
public static ProcessOutput RunADBCommandsFromFile(string path)
{
ADB.WakeDevice();
ProcessOutput output = new ProcessOutput();
string[] commands = File.ReadAllLines(path);
string currfolder = Path.GetDirectoryName(path);
@@ -147,7 +144,6 @@ namespace AndroidSideloader
{
MainForm.backupFolder = Path.Combine((Properties.Settings.Default.backupDir), $"Rookie Backups");
}
ADB.WakeDevice();
if (!Directory.Exists(MainForm.backupFolder))
{
_ = Directory.CreateDirectory(MainForm.backupFolder);
@@ -165,7 +161,6 @@ namespace AndroidSideloader
public static ProcessOutput DeleteFile(string GameName)
{
ADB.WakeDevice();
ProcessOutput output = new ProcessOutput("", "");
string packageName = Sideloader.gameNameToPackageName(GameName);
@@ -184,8 +179,6 @@ namespace AndroidSideloader
//Extracts apk from device, saves it by package name to sideloader folder
public static ProcessOutput getApk(string GameName)
{
ADB.WakeDevice();
_ = new ProcessOutput("", "");
string packageName = Sideloader.gameNameToPackageName(GameName);
@@ -272,48 +265,48 @@ namespace AndroidSideloader
if (!File.Exists("Sideloader Launcher.exe"))
{
currentAccessedWebsite = "github";
_ = Logger.Log($"Missing 'Sideloader Launcher.exe'. Attempting to download from {currentAccessedWebsite}");
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Sideloader%20Launcher.exe", "Sideloader Launcher.exe");
_ = Logger.Log($"'Sideloader Launcher.exe' download successful");
}
if (!File.Exists("Rookie Offline.cmd"))
{
currentAccessedWebsite = "github";
_ = Logger.Log($"Missing 'Rookie Offline.cmd'. Attempting to download from {currentAccessedWebsite}");
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/Rookie%20Offline.cmd", "Rookie Offline.cmd");
_ = Logger.Log($"'Rookie Offline.cmd' download successful");
}
if (!File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\aug2021.txt") || !File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
if (!File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
{
if (Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\2.8.2"))
if (!Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools"))
{
Directory.Delete($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\2.8.2", true);
}
if (Directory.Exists($"{Properties.Settings.Default.MainDir}\\adb"))
{
Directory.Delete($"{Properties.Settings.Default.MainDir}\\adb", true);
}
if (!Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools"))
{
_ = Directory.CreateDirectory($"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools");
_ = Directory.CreateDirectory($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
}
currentAccessedWebsite = "github";
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/adb2.zip", "Ad.7z");
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\Ad.7z", $"{Path.GetPathRoot(Environment.SystemDirectory)}\\RSL\\platform-tools");
File.Delete("Ad.7z");
_ = Logger.Log($"Missing adb within {Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools. Attempting to download from {currentAccessedWebsite}");
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/adb2.zip", "_adb.7z");
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\_adb.7z", $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
File.Delete("_adb.7z");
_ = Logger.Log($"adb download successful");
}
if (!Directory.Exists(Environment.CurrentDirectory + "\\rclone"))
{
currentAccessedWebsite = "rclone";
_ = Logger.Log($"Missing rclone. Attempting to download from {currentAccessedWebsite}.org");
string url = Environment.Is64BitOperatingSystem
? "https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-amd64.zip"
: "https://downloads.rclone.org/v1.62.2/rclone-v1.62.2-windows-386.zip";
//Since sideloader is build for x86, it should work on both x86 and x64 so we download the according rclone version
_ = Logger.Log("Begin download rclone");
client.DownloadFile(url, "rclone.zip");
_ = Logger.Log("Complete download rclone");
_ = Logger.Log($"Extract {Environment.CurrentDirectory}\\rclone.zip");
Utilities.Zip.ExtractFile(Environment.CurrentDirectory + "\\rclone.zip", Environment.CurrentDirectory);
File.Delete("rclone.zip");
@@ -327,9 +320,11 @@ namespace AndroidSideloader
break; //only 1 rclone folder
}
}
_ = Logger.Log($"rclone download successful");
}
else
{
_ = Logger.Log($"Checking for Local rclone...");
string pathToRclone = Path.Combine(Environment.CurrentDirectory, "rclone", "rclone.exe");
if (File.Exists(pathToRclone))
{
@@ -340,7 +335,7 @@ namespace AndroidSideloader
{
if (version != "1.62.2")
{
Logger.Log("RCLONE Version not matching! Downloading required version.", LogLevel.WARNING);
Logger.Log($"RCLONE Version does not match ({version})! Downloading required version (1.62.2)", LogLevel.WARNING);
File.Delete(pathToRclone);
currentAccessedWebsite = "rclone";
string architecture = Environment.Is64BitOperatingSystem ? "amd64" : "386";

View File

@@ -179,7 +179,7 @@ namespace AndroidSideloader
_ = Logger.Log($"Attempting to Update Download Config");
try
{
string configUrl = "https://wiki.vrpirates.club/downloads/vrp.download.config";
string configUrl = "https://vrpirates.wiki/downloads/vrp.download.config";
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
@@ -248,7 +248,7 @@ namespace AndroidSideloader
_ = Logger.Log($"Attempting to Update Upload Config");
try
{
string configUrl = "https://wiki.vrpirates.club/downloads/vrp.upload.config";
string configUrl = "https://vrpirates.wiki/downloads/vrp.upload.config";
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))
@@ -277,7 +277,7 @@ namespace AndroidSideloader
_ = Logger.Log($"Attempting to Update Public Config");
try
{
string configUrl = "https://wiki.vrpirates.club/downloads/vrp-public.json";
string configUrl = "https://vrpirates.wiki/downloads/vrp-public.json";
HttpWebRequest getUrl = (HttpWebRequest)WebRequest.Create(configUrl);
using (StreamReader responseReader = new StreamReader(getUrl.GetResponse().GetResponseStream()))

View File

@@ -13,7 +13,7 @@ namespace AndroidSideloader
private static readonly string RawGitHubUrl = "https://raw.githubusercontent.com/VRPirates/rookie";
private static readonly string GitHubUrl = "https://github.com/VRPirates/rookie";
public static readonly string LocalVersion = "2.21";
public static readonly string LocalVersion = "2.25";
public static string currentVersion = string.Empty;
public static string changelog = string.Empty;

View File

@@ -1,26 +1,4 @@
RSL 2.21
RSL 2.25
- Feature: Search now shows all results found
- Feature: Add --no-rclone-updating launch flag
- Feature: Add lime-green color to various after download jobs
- Feature: Update Sideloader Launcher to check for Rookie
- Feature: Add the ability to download into virtual filesystems (Settings)
- Feature: Add stacktrace & innerexception to crashlog
- Feature: Add CallerInfo to debuglog
- Feature: Rookie will now tell the user when there's a running RCLONE Job
- Fix: Rookie will no longer repeat "All tasks finished." in No Device Mode
- Fix: Rookie should no longer delete the entire OBB/Data folder when uninstalling a game
- Fix: Rookie should no longer freeze on the OBB Comparison
- Fix: The free disclaimer on launch is no longer broken
- Fix: Use new process for every ADB command
- Fix: Do not delete game files on an OBB Mismatch anymore
- Fix: Change all hardcoded C:/ paths to dynamically grab the system drive for further compatability
- Fix: Rookie should now function on 32 Bit again
- Fix: Fix crash on failed extraction
- Chore: Update quota message to be up to date
- Chore: Code rewrites for logging system, obb comparison, updater
- Chore: Several redundant code removals
- Chore: Change Install w/ Enter Key to Download w/ Enter Key
- Chore: Several code cleanups & optimizations
~ Chax
- Fix: Fix to unauthorized device bug
- Chore: Update Wiki URL

View File

@@ -1 +1 @@
2.21
2.25