1. What is aapt
aapt is the Android Asset Packaging Tool, which is located in the build-tools directory of the SDK. This tool can view, create and update file attachments (zip, jar, apk) in ZIP format. You can also compile resource files into binary files. Although you may not have used the aapt tool directly, build scripts and IDE plug-ins will use this tool to package apk files to form an Android application. Before using aapt, you need to configure the sdk-tools path in the environment variable, or enter aapt by path+aapt.
The aapt command can be used to view the apk package name, main activity, version and many other information.
Second, the use of aapt
First, we need to configure the environment variables of aapt, and then we can use the aapt command to view some content.
2.1 View various detailed information of apk package
Use aapt to view packageName, versionCode, applicationLabel, launcherActivity, permission and other detailed information of apk package
aapt dump badging
2.2 View permissions
aapt dump permissions
2.3 View the resource list
aapt dump resources
Generally, a lot of information will be output. To view all of them, please use the following two sentences:
aapt dump resources
This will output all information to the out.txt file through the redirection “>”, and then open the file to view it.
2.4 View apk configuration information
aapt dump configurations
2.5 View the specified apk xml file
aapt dump xmltree