Android aapt 命令 详细解析

aapt即 Android Asset Packaging Tool。该工具在SDK/tools目录下,如果你没有设置环境变量,那需要进入该目录下才能运行aapt命令,如果设置了环境变量则可以在任何目录下运行aapt命令了。

1、列出压缩文件目录

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

参数:

-v:会以table的形式输出目录,table的表目有:Length、Method、Size、Ratio、Date、Time、CRC-32、Name。其中Method表示压缩形式,有Deflate和Stored两种,即该Zip目录采用的算法是压缩模式还是存储模式;Ratio表示压缩率。

-a:会详细输出所有目录的内容。

 

2、查看APK的相关信息

aapt d[ump] [--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.

   resources        Print the resource table from the APK.

   configurations   Print the configurations in the APK.

   xmltree          Print the compiled xmls in the given assets.

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值