最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】mac中安装最新版本的安卓反编译工具:Apktool

Mac crifan 1408浏览 0评论
折腾:
【已解决】尝试破解小花生app安卓apk希望看到api返回的json中的J的解密算法得到明文
期间,先要去mac中安装最新版本的Apktool。
还是继续参考官网:
Apktool – A tool for reverse engineering 3rd party, closed, binary Android apps.
“A tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications. It also makes working with an app easier because of the project like file structure and automation of some repetitive tasks like building apk, etc.
It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms, analyzing applications and much more.”
Apktool – How to Install
去安装:
➜  ~ java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)
是java 1.8
然后再去下载
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/osx/apktool
下载:apktool-2
iBotPeaches / Apktool / Downloads — Bitbucket
-》https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.0.jar
-》
apktool_2.4.0.jar
重命名为:apktool.jar
把:
  • apktool
  • apktool.jar
移动到:
/usr/local/bin
里:
➜  reverse engineering ll
total 65520
-rw-r--r--@ 1 crifan  staff   2.3K  3 14 11:26 apktool
-rw-r--r--@ 1 crifan  staff    16M  3 14 11:29 apktool.jar
-rw-r--r--@ 1 crifan  staff    16M  3 14 11:29 apktool_2.4.0.jar
➜  reverse engineering cp apktool apktool.jar /usr/local/bin
➜  reverse engineering ll /usr/local/bin/apk*
-rw-r--r--@ 1 crifan  admin   2.3K  3 14 11:31 /usr/local/bin/apktool
-rw-r--r--@ 1 crifan  admin    16M  3 14 11:31 /usr/local/bin/apktool.jar
设置可执行权限:
➜  reverse engineering chmod +x /usr/local/bin/apk*
➜  reverse engineering ll /usr/local/bin/apk*
-rwxr-xr-x@ 1 crifan  admin   2.3K  3 14 11:31 /usr/local/bin/apktool
-rwxr-xr-x@ 1 crifan  admin    16M  3 14 11:31 /usr/local/bin/apktool.jar
去终端中运行apktool试试
➜  reverse engineering which apktool
/usr/local/bin/apktool
➜  reverse engineering apktool
Apktool v2.4.0 - a tool for reengineering Android apk files
with smali v2.2.6 and baksmali v2.2.6
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
➜  reverse engineering apktool --version
2.4.0
注:
上面的apktool脚本,其实是可选非必须的,其目的是省去每次都输入:
java -jar apktool.jar
才能调用到apktool.jar,比较方便些。
再去看看高级用法:
➜  reverse engineering apktool --advanced
Apktool v2.4.0 - a tool for reengineering Android apk files
with smali v2.2.6 and baksmali v2.2.6
Copyright 2014 Ryszard Wiśniewski <
[email protected]
>
Updated by Connor Tumbleson <
[email protected]
>
Apache License 2.0 (
http://www.apache.org/licenses/LICENSE-2.0
)

usage: apktool [-q|--quiet OR -v|--verbose]
 -advance,--advanced   prints advance information.
 -version,--version    prints the version then exits
usage: apktool [-q|--quiet OR -v|--verbose] if|install-framework [options] <framework.apk>
 -p,--frame-path <dir>   Stores framework files into <dir>.
 -t,--tag <tag>          Tag frameworks using <tag>.
usage: apktool [-q|--quiet OR -v|--verbose] d[ecode] [options] <file_apk>
 -api,--api-level <API>   The numeric api-level of the file to generate, e.g. 14 for ICS.
 -b,--no-debug-info       don't write out debug info (.local, .param, .line, etc.)
 -f,--force               Force delete destination directory.
    --force-manifest      Decode the APK's compiled manifest, even if decoding of resources is set to "false".
 -k,--keep-broken-res     Use if there was an error and some resources were dropped, e.g.
                          "Invalid config flags detected. Dropping resources", but you
                          want to decode them anyway, even with errors. You will have to
                          fix them manually before building.
 -m,--match-original      Keeps files to closest to original as possible. Prevents rebuild.
    --no-assets           Do not decode assets.
 -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 [-q|--quiet OR -v|--verbose] b[uild] [options] <app_path>
 -a,--aapt <loc>         Loads aapt from specified location.
 -c,--copy-original      Copies original AndroidManifest.xml and META-INF. See project page for more info.
 -d,--debug              Sets android:debuggable to "true" in the APK's compiled manifest
 -f,--force-all          Skip changes detection and build all files.
 -nc,--no-crunch         Disable crunching of resource files during the build step.
 -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>.
    --use-aapt2          Upgrades apktool to use experimental aapt2 binary.
usage: apktool [-q|--quiet OR -v|--verbose] publicize-resources <file_path>

usage: apktool [-q|--quiet OR -v|--verbose] empty-framework-dir [options]
 -f,--force              Force delete destination directory.
 -p,--frame-path <dir>   Stores framework files into <dir>.

For additional info, see: 
http://ibotpeaches.github.io/Apktool/
For smali/baksmali info, see: 
https://github.com/JesusFreke/smali
【总结】
参考官网:
Apktool – How to Install
去:

转载请注明:在路上 » 【已解决】mac中安装最新版本的安卓反编译工具:Apktool

发表我的评论
取消评论

表情

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

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
85 queries in 0.314 seconds, using 22.08MB memory