8 Commits

Author SHA1 Message Date
q3b5q3 e1afd0c7ac Update README.md 2022-05-05 17:41:51 +02:00
q3b5q3 9f5ea243e6 Update README.md 2022-05-05 17:39:43 +02:00
q3b5q3 eec15ff17e Update README.md 2022-05-05 17:22:11 +02:00
q3b5q3 8e917167f3 3.0.1.0
See changelog.txt
2022-05-05 17:16:33 +02:00
q3b5q3 25b1a409b3 Fix APK decompilation input and save log in temp folder. 2022-04-17 13:22:38 +02:00
q3b5q3 f8ebdd867b Small changes
- Show changelog on update prompt
- Implement unsigned APK creation after compile. Totally forgotten it
- Compiled APK named "signed" instead "compiled" when signng after compile
2022-04-12 15:41:38 +02:00
q3b5q3 e9e27dd38e Update README.md 2022-04-11 21:06:29 +02:00
AndnixSH 01e1ac87a2 Update README.md 2022-04-11 14:06:06 +02:00
17 changed files with 936 additions and 711 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ namespace APKToolGUI.Utils
Permissions += StringExt.Regex(@"(?<=name=\')(.*?)(?=\')", line) + "\n";
break;
case "sdkVersion":
SdkVersion += SdkToAndroidVer(StringExt.Regex(@"(?<=sdkVersion:\')(.*?)(?=\')", line));
SdkVersion = SdkToAndroidVer(StringExt.Regex(@"(?<=sdkVersion:\')(.*?)(?=\')", line));
break;
case "targetSdkVersion":
TargetSdkVersion = SdkToAndroidVer(StringExt.Regex(@"(?<=targetSdkVersion:\')(.*?)(?=\')", line));
+9 -12
View File
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace APKToolGUI.ApkTool
@@ -42,20 +43,16 @@ namespace APKToolGUI.ApkTool
string ymlPath = Path.Combine(path, "apktool.yml");
if (File.Exists(ymlPath))
{
string[] Manifest = File.ReadAllLines(ymlPath);
string yml = "";
foreach (string s in Manifest)
string ymll = File.ReadAllText(ymlPath);
int sdk = 30;
int.TryParse(StringExt.Regex(@"(?<= targetSdkVersion: \')(.*?)(?=\')", ymll), out sdk);
if (sdk >= 30)
{
int sdk = 30;
int.TryParse(StringExt.Regex(@"(?<= targetSdkVersion: \')(.*?)(?=\')", s), out sdk);
if (sdk >= 30)
{
yml += " targetSdkVersion: '29'\n";
return true;
}
yml += s + "\n";
ymll = ymll.Replace("targetSdkVersion: '" + sdk + "'", "targetSdkVersion: '29'");
File.WriteAllText(ymlPath, ymll);
return true;
}
File.WriteAllText(ymlPath, yml);
}
return false;
}
+8 -6
View File
@@ -44,6 +44,7 @@ namespace APKToolGUI
public const string OutputAppPath = " -o"; // The name of apk that gets written. Default is dist/name.apk
public const string NoCrunch = " -nc"; // Disable crunching of resource files during the build step.
public const string ApiLevel = " -api"; //The numeric api-level of the file to generate, e.g. 14 for ICS.
public const string UseAapt2 = " --use-aapt2"; //Upgrades apktool to use experimental aapt2 binary.
}
static class InstallFrameworkKeys
@@ -103,9 +104,8 @@ namespace APKToolGUI
CancelErrorRead();
}
public int Decompile(string outputDir)
public int Decompile(string inputPath, string outputDir)
{
string inputPath = Settings.Default.Decode_InputAppPath;
string keyNoSrc = null, keyNoRes = null, keyForce = null, keyFramePath = null, keyMatchOriginal = null, keyOutputDir = null, onlyMainClasses = null, noDebugInfo = null, keyKeepBrokenRes = null, apiLevel = null;
if (Settings.Default.Decode_NoSrc)
@@ -128,7 +128,7 @@ namespace APKToolGUI
apiLevel = String.Format("{0} {1}", DecompileKeys.ApiLevel, Settings.Default.Decode_ApiLevel);
keyOutputDir = String.Format("{0} \"{1}\"", DecompileKeys.OutputDir, outputDir);
string args = String.Format("d{0}{1}{2}{3}{4}{5}{6}{7}{8}{9} \"{10}\"", keyNoSrc, keyNoRes, keyForce, onlyMainClasses, noDebugInfo, keyMatchOriginal, keyFramePath, keyKeepBrokenRes, keyOutputDir, apiLevel, inputPath);
string args = String.Format($"d{keyNoSrc}{keyNoRes}{keyForce}{onlyMainClasses}{noDebugInfo}{keyMatchOriginal}{keyFramePath}{keyKeepBrokenRes}{apiLevel}{keyOutputDir} \"{inputPath}\"");
Start(args);
BeginOutputReadLine();
@@ -141,7 +141,7 @@ namespace APKToolGUI
{
string decApkDir = Settings.Default.Build_InputDir;
string keyForceAll = null, keyAapt = null, keyCopyOriginal = null, noCrunch = null, keyFramePath = null, keyOutputAppPath = null, apiLevel = null;
string keyForceAll = null, keyAapt = null, keyCopyOriginal = null, noCrunch = null, keyFramePath = null, keyOutputAppPath = null, apiLevel = null, useAapt2 = null;
if (Settings.Default.Build_ForceAll)
keyForceAll = BuildKeys.ForceAll;
if (Settings.Default.Build_CopyOriginal)
@@ -154,9 +154,11 @@ namespace APKToolGUI
keyFramePath = String.Format("{0} \"{1}\"", BuildKeys.FrameworkPath, Settings.Default.Build_FrameDir);
if (Settings.Default.Build_SetApiLevel)
apiLevel = String.Format("{0} {1}", DecompileKeys.ApiLevel, Settings.Default.Build_ApiLevel);
if (Settings.Default.Build_UseAapt2)
useAapt2 = BuildKeys.UseAapt2;
keyOutputAppPath = String.Format("{0} \"{1}\"", BuildKeys.OutputAppPath, outputFile);
string args = String.Format("b{0}{1}{2}{3}{4}{5}{6} \"{7}\"", keyForceAll, keyAapt, keyCopyOriginal, noCrunch, keyFramePath, keyOutputAppPath, apiLevel, decApkDir);
string args = String.Format($"b{keyForceAll}{keyAapt}{keyCopyOriginal}{noCrunch}{keyFramePath}{apiLevel}{useAapt2}{keyOutputAppPath} \"{decApkDir}\"");
Start(args);
BeginOutputReadLine();
@@ -175,7 +177,7 @@ namespace APKToolGUI
if (Settings.Default.InstallFramework_UseTag)
keyTag = String.Format("{0} \"{1}\"", InstallFrameworkKeys.Tag, Settings.Default.InstallFramework_Tag);
string args = String.Format("if{0}{1} \"{2}\"", keyFrameDir, keyTag, inputPath);
string args = String.Format($"if{keyFrameDir}{keyTag} \"{inputPath}\"");
Start(args);
BeginOutputReadLine();
+630 -608
View File
File diff suppressed because it is too large Load Diff
+49 -6
View File
@@ -89,6 +89,7 @@ namespace APKToolGUI
button_DECODE_BrowseInputAppPath.Click += decodeHandlers.button_DECODE_BrowseInputAppPath_Click;
button_DECODE_Decode.Click += decodeHandlers.button_DECODE_Decode_Click;
decApkOpenDirBtn.Click += decodeHandlers.decApkOpenDirBtn_Click;
decOutOpenDirBtn.Click += decodeHandlers.decOutOpenDirBtn_Click;
buildHandlers = new BuildControlEventHandlers(this);
button_BUILD_BrowseAaptPath.Click += buildHandlers.button_BUILD_BrowseAaptPath_Click;
@@ -258,6 +259,9 @@ namespace APKToolGUI
GetApkInfo(file);
tabControlMain.SelectedIndex = 1;
break;
default: //Fix when running app as Release from Visual studio
IgnoreOutputDirContextMenu = false;
break;
}
}
}
@@ -363,10 +367,11 @@ namespace APKToolGUI
if (e.Result is UpdateChecker.Result)
{
UpdateChecker.Result result = (UpdateChecker.Result)e.Result;
switch (result.State)
{
case UpdateChecker.State.NeedUpdate:
if (MessageBox.Show(Language.UpdateNewVersion, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
if (MessageBox.Show(Language.UpdateNewVersion + "\n\n" + result.Changelog, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
Process.Start("https://repo.andnixsh.com/tools/APKToolGUI/APKToolGUI.zip");
break;
case UpdateChecker.State.NoUpdate:
@@ -378,6 +383,7 @@ namespace APKToolGUI
MessageBox.Show(Language.ErrorUpdateChecking + " " + Environment.NewLine + result.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
break;
}
Settings.Default.LastUpdateCheck = DateTime.Now;
}
}
@@ -541,11 +547,11 @@ namespace APKToolGUI
ToStatus(String.Format(Language.Decoding + " \"{0}\"...", Path.GetFileName(inputApk)), Resources.waiting);
}));
string outputDir = PathUtils.GetDirectoryNameWithoutExtension(Settings.Default.Decode_InputAppPath);
string outputDir = PathUtils.GetDirectoryNameWithoutExtension(inputApk);
if (Settings.Default.Decode_UseOutputDir && !IgnoreOutputDirContextMenu)
outputDir = Path.Combine(Settings.Default.Decode_OutputDir, Path.GetFileNameWithoutExtension(Settings.Default.Decode_InputAppPath));
outputDir = Path.Combine(Settings.Default.Decode_OutputDir, Path.GetFileNameWithoutExtension(inputApk));
code = apktool.Decompile(outputDir);
code = apktool.Decompile(inputApk, outputDir);
if (code == 0)
{
@@ -564,6 +570,7 @@ namespace APKToolGUI
if (ApkFixer.RemoveApkToolDummies(outputDir))
ToLog(ApktoolEventType.Information, Language.RemoveApkToolDummies);
}
ToLog(ApktoolEventType.Information, Language.AllDone);
}
else
ToLog(ApktoolEventType.Error, Language.ErrorDecompiling);
@@ -605,12 +612,14 @@ namespace APKToolGUI
await Task.Factory.StartNew(() =>
{
string outputFile = inputFile + " compiled.apk";
if (Settings.Default.Build_SignAfterBuild)
outputFile = inputFile + " signed.apk";
if (Settings.Default.Build_UseOutputAppPath && !IgnoreOutputDirContextMenu)
{
outputFile = Path.Combine(Settings.Default.Build_OutputAppPath, Path.GetFileName(inputFile)) + ".apk";
inputFile = outputFile;
if (Settings.Default.Build_SignAfterBuild)
outputFile = Path.Combine(Settings.Default.Build_OutputAppPath, Path.GetFileName(inputFile)) + " signed.apk";
}
code = apktool.Build(outputFile);
if (code == 0)
@@ -626,7 +635,20 @@ namespace APKToolGUI
return;
}
else
{
if (Settings.Default.Build_CreateUnsignedApk)
{
ToLog(ApktoolEventType.Information, Language.CreateUnsignedApk);
if (Directory.Exists(Path.Combine(inputFile, "original", "META-INF")))
{
ZipUtils.UpdateDirectory(outputFile, Path.Combine(inputFile, "original", "META-INF"), "META-INF");
File.Copy(outputFile, Path.Combine(Path.GetDirectoryName(outputFile), Path.GetFileName(inputFile) + " unsigned.apk"), true);
}
else
ToLog(ApktoolEventType.Warning, Language.MetainfNotExist);
}
ToLog(ApktoolEventType.Information, Language.Done);
}
}
if (Settings.Default.Build_SignAfterBuild)
{
@@ -932,6 +954,27 @@ namespace APKToolGUI
#endregion
#region Form handlers
private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
{
//For debugging purposes
try
{
using (TextWriter TW = new StreamWriter(Path.Combine(Program.TEMP_DIR, "logs.txt")))
{
for (int i = 0; i < logGridView.Rows.Count; i++)
{
string dateTime = (string)logGridView.Rows[i].Cells[1].Value;
string text = (string)logGridView.Rows[i].Cells[2].Value;
TW.WriteLine($"{dateTime} {text}");
}
}
}
catch
{
}
}
private void Application_ApplicationExit(object sender, EventArgs e)
{
Save();
+129 -63
View File
@@ -132,10 +132,10 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="comApkOpenDir.Location" type="System.Drawing.Point, System.Drawing">
<value>414, 200</value>
<value>406, 200</value>
</data>
<data name="comApkOpenDir.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 24</value>
<value>175, 24</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="comApkOpenDir.TabIndex" type="System.Int32, mscorlib">
@@ -156,6 +156,39 @@
<data name="&gt;&gt;comApkOpenDir.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="decOutOpenDirBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="decOutOpenDirBtn.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Center</value>
</data>
<data name="decOutOpenDirBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="decOutOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 228</value>
</data>
<data name="decOutOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>175, 24</value>
</data>
<data name="decOutOpenDirBtn.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="decOutOpenDirBtn.Text" xml:space="preserve">
<value>Decompile output location</value>
</data>
<data name="&gt;&gt;decOutOpenDirBtn.Name" xml:space="preserve">
<value>decOutOpenDirBtn</value>
</data>
<data name="&gt;&gt;decOutOpenDirBtn.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;decOutOpenDirBtn.Parent" xml:space="preserve">
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;decOutOpenDirBtn.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="signApkOpenDirBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
@@ -166,10 +199,10 @@
<value>NoControl</value>
</data>
<data name="signApkOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>306, 227</value>
<value>406, 228</value>
</data>
<data name="signApkOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 24</value>
<value>175, 24</value>
</data>
<data name="signApkOpenDirBtn.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
@@ -187,7 +220,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;signApkOpenDirBtn.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="alignApkOpenDirBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@@ -199,10 +232,10 @@
<value>NoControl</value>
</data>
<data name="alignApkOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>101, 227</value>
<value>206, 228</value>
</data>
<data name="alignApkOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 24</value>
<value>175, 24</value>
</data>
<data name="alignApkOpenDirBtn.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
@@ -220,7 +253,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;alignApkOpenDirBtn.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="decApkOpenDirBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@@ -232,10 +265,10 @@
<value>NoControl</value>
</data>
<data name="decApkOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>211, 200</value>
<value>206, 200</value>
</data>
<data name="decApkOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 24</value>
<value>175, 24</value>
</data>
<data name="decApkOpenDirBtn.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
@@ -253,7 +286,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;decApkOpenDirBtn.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="selectedApkOpenDirBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
@@ -265,10 +298,10 @@
<value>NoControl</value>
</data>
<data name="selectedApkOpenDirBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 201</value>
<value>7, 201</value>
</data>
<data name="selectedApkOpenDirBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 23</value>
<value>175, 23</value>
</data>
<data name="selectedApkOpenDirBtn.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
@@ -286,16 +319,16 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;selectedApkOpenDirBtn.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="button_OpenMainActivity.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="button_OpenMainActivity.Location" type="System.Drawing.Point, System.Drawing">
<value>414, 256</value>
<value>406, 256</value>
</data>
<data name="button_OpenMainActivity.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 23</value>
<value>175, 23</value>
</data>
<data name="button_OpenMainActivity.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
@@ -313,16 +346,16 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;button_OpenMainActivity.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="openApktoolYmlBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="openApktoolYmlBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>211, 256</value>
<value>206, 256</value>
</data>
<data name="openApktoolYmlBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 23</value>
<value>175, 23</value>
</data>
<data name="openApktoolYmlBtn.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@@ -340,16 +373,16 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;openApktoolYmlBtn.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="openAndroidMainfestBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="openAndroidMainfestBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 256</value>
<value>7, 256</value>
</data>
<data name="openAndroidMainfestBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>167, 23</value>
<value>175, 23</value>
</data>
<data name="openAndroidMainfestBtn.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@@ -367,7 +400,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;openAndroidMainfestBtn.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -508,7 +541,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;signPanel.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -649,7 +682,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;zipalignPanel.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -790,7 +823,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;comPanel.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -931,7 +964,7 @@
<value>tabPageMain</value>
</data>
<data name="&gt;&gt;decPanel.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="tabPageMain.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
@@ -2282,7 +2315,7 @@ and change target SDK to 29</value>
<value>4, 4</value>
</data>
<data name="groupBox_DECODE_Options.Size" type="System.Drawing.Size, System.Drawing">
<value>559, 344</value>
<value>559, 349</value>
</data>
<data name="groupBox_DECODE_Options.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@@ -2332,6 +2365,36 @@ and change target SDK to 29</value>
<data name="tabPageBuild.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="useAapt2ChkBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="useAapt2ChkBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="useAapt2ChkBox.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 312</value>
</data>
<data name="useAapt2ChkBox.Size" type="System.Drawing.Size, System.Drawing">
<value>353, 17</value>
</data>
<data name="useAapt2ChkBox.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
</data>
<data name="useAapt2ChkBox.Text" xml:space="preserve">
<value>Use aapt2 (Upgrades apktool to use experimental aapt2 binary.)</value>
</data>
<data name="&gt;&gt;useAapt2ChkBox.Name" xml:space="preserve">
<value>useAapt2ChkBox</value>
</data>
<data name="&gt;&gt;useAapt2ChkBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;useAapt2ChkBox.Parent" xml:space="preserve">
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;useAapt2ChkBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="buildApiLvlUpDown.Location" type="System.Drawing.Point, System.Drawing">
<value>492, 17</value>
</data>
@@ -2351,7 +2414,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;buildApiLvlUpDown.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<data name="buildSetApiLvlChkBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2381,7 +2444,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;buildSetApiLvlChkBox.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="label23.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2393,13 +2456,13 @@ and change target SDK to 29</value>
<value>26, 291</value>
</data>
<data name="label23.Size" type="System.Drawing.Size, System.Drawing">
<value>336, 13</value>
<value>344, 13</value>
</data>
<data name="label23.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="label23.Text" xml:space="preserve">
<value>May not work with Lucky Patcher. It works better for CorePatch. </value>
<value>May not work with Lucky Patcher. It works better with CorePatch. </value>
</data>
<data name="&gt;&gt;label23.Name" xml:space="preserve">
<value>label23</value>
@@ -2411,37 +2474,37 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;label23.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="checkBox1.AutoSize" type="System.Boolean, mscorlib">
<data name="createUnsignApkChkBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBox1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="createUnsignApkChkBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="checkBox1.Location" type="System.Drawing.Point, System.Drawing">
<data name="createUnsignApkChkBox.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 271</value>
</data>
<data name="checkBox1.Size" type="System.Drawing.Size, System.Drawing">
<data name="createUnsignApkChkBox.Size" type="System.Drawing.Size, System.Drawing">
<value>190, 17</value>
</data>
<data name="checkBox1.TabIndex" type="System.Int32, mscorlib">
<data name="createUnsignApkChkBox.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="checkBox1.Text" xml:space="preserve">
<data name="createUnsignApkChkBox.Text" xml:space="preserve">
<value>Create unsigned APK after build</value>
</data>
<data name="&gt;&gt;checkBox1.Name" xml:space="preserve">
<value>checkBox1</value>
<data name="&gt;&gt;createUnsignApkChkBox.Name" xml:space="preserve">
<value>createUnsignApkChkBox</value>
</data>
<data name="&gt;&gt;checkBox1.Type" xml:space="preserve">
<data name="&gt;&gt;createUnsignApkChkBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBox1.Parent" xml:space="preserve">
<data name="&gt;&gt;createUnsignApkChkBox.Parent" xml:space="preserve">
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox1.ZOrder" xml:space="preserve">
<value>3</value>
<data name="&gt;&gt;createUnsignApkChkBox.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label16.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2471,7 +2534,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;label16.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="signAfterBuildChkBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2501,7 +2564,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;signAfterBuildChkBox.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="zipalignAfterBuildChkBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2531,7 +2594,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;zipalignAfterBuildChkBox.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="checkBox_BUILD_NoCrunch.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2561,7 +2624,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox_BUILD_NoCrunch.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="button_BUILD_BrowseOutputAppPath.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -2591,7 +2654,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;button_BUILD_BrowseOutputAppPath.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="checkBox_BUILD_ForceAll.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2621,7 +2684,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox_BUILD_ForceAll.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="button_BUILD_BrowseFrameDir.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -2651,7 +2714,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;button_BUILD_BrowseFrameDir.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="button_BUILD_BrowseAaptPath.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@@ -2681,7 +2744,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;button_BUILD_BrowseAaptPath.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="checkBox_BUILD_OutputAppPath.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2711,7 +2774,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox_BUILD_OutputAppPath.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="checkBox_BUILD_CopyOriginal.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2741,7 +2804,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox_BUILD_CopyOriginal.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="textBox_BUILD_OutputAppPath.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 145</value>
@@ -2765,7 +2828,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;textBox_BUILD_OutputAppPath.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="checkBox_BUILD_UseAapt.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2795,7 +2858,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox_BUILD_UseAapt.ZOrder" xml:space="preserve">
<value>15</value>
<value>16</value>
</data>
<data name="textBox_BUILD_AaptPath.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 93</value>
@@ -2819,7 +2882,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;textBox_BUILD_AaptPath.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<data name="textBox_BUILD_FrameDir.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 119</value>
@@ -2843,7 +2906,7 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;textBox_BUILD_FrameDir.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="checkBox_BUILD_UseFramework.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -2873,13 +2936,13 @@ and change target SDK to 29</value>
<value>groupBox_BUILD_Options</value>
</data>
<data name="&gt;&gt;checkBox_BUILD_UseFramework.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="groupBox_BUILD_Options.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 7</value>
</data>
<data name="groupBox_BUILD_Options.Size" type="System.Drawing.Size, System.Drawing">
<value>559, 328</value>
<value>559, 354</value>
</data>
<data name="groupBox_BUILD_Options.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
@@ -5254,7 +5317,7 @@ and change target SDK to 29</value>
<value>100, 16</value>
</data>
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 485</value>
<value>0, 464</value>
</data>
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>596, 22</value>
@@ -5386,7 +5449,7 @@ and change target SDK to 29</value>
<value>96, 96</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>596, 507</value>
<value>596, 486</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt</value>
@@ -7057,6 +7120,9 @@ and change target SDK to 29</value>
//////////w4AAAcP///////
</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>99, 97</value>
</data>
@@ -87,8 +87,14 @@ namespace APKToolGUI.Handlers
string decApkDir = main.textBox_BUILD_InputProjectDir.Text;
string outputFile = decApkDir + " compiled.apk";
if (Settings.Default.Build_SignAfterBuild)
outputFile = decApkDir + " signed.apk";
if (Settings.Default.Build_UseOutputAppPath)
outputFile = Path.Combine(Settings.Default.Build_OutputAppPath, Path.GetFileName(decApkDir) + ".apk");
{
outputFile = Path.Combine(Settings.Default.Build_OutputAppPath, Path.GetFileName(decApkDir)) + ".apk";
if (Settings.Default.Build_SignAfterBuild)
outputFile = Path.Combine(Settings.Default.Build_OutputAppPath, Path.GetFileName(decApkDir)) + " signed.apk";
}
if (File.Exists(outputFile))
Process.Start("explorer.exe", string.Format("/select,\"{0}\"", outputFile));
@@ -101,5 +101,15 @@ namespace APKToolGUI.Handlers
main.ToLog(ApktoolEventType.Error, Language.ErrorSelectedFileNotExist);
}
}
internal void decOutOpenDirBtn_Click(object sender, EventArgs e)
{
if (Directory.Exists(main.textBox_DECODE_OutputDirectory.Text))
Process.Start("explorer.exe", main.textBox_DECODE_OutputDirectory.Text);
else
{
main.ToLog(ApktoolEventType.Error, Language.ErrorSelectedOutputFolderNotExist);
}
}
}
}
+18
View File
@@ -204,6 +204,15 @@ namespace APKToolGUI.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Creating Unsigned APK.
/// </summary>
internal static string CreateUnsignedApk {
get {
return ResourceManager.GetString("CreateUnsignedApk", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Debug mode.
/// </summary>
@@ -663,6 +672,15 @@ namespace APKToolGUI.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to META-INF folder does not exist. Skipped.
/// </summary>
internal static string MetainfNotExist {
get {
return ResourceManager.GetString("MetainfNotExist", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to For the changes to take effect you must restart the program. You want to do it now?.
/// </summary>
+6
View File
@@ -396,4 +396,10 @@
<data name="ZipalignApk" xml:space="preserve">
<value>Zipalign APK</value>
</data>
<data name="CreateUnsignedApk" xml:space="preserve">
<value>Creating Unsigned APK</value>
</data>
<data name="MetainfNotExist" xml:space="preserve">
<value>META-INF folder does not exist. Skipped</value>
</data>
</root>
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Можно задать все значения или принять номер построения и номер редакции по умолчанию,
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.0.1.0")]
[assembly: AssemblyFileVersion("3.0.1.0")]
+12
View File
@@ -932,5 +932,17 @@ namespace APKToolGUI.Properties {
this["IgnoreOutputDirContextMenu"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool Build_UseAapt2 {
get {
return ((bool)(this["Build_UseAapt2"]));
}
set {
this["Build_UseAapt2"] = value;
}
}
}
}
+3
View File
@@ -221,5 +221,8 @@
<Setting Name="IgnoreOutputDirContextMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Build_UseAapt2" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
+20 -5
View File
@@ -31,9 +31,11 @@ namespace APKToolGUI
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
Version latestVersion = null;
string changelog = null;
try
{
latestVersion = GetVersion();
changelog = GetChangelog();
}
catch (Exception exc)
{
@@ -43,7 +45,7 @@ namespace APKToolGUI
{
if (CompareVersion(latestVersion))
{
e.Result = new Result(State.NeedUpdate, latestVersion.ToString(), (bool)e.Argument);
e.Result = new Result(State.NeedUpdate, latestVersion.ToString(), (bool)e.Argument, changelog);
}
else
e.Result = new Result(State.NoUpdate, null, (bool)e.Argument);
@@ -83,6 +85,17 @@ namespace APKToolGUI
return null;
}
private string GetChangelog()
{
string changelog;
using (WebClient webClient = new WebClient())
{
changelog = webClient.DownloadString("https://repo.andnixsh.com/tools/APKToolGUI/changelog.txt");
}
return changelog;
}
public enum State
{
NoUpdate,
@@ -92,15 +105,17 @@ namespace APKToolGUI
public class Result
{
public Result(State state, string message, bool silently)
public Result(State state, string message, bool silently, string changelog = null)
{
this.State = state;
this.Message = message;
this.Silently = silently;
State = state;
Message = message;
Silently = silently;
Changelog = changelog;
}
public State State { get; private set; }
public string Message { get; private set; }
public bool Silently { get; private set; }
public string Changelog { get; private set; }
}
}
}
+3
View File
@@ -226,6 +226,9 @@
<setting name="IgnoreOutputDirContextMenu" serializeAs="String">
<value>False</value>
</setting>
<setting name="Build_UseAapt2" serializeAs="String">
<value>True</value>
</setting>
</APKToolGUI.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup>
+14 -7
View File
@@ -1,11 +1,13 @@
# APK Tool GUI
![](https://i.imgur.com/MUuWTdW.png)
[![](https://img.shields.io/github/downloads/AndnixSH/APKToolGUI/total?style=for-the-badge)](https://github.com/AndnixSH/APKToolGUI/releases) [![](https://img.shields.io/github/v/release/andnixsh/APKToolGUI?style=for-the-badge)](https://github.com/AndnixSH/APKToolGUI/releases)
GUI for apktool, signapk, zipalign and baksmali utilities.
It is a tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.
# Download
# Download links
https://github.com/AndnixSH/APKToolGUI/releases
https://app.box.com/s/y0cxdzxknb98v3c90e705ltzuehjiddn
@@ -13,7 +15,6 @@ https://app.box.com/s/y0cxdzxknb98v3c90e705ltzuehjiddn
https://mega.nz/folder/aBxWnaSA#XMLOS9bPJgtTTd2vEjh2SQ
https://sbupload.com/folder/3324/APK_Tool_GUI
# Requirements
- Windows 7 and above
- JDK/JRE 8 and above. Highly recommended to use 64-bit version of Java if your system is 64-bit
@@ -44,7 +45,7 @@ Framework/system apps related issues, check on [XDA Forum](https://forum.xda-dev
# FAQ
##### Q: Can it be ported to other OS like Linux?
A: Maybe, but it's not easy since Microsoft is dumb for not making it easy for .NET Core unlike Java's GUI
A: Maybe, but it's not easy since Microsoft is dumb for not making it easy for .NET Core unlike Java's GUI which supports all supported platforms
##### Q: How to update Apktool?
A: Download [Apktool.jar](https://github.com/iBotPeaches/Apktool/releases) and replace it on Resources folder
@@ -55,6 +56,12 @@ A: Download [Baksmali.jar/Smali.jar](https://bitbucket.org/JesusFreke/smali/down
##### Q: How to reset?
A: Simply delete the config.xml file
##### Q: Why this tool is a virus?
A: It just a false positive, anti-virus always flag tools/softwares like this as virus. Don't always believe what your anti-virus are telling you. Try to compile the source by yourself and you will see
##### Q: Can you make an automatic APK injecting tool?
A: No, that's not the point of this tool, and I don't have time for that. However, you can try making it by yourself, or have a look on [SaveToGame](https://github.com/And42/SaveToGame) which can give you ideas how to do it.
# Development
Use Visual Studio 2019 and above. NET Framework 4.8 SDK is required
@@ -66,9 +73,9 @@ Currently there is two languages, english and russian. Russian is not complete b
- Open any forms. Under properties, scroll down until you see Language, and select any language you would like to translate. It will create new resx file inside cs file
# Credits
AndnixSH
iBotPeaches ([Apktool](https://ibotpeaches.github.io/Apktool/))
INF1NUM (Original author of [APKToolGUI](https://github.com/INF1NUM/APKToolGUI)
- AndnixSH
- iBotPeaches ([Apktool](https://ibotpeaches.github.io/Apktool/))
- INF1NUM (Original author of [APKToolGUI](https://github.com/INF1NUM/APKToolGUI))
# Disclaimer
Same as Apktool by iBotPeaches, It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms and other GOOD purposes. Just try to be fair with authors of an app, that you use and probably like.
Same as Apktool by iBotPeaches, It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms and other GOOD purposes. Just try to be fair with authors of an app, that you use and probably like.
+15
View File
@@ -1,3 +1,18 @@
3.0.1.0
- Fix filename to signed APK
- Fix minimum API changer
- Added button to open decompile project output folder
- Added "use aapt2"
3.0.0.2
- Fix APK input for decompilation
- Save log in temp folder
3.0.0.1
- Show changelog on update prompt
- Implement unsigned APK creation after compile. Totally forgotten it
- Compiled APK named "signed" instead "compiled" when signng after compile
3.0.0.0
- Updated apktool to 2.6.1
- Updated apksinger, aapt, and zipalign to SDK 31