SoFunction
Updated on 2025-03-09

Android uses the aapt command to obtain apk details (including: file package name, version number, SDK and other information)

The company's operation and maintenance asked me how to install the emulator on Windows. I said, what are you doing when installing the emulator? He said, I installed the simulator to view the package name of the app to do statistics.

I suddenly thought, is it necessary to make such a struggle?

I then installed the Android SDK for him and ran the command through the file below build-tools to get all the apk information.

aapt command

aapt l[ist] [-v] [-a] file.{zip,jar,apk} List contents of Zip-compatible archive.

aapt d[ump] [--values] [--include-meta-data] WHAT file.{apk} [asset [asset ...]]

* aapt d strings *.apk ---> Printed content resource table string pool APK file.
* aapt d badging *.apk ---> Print labels and icons declared in the APK.
* aapt d permissions *.apk ---> Permissions to print from APK file
* aapt d resources *.apk ---> Print resource table from APK file.
* aapt d configurations *.apk ---> Configuration for APK file printing.
* aapt d xmltree *.apk res/***.xml---> Print xml information in a tree structure.
* aapt d xmlstrings *.apk res/***.xml---> Print all string information in the xml file.

aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M ]

Package android resources. It will read the assets and resources to provide the -m -a -s or raw-files-dir parameters. -j -p -f and -r control the output options of the files.

aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]

Delete the specified file from the Zip-compatible file.

aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]

The specified file is added to the Zip-compatible archive.

aapt c[runch] [-v] -S resource-sources ... -C output-folder ...

PNG preprocesses to one or more resource folders and stores the results in the output folder.

aapt s[ingleCrunch] [-v] -i input-file -o outputfile

PNG preprocessing is done in a single file.

aapt v[ersion]

Print the program version.

The above is what the editor introduced to you about Android to obtain detailed information about apk (including: file package name, version number, SDK, etc.) through the aapt command. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!