Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6ef62c6ca | ||
|
|
5fab216798 | ||
|
|
a37c843a99 | ||
|
|
222edcd6a8 | ||
|
|
130140727b | ||
|
|
5ec2f260fc |
@@ -2,5 +2,6 @@
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\AndroidSideloader.sln",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
||||
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
2
ADB.cs
2
ADB.cs
@@ -12,7 +12,7 @@ namespace AndroidSideloader
|
||||
class ADB
|
||||
{
|
||||
static Process adb = new Process();
|
||||
public static string adbFolderPath = Environment.CurrentDirectory + "\\adb";
|
||||
public static string adbFolderPath = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\RSL\\2.14HF4\\ADB";
|
||||
public static string adbFilePath = adbFolderPath + "\\adb.exe";
|
||||
public static string DeviceID = "";
|
||||
public static string package = "";
|
||||
|
||||
29
MainForm.cs
29
MainForm.cs
@@ -289,11 +289,33 @@ namespace AndroidSideloader
|
||||
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
string adbFile = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\RSL\\2.14HF4\\adb\\adb.exe";
|
||||
string adbDir = $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\\RSL\\2.14HF4\\adb";
|
||||
string fileName = "";
|
||||
string destFile = "";
|
||||
Properties.Settings.Default.MainDir = Environment.CurrentDirectory;
|
||||
Properties.Settings.Default.ADBPath = $"{Properties.Settings.Default.MainDir}\\adb\\adb.exe";
|
||||
Properties.Settings.Default.Save();
|
||||
if (!File.Exists(adbFile))
|
||||
{
|
||||
Directory.CreateDirectory(adbDir);
|
||||
if (System.IO.Directory.Exists($"{Environment.CurrentDirectory}\\adb"))
|
||||
{
|
||||
string[] ADBfiles = System.IO.Directory.GetFiles($"{Properties.Settings.Default.MainDir}\\adb");
|
||||
|
||||
// Copy the files and overwrite destination files if they already exist.
|
||||
foreach (string s in ADBfiles)
|
||||
{
|
||||
fileName = System.IO.Path.GetFileName(s);
|
||||
destFile = System.IO.Path.Combine(adbDir, fileName);
|
||||
System.IO.File.Copy(s, destFile, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Properties.Settings.Default.ADBPath = adbFile;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
|
||||
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
if (File.Exists(Sideloader.CrashLogPath))
|
||||
{
|
||||
@@ -1321,6 +1343,7 @@ without him none of this would be possible
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
RCLONE.killRclone();
|
||||
ADB.RunAdbCommandToString("kill-server");
|
||||
}
|
||||
|
||||
private void ADBWirelessDisable_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AndroidSideloader
|
||||
private static string RawGitHubUrl;
|
||||
private static string GitHubUrl;
|
||||
|
||||
static readonly public string LocalVersion = "2.1HF2";
|
||||
static readonly public string LocalVersion = "2.1HF4";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
@@ -28,9 +28,6 @@ namespace AndroidSideloader
|
||||
try
|
||||
{
|
||||
currentVersion = client.GetStringAsync($"{RawGitHubUrl}/master/version").Result;
|
||||
if (currentVersion.Length > LocalVersion.Length)
|
||||
currentVersion = currentVersion.Remove(currentVersion.Length - 1);
|
||||
currentVersion = currentVersion.Replace("\n", "");
|
||||
changelog = client.GetStringAsync($"{RawGitHubUrl}/master/changelog.txt").Result;
|
||||
client.Dispose();
|
||||
}
|
||||
@@ -41,8 +38,8 @@ namespace AndroidSideloader
|
||||
//Call this to ask the user if they want to update
|
||||
public static void Update()
|
||||
{
|
||||
RawGitHubUrl = $"https://raw.githubusercontent.com/{Repostory}";
|
||||
GitHubUrl = $"https://github.com/{Repostory}";
|
||||
RawGitHubUrl = $"https://raw.githubusercontent.com/nerdunit/androidsideloader";
|
||||
GitHubUrl = $"https://github.com/nerdunit/androidsideloader";
|
||||
if (IsUpdateAvailable())
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user