Using "./" means that you want to run file located in current folder. Since you mentioned "bash" your apktool should be probably installed in "/usr/local/bin" so when you complete the installation do not add "./" just type "apktool" to run it.
hey guys, im trying to inject a meterpreter reverse shell in an apk and installing it on my own phone but when i try to use a template apk with msfvenom, it gives me an "Error: apktool version 2.6.0 not supported, please download at least version 2.7.0". the problem is no matter how many times i try to update it, the version is always 2.6.0 thus not allowing me to proceed. any help appreciated, thanks in advance!
Now when I am in my last step, using APKtool to decode the apk file, however, it shows "-bash: apktool: command not found " eventhough I put all 3 files(aapt, apktool and apktool.jar) into one folder.
I started my exploration from there. I used the output of JADX to explore where this parameter was being populated. This is where having the decompiled source code was really useful. The file structure in the apktool output and jadx output is the same so we can explore the output of JADX to help us figure out where to insert the debug statements in smali.
:$ apktool build '/home/...' I: Checking whether sources has changed... I: Checking whether resources has changed... I: Building resources... Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException:
could not exec command: aapt, p, -F, /tmp/APKTOOL3418222472327622786.tmp, -I,
/home/apktool/framework/1.apk, -S, /home/.../ /home/.../AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:255) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324) at brut.androlib.Androlib.buildResources(Androlib.java:269) at brut.androlib.Androlib.build(Androlib.java:192) at brut.androlib.Androlib.build(Androlib.java:174) at brut.apktool.Main.cmdBuild(Main.java:188) at brut.apktool.Main.main(Main.java:70) Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL3418222472327622786.tmp, -I, /home/.../.../framework/1.apk, -S, /home/.../.../res, -M, /home/.../.../AndroidManifest.xml] at brut.util.OS.exec(OS.java:87) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:253) ... 6 more Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:475) at java.lang.Runtime.exec(Runtime.java:610) at java.lang.Runtime.exec(Runtime.java:483) at brut.util.OS.exec(OS.java:78) ... 7 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.(UNIXProcess.java:164) at java.lang.ProcessImpl.start(ProcessImpl.java:81) at java.lang.ProcessBuilder.start(ProcessBuilder.java:468) ... 10 more
As of apktool v1.5.1 I added support for passing the path to apktool via --aapt/-a, so on rebuild just use apktool b --aapt /path/to/aapt nameofapkfolder. So update your apktool and forget messing around with path variables.
3. In current folder (where you store the LÖVE APK), open Command Prompt/Terminal in the current directory and execute apktool d -s -o love_decoded love-11.3-android-embed.apk and new folder love_decoded will be created. You can use any folder name, just make sure to make it consistent in later operations.
Download Source Package apktool:
Other Packages Related to apktool
In order to do any sort of modification to an Android APK file, you must first decompile it, edit its contents and then compile it back. Currently, the easiest way to do this is using a special desktop PC tool known as apktool. Apktool is a Java-based utility which can run on Windows, MacOS, and Linux with minimal effort. Once it is set up, it can decompile or compile an APK file with a single command.
Before you can follow our apktool tutorial, there are a few prerequisites you need to take care of. The only requirement of apktool is Java version 1.8 or greater. You can check if you have Java installed on your machine by opening a command prompt on Windows (click the Start Menu, type cmd.exe and hit enter) or a terminal on MacOS/Linux and giving the command
Finally, you will need to move both the apktool and wrapper files to a special location so they can be executed everywhere on the system: On Windows, this location is C:\\Windows . On MacOS and Linux, place them under /usr/bin or /usr/local/bin (root required). If you are on Linux or MacOS, make sure that both files have the execute permission set.
To test that everything works as expected, open a command prompt on Windows or a terminal emulator on MacOS and Linux. Then issue the command apktool and hit enter. You should get an output similar to the following:
That is all you need to know if you want to compile and decompile APK files for Android. Stay tuned for special guides about manipulating App icons and colors and adding or removing functionalities to your apps! Try it now and let us know if you were able to decompile and compile an APK. I just hope our apktool tutorial will help you edit APK files yourself.
760c119bf3