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

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

问题描述

我使用MacOSX的,并试图提取一个APK文件的所有文件,我已经解压缩后并解压缩。二手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脱code中的APK文件,但是,它显示-bash:apktool:命令未找到eventhough我把所有3个文件(AAPT,apktool和apktool的.jar)到一个文件夹中。

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,你是 CD D到他们的目录在,你必须preFIX命令与 ./

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在 /路径/要/ apktool

So if apktool is at /path/to/apktool

和你 CD /路径/到

然后键入 ./ apktool

而不是 apktool

如果要将此文件夹添加到您的路径,就可以做到这一点...

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:/路径/到

在哪里,再次 /路径/到是包含文件夹 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天全站免登陆