Compare commits

...

14 Commits
v1.6 ... v1.8

Author SHA1 Message Date
nerdunit
2505cd6923 Update version 2020-07-28 14:26:53 -07:00
nerdunit
872ceb17ce Add files via upload 2020-07-28 06:09:30 -07:00
nerdunit
494f3dec69 Update version 2020-07-27 23:03:21 -07:00
nerdunit
ab870f984d Add files via upload 2020-07-27 23:03:10 -07:00
nerdunit
c4327c3de9 Add files via upload 2020-07-26 08:43:00 -07:00
nerdunit
34c3c1b9ab Add files via upload 2020-07-25 08:52:13 -07:00
nerdunit
698c49bc0e Update README.md 2020-07-25 01:45:34 -07:00
nerdunit
298fbe8a00 Add files via upload 2020-07-25 01:44:34 -07:00
nerdunit
7143bf63c6 Add files via upload 2020-07-23 08:10:51 -07:00
nerdunit
c905acaa6a Add files via upload 2020-07-23 02:58:37 -07:00
nerdunit
de1cfd511a Add files via upload 2020-07-21 13:51:59 -07:00
nerdunit
af7bbc3407 Update donators.txt 2020-07-21 07:36:08 -07:00
nerdunit
e9805f8c17 v1.6 2020-07-21 07:23:53 -07:00
nerdunit
a8106a87b2 Update version 2020-07-21 07:23:50 -07:00
7 changed files with 144 additions and 61 deletions

47
Form1.Designer.cs generated
View File

@@ -36,8 +36,6 @@
this.backupbutton = new System.Windows.Forms.Button();
this.restorebutton = new System.Windows.Forms.Button();
this.getApkButton = new System.Windows.Forms.Button();
this.launchPackageTextBox = new System.Windows.Forms.TextBox();
this.launchApkButton = new System.Windows.Forms.Button();
this.uninstallAppButton = new System.Windows.Forms.Button();
this.sideloadFolderButton = new System.Windows.Forms.Button();
this.progressBar = new System.Windows.Forms.ProgressBar();
@@ -61,6 +59,7 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.etaLabel = new System.Windows.Forms.Label();
this.speedLabel = new System.Windows.Forms.Label();
this.diskLabel = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.backupContainer.SuspendLayout();
this.sideloadContainer.SuspendLayout();
@@ -212,29 +211,6 @@
this.getApkButton.UseVisualStyleBackColor = false;
this.getApkButton.Click += new System.EventHandler(this.getApkButton_Click);
//
// launchPackageTextBox
//
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(714, 150);
this.launchPackageTextBox.Margin = new System.Windows.Forms.Padding(4);
this.launchPackageTextBox.Name = "launchPackageTextBox";
this.launchPackageTextBox.Size = new System.Drawing.Size(255, 22);
this.launchPackageTextBox.TabIndex = 23;
this.launchPackageTextBox.Text = "de.eye_interactive.atvl.settings";
//
// launchApkButton
//
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);
this.launchApkButton.TabIndex = 24;
this.launchApkButton.Text = "Launch Apk By Package Name";
this.launchApkButton.UseVisualStyleBackColor = true;
this.launchApkButton.Click += new System.EventHandler(this.launchApkButton_Click);
//
// uninstallAppButton
//
this.uninstallAppButton.BackColor = global::AndroidSideloader.Properties.Settings.Default.SubButtonColor;
@@ -632,7 +608,7 @@
this.etaLabel.AutoSize = true;
this.etaLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.etaLabel.ForeColor = System.Drawing.Color.White;
this.etaLabel.Location = new System.Drawing.Point(281, 186);
this.etaLabel.Location = new System.Drawing.Point(278, 204);
this.etaLabel.Name = "etaLabel";
this.etaLabel.Size = new System.Drawing.Size(295, 36);
this.etaLabel.TabIndex = 75;
@@ -643,12 +619,23 @@
this.speedLabel.AutoSize = true;
this.speedLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.speedLabel.ForeColor = System.Drawing.Color.White;
this.speedLabel.Location = new System.Drawing.Point(281, 150);
this.speedLabel.Location = new System.Drawing.Point(278, 170);
this.speedLabel.Name = "speedLabel";
this.speedLabel.Size = new System.Drawing.Size(300, 36);
this.speedLabel.TabIndex = 76;
this.speedLabel.Text = "DLS: Speed in MBPS";
//
// diskLabel
//
this.diskLabel.AutoSize = true;
this.diskLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.diskLabel.ForeColor = System.Drawing.Color.White;
this.diskLabel.Location = new System.Drawing.Point(282, 145);
this.diskLabel.Name = "diskLabel";
this.diskLabel.Size = new System.Drawing.Size(103, 25);
this.diskLabel.TabIndex = 77;
this.diskLabel.Text = "Disk Label";
//
// Form1
//
this.AllowDrop = true;
@@ -656,6 +643,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
this.ClientSize = new System.Drawing.Size(982, 786);
this.Controls.Add(this.diskLabel);
this.Controls.Add(this.speedLabel);
this.Controls.Add(this.etaLabel);
this.Controls.Add(this.panel1);
@@ -663,8 +651,6 @@
this.Controls.Add(this.downloadInstallGameButton);
this.Controls.Add(this.DragDropLbl);
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));
@@ -697,8 +683,6 @@
private System.Windows.Forms.Button restorebutton;
private System.Windows.Forms.Button getApkButton;
private SergeUtils.EasyCompletionComboBox m_combo;
private System.Windows.Forms.TextBox launchPackageTextBox;
private System.Windows.Forms.Button launchApkButton;
private System.Windows.Forms.Button uninstallAppButton;
private System.Windows.Forms.Button sideloadFolderButton;
private System.Windows.Forms.ProgressBar progressBar;
@@ -722,6 +706,7 @@
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label etaLabel;
private System.Windows.Forms.Label speedLabel;
private System.Windows.Forms.Label diskLabel;
}
}

135
Form1.cs
View File

@@ -67,17 +67,6 @@ namespace AndroidSideloader
backupContainer.Visible = false;
}
private void HideSubMenu()
{
if (sideloadContainer.Visible == true)
{
sideloadContainer.Visible = false;
}
if (backupContainer.Visible == true)
{
backupContainer.Visible = false;
}
}
//does the fancy stuff
private void ShowSubMenu(Panel subMenu)
{
@@ -119,11 +108,15 @@ namespace AndroidSideloader
}
public void RunAdbCommand(string command)
public void RunAdbCommand(string command, bool changeTitle = true)
{
ChangeStyle(1);
oldTitle = this.Text;
ChangeTitle("Rookie's Sideloader | Running command " + command);
if (changeTitle==true)
{
oldTitle = this.Text;
ChangeTitle("Rookie's Sideloader | Running command " + command);
}
Process cmd = new Process();
cmd.StartInfo.FileName = Environment.CurrentDirectory + "\\adb\\adb.exe";
@@ -148,7 +141,8 @@ namespace AndroidSideloader
sw.Close();
line = allText.Split('\n');
ChangeTitle(oldTitle);
if (changeTitle == true)
ChangeTitle(oldTitle);
ChangeStyle(0);
}
@@ -201,6 +195,8 @@ namespace AndroidSideloader
ChangeTitlebarToDevice();
notify(allText);
showAvailableSpace();
}
public static void notify(string message)
@@ -333,30 +329,87 @@ namespace AndroidSideloader
}
}
int TimerMs = 1024;
bool isDonator = false;
string donatorName = "";
void SetTimerSpeed()
{
var donators = client.GetStringAsync("https://raw.githubusercontent.com/nerdunit/androidsideloader/master/donators.txt").Result.Split('\n');
foreach (string line in donators)
{
if (line.Contains(HWID))
{
if (line.Contains(HWID))
{ /*line.Split(';')
* [0] is HWID
* [1] is Time in ms when donatebutton should refresh
* [2] is name
*/
isDonator = true;
TimerMs = Int32.Parse(line.Split(';')[1]);
try { donatorName = line.Split(';')[2]; } catch { }
}
}
}
void showAvailableSpace()
{
RunAdbCommand("shell df", false);
long totalSize = 0;
long usedSize = 0;
long freeSize = 0;
foreach (string currLine in line)
{
if (currLine.StartsWith("/data/media"))
{
var foo = currLine.Split(' ');
int i = 0;
foreach (string curr in foo)
{
if (curr.Length > 1)
{
switch (i)
{
case 0:
break;
case 1:
totalSize = Int64.Parse(curr) / 1000;
break;
case 2:
usedSize = Int64.Parse(curr) / 1000;
break;
case 3:
freeSize = Int64.Parse(curr) / 1000;
break;
default:
break;
}
i++;
}
}
}
}
if (totalSize != 0)
diskLabel.Text = $"Total space: {String.Format("{0:0.00}", (double)totalSize / 1000)}GB Used space: {String.Format("{0:0.00}", (double)usedSize / 1000)}GB Free space: {String.Format("{0:0.00}", (double)freeSize / 1000)}GB";
}
//A lot of stuff to do when the form loads, centers the program,
private void Form1_Load(object sender, EventArgs e)
{
this.CenterToScreen();
SetTimerSpeed();
etaLabel.Text = "";
speedLabel.Text = "";
diskLabel.Text = "";
if (File.Exists(debugPath))
File.Delete(debugPath); //clear debug.log each start
@@ -368,9 +421,11 @@ namespace AndroidSideloader
checkForUpdate();
RunAdbCommand("devices"); //check if there is any device connected
ChangeTitlebarToDevice();
if (line[1].Length > 1) //check for device connected
{
if (Properties.Settings.Default.firstRun == true)
{
UsernameForm.createUserJson(randomString(16));
@@ -379,12 +434,14 @@ namespace AndroidSideloader
Properties.Settings.Default.firstRun = false;
Properties.Settings.Default.Save();
}
showAvailableSpace();
}
intToolTips();
listappsBtn();
}
readonly string localVersion = "1.5";
readonly string localVersion = "1.6";
void intToolTips()
{
ToolTip ListDevicesToolTip = new ToolTip();
@@ -657,7 +714,7 @@ namespace AndroidSideloader
{
Thread t1 = new Thread(() =>
{
RunAdbCommand("shell am start -n " + launchPackageTextBox.Text);
RunAdbCommand("shell am start -n " + getpackagename());
});
t1.IsBackground = true;
t1.Start();
@@ -739,6 +796,7 @@ namespace AndroidSideloader
Thread t1 = new Thread(() =>
{
RunAdbCommand("shell pm uninstall -k --user 0 " + package);
RunAdbCommand("shell pm uninstall" + package);
});
t1.IsBackground = true;
t1.Start();
@@ -882,6 +940,8 @@ namespace AndroidSideloader
private void Form1_Shown(object sender, EventArgs e)
{
Debug.WriteLine(TimerMs);
Timer99.Tick += Timer99_Tick; // don't freeze the ui
Timer99.Interval = new TimeSpan(0, 0, 0, 0, TimerMs);
@@ -899,6 +959,7 @@ namespace AndroidSideloader
{
wait = true;
Process cmd = new Process();
cmd.StartInfo.FileName = Environment.CurrentDirectory + "\\rclone\\rclone.exe";
cmd.StartInfo.Arguments = command;
cmd.StartInfo.RedirectStandardInput = true;
@@ -957,7 +1018,12 @@ namespace AndroidSideloader
private void aboutBtn_Click(object sender, EventArgs e)
{
string about = $@"Finally {localVersion}
string donatorMsg = "";
if (isDonator)
donatorMsg = $"Thank you {donatorName} for donating! :D";
string about = $@"Finally {localVersion} {donatorMsg}
- Software orignally coded by rookie.lol
- Thanks to pmow for all of his work, including rclone, wonka and other projects
- Thanks to flow for being friendly and helping every one
@@ -971,6 +1037,8 @@ namespace AndroidSideloader
- Thanks to Mike Gold https://www.c-sharpcorner.com/members/mike-gold2 for the scrollable message box
- Thanks to https://github.com/davcs86 for the hwid lib
- The icon of the app contains an icon made by icon8.com";
FlexibleMessageBox.Show(about);
}
@@ -1073,11 +1141,21 @@ namespace AndroidSideloader
await Task.Run(() => updateConfig());
}
string gameName = gamesComboBox.SelectedItem.ToString();
Debug.WriteLine(runRcloneCommand($"size \"VRP:Quest Games/{gameName}\" --config .\\a --json"));
dynamic results = JsonConvert.DeserializeObject<dynamic>(runRcloneCommand($"size \"VRP:Quest Games/{gameName}\" --config .\\a --json"));
long gameSize = results.bytes.ToObject<long>();
DialogResult dialogResult = FlexibleMessageBox.Show($"Are you sure you want to download {gameName}? it has a size of {String.Format("{0:0.00}", (double)gameSize / 1000000)} MB" , "Are you sure?", MessageBoxButtons.YesNo);
if (dialogResult != DialogResult.Yes)
return;
int apkNumber = 0;
int obbNumber = 0;
string gameName = gamesComboBox.SelectedItem.ToString();
Directory.CreateDirectory(Environment.CurrentDirectory + "\\" + gameName);
@@ -1112,7 +1190,7 @@ namespace AndroidSideloader
string foo = await response.Content.ReadAsStringAsync();
Debug.WriteLine("RESP CONTENT " + foo);
dynamic results = JsonConvert.DeserializeObject<dynamic>(foo);
results = JsonConvert.DeserializeObject<dynamic>(foo);
float downloadSpeed = results.speed.ToObject<float>();
@@ -1159,7 +1237,7 @@ namespace AndroidSideloader
string[] files = Directory.GetFiles(Environment.CurrentDirectory + "\\" + gameName);
Debug.WriteLine("Game Folder is: " + Environment.CurrentDirectory + "\\" + gameName);
string output = "";
Debug.WriteLine("FILES IN GAME FOLDER: ");
foreach (string file in files)
{
@@ -1169,6 +1247,7 @@ namespace AndroidSideloader
{
apkNumber++;
await Task.Run(() => Sideload(file));
output += allText;
}
}
@@ -1206,7 +1285,8 @@ namespace AndroidSideloader
Directory.Delete(Environment.CurrentDirectory + "\\" + gameName, true);
}
ChangeTitlebarToDevice();
notify("Game downloaded and installed " + apkNumber + " apks and " + obbNumber + " obb folders");
//notify("Game downloaded and installed " + apkNumber + " apks and " + obbNumber + " obb folders");
notify($"Apk installation output: {output}\n");
//Environment.CurrentDirectory + "\\" + gameName
}
@@ -1216,7 +1296,6 @@ namespace AndroidSideloader
themeForm themeform1 = new themeForm();
themeform1.Show();
}
}
public static class ControlExtensions

View File

@@ -2,7 +2,8 @@
The icon of the app contains an icon made by icon8.com
Special thanks to
Special thanks to
- Everyone who donated!
- pmow for all of his work, including rclone, wonka and other projects
- flow for being friendly and helping every one
- succ for creating and maintaining the server

View File

@@ -1,3 +1,15 @@
1.7
+ Removed some freezes
+ Sideloader kills rclone on start and on close if it's open so you dont waste bandwith
+ Updating rclone config now does a hash check first
+ Refresh storage after game install and on game uninstall
1.6
+ Disk space label and check
+ Checks game size before download
= Download and install game button outputs adb log now
- Launch package name button and textbox
1.5
+ Added ETA, based on CURRENT DOWNLOAD SPEED NOT DELTA OF IT
+ Added DLS label instead of showing it in the toolbar

View File

@@ -4,3 +4,9 @@ E5148390BFEBFBFF000906EA;250;Gotard
5ECC5497178BFBFF00870F10;1024;Saidis21
B0374BE2BFEBFBFF00040651;0;ecirbaf
926C60A8178BFBFF00800F82;250;ThePhantomPickaxe
2A8C5999BFEBFBFF0001067A;0;karl
80ACB80FBFEBFBFF000206C2;4096;JJ-4
9AA172C9BFEBFBFF000906ED;1024;Clayton Bigsby
645C9EADBFEBFBFF000906EA;5000;Heracide
1C51D0CD178BFBFF00870F10;0;Mr.Tibby
287B5C6CBFEBFBFF000906EA;0;videobeer

BIN
song.mp3 Normal file

Binary file not shown.

View File

@@ -1 +1 @@
1.5
1.7.5