Skip to content

Commit

Permalink
Update 1.6.5
Browse files Browse the repository at this point in the history
- Fix IP error
- Fix disable, enable, clear data method
- Other minor improvements
  • Loading branch information
msartore committed May 24, 2021
1 parent 6639448 commit 7a19de5
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 52 deletions.
26 changes: 13 additions & 13 deletions ATA GUI/Forms/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions ATA GUI/Forms/BloatwareDetecter.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions ATA GUI/Forms/BloatwareDetecter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public partial class BloatwareDetecter : Form
private readonly List<string> installedPackageList;
private readonly HashSet<string> foundPackageList = new HashSet<string>();
private readonly MainForm mainForm;
public string currentDevice;

public BloatwareDetecter(List<string> listOfApps, MainForm main)
{
Expand Down Expand Up @@ -94,11 +95,16 @@ private void BloatwareDetecter_Shown(object sender, EventArgs e)
"to function. Uninstalling a critical system app may result in bricking your phone. So always double check before uninstalling any system app.", 1);
}

private void buttonUninstall_Click(object sender, EventArgs e)
private void buttonDisable_Click(object sender, EventArgs e)
{
if(checkedListBoxBloatwareList.CheckedItems.Count> 0)
{
mainForm.uninstaller(checkedListBoxBloatwareList.CheckedItems);
{
List<string> apks = new List<string>();
foreach (Object list in checkedListBoxBloatwareList.CheckedItems)
{
apks.Add(list.ToString());
}
mainForm.loadMethod(apks, "adb -s " + currentDevice + " shell pm disable-user --user 0 ", "Disabled:");
this.Close();
}
else
Expand Down
5 changes: 2 additions & 3 deletions ATA GUI/Forms/LoadingForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ public partial class LoadingForm : Form
private readonly bool fileTransfer;


public LoadingForm(List<string> arrayApkTemp, string commandTemp, string labelTemp, string deviceSerialTmp)
public LoadingForm(List<string> arrayApkTemp, string commandTemp, string labelTemp)
{
InitializeComponent();
arrayApk = arrayApkTemp;
command = commandTemp;
labelText.Text = labelTemp;
fileTransfer = false;
deviceSerial = deviceSerialTmp;
}

public LoadingForm(string [] array, string deviceSerialTmp)
Expand Down Expand Up @@ -92,7 +91,7 @@ private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
labelFileName.Text = apk;
this.Refresh();
MainForm.systemCommand("adb " + command + apk);
MainForm.systemCommand(command + apk);
backgroundWorker.ReportProgress(++i);
}
}
Expand Down
43 changes: 26 additions & 17 deletions ATA GUI/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static string RemoveWhiteSpaces(string str)
[DllImportAttribute("user32.dll")]
public static extern bool ReleaseCapture();

private const string CURRENTVERSION = "v.1.6.0";
private const string CURRENTVERSION = "v.1.6.5";

public MainForm()
{
Expand Down Expand Up @@ -295,8 +295,11 @@ private void backgroundWorkerSync_DoWork(object sender, System.ComponentModel.Do
labelD.Text = arrayDeviceInfo[6];
if (arrayDeviceInfo.Length > 7)
{
textBoxIP.Text = labelIP.Text = arrayDeviceInfo[7].Substring(arrayDeviceInfo[7].IndexOf("src") + 4);
if (labelIP.Text.Contains("t of devices attached"))
if(arrayDeviceInfo[7].Length > 4)
{
textBoxIP.Text = labelIP.Text = arrayDeviceInfo[7].Substring(arrayDeviceInfo[7].IndexOf("src") + 4);
}
if (labelIP.Text.Contains("t of devices attached") || arrayDeviceInfo[7].Length == 0)
{
labelIP.Text = "Not connected to a network";
textBoxIP.Text = "";
Expand Down Expand Up @@ -1042,7 +1045,7 @@ public void uninstaller(CheckedListBox.CheckedItemCollection foundPackageList)
{
if (stringApk.Contains(list.ToString()))
{
load = new LoadingForm(new List<string> { list.ToString() }, "-s " + currentDeviceSelected + " uninstall ", "Uninstalled:", currentDeviceSelected);
load = new LoadingForm(new List<string> { list.ToString() }, "-s " + currentDeviceSelected + " uninstall ", "Uninstalled:");
load.ShowDialog();
if (load.DialogResult != DialogResult.OK)
{
Expand All @@ -1051,7 +1054,7 @@ public void uninstaller(CheckedListBox.CheckedItemCollection foundPackageList)
}
else if (stringApkS.Contains(list.ToString()))
{
load = new LoadingForm(new List<string> { list.ToString() }, "-s " + currentDeviceSelected + " shell pm uninstall -k --user 0 ", "Uninstalled:", currentDeviceSelected);
load = new LoadingForm(new List<string> { list.ToString() }, "-s " + currentDeviceSelected + " shell pm uninstall -k --user 0 ", "Uninstalled:");
load.ShowDialog();
if (load.DialogResult != DialogResult.OK)
{
Expand Down Expand Up @@ -1082,7 +1085,7 @@ public void uninstaller(CheckedListBox.CheckedItemCollection foundPackageList)
{
arrayApkSelect.Add(list.ToString());
}
LoadingForm load = new LoadingForm(arrayApkSelect, command, "Uninstalled:", currentDeviceSelected);
LoadingForm load = new LoadingForm(arrayApkSelect, command, "Uninstalled:");
load.ShowDialog();
if (load.DialogResult != DialogResult.OK)
{
Expand Down Expand Up @@ -1140,23 +1143,28 @@ private void toolStripButton5_Click(object sender, EventArgs e)
MessageShowBox("Generic error", 0);
return;
}
LoadingForm load = new LoadingForm(arrayApkSelect, command, commandName, currentDeviceSelected);
load.ShowDialog();
if (load.DialogResult == DialogResult.OK)
{
syncFun(2);
}
else
{
MessageShowBox("Error during this process", 0);
}
loadMethod(arrayApkSelect, command, commandName);
}
else
{
MessageShowBox("No app selected", 1);
}
}

public void loadMethod(List<string> arrayApkSelect, string command, string commandName)
{
LoadingForm load = new LoadingForm(arrayApkSelect, command, commandName);
load.ShowDialog();
if (load.DialogResult == DialogResult.OK)
{
syncFun(2);
}
else
{
MessageShowBox("Error during this process", 0);
}
}

private void nonSystemAppToolStripMenuItem1_Click(object sender, EventArgs e)
{
toolStripButtonUninstallApp.Enabled = true;
Expand Down Expand Up @@ -1407,6 +1415,7 @@ private void toolStripButtonBloatwareDetecter_Click(object sender, EventArgs e)
listOfApps.Add(list.ToString());
}
BloatwareDetecter bloatwareDetecter = new BloatwareDetecter(listOfApps, this);
bloatwareDetecter.currentDevice = currentDeviceSelected;
bloatwareDetecter.ShowDialog();
}
else
Expand All @@ -1424,7 +1433,7 @@ private void toolStripButtonRestoreApp_Click(object sender, EventArgs e)
{
apps.Add(app.ToString());
}
LoadingForm load = new LoadingForm(apps, "-s " + currentDeviceSelected + " shell cmd package install-existing ", "Restored:", currentDeviceSelected);
LoadingForm load = new LoadingForm(apps, "-s " + currentDeviceSelected + " shell cmd package install-existing ", "Restored:");
load.ShowDialog();
if (load.DialogResult != DialogResult.OK)
{
Expand Down
2 changes: 1 addition & 1 deletion ATA GUI/Forms/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial class Settings : Form
{
private string changelog = "";

private const string currentVersion = "v1.6.0";
private const string currentVersion = "v1.6.5";

public Settings()
{
Expand Down
4 changes: 2 additions & 2 deletions ATA GUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.0")]
[assembly: AssemblyFileVersion("1.5.0")]
[assembly: AssemblyVersion("1.6.5")]
[assembly: AssemblyFileVersion("1.6.5")]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="Resources/interface.jpg">

> **Last version:** v1.6.0
> **Last version:** v1.6.5
## 💡Introduction
ATA GUI is a project to port ATA to all the users. ATA GUI is an Advance Tool for Android™ powered by SDK Platform Tools.
Expand Down

0 comments on commit 7a19de5

Please sign in to comment.