Terminal can't run apktool [closed]

匿名 (未验证) 提交于 2019-12-03 01:34:02

问题:

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?

回答1:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!