mmmyddd.freeshell.net/blog/blosxom.cgi/Android/
如何管理cupcake 源码中系统的资源文件, 直接通过AAPT进行管理 Using aaptaapt stands for Android Asset Packaging Tool and is included in the Though you probably won't often use aapt directly, build scripts and IDE plugins can utilize this tool to package the apk file that constitutes an Android application. For more usage details, open a terminal, go to the
进入/home/jack/android/cupcake/out/host/linux-x86/bin目录下 (一),生成资源apk包,由以下命令完成: ./aapt package -z -u -x -M /home/jack/android/cupcake/frameworks/base/core/res/AndroidManifest.xml -S /home/jack/android/cupcake/frameworks/base/core/res/res (二)第二步,为生成的资源包做签名: java -jar /home/jack/android/cupcake/out/host/linux-x86/framework/signapk.jar /home/jack/android/cupcake/build/target/product/security/platform.x509.pem /home/jack/android/cupcake/build/target/product/security/platform.pk8 /home/jack/android/cupcake/out/target/product/generic/obj/APPS/framework-res_intermediates/package.apk.unsigned /home/jack/android/cupcake/out/target/product/generic/obj/APPS/framework-res_intermediates/package.apk.signed (三)第三步,为生成的包做对齐处理: ./zipalign -f 4 /home/jack/android/cupcake/out/target/product/generic/obj/APPS/framework-res_intermediates/package.apk.unaligned /home/jack/android/cupcake/out/target/product/generic/obj/APPS/framework-res_intermediates/package.apk.aligned 命令解释如下 aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] / [-0 extension [-0 extension ...]] / [-g tolerance] / [-j jarfile] / [-I base-package [-I base-package ...]] / [-A asset-source-dir] [-P public-definitions-file] / [-S resource-sources [-S resource-sources ...]] [-F apk-file] [-J R-file-dir] / [raw-files-dir [raw-files-dir] ...] 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. cd /home/jack/eclipse_rcp_wk/HELLLO/bin jar -cvf XX.jar *.* (java jar 打包 xx.jar) zipalign 这个命令? 如此生成的framework-res.apk包可以被用来替换system.img中的资源包。 具体步骤:
|
如何管理cupcake 源码中系统的资源文件,
最新推荐文章于 2021-05-28 14:50:55 发布