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

简介

  1. 用于反编译Android apk,可以将应用中的资源提取出来,也可以在修改资源文件后重新打包。
  2. smali 调试

环境要求

  1. 安装java 1.8 以上
  2. 命令行运行 java -version 返回版本大于1.8
  3. 如果没有,请安装java 1.8

下载与安装

  1. 下载apktool_x.x.x.jar到本地 官网下载或者 镜像下载

  2. 重命名下载的apktool_x.x.x.jar,改名为apktool.jar

  3. 下载脚本并配置

    1. Windows
      1. 下载Windows 包装程序脚本(右键单击,将链接另存为apktool.bat)
      2. 两个文件放在同一目录,然后将该目录添加到您的环境变量系统PATH变量中
    2. Linux
      1. 下载Linux 包装器脚本(右键单击,将链接另存为apktool)
      2. 将两个文件(apktool.jar&apktool)移动到/usr/local/bin
      3. 确保两个文件都可执行(chmod +x)
    3. Mac OS
      1. 下载Mac 包装器脚本(右键单击,将链接另存为apktool)
      2. 将两个文件(apktool.jar&apktool)移动到/usr/local/bin
      3. 确保两个文件都可执行(chmod +x)
  4. 命令行中输入 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 需要签名才能安装

参考

Apktool

 

https://www.jianshu.com/p/919a966843c4

 

##############################################################################################################

 

Install Instructions

Quick Check

  1. Is at least Java 1.8 installed?
  2. Does executing java -version on command line / command prompt return 1.8 or greater?
  3. If not, please install Java 8+ and make it the default. (Java 7 will also work at this time)

Installation for Apktool

  • Windows:
    1. Download Windows wrapper script (Right click, Save Link As apktool.bat)
    2. Download apktool-2 (find newest here)
    3. Rename downloaded jar to apktool.jar
    4. Move both files (apktool.jar & apktool.bat) to your Windows directory (Usually C://Windows)
    5. 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.
    6. Try running apktool via command prompt
  • Linux:
    1. Download Linux 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:
    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

    Or you can install apktool via Homebrew:

    1. Install Homebrew as described in this page
    2. 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.
    3. Try running apktool via cli

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/
posted @   a318013800  阅读(809)  评论(0编辑  收藏  举报
编辑推荐:
· 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]
点击右上角即可分享
微信分享提示