zoukankan      html  css  js  c++  java
  • Android--aapt命令

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

    释义:列出压缩文件中的内容

      aapt l xxx.apk:简单的罗列压缩文件中每一项的内容

      aapt l -v xxx.apk:较详细输出内容  

      aapt l -a xxx.apk:详细输出压缩文件中所有目录的内容

    2.aapt d[ump] [--values] [--include-meta-data] xxx.apk

    释义:通过参数配置可以dump apk中各种详细信息

    Example:aapt dump badging xxx.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

    3.aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifext.xml]

    释义:

    Package the android resources. It will read assets and resources that are supplied with the -M -A -S or raw-files-dir arguments. The -J -P -F and -R options control which files are output.
    • -d:包括一个或多个设备资源,由逗号分隔;
    • -f:覆盖现有的文件命令,加上后编译生成直接覆盖目前已经存在的R.java;
    • -m:使生成的包的目录放在-J参数指定的目录;
    • -u:更新现有的包 u = update;
    • -v:详细输出,加上此命令会在控制台输出每一个资源文件信息,R.java生成后还有注释。
    • -x:创建扩展资源ID;
    • -z:需要本地化的资源属性标记定位。
    • -M:AndroidManifest.xml的路径
    • -0:指定一个额外的扩展. apk文件将不会存储压缩
    • -g:制定像素迫使图形的灰度
    • -j:指定包含一个jar或zip文件包,这个命令很特别
    • –debug-mode:指定的是调试模式下的编译资源;
    • –min-sdk-versopm VAL:最小SDK版本 如是7以上 则默认编译资源的格式是 utf-8
    • –target-sdk-version VAL:在androidMainfest中的目标编译SDK版本
    • –app-version VAL:应用程序版本号
    • –app-version-name TEXT:应该程序版本名字;
    • –custom-package VAL:生成R.java到一个不同的包
    • –rename-mainifest-package PACKAGE:修改APK包名的选项;
    • –rename-instrumentation-target-package PACKAGE:重写指定包名的选项;
    • –utf16:资源编码修改为更改默认utf – 16编码;
    • –auto-add-overlay:自动添加资源覆盖
    • –max-res-version:最大资源版本
    • -I:指定的SDK版本中android.jar的路径
    • -A:assert文件夹的路径
    • -G:一个文件输出混淆器选项,后面加文件逗号隔开.
    • -P:指定的输出公共资源,可以指定一个文件 让资源ID输出到那上面;
    • -S:指定资源目录 一般是 res
    • -F:指定把资源输出到 apk文件中
    • -J:指定R.java输出的路径
    • raw-file-dir:附加打包进APK的文件
    4. aapt r[emove] [-v] xxx.apk file1 [file2 ...]
    释义:Delete specified files from Zip-compatible archive
     
    5. aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
    释义:Add specified files to Zip-compatible archive.
     

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

    释义:Do PNG preprocessing on one or several resource folders and store the results in the output folder.

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

    释义:Do PNG preprocessing on a single file

      

  • 相关阅读:
    【EXCEL】乱数関数集合
    PHP 获取当前时间前52周 12个月 4个季度
    python 清理没有过期时间的redis
    yii2 使用mongo查询(包含like查询)
    crontab 时间详解
    安装 cronsun
    php的加密&解密 (压缩数据) gzcompress & gzuncompress
    三数之和
    贪心算法解决集合覆盖问题
    KMP算法实现字符串匹配
  • 原文地址:https://www.cnblogs.com/fqfanqi/p/10090445.html
Copyright © 2011-2022 走看看