最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【已解决】Mac中更新apktool为最新版2.5.0

apk crifan 159浏览 0评论
折腾:
【未解决】Mac中用apktool破解反编译安卓apk:adcWallet_release_v2.2.4.apk
期间,去更新apktool为最新版。
Apktool – A tool for reverse engineering 3rd party, closed, binary Android apps.
Apktool – How to Install
最新版是:2.5.0
此处自己的是:
 crifan@licrifandeMacBook-Pro  ~/dev/dev_root/projects/AdcWalletCrack  apktool --version
2.4.0
 crifan@licrifandeMacBook-Pro  ~/dev/dev_root/projects/AdcWalletCrack  which apktool
/usr/local/bin/apktool
 crifan@licrifandeMacBook-Pro  ~/dev/dev_root/projects/AdcWalletCrack  ll /usr/local/bin/apktool
-rwxr-xr-x@ 1 crifan  admin   2.3K  3 14  2019 /usr/local/bin/apktool
2.4.0
先去升级到最新的2.5.0
iBotPeaches/Apktool: A tool for reverse engineering Android apk files
How to extract source code of an apk using apktool | by Jasjot Singh | Medium
https://ibotpeaches.github.io/Apktool/
iBotPeaches / Apktool / Downloads — Bitbucket
点击下载:
https://bbuseruploads.s3.amazonaws.com/0becf6a1-1706-4f2e-9ae6-891e00a8dd5f/downloads/28d93a5d-b242-41bc-a578-11a4bd6225ba/apktool_2.5.0.jar
核心特点:
  • * Disassembling resources to nearly original form (including resources.arsc, classes.dex, 9.png. and XMLs)
    • 可以反编译为很接近原始格式,正是我们希望的
  • * Rebuilding decoded resources back to binary APK/JAR
    • 而且还能修改后,重新打包,也是我们希望的
  • * Organizing and handling APKs that depend on framework resources
  • * Smali Debugging (Removed in 2.1.0 in favor of IdeaSmali)
  • * Helping with repetitive tasks
下载到的是19M多的jar文件:
apktool_2.5.0.jar
去看看如何安装的:
Apktool – How to Install
  • macOS:
    • 1. Download Mac wrapper script (Right click, Save Link As apktool)
    • 2. Download apktool-2 (find newest here)
    • 3. Rename downloaded jar to apktool.jar
    • 4. Move both files (apktool.jar & apktool) to /usr/local/bin (root needed)
    • 5. Make sure both files are executable (chmod +x)
    • 6. Try running apktool via cli
macOS下载一个wrapper:
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/osx/apktool
然后才看懂,之前在:
 ll /usr/local/bin/apktool
-rwxr-xr-x@ 1 crifan  admin   2.3K  3 14  2019 /usr/local/bin/apktool
/usr/local/binapktool是2.3KB,原来是wrapper
另外,也看到,其实brew可以安装,不过不是最新版:
 brew info apktool
apktool: stable 2.4.1
Tool for reverse engineering 3rd party, closed, binary Android apps
Not installed
From: 
https://mirrors.ustc.edu.cn/homebrew-core.git/Formula/apktool.rb
==> Analytics
install: 4,295 (30 days), 8,942 (90 days), 30,889 (365 days)
install-on-request: 4,274 (30 days), 8,897 (90 days), 30,482 (365 days)
build-error: 0 (30 days)
但是版本是2.4.1,也还算新的了。
注:其实可以不用wrapper,也可以直接用:
java -jar apktool.jar
启动的。
另外,此处java是大于8.0版本的:
  java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
把apktool的wrapper和apktool.jar加上可执行权限,拷贝到/usr/local/bin/
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  ll
total 76880
-rw-r--r--@ 1 crifan  staff   2.3K 12 13 21:24 apktool
-rw-r--r--@ 1 crifan  staff    18M 12 13 21:31 apktool.jar
-rw-r--r--@ 1 crifan  staff    18M 12 13 21:31 apktool_2.5.0.jar
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  chmod ugo+x apktool
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  chmod ugo+x apktool.jar
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  ll
total 76880
-rwxr-xr-x@ 1 crifan  staff   2.3K 12 13 21:24 apktool
-rwxr-xr-x@ 1 crifan  staff    18M 12 13 21:31 apktool.jar
-rw-r--r--@ 1 crifan  staff    18M 12 13 21:31 apktool_2.5.0.jar
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  cp apktool /usr/local/bin
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  cp apktool.jar /usr/local/bin
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool  ll /usr/local/bin/apktool*
-rwxr-xr-x@ 1 crifan  admin   2.3K 12 13 21:32 /usr/local/bin/apktool
-rwxr-xr-x@ 1 crifan  admin    18M 12 13 21:32 /usr/local/bin/apktool.jar
 crifan@licrifandeMacBook-Pro  ~/dev/dev_tool/android/reverse_engineering/apktool 
即可。
 crifan@licrifandeMacBook-Pro  ~  apktool --version
2.5.0
【总结】
从主页
Apktool – A tool for reverse engineering 3rd party, closed, binary Android apps.
点击右上角的:
Current Version: 2.5.0
自动会下载,得到:
apktool_2.5.0.jar
然后
改名为:
apktool.jar
另外再去下载wrapper script:
保存为:
apktool
然后两者都加上可执行权限:
chmod ugo+x apktool
chmod ugo+x apktool.apk
都拷贝到/usr/local/bin/
cp apktool /usr/local/bin
cp apktool.jar /usr/local/bin
即可。
确认版本:
 apktool --version
2.5.0

转载请注明:在路上 » 【已解决】Mac中更新apktool为最新版2.5.0

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
19 queries in 0.084 seconds, using 9.26MB memory