终端无法运行 apktool [英] Terminal can't run apktool

查看:36
本文介绍了终端无法运行 apktool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 macOSX,并尝试解压缩 APK 文件中的所有文件,我已使用 zip 和解压缩对其进行解压缩.使用dex2jar将classes.dex解压成jar文件并反编译.

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.

现在,当我在最后一步中,使用 APKtool 解码 apk 文件时,尽管我将所有 3 个文件(aapt、apktool 和 apktool.jar)放入其中,但它显示-bash:apktool:未找到命令"一个文件夹.

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.

我现在如何用我的 apktool 反编译?

How can I decompile with my apktool now?

推荐答案

如果你使用相对路径执行 apktool,并且你 cdd 到他们所在的目录,你必须前缀带有 ./

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 ./

所以如果 apktool 位于 /path/to/apktool

So if apktool is at /path/to/apktool

cd/path/to

然后输入./apktool

代替apktool

如果您想将此文件夹添加到您的 PATH,您也可以这样做...

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

在选择的文本编辑器中打开 ~/.bashrc 并将其添加到它的底部:

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

PATH=$PATH:/path/to

再说一次,/path/to 是包含 apktool 的文件夹.

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

现在您可以从任何地方输入 apktool.

Now you can just type apktool from anywhere.

这篇关于终端无法运行 apktool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆