Android SDK aapt工具常用命令语句
2015-04-23 11:57
344 查看
aapt即Android Asset Packaging Tool,在SDK的build-tools目录下。该工具可以查看,创建, 更新ZIP格式的文档附件(zip, jar, apk)。也可将资源文件编译成二进制文件,尽管你可能没有直接使用过aapt工具,但是build
scripts和IDE插件会使用这个工具打包apk文件构成一个Android
应用程序。在使用aapt之前需要在环境变量里面配置SDK-tools路径,或者是路径+aapt的方式进入aapt。
aapt l[ist]:列出资源压缩包里的内容。
aapt d[ump]:查看APK包内指定的内容。
aapt p[ackage]:打包生成资源压缩包。
aapt r[emove]:从压缩包中删除指定文件。
aapt a[dd]:向压缩包中添加指定文件。
aapt v[ersion]:打印aapt的版本。
下面举例介绍几个常见用于APK文件操作的命令语句:
1.
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.
xmlstrings Print the strings of the given compiled xml assets.
例如查看apk压缩文件中AndroidManifest.xml内容:
回车运行:
当AndroidManifest.xml输出内容过多时,可以使用重定向符号">"将所有信息写到指定的一个文件如AndroidManifest.txt里面:
scripts和IDE插件会使用这个工具打包apk文件构成一个Android
应用程序。在使用aapt之前需要在环境变量里面配置SDK-tools路径,或者是路径+aapt的方式进入aapt。
aapt l[ist]:列出资源压缩包里的内容。
aapt d[ump]:查看APK包内指定的内容。
aapt p[ackage]:打包生成资源压缩包。
aapt r[emove]:从压缩包中删除指定文件。
aapt a[dd]:向压缩包中添加指定文件。
aapt v[ersion]:打印aapt的版本。
下面举例介绍几个常见用于APK文件操作的命令语句:
1.
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.
xmlstrings Print the strings of the given compiled xml assets.
例如查看apk压缩文件中AndroidManifest.xml内容:
回车运行:
当AndroidManifest.xml输出内容过多时,可以使用重定向符号">"将所有信息写到指定的一个文件如AndroidManifest.txt里面:
相关文章推荐
- Android 常用工具命令
- 常用的ubuntu第三方工具及android命令
- Android常用命令及工具
- 【【【常用的ubuntu第三方工具及android命令(自存档)】】】
- 【【【常用的ubuntu第三方工具及android命令(自存档)】】】
- Android常用命令(android-sdk-windows\platform-tools下面有)
- Android常用调试命令、工具汇总 (一)命令篇
- 【【【常用的ubuntu第三方工具及android命令(自存档)】】】二
- android 常用的命令和工具
- Android技术知识分享第一弹——SDK中常用命令
- Android-SDK-For-Linux常用命令
- Android 下 一些常用工具命令
- Android SDK开发常用工具的使用及其异常处理
- android —— studio及eclipse工具使用记录及sdk,build-tools,gradle介绍,adb命令
- Android通过aapt命令获取apk详细信息(包括:文件包名,版本号,SDK等信息)
- Android aapt命令介绍及常用命令实践
- 常用开发工具镜像,不用翻墙,即可下载Chrome Android Studio Gradle Golang NDK SDK NodeJS
- Android 系统提供的常用命令工具
- Android自定义View—常用工具(二)
- shell 常用命令语句