win10最新版apktool 反编译
apktool_2.6.0.jar 改成apktool.jar 和apktool.bat放在同一个文件夹,并将此文件夹加入系统变量Path(D:\SoftWare\apktool)
apktool.bat:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | @echo off setlocal set BASENAME=apktool_ chcp 65001 2>nul >nul set java_exe=java.exe if defined JAVA_HOME ( set java_exe= "%JAVA_HOME%\bin\java.exe" ) rem Find the highest version .jar available in the same directory as the script setlocal EnableDelayedExpansion pushd "%~dp0" if exist apktool.jar ( set BASENAME=apktool goto skipversioned ) set max=0 for /f "tokens=1* delims=-_.0" %%A in ( 'dir /b /a-d %BASENAME%*.jar' ) do if %%~B gtr !max! set max=%%~nB :skipversioned popd setlocal DisableDelayedExpansion rem Find out if the commandline is a parameterless .jar or directory, for fast unpack/repack if "%~1" == "" goto load if not "%~2" == "" goto load set ATTR=%~a1 if "%ATTR:~0,1%" == "d" ( rem Directory, rebuild set fastCommand=b ) if "%ATTR:~0,1%" == "-" if "%~x1" == ".apk" ( rem APK file, unpack set fastCommand=d ) :load %java_exe% -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0%BASENAME%%max%.jar" %fastCommand% %* rem Pause when ran non interactively for /f "tokens=2" %%# in ( "%cmdcmdline%" ) do if /i "%%#" equ "/c" pause |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | C:\Users\Administrator>apktool d D:\SoftWare\apktool\xb.apk -o D:\SoftWare\apktool\baz2 I: Using Apktool 2.6.0 on xb.apk I: Loading resource table... I: Decoding AndroidManifest.xml with resources... I: Loading resource table from file: C:\Users\Administrator\AppData\Local\apktool\framework\1.apk I: Regular manifest package... I: Decoding file-resources... I: Decoding values */* XMLs... I: Baksmaling classes.dex... I: Copying assets and libs... I: Copying unknown files... I: Copying original files... I: Copying META-INF/services directory C:\Users\Administrator> |
1 2 | https: //ibotpeaches.github.io/Apktool/install/ https: //ibotpeaches.github.io/Apktool/# |
Apktool 下载、安装和使用
0.1152019.11.09 23:39:21字数 329阅读 5,800
Apktool
简介
- 用于反编译Android apk,可以将应用中的资源提取出来,也可以在修改资源文件后重新打包。
- smali 调试
环境要求
- 安装java 1.8 以上
- 命令行运行 java -version 返回版本大于1.8
- 如果没有,请安装java 1.8
下载与安装
-
重命名下载的apktool_x.x.x.jar,改名为apktool.jar
-
下载脚本并配置
-
命令行中输入 apktool 验证
使用
- 反编译
使用 d 或者 decode 命令
$ apktool d bar.apk
$ apktool decode bar.apk
// 效果一样 反编译 bar.apk 并将其解压到 bar 目录
$ apktool d bar.apk o baz
反编译 bar.apk 并将其解压到 baz 目录
- 重新打包
使用 b 或 build
$ apktool b bar -o new_bar.apk
// 将 bar 目录的资源打包成 new_bar.apk
重新打包生成的 apk 需要签名才能安装
参考
https://www.jianshu.com/p/919a966843c4
##############################################################################################################
Install Instructions
Quick Check
- Is at least Java 1.8 installed?
- Does executing java -version on command line / command prompt return 1.8 or greater?
- If not, please install Java 8+ and make it the default. (Java 7 will also work at this time)
Installation for Apktool
- Windows:
- Download Windows wrapper script (Right click, Save Link As
apktool.bat
) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar
- Move both files (
apktool.jar
&apktool.bat
) to your Windows directory (UsuallyC://Windows
) - If you do not have access to
C://Windows
, you may place the two files anywhere then add that directory to your Environment Variables System PATH variable. - Try running apktool via command prompt
- Download Windows wrapper script (Right click, Save Link As
- Linux:
- Download Linux wrapper script (Right click, Save Link As
apktool
) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar
- Move both files (
apktool.jar
&apktool
) to/usr/local/bin
(root needed) - Make sure both files are executable (
chmod +x
) - Try running apktool via cli
- Download Linux wrapper script (Right click, Save Link As
- macOS:
- Download Mac wrapper script (Right click, Save Link As
apktool
) - Download apktool-2 (find newest here)
- Rename downloaded jar to
apktool.jar
- Move both files (
apktool.jar
&apktool
) to/usr/local/bin
(root needed) - Make sure both files are executable (
chmod +x
) - Try running apktool via cli
Or you can install apktool via Homebrew:
- Install Homebrew as described in this page
- Execute command
brew install apktool
in terminal (no root needed). The latest version will be installed in/usr/local/Cellar/apktool/[version]/
and linked to/usr/local/bin/apktool
. - Try running apktool via cli
- Download Mac wrapper script (Right click, Save Link As
Note - Wrapper scripts are not needed, but helpful so you don’t have to type java -jar apktool.jar over and over.
1 | https: //ibotpeaches.github.io/Apktool/install/ |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
2019-10-25 8086汇编语言入门-HelloWorld
2019-10-25 存储原理
2018-10-25 编程经验
2018-10-25 Vim命令合集
2018-10-25 jni数组操作
2018-10-25 Android jni中数组参数的传递方式
2018-10-25 How to get the size of an Array? [duplicate]