Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23990935d1 | ||
|
|
bf41013add | ||
|
|
0acc36feed | ||
|
|
3301227163 | ||
|
|
45d1981451 | ||
|
|
f22636d81f | ||
|
|
bd8e94c210 | ||
|
|
cac88cae92 | ||
|
|
4370e922ef | ||
|
|
caa4f78943 | ||
|
|
d3b988546f | ||
|
|
cbdde48344 | ||
|
|
3b830d9f67 | ||
|
|
7572ddb84e | ||
|
|
7c6f05361e | ||
|
|
5b54f195f1 | ||
|
|
bd71e07b19 |
1
ADB.cs
1
ADB.cs
@@ -171,7 +171,6 @@ namespace AndroidSideloader
|
||||
long usedSize = 0;
|
||||
|
||||
long freeSize = 0;
|
||||
WakeDevice();
|
||||
var output = RunAdbCommandToString("shell df").Output.Split('\n');
|
||||
|
||||
foreach (string currLine in output)
|
||||
|
||||
183
MainForm.cs
183
MainForm.cs
@@ -41,6 +41,189 @@ namespace AndroidSideloader
|
||||
|
||||
private string oldTitle = "";
|
||||
|
||||
|
||||
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
string adbFile = "C:\\RSL\\2.1.1\\adb\\adb.exe";
|
||||
string adbDir = "C:\\RSL\\2.1.1\\adb";
|
||||
string fileName = "";
|
||||
string destFile = "";
|
||||
string date_time = DateTime.Today.ToString("dddd, MMMM dd @ hh:mmtt");
|
||||
Logger.Log($"\n\n##############\n##############\n##############\n\nAPP LAUNCH DATE/TIME: " + date_time + "\n\n##############\n##############\n##############\n\n");
|
||||
Properties.Settings.Default.MainDir = Environment.CurrentDirectory;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
if (!File.Exists(adbFile))
|
||||
{
|
||||
Directory.CreateDirectory(adbDir);
|
||||
if (System.IO.Directory.Exists($"{Environment.CurrentDirectory}\\adb"))
|
||||
{
|
||||
string[] ADBfiles = System.IO.Directory.GetFiles($"{Properties.Settings.Default.MainDir}\\adb");
|
||||
|
||||
// Copy the files and overwrite destination files if they already exist.
|
||||
foreach (string s in ADBfiles)
|
||||
{
|
||||
fileName = System.IO.Path.GetFileName(s);
|
||||
destFile = System.IO.Path.Combine(adbDir, fileName);
|
||||
System.IO.File.Copy(s, destFile, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Properties.Settings.Default.ADBPath = adbFile;
|
||||
Properties.Settings.Default.Save();
|
||||
if (File.Exists(Sideloader.CrashLogPath))
|
||||
{
|
||||
DialogResult dialogResult = FlexibleMessageBox.Show(this, $"Sideloader crashed during your last use.\nPlease report issue @ https://github.com/nerdunit/androidsideloader/issues + send the crashlog to a mod or dev.\n\n(Crashlog.txt is located here: {Path.GetFullPath(Sideloader.CrashLogPath)})\n\nIf you've already sent it press YES to delete it and prevent this message. Press NO if you'd still like to send it.", "Crash Detected", MessageBoxButtons.YesNo);
|
||||
if (dialogResult == DialogResult.Yes)
|
||||
File.Delete(Sideloader.CrashLogPath);
|
||||
}
|
||||
CheckForInternet();
|
||||
|
||||
if (HasInternet == true)
|
||||
Sideloader.downloadFiles();
|
||||
else
|
||||
FlexibleMessageBox.Show("Cannot connect to google dns, your internet may be down, won't use rclone or online features!");
|
||||
await Task.Delay(100);
|
||||
|
||||
if (!Directory.Exists(BackupFolder))
|
||||
Directory.CreateDirectory(BackupFolder);
|
||||
|
||||
if (Directory.Exists(Sideloader.TempFolder))
|
||||
{
|
||||
Directory.Delete(Sideloader.TempFolder, true);
|
||||
Directory.CreateDirectory(Sideloader.TempFolder);
|
||||
}
|
||||
|
||||
//Delete the Debug file if it is more than 5MB
|
||||
if (File.Exists(Logger.logfile))
|
||||
{
|
||||
long length = new System.IO.FileInfo(Logger.logfile).Length;
|
||||
if (length > 5000000) File.Delete(Logger.logfile);
|
||||
}
|
||||
|
||||
RCLONE.Init();
|
||||
try { Spoofer.spoofer.Init(); } catch { }
|
||||
|
||||
if (Properties.Settings.Default.CallUpgrade)
|
||||
{
|
||||
Properties.Settings.Default.Upgrade();
|
||||
Properties.Settings.Default.CallUpgrade = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
this.CenterToScreen();
|
||||
gamesListView.View = View.Details;
|
||||
gamesListView.FullRowSelect = true;
|
||||
gamesListView.GridLines = true;
|
||||
etaLabel.Text = "";
|
||||
speedLabel.Text = "";
|
||||
diskLabel.Text = "";
|
||||
|
||||
try
|
||||
{
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
ADB.WakeDevice();
|
||||
await CheckForDevice();
|
||||
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
|
||||
private async void Form1_Shown(object sender, EventArgs e)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(10000);
|
||||
freeDisclaimer.Invoke(() => { freeDisclaimer.Dispose(); });
|
||||
}).Start();
|
||||
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
if (!debugMode && Properties.Settings.Default.checkForUpdates)
|
||||
{
|
||||
Updater.AppName = "AndroidSideloader";
|
||||
Updater.Repostory = "nerdunit/androidsideloader";
|
||||
Updater.Update();
|
||||
}
|
||||
progressBar.Invoke(() => { progressBar.Style = ProgressBarStyle.Marquee; });
|
||||
ChangeTitle("Initializing Mirrors");
|
||||
initMirrors(true);
|
||||
ChangeTitle("Initializing Games");
|
||||
SideloaderRCLONE.initGames(currentRemote);
|
||||
if (!Directory.Exists(SideloaderRCLONE.ThumbnailsFolder) || !Directory.Exists(SideloaderRCLONE.NotesFolder))
|
||||
{
|
||||
MessageBox.Show("It seems you are missing the thumbnails and/or notes database, the first start of the sideloader takes a bit more time, so dont worry if it looks stuck!");
|
||||
}
|
||||
ChangeTitle("Syncing Game Photos");
|
||||
SideloaderRCLONE.UpdateGamePhotos(currentRemote);
|
||||
ChangeTitle("Checking for Updates on server...");
|
||||
SideloaderRCLONE.UpdateGameNotes(currentRemote);
|
||||
listappsbtn();
|
||||
});
|
||||
t1.SetApartmentState(ApartmentState.STA);
|
||||
t1.IsBackground = false;
|
||||
if (HasInternet)
|
||||
t1.Start();
|
||||
|
||||
showAvailableSpace();
|
||||
|
||||
intToolTips();
|
||||
|
||||
while (t1.IsAlive)
|
||||
await Task.Delay(100);
|
||||
ChangeTitle("GREEN = Up to date, ORANGE = Out of date - Checking installed app versions, please wait...");
|
||||
|
||||
initListView();
|
||||
ChangeTitle("Loaded");
|
||||
downloadInstallGameButton.Enabled = true;
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void intToolTips()
|
||||
{
|
||||
ToolTip ListDevicesToolTip = new ToolTip();
|
||||
ListDevicesToolTip.SetToolTip(this.devicesbutton, "Lists the devices in a message box, also updates title bar");
|
||||
ToolTip SideloadAPKToolTip = new ToolTip();
|
||||
SideloadAPKToolTip.SetToolTip(this.startsideloadbutton, "Sideloads/Installs one apk on the android device");
|
||||
ToolTip OBBToolTip = new ToolTip();
|
||||
OBBToolTip.SetToolTip(this.obbcopybutton, "Copies an obb folder to the Android/Obb folder from the device, some games/apps need this");
|
||||
ToolTip BackupGameDataToolTip = new ToolTip();
|
||||
BackupGameDataToolTip.SetToolTip(this.backupbutton, "Saves the game and apps data to the sideloader folder, does not save apk's and obb's");
|
||||
ToolTip RestoreGameDataToolTip = new ToolTip();
|
||||
RestoreGameDataToolTip.SetToolTip(this.restorebutton, "Restores the game and apps data to the device, first use Backup Game Data button");
|
||||
ToolTip GetAPKToolTip = new ToolTip();
|
||||
GetAPKToolTip.SetToolTip(this.getApkButton, "Saves the selected apk to the folder where the sideloader is");
|
||||
ToolTip sideloadFolderToolTip = new ToolTip();
|
||||
sideloadFolderToolTip.SetToolTip(this.sideloadFolderButton, "Sideloads every apk from a folder");
|
||||
ToolTip uninstallAppToolTip = new ToolTip();
|
||||
uninstallAppToolTip.SetToolTip(this.uninstallAppButton, "Uninstalls selected app");
|
||||
ToolTip userjsonToolTip = new ToolTip();
|
||||
userjsonToolTip.SetToolTip(this.ADBWirelessEnable, "After you enter your username it will create an user.json file needed for some games");
|
||||
ToolTip etaToolTip = new ToolTip();
|
||||
etaToolTip.SetToolTip(this.etaLabel, "Estimated time when game will finish download, updates every 5 seconds, format is HH:MM:SS");
|
||||
ToolTip dlsToolTip = new ToolTip();
|
||||
dlsToolTip.SetToolTip(this.speedLabel, "Current download speed, updates every second, in mbps");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ADB.RunAdbCommandToString("shell input keyevent KEYCODE_WAKEUP");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public async void ChangeTitle(string txt, bool reset = true)
|
||||
{
|
||||
this.Invoke(() => { oldTitle = txt; this.Text = "Rookie's Sideloader | " + txt; });
|
||||
|
||||
@@ -8,7 +8,10 @@ namespace AndroidSideloader
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// The main entry point for the appli
|
||||
///
|
||||
///
|
||||
/// ion.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
|
||||
@@ -28,7 +31,8 @@ namespace AndroidSideloader
|
||||
static void MyHandler(object sender, UnhandledExceptionEventArgs args)
|
||||
{
|
||||
Exception e = (Exception)args.ExceptionObject;
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"Message: {e.Message}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}");
|
||||
string date_time = DateTime.Today.ToString("dddd, MMMM dd @ hh:mmtt");
|
||||
File.WriteAllText(Sideloader.CrashLogPath, $"\n\n################\nDate/Time of crash: {date_time}################\n\nMessage: {e.Message}\nData: {e.Data}\nSource: {e.Source}\nTargetSite: {e.TargetSite}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -84,7 +85,7 @@ namespace AndroidSideloader
|
||||
rclone.WaitForExit();
|
||||
|
||||
//if there is one of these errors, we switch the mirrors
|
||||
if (error.Contains("cannot fetch token") || error.Contains("authError") || (error.Contains("quota") && error.Contains("exceeded")))
|
||||
if (error.Contains("cannot fetch token") || error.Contains("authError") || (error.Contains("quota") || error.Contains("exceeded")))
|
||||
{
|
||||
string oldRemote = MainForm.currentRemote;
|
||||
try
|
||||
@@ -102,8 +103,12 @@ namespace AndroidSideloader
|
||||
prcoutput.Output = output;
|
||||
prcoutput.Error = error;
|
||||
}
|
||||
if (!prcoutput.Output.Contains("Game Name;Release Name;Release APK Path;Package Name;Version Code;Version Name"))
|
||||
Logger.Log($"Rclone error: {error}\nRclone Output: {output}");
|
||||
return prcoutput;
|
||||
if (error.Contains("There is not enough space"))
|
||||
MessageBox.Show("There isn't enough space on your PC to properly install this game. Please have at least 2x the size of the game you are trying to download/install available on the drive where Rookie is installed.", "NOT ENOUGH SPACE");
|
||||
return prcoutput;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace AndroidSideloader
|
||||
{
|
||||
@@ -8,11 +9,19 @@ namespace AndroidSideloader
|
||||
|
||||
public static bool Log(string text, bool ret = true)
|
||||
{
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
try { File.AppendAllText(logfile, text + newline); } catch { }
|
||||
return ret;
|
||||
if (text.Length > 0)
|
||||
{
|
||||
string time = DateTime.UtcNow.ToString("hh:mmtt(UTC): ");
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
text = time += text;
|
||||
try { File.AppendAllText(logfile, text + newline); } catch { }
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
return ret;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,66 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
RSL 2.1.1HF1
|
||||
|
||||
+ Prepended each line of debuglog.txt with Hour and Minute in UTC time.
|
||||
+ Added DATE + TIME to Debuglog.txt each time user launches RSL.
|
||||
+ Added DATE + TIME to CrashLog.txt each time program crashes.
|
||||
= Simplified crashlog.txt delete message on boot.
|
||||
= Fixed unhandled exception crashes (I hope).
|
||||
= Fixed rare QU settings error.
|
||||
= Cleaned up code order.
|
||||
= Cleaned up Install.txt logic.
|
||||
= Other bugfixes.
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmDl8XUACgkQx/Rql1Vo
|
||||
czfl3w//QQmRaVj8IGyevA3fKBB3jdKVZDCbKrRsxTS8MfvVxLeCczDwCJemmu1u
|
||||
oF+8TXj0knOLA2FmgVtJAuBjTQLzlL3KGFdZjctfV+7II+LnwvNO01agxfVITAUh
|
||||
nivRDsGqu7p3pDQly3dAOAjuUNl9qEy5iI3g1bVHUNK0qk+zI1DFi2AP2q3309df
|
||||
O4bE14erPzDz+ELY1PA5oki7T5CyKUakcoYsA6ee4la1ClE2gYBmZym0NdlCu2ay
|
||||
9iq+K47D7yHi2J5lIks/RHvmWQwAnrii9J6Ftcl+AsB3DzT8nPgDUx6empDzKgN6
|
||||
8XhjF4sxGWVRbxUZe00f5QGLGS0FZjwCCXS2TjZJ3s9+mdHqQuWybYG+oO0Nk6XP
|
||||
IOWXsvzMoyo8c8S7oatUuOAPaIx94BdiVS9WOJvQLEk7/HLzsT2jafJBacb/mM2y
|
||||
HmLi4VFjhjxvptek+nCFgtiA+zt79/DX11luSfFNA8P2jdV7ECwRMebg0rc05SI3
|
||||
DKD35f00yAsIDt/GJjP3PhiUgmlBwkmJ7GiQPNRwif6J7t3LRootA03FWTI3kHbM
|
||||
MdNkI0QV6qOZFK+j6T/Xwt8J3EhJR0MNFUuzKg+9pfzeGAPiPXaCbr6BajgPiEPe
|
||||
z1m2udFCNYt+bYKvbxc1ALpfkKiegwlh40IF/eAz3iPH4lLOlRs=
|
||||
=dL8Y
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
|
||||
|
||||
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
RSL 2.1.1
|
||||
|
||||
+ Added optional Wake on Wifi setting so Wireless ADB will still connect as long as device is not powered off or dead.
|
||||
+ RSL will now automatically choose any Oculus device over devices made by other manufacturers if more than one ADB device is present.
|
||||
= Fixed Download+Install QUSettings application if QUSettings are set.
|
||||
= Fixed Pull APK from device.
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmDjcnQACgkQx/Rql1Vo
|
||||
czchqg//WStjc1ANHJK1P06ormJ4ArZFA70UkL0Xd7QUcwJhEiR2/uIIHpOCeCdZ
|
||||
ymf6fvsqcyMkAMMq2YA1sNd5fPTFgcaqWZhkir+TywPBfrpcMJYP2lcJGXuhcmjm
|
||||
GJo4uymOjci9SBrjb7o8Z5q3cxInRPLfgksgRVN+b3Y965yqETm0OcSXBrCuDyXV
|
||||
SqgAJzAFNqElE91LRtz3BqOJ8eNXmEbmC9iSFnllwC9fSYwDefNkIRAVfmD5inqs
|
||||
acSW/6URwF4xnF578mnHfdhKlhROqt7XJ/dqIrrh1o0/kV7VbOR4J7rq8vD1nHrZ
|
||||
uOAZ+zBKnk37Px61F4XWtUmX0MDHoTuJChAZqKzdZkIUy9Dq/l5asMFufGaGLrHa
|
||||
OGjuXNQOTGzSKzp6SNsrU+BkBAJDW4NBWrgacC9PqgE+uZSgedreDZb86UWtZ6ZA
|
||||
MR7MFiqaKBGx0GMfbO/JWu/REa9GkdCghwbSKrnPCIK2wsY7zECFflmIaf/BQWzw
|
||||
p6hicDZc5053Cu+ZHPy8AiKbv+3FB5AWiujYbl/QkBifoEL03tHepCREAHMD6MBn
|
||||
OqgnRU2gwtqke2FSnThyx1qgnnXLLi2M4we171DreBziF9DE23W/hcE+RU3WtucR
|
||||
QflQ1p4c5o1q8B2QDkDSjcsCfCXRnfQ52YRv0N7cdKZ9M56GAF0=
|
||||
=KqGL
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
Update RSL2.1HF5
|
||||
|
||||
Fixed ADB path for usernames containing spaces. ADB now located at c:\RSL\VersionNumber\ADB
|
||||
|
||||
Reference in New Issue
Block a user