LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

apktool

Reverse engineer Android APK files

TLDR

Decode (decompile) an APK
$ apktool d [app.apk]
copy
Decode to specific directory
$ apktool d [app.apk] -o [output_dir]
copy
Build (recompile) an APK
$ apktool b [decoded_dir]
copy
Build with output name
$ apktool b [decoded_dir] -o [output.apk]
copy
Decode without resources
$ apktool d [app.apk] -r
copy
Decode without sources
$ apktool d [app.apk] -s
copy

SYNOPSIS

apktool d|b [options] apk|dir

DESCRIPTION

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.

PARAMETERS

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

CONFIGURATION

~/.local/share/apktool/framework/

Directory for stored framework files used during decoding and rebuilding.

INSTALL

sudo apt install apktool
copy
brew install apktool
copy
nix profile install nixpkgs#apktool
copy

CAVEATS

Rebuilt APKs must be signed before installation. Some protection schemes may prevent successful decoding. Resource decoding may fail for heavily modified framework.

HISTORY

apktool was created by Brut.all (Connor Tumbleson maintains the fork) and first released around 2010. It became the standard tool for Android APK reverse engineering.

SEE ALSO

apksigner(1), jadx(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid