Android aapt Tool 学习

1. aapt dump badging XXX.apk

C:\Users\beijing_zbs>aapt dump badging C:\Users\baosenzhang\Desktop\DeviceinfoV1.0.apk
回车后输出信息如下:
package: name='com.example.deviceinfo' versionCode='1' versionName='1.0'
sdkVersion:'8'
targetSdkVersion:'17'
application-label:'Deviceinfo'
application-icon-160:'res/drawable-mdpi/ic_launcher.png'
application-icon-240:'res/drawable-hdpi/ic_launcher.png'
application-icon-320:'res/drawable-xhdpi/ic_launcher.png'
application-icon-480:'res/drawable-xxhdpi/ic_launcher.png'
application: label='Deviceinfo' icon='res/drawable-mdpi/ic_launcher.png'
application-debuggable
launchable-activity: name='com.example.deviceinfo.MainActivity'  label='Devicein
fo' icon=''
uses-permission:'android.permission.READ_PHONE_STATE'
uses-permission:'android.permission.ACCESS_NETWORK_STATE'
uses-permission:'android.permission.ACCESS_WIFI_STATE'
uses-permission:'android.permission.INTERNET'
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission:'android.permission.MOUNT_UNMOUNT_FILESYSTEMS'
uses-permission:'android.permission.READ_LOGS'
uses-permission:'android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE','requested WR
ITE_EXTERNAL_STORAGE'
uses-feature:'android.hardware.wifi'
uses-implied-feature:'android.hardware.wifi','requested android.permission.ACCES
S_WIFI_STATE, android.permission.CHANGE_WIFI_STATE, or android.permission.CHANGE
_WIFI_MULTICAST_STATE permission'
uses-feature:'android.hardware.touchscreen'
uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch
 screen unless explicitly made optional'
main
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160' '240' '320' '480'

C:\Users\beijing_zbs>

2. aapt l -v xxxx.apk   如果采用-v选项,会将所有文件的详细信息打印出来

Archive:  C:\Users\beijing_zbs\Desktop\HelloWorld-release.apk
 Length   Method    Size  Ratio   Offset      Date  Time  CRC-32    Name
--------  ------  ------- -----  -------      ----  ----  ------    ----
    1964  Deflate     750  62%         0  03-31-15 21:08  48317901  AndroidManifest.xml
    5964  Stored     5964   0%       819  03-31-15 21:08  f248df62  res/drawable-hdpi-v4/ic_launcher.png
    3112  Stored     3112   0%      6852  03-31-15 21:08  6a84dfd9  res/drawable-mdpi-v4/ic_launcher.png
    9355  Stored     9355   0%     10032  03-31-15 21:08  a227fc8a  res/drawable-xhdpi-v4/ic_launcher.png
   17889  Stored    17889   0%     19455  03-31-15 21:08  2a4a99d1  res/drawable-xxhdpi-v4/ic_launcher.png
     480  Deflate     246  49%     37413  03-31-15 21:08  3f94929e  res/layout/activity_main.xml
    1384  Stored     1384   0%     37733  03-31-15 21:08  3d72f876  resources.arsc
 1119500  Deflate  457394  59%     39164  03-31-15 21:08  fb448954  classes.dex
     695  Deflate     372  46%    496615  03-31-15 21:08  db2d91e0  META-INF/MANIFEST.MF
     748  Deflate     403  46%    497053  03-31-15 21:08  bff6faf8  META-INF/CERT.SF
     955  Deflate     654  32%    497518  03-31-15 21:08  7f96ff53  META-INF/CERT.RSA
--------          -------  ---                            -------
 1162046           497523  57%                            11 files

3. aapt l -a xxxx.apk    如果采用-a选项,会在上述文件列表之后,打印出android使用的符号表



你可能感兴趣的:(Android aapt Tool 学习)