Linux command
apktool 命令
文本
Copy it and replace filenames, paths, or keywords as needed.
命令示例
Decode
apktool d [app.apk]
Example
apktool d [app.apk] -o [output_dir]
Build
apktool b [decoded_dir]
Example
apktool b [decoded_dir] -o [output.apk]
Example
apktool d [app.apk] -r
Example
apktool d [app.apk] -s
说明
apktool is a reverse engineering tool for Android APK files. It decodes resources to nearly original form, allowing inspection and modification of manifests, layouts, and other XML resources. It also disassembles Dalvik bytecode to smali. After modifications, apktool can rebuild the APK, which then needs to be signed before installation.
参数
- d, decode
- Decode APK to directory
- b, build
- Build APK from directory
- -o _path_, --output _path_
- Output file/directory
- -r, --no-res
- Don't decode resources
- -s, --no-src
- Don't decode sources (smali)
- -f, --force
- Force overwrite existing files
- --frame-path _dir_
- Framework files directory
- -p _dir_, --frame-path _dir_
- Store/load framework files
- --use-aapt2
- Use aapt2 instead of aapt
FAQ
What is the apktool command used for?
apktool is a reverse engineering tool for Android APK files. It decodes resources to nearly original form, allowing inspection and modification of manifests, layouts, and other XML resources. It also disassembles Dalvik bytecode to smali. After modifications, apktool can rebuild the APK, which then needs to be signed before installation.
How do I run a basic apktool example?
Run `apktool d [app.apk]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does d, decode do in apktool?
Decode APK to directory