2017-03-17 50 views
0

我從網站上下載了Apktools並獲得了2個文件:Apktool.txt和Apktool_2.2.2。根據說明我將Apktool_2.2.2更名爲Apktools.jar。然後我去了終端,這就是我所做的:Mac上的Apktools

Last login: Fri Mar 17 12:08:55 on ttys000 
Roberts-MBP:~ Robert$ cd documents 
Roberts-MBP:documents Robert$ cd metronomeapp/apktool 
Roberts-MBP:apktool Robert$ **java -jar apktool.jar** 
Apktool v2.2.2 - a tool for reengineering Android apk files 
with smali v2.1.3 and baksmali v2.1.3 
Copyright 2014 Ryszard Wiśniewski <[email protected]> 
Updated by Connor Tumbleson <[email protected]> 

usage: apktool 
-advance,--advanced prints advance information. 
-version,--version prints the version then exits 
usage: apktool if|install-framework [options] <framework.apk> 
-p,--frame-path <dir> Stores framework files into <dir>. 
-t,--tag <tag>   Tag frameworks using <tag>. 
usage: apktool d[ecode] [options] <file_apk> 
-f,--force    Force delete destination directory. 
-o,--output <dir>  The name of folder that gets written. Default is apk.out 
-p,--frame-path <dir> Uses framework files located in <dir>. 
-r,--no-res    Do not decode resources. 
-s,--no-src    Do not decode sources. 
-t,--frame-tag <tag> Uses framework files tagged by <tag>. 
usage: apktool b[uild] [options] <app_path> 
-f,--force-all   Skip changes detection and build all files. 
-o,--output <dir>  The name of apk that gets written. Default is dist/name.apk 
-p,--frame-path <dir> Uses framework files located in <dir>. 

For additional info, see: http://ibotpeaches.github.io/Apktool/ 
For smali/baksmali info, see: https://github.com/JesusFreke/smali 
Roberts-MBP:apktool Robert$ **./apktool d metronome.apk** 
-bash: ./apktool: No such file or directory 
Roberts-MBP:apktool Robert$ **apktool d metronome.apk** 
-bash: apktool: command not found 
Roberts-MBP:apktool Robert$ 

你可以用粗體看到我輸入的內容。在第二和第三個大膽的陳述中,我做了兩種方法,因爲我發現信息其中一個在Windows上工作,另一個在Mac上,而且由於mac沒有工作,我想嘗試一個窗口來看看它會說什麼。這兩個文件都與apk文件位於同一目錄(metronome.apk)有誰知道爲什麼這不起作用,我能做些什麼來解決它?

感謝。 羅伯特

+0

嘗試'java -jar apktool.jar d metronome.apk' –

+0

太棒了!這工作。 – Rob26br

+0

如果您願意,請回答。 SO對回答問題的評論感到不滿。 –

回答

1

嘗試java -jar apktool.jar d metronome.apk

要細說,apktool.jar不是命令本身。這是一個Java Jar文件,可以由Java運行時執行。