2

I am using macOSX, and trying to extract all the files in a APK file, I've extracted it with zip and unzip. Used dex2jar to extract classes.dex to jar file and decompiled it.

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.

How can I decompile with my apktool now?

user3289129
  • 45
  • 1
  • 1
  • 6

1 Answers1

8

If you are using relative paths to execute apktool, and you are cdd to the directory they are in, you have to prefix the command with ./

So if apktool is at /path/to/apktool

And you cd /path/to

Then type ./apktool

Instead of apktool


If you want to add this folder to your PATH, you can do that too...

Open ~/.bashrc in a text editor of choice and add this to the bottom of it:

PATH=$PATH:/path/to

Where, once again, /path/to is the folder that contains apktool.

Now you can just type apktool from anywhere.

flagoworld
  • 3,196
  • 2
  • 20
  • 16