美文网首页
aapt相关用法

aapt相关用法

作者: 喵叮当 | 来源:发表于2018-04-24 16:01 被阅读0次

AAPT

AAPT全称,Android Asset Packaging Tool。开发者可以在Android SDK的build-tools目录下找到这个工具。


aapt_dir.png

AAPT使用

  1. 列举apk内容文件
     ./aapt l[ist] <APK PATH>
    
    利用上面的指令,可以列举出apk中的所有内容
    可以使用重定向符“>”讲内容输出到指定的文件中
    ./aapt l[ist] <APK PATH> > <DEST PATH>
    
  2. 查看指定文件信息
    ./aapt d[ump] [--values]<APK PATH>
    
    values的取值可以分为以下几类
    • strings Print the contents of the resource table string pool in the APK.
    • badging Print the label and icon for the app declared in APK.
    • permissions Print the permissions from the APK.
    • resources Print the resource table from the APK.
    • configurations Print the configurations in the APK.
    • xmltree Print the compiled xmls in the given assets.
    • xmlstrings Print the strings of the given compiled xml assets.
      xmltree和xmlstrings 两个参数在apk后面要写出具体的xml文件的路径
    ./aapt d badging app-debug.apk|grep package
    

相关文章

网友评论

      本文标题:aapt相关用法

      本文链接:https://www.haomeiwen.com/subject/joljlftx.html