introduction
- A friend wants to check the versionCode information of an existing package and ask in the group. Since it is an existing apk package and only needs the versionCode information in it, the author sends an aapt command:
aapt dump badging <files.apk>
The following is an introduction to the aapt command. Before The author has also introduced some commonly used adb commands: summarize some commonly used Android adb commands , after understanding these commands, it can be more convenient for us to develop and improve the development efficiency. In this article, the author randomly downloaded an app on the Internet as a demonstration.
aapt command list
aapt [dump] [--values] WHAT file.{apk} [asset [asset ...]]
-
badging
Print the label and icon for the app declared in APK.
-
permissions
Print the permissions from the APK. Print the permissions information declared in the APK.
-
**resources **
Print the resource table from the APK.
-
configurations
Print the configurations in the APK. Print the configurations in the APK.
-
xmltree
Print the compiled xmls in the given assets. Print the specified xml file of the specified apk.
-
xmlstrings
Print the strings of the given compiled xml assets. Print all string information in the xml file
aapt l[ist] [-v] [-a] file.{zip,jar,apk}
List contents of Zip-compatible archive. List archive directories
-
aapt list <file.apk>
-
aapt list -v <file.apk>
The directory will be output in the form of a table
-
aapt list -a <file.apk>
Verbose output of the contents of all directories (= aapt list)
Other aapt commands (not commonly used, no demonstration, you can try it yourself if you are interested)
-
aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
Delete specified files from Zip-compatible archive.
-
aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
Add specified files to Zip-compatible archive.
-
aapt v [ersion]
Print program version.