Android aapt command introduction and common command practice

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.

    aapt dump badging

  • permissions

    Print the permissions from the APK. Print the permissions information declared in the APK.

    aapt dump permissions

  • **resources **

    Print the resource table from the APK.

    aapt dump resources

  • configurations

    Print the configurations in the APK. Print the configurations in the APK.

    aapt dump configurations

  • xmltree

    Print the compiled xmls in the given assets. Print the specified xml file of the specified apk.

    aapt dump configurations

  • xmlstrings

    Print the strings of the given compiled xml assets. Print all string information in the xml file

    aapt dump xmlstrings

aapt l[ist] [-v] [-a] file.{zip,jar,apk}

List contents of Zip-compatible archive. List archive directories

  • aapt list <file.apk>

    aapt list

  • aapt list -v <file.apk>

    The directory will be output in the form of a table

    aapt list -v

  • 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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325545462&siteId=291194637