What is apktool and how to use it?
Sarah Martinez
Updated on April 03, 2026
Apktool is a utility that can be used for reverse engineering Android applications resources (APK). With the help of Apktool, we can decode APK resources to almost original form; we can modify the source code on the fly and rebuild the decoded resources back to APK.
What should be the default values of apktool’s pkgid?
These values should range from 1 to 30. Any APK that installs itself as 127 is 0x7F which is an internal pkgId. Apktool comes with an internal framework like mentioned above. This file is copied to $HOME/apktool/framework/1.apk during use. Warning Apktool has no knowledge of what version of framework resides there.
What is the pkgid of an APK that is installed?
The number that the framework is named during install corresponds to the pkgId of the application. These values should range from 1 to 30. Any APK that installs itself as 127 is 0x7F which is an internal pkgId. Apktool comes with an internal framework like mentioned above.
What is smalI folder in apktool?
The Smali folder is the important part, Apktool decodes compiled java files in the form of .smali files (Read more on smali here ). This folder appears only if the APK is deodexed (Read more here) else, these files are compressed in a single file with an extension .odex.
What is AOSP framework in apktool?
As you probably know, Android apps utilize code and resources that are found on the Android OS itself. These are known as framework resources and Apktool relies on these to properly decode and build apks. Every Apktool release contains internally the most up to date AOSP framework at the time of the release.
What are framework resources in apktool?
These are known as framework resources and Apktool relies on these to properly decode and build apks. Every Apktool release contains internally the most up to date AOSP framework at the time of the release. This allows you to decode and build most apks without a problem.