Compare commits

...

10 Commits
v1.3 ... v1.4

Author SHA1 Message Date
nerdunit
6690099982 Add files via upload 2020-07-17 13:55:34 -07:00
nerdunit
6726de7d26 Update donators.txt 2020-07-17 13:55:04 -07:00
nerdunit
401c9c22dd Update donators.txt 2020-07-17 13:50:26 -07:00
nerdunit
6e6341e11f Add files via upload 2020-07-17 13:47:37 -07:00
nerdunit
cc09e41622 Add files via upload 2020-07-17 13:08:53 -07:00
nerdunit
059d195f21 Add files via upload 2020-07-17 12:31:32 -07:00
nerdunit
cf334f00cd Add files via upload 2020-07-16 12:36:19 -07:00
nerdunit
f0af68b228 Add files via upload 2020-07-16 12:01:21 -07:00
nerdunit
92a1da1939 v1.3 2020-07-16 11:45:15 -07:00
nerdunit
bfce0e54ec Update version 2020-07-16 11:45:12 -07:00
8 changed files with 146 additions and 65 deletions

View File

@@ -109,6 +109,9 @@
<Reference Include="MetroFramework.Fonts, Version=1.2.0.3, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=MSIL">
<HintPath>packages\MetroFramework.Fonts.1.2.0.3\lib\net40\MetroFramework.Fonts.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SergeUtils">
<HintPath>.\SergeUtils.dll</HintPath>
</Reference>

46
Form1.Designer.cs generated
View File

@@ -40,7 +40,7 @@
this.launchApkButton = new System.Windows.Forms.Button();
this.uninstallAppButton = new System.Windows.Forms.Button();
this.sideloadFolderButton = new System.Windows.Forms.Button();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.progressBar = new System.Windows.Forms.ProgressBar();
this.copyBulkObbButton = new System.Windows.Forms.Button();
this.DragDropLbl = new System.Windows.Forms.Label();
this.downloadInstallGameButton = new System.Windows.Forms.Button();
@@ -75,7 +75,7 @@
this.m_combo.Location = new System.Drawing.Point(284, 14);
this.m_combo.Margin = new System.Windows.Forms.Padding(4);
this.m_combo.Name = "m_combo";
this.m_combo.Size = new System.Drawing.Size(568, 24);
this.m_combo.Size = new System.Drawing.Size(685, 24);
this.m_combo.TabIndex = 19;
this.m_combo.Text = "Select an app from here...";
//
@@ -215,7 +215,7 @@
this.launchPackageTextBox.BackColor = global::AndroidSideloader.Properties.Settings.Default.TextBoxColor;
this.launchPackageTextBox.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "TextBoxColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.launchPackageTextBox.ForeColor = System.Drawing.Color.White;
this.launchPackageTextBox.Location = new System.Drawing.Point(597, 148);
this.launchPackageTextBox.Location = new System.Drawing.Point(714, 150);
this.launchPackageTextBox.Margin = new System.Windows.Forms.Padding(4);
this.launchPackageTextBox.Name = "launchPackageTextBox";
this.launchPackageTextBox.Size = new System.Drawing.Size(255, 22);
@@ -224,7 +224,7 @@
//
// launchApkButton
//
this.launchApkButton.Location = new System.Drawing.Point(597, 175);
this.launchApkButton.Location = new System.Drawing.Point(714, 177);
this.launchApkButton.Margin = new System.Windows.Forms.Padding(4);
this.launchApkButton.Name = "launchApkButton";
this.launchApkButton.Size = new System.Drawing.Size(255, 25);
@@ -277,15 +277,15 @@
this.sideloadFolderButton.UseVisualStyleBackColor = false;
this.sideloadFolderButton.Click += new System.EventHandler(this.sideloadFolderButton_Click);
//
// progressBar1
// progressBar
//
this.progressBar1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.progressBar1.ForeColor = System.Drawing.Color.Purple;
this.progressBar1.Location = new System.Drawing.Point(284, 46);
this.progressBar1.Margin = new System.Windows.Forms.Padding(4);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(568, 25);
this.progressBar1.TabIndex = 20;
this.progressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.progressBar.ForeColor = System.Drawing.Color.Purple;
this.progressBar.Location = new System.Drawing.Point(284, 46);
this.progressBar.Margin = new System.Windows.Forms.Padding(4);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(685, 25);
this.progressBar.TabIndex = 20;
//
// copyBulkObbButton
//
@@ -327,7 +327,7 @@
this.downloadInstallGameButton.Location = new System.Drawing.Point(284, 113);
this.downloadInstallGameButton.Margin = new System.Windows.Forms.Padding(4);
this.downloadInstallGameButton.Name = "downloadInstallGameButton";
this.downloadInstallGameButton.Size = new System.Drawing.Size(568, 28);
this.downloadInstallGameButton.Size = new System.Drawing.Size(685, 28);
this.downloadInstallGameButton.TabIndex = 22;
this.downloadInstallGameButton.Text = "Download and Install Game";
this.downloadInstallGameButton.UseVisualStyleBackColor = true;
@@ -343,7 +343,8 @@
this.gamesComboBox.Location = new System.Drawing.Point(284, 81);
this.gamesComboBox.Margin = new System.Windows.Forms.Padding(4);
this.gamesComboBox.Name = "gamesComboBox";
this.gamesComboBox.Size = new System.Drawing.Size(568, 24);
this.gamesComboBox.Size = new System.Drawing.Size(685, 24);
this.gamesComboBox.Sorted = true;
this.gamesComboBox.TabIndex = 21;
this.gamesComboBox.Text = "Select a game from here...";
//
@@ -616,13 +617,14 @@
this.pictureBox1.ErrorImage = null;
this.pictureBox1.ImageLocation = global::AndroidSideloader.Properties.Settings.Default.BackPicturePath;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(263, 0);
this.pictureBox1.Location = new System.Drawing.Point(264, 0);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(604, 788);
this.pictureBox1.Size = new System.Drawing.Size(718, 788);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 74;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// Form1
//
@@ -630,22 +632,22 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
this.ClientSize = new System.Drawing.Size(861, 786);
this.ClientSize = new System.Drawing.Size(982, 786);
this.Controls.Add(this.panel1);
this.Controls.Add(this.gamesComboBox);
this.Controls.Add(this.downloadInstallGameButton);
this.Controls.Add(this.DragDropLbl);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.progressBar);
this.Controls.Add(this.launchApkButton);
this.Controls.Add(this.launchPackageTextBox);
this.Controls.Add(this.m_combo);
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.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4);
this.MaximumSize = new System.Drawing.Size(879, 1214);
this.MinimumSize = new System.Drawing.Size(879, 537);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1000, 833);
this.MinimumSize = new System.Drawing.Size(879, 833);
this.Name = "Form1";
this.Text = "Rookie SideLoader";
this.Load += new System.EventHandler(this.Form1_Load);
@@ -674,7 +676,7 @@
private System.Windows.Forms.Button launchApkButton;
private System.Windows.Forms.Button uninstallAppButton;
private System.Windows.Forms.Button sideloadFolderButton;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.ProgressBar progressBar;
private System.Windows.Forms.Button copyBulkObbButton;
private System.Windows.Forms.Label DragDropLbl;
private System.Windows.Forms.Button downloadInstallGameButton;

143
Form1.cs
View File

@@ -13,6 +13,7 @@ using System.Windows.Threading;
using System.Net;
using SergeUtils;
using JR.Utils.GUI.Forms;
using Newtonsoft.Json;
@@ -95,24 +96,24 @@ namespace AndroidSideloader
{
if (style==1)
{
if (progressBar1.InvokeRequired)
if (progressBar.InvokeRequired)
{
progressBar1.Invoke(new Action(() => progressBar1.Style = ProgressBarStyle.Marquee));
progressBar.Invoke(new Action(() => progressBar.Style = ProgressBarStyle.Marquee));
}
else
{
progressBar1.Style = ProgressBarStyle.Marquee;
progressBar.Style = ProgressBarStyle.Marquee;
}
}
else
{
if (progressBar1.InvokeRequired)
if (progressBar.InvokeRequired)
{
progressBar1.Invoke(new Action(() => progressBar1.Style = ProgressBarStyle.Continuous));
progressBar.Invoke(new Action(() => progressBar.Style = ProgressBarStyle.Continuous));
}
else
{
progressBar1.Style = ProgressBarStyle.Continuous;
progressBar.Style = ProgressBarStyle.Continuous;
}
}
@@ -161,8 +162,6 @@ namespace AndroidSideloader
t1.IsBackground = true;
t1.Start();
t1.Join();
if (allText.Length == 0)
notify("Install Failed, apk may be corrupt");
}
private async void startsideloadbutton_Click(object sender, EventArgs e)
@@ -352,7 +351,7 @@ namespace AndroidSideloader
listappsBtn();
}
string localVersion;
string localVersion = "1.3";
void intToolTips()
{
ToolTip ListDevicesToolTip = new ToolTip();
@@ -378,8 +377,7 @@ namespace AndroidSideloader
{
try
{
localVersion = "1.2";
HttpClient client = new HttpClient();
string currentVersion = client.GetStringAsync("https://raw.githubusercontent.com/nerdunit/androidsideloader/master/version").Result;
currentVersion = currentVersion.Remove(currentVersion.Length - 1);
@@ -520,23 +518,32 @@ namespace AndroidSideloader
await Task.Run(() => listapps());
foreach (string obj in line)
for (int i= 0; i < line.Length; i++)
{
if (obj.Length > 9)
if (line[i].Length > 9)
{
string packageName = obj.Remove(0, 8);
packageName = packageName.Remove(packageName.Length - 1);
line[i] = line[i].Remove(0, 8);
line[i] = line[i].Remove(line[i].Length - 1);
foreach (string game in games)
{
if (packageName.Length > 0 && game.Contains(packageName))
if (line[i].Length > 0 && game.Contains(line[i]))
{
var foo = game.Split(';');
packageName = foo[0];
line[i] = foo[0];
}
}
m_combo.Items.Add(packageName);
}
}
Array.Sort(line);
foreach (string game in line)
{
if (game.Length > 0)
m_combo.Items.Add(game);
}
m_combo.MatchingMethod = StringMatchingMethod.NoWildcards;
}
@@ -649,9 +656,12 @@ namespace AndroidSideloader
string packageName = await getpackagename();
packageName = packageName.Split(';')[2];
try
{
packageName = packageName.Split(';')[2];
} catch { }
DialogResult dialogResult = MessageBox.Show("Are you sure you want to uninstall " + packageName + " this CANNOT be undone!", "WARNING!", MessageBoxButtons.YesNo);
DialogResult dialogResult = MessageBox.Show("Are you sure you want to uninstall " + packageName + ", this CANNOT be undone!", "WARNING!", MessageBoxButtons.YesNo);
if (dialogResult != DialogResult.Yes)
return;
@@ -663,6 +673,15 @@ namespace AndroidSideloader
await Task.Run(() => removeFolder("/sdcard/Android/obb/" + packageName + "/"));
uninstallText += allText;
dialogResult = MessageBox.Show("Do you want to remove savedata for " + packageName + ", this CANNOT be undone!", "WARNING!", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
await Task.Run(() => removeFolder("/sdcard/Android/data/" + packageName + "/"));
await Task.Run(() => removeFolder("/sdcard/Android/data/" + packageName));
}
notify(uninstallText);
}
@@ -856,20 +875,16 @@ namespace AndroidSideloader
var games = cmd.StandardOutput.ReadToEnd().Split('\n');
cmd.WaitForExit();
Console.WriteLine("Loaded following games: ");
Debug.WriteLine("Loaded following games: ");
foreach (string game in games)
{
Console.WriteLine(game);
if (!game.StartsWith("."))
if (!game.StartsWith(".") && game.Length>1)
{
string currGame = game;
if (currGame.Length > 0)
currGame = currGame.Remove(currGame.Length - 1);
gamesComboBox.Invoke(() => { gamesComboBox.Items.Add(currGame); });
Debug.WriteLine(game);
gamesComboBox.Invoke(() => { gamesComboBox.Items.Add(game.Remove(game.Length - 1)); });
}
}
Console.WriteLine(wrDelimiter);
Debug.WriteLine(wrDelimiter);
}
string wrDelimiter = "-------";
private void sideloadContainer_Click(object sender, EventArgs e)
@@ -975,8 +990,11 @@ namespace AndroidSideloader
return res.ToString();
}
private static readonly HttpClient client = new HttpClient();
private async void downloadInstallGameButton_Click(object sender, EventArgs e)
{
int apkNumber = 0;
int obbNumber = 0;
@@ -985,28 +1003,32 @@ namespace AndroidSideloader
changeTitle("Rookie's Sideloader | Downloading game " + gameName);
Directory.CreateDirectory(Environment.CurrentDirectory + "\\" + gameName);
string command = "copy --config .\\a \"VRP:Quest Games/" + gamesComboBox.SelectedItem.ToString() + "\" \"" + Environment.CurrentDirectory + "\\" + gameName + "\" --progress --drive-acknowledge-abuse";
string command = "copy --config .\\a \"VRP:Quest Games/" + gamesComboBox.SelectedItem.ToString() + "\" \"" + Environment.CurrentDirectory + "\\" + gameName + "\" --progress --drive-acknowledge-abuse --rc";
Process cmd = new Process();
Thread t1 = new Thread(() =>
{
changeStyle(1);
wait = true;
Process cmd = new Process();
cmd.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
cmd.StartInfo.Arguments = command;
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\rclone";
cmd.StartInfo.CreateNoWindow = true;
if (debugMode == true)
cmd.StartInfo.CreateNoWindow = false;
cmd.StartInfo.UseShellExecute = false;
cmd.Start();
cmd.StandardInput.WriteLine(command);
cmd.StandardInput.Flush();
cmd.StandardInput.Close();
var games = cmd.StandardOutput.ReadToEnd().Split('\n');
cmd.WaitForExit();
wait = false;
changeStyle(0);
});
t1.IsBackground = true;
t1.Start();
@@ -1017,20 +1039,51 @@ namespace AndroidSideloader
UsernameForm.deleteUserJson();
await Task.Delay(1000);
await Task.Delay(5000);
while (wait)
{
await Task.Delay(25);
HttpResponseMessage response = await client.PostAsync("http://127.0.0.1:5572/core/stats", null);
string foo = await response.Content.ReadAsStringAsync();
//Debug.WriteLine("RESP CONTENT " + foo);
dynamic results = JsonConvert.DeserializeObject<dynamic>(foo);
float downloadSpeed = results.speed.ToObject<float>();
long allSize = 0;
long downloaded = 0;
try
{
foreach (var obj in results.transferring)
{
allSize += obj["size"].ToObject<long>();
downloaded += obj["bytes"].ToObject<long>();
}
allSize /= 1000;
downloaded /= 1000;
Debug.WriteLine("Allsize: " + allSize + "\nDownloaded: " + downloaded + "\nValue: " + (((double)downloaded / (double)allSize) * 100));
try { progressBar.Value = Convert.ToInt32((((double)downloaded / (double)allSize) * 100)); } catch { }
}
catch { }
changeTitle("Rookie's Sideloader | Downloading " + gameName + " | Speed " + String.Format("{0:0.00}", downloadSpeed / 1000000) + " mbps");
await Task.Delay(1000);
}
progressBar.Value = 0;
changeTitle("Rookie's Sideloader | Installing game apk " + gameName);
string[] files = Directory.GetFiles(Environment.CurrentDirectory + "\\" + gameName);
Console.WriteLine("Game Folder is: " + Environment.CurrentDirectory + "\\" + gameName);
Debug.WriteLine("Game Folder is: " + Environment.CurrentDirectory + "\\" + gameName);
Console.WriteLine("FILES IN GAME FOLDER: ");
Debug.WriteLine("FILES IN GAME FOLDER: ");
foreach (string file in files)
{
Console.WriteLine(file);
Debug.WriteLine(file);
string extension = Path.GetExtension(file);
if (extension == ".apk")
{
@@ -1041,7 +1094,9 @@ namespace AndroidSideloader
}
}
Console.WriteLine(wrDelimiter);
Debug.WriteLine(wrDelimiter);
changeTitle("Rookie's Sideloader | Installing game obb " + gameName);
string[] folders = Directory.GetDirectories(Environment.CurrentDirectory + "\\" + gameName);
@@ -1071,12 +1126,15 @@ namespace AndroidSideloader
if (Properties.Settings.Default.deleteAllAfterInstall)
{
string oldTitle = this.Text;
changeTitle("Rookie's Sideloader | Deleting game files");
Directory.Delete(Environment.CurrentDirectory + "\\" + gameName, true);
changeTitle(oldTitle);
}
notify("Game downloaded and installed " + apkNumber + " apks and " + obbNumber + " obb folders");
//Environment.CurrentDirectory + "\\" + gameName
}
private void themesbutton_Click(object sender, EventArgs e)
@@ -1084,6 +1142,11 @@ namespace AndroidSideloader
ThemeForm themeform1 = new ThemeForm();
themeform1.Show();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
public static class ControlExtensions

View File

@@ -1,4 +1,10 @@
1.1HF1
1.3
+ Added progress bar logic for game downloading with rclone
+ Uninstalling apps now asks the user if it should also remove game data
= Sorted installed apps combobox
= Fixed uninstalling apps by package names lol nobody knew was broken
1.2
+ Added unicode support for rclone
+ Added some delay on game installation
= Fixed stuff
@@ -131,4 +137,7 @@
+ Renamed buttons
0.1
+ Initial Release
+ Initial Release
HF - Hot Fix
SU - Small Update

3
donators.txt Normal file
View File

@@ -0,0 +1,3 @@
CC0E0834BFEBFBFF000906E9;5000
184204E0178BFBFF00870F10;0
E5148390BFEBFBFF000906EA;250

View File

@@ -6,4 +6,5 @@
<package id="MetroFramework.Design" version="1.2.0.3" targetFramework="net452" />
<package id="MetroFramework.Fonts" version="1.2.0.3" targetFramework="net452" />
<package id="MetroFramework.RunTime" version="1.2.0.3" targetFramework="net452" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net452" />
</packages>

BIN
secret Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

View File

@@ -1 +1 @@
1.2
1.3