summaryrefslogtreecommitdiff
path: root/tools/aapt/Command.cpp
AgeCommit message (Collapse)Author
2014-08-29Change platformBuildVersionCode to name in aapt dump badgingAdam Lesinski
Change-Id: Ie3972105b3f6a727682f91851f7a99b05bb28e1a
2014-08-27Stamp platform version code into app ApksAdam Lesinski
The versionCode of theframework resources that an app is built against gets stamped inside an app's AndroidManifest.xml in the <manifest> tag as "platformBuildVersionCode" and "platformBuildVersionName" attributes. Bug:17207635 Change-Id: Id573c3dffcbca38eec9c0eb3e89f4a547e3361d3
2014-08-25Have R classes generate their own reference rewrite logicAdam Lesinski
Change-Id: I0e5b8311fc3479d966a49f9acf0d4c32a6a024d3
2014-08-22AAPT: Dump installLocation in badgingAdam Lesinski
Bug:17033144 Change-Id: I87dea9af47eef8bcba1465df9b49e355ac6346ec
2014-08-18Include build number in aapt versionAdam Lesinski
Teams are constantly confused over which version of aapt they are running. Include the build number from the Android build system in the binary. Can be retrieved by executing 'aapt version'. Change-Id: I9165c7d01f977344e143c2cb4dd963310ab28b72
2014-08-18Revert "Include build number in aapt version"Adam Lesinski
This reverts commit a7ce555ee82ed91345a54ee171dc9a415b65e134. Change-Id: I1018747766963e75bec11ddb01ba6d138f133959
2014-08-18Include build number in aapt versionAdam Lesinski
Teams are constantly confused over which version of aapt they are running. Include the build number from the Android build system in the binary. Can be retrieved by executing 'aapt version'. Change-Id: Ie4692fb160c7cbe720a8e76b73e435170214fe0e
2014-08-15AAPT: Output only 64-bit arch when multiArch is trueAdam Lesinski
When android:multiArch="true" in the <application> tag, aapt dump badging should only output the 64-bit architecture under the 'native-code' entry. Other architectures will be emitted under the 'alt-native-code' entry. Bug:17061929 Change-Id: I8310b2388b06a2ed571e5e121e4989403082ba68
2014-08-15Merge "Add FeatureGroup to PackageInfo" into lmp-devAdam Lesinski
2014-08-15Add FeatureGroup to PackageInfoAdam Lesinski
FeatureGroups replace top-level FeatureInfo objects. FeatureGroups inherit top-level FeatureInfos but override them if the feature names are the same. Bug:16822121 Change-Id: I80b2cb778a0fbcb4521efce986fba641e0914290
2014-08-15Fix assumption about DynamicRefTable in aaptAdam Lesinski
Packages without any resources should not expect to have a DynamicRefTable. Bug:16895517 Bug:17056720 Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a
2014-08-12AAPT: Dump an APK's split name attributeAdam Lesinski
Bug:16919497 Change-Id: I109e21bff9e4a64a10f48dce7f2d41102b32ee1d
2014-08-04Modify base Configuration used for aapt dump badgingAdam Lesinski
Some apps don't provide defaults when providing icons for different screen sizes, so use a configuration that has a screen size set to NORMAL. Change-Id: If4b9eebd37e5d2e2991301d09ff5c39dd41c1565
2014-07-30Add shared library support to aapt dumpAdam Lesinski
AAPT dump should be able to handle dynamic references that often come with shared library resources. Bug:16678251 Change-Id: I6c8cd943145aab20ca9db9694c8c433b3c64279b
2014-07-25Have AEP GL feature depend on GLES 3.1 in badgingAdam Lesinski
AAPT dump badging should output the uses-gl-es tag with a version of 3.1 when android.hardware.opengles.aep is declared as a feature. Change-Id: I8affc6dad574c8303c6ba9810ad8e6e205ea9506
2014-07-23Add <feature-group> tag and change aapt badgingAdam Lesinski
A <feature-group> represents a set of features required for an app to be compatible with a device. Multiple <feature-group> elements represent a logical 'or' of required features. Features defined in the old way with <uses-feature> tags under the <manifest> tag are automatically added to each feature-group defined. Defining a <feature-group> means that any default features are not included (such as android.hardware.touchscreen) and declared permissions do not imply any features. Change-Id: I45626f0fdc546e47bcf2aead7ef05ebcca12b023
2014-06-27Add a BIND_DREAM_SERVICE signature-level permission.John Spurlock
Starting in api 21, will be required to bind to a declared dream or doze service. Also added to aapt dump badging output. Bug:15862654 Change-Id: Ifa0a594eeecf21e6146176c7810a847e1d08fe3b
2014-06-24Dump more info about behaviors an APK offersAdam Lesinski
Behaviors include things like print services, custom launchers, camera apps, etc. Bug:13748429 Change-Id: I9fb83bac95b1be61fc630c1e74daf0f4a8b9b27f
2014-05-19Don't dump data from a bad ResTableAdam Lesinski
AAPT dumps data from a bad ResTable, which causes crashes. Prevent this by checking if there were errors when creating the ResTable. Bug:14902008 Change-Id: I5e04ebf967c60b78c511dd175785a13bca52f09a
2014-05-15Merge "AAPT dump badging should allow refs in meta-data"Adam Lesinski
2014-05-15AAPT dump badging should allow refs in meta-dataAdam Lesinski
The framework allows references in the <meta-data> element in an AndroidManifest.xml, so badging should do the same. Bug:14088271 Change-Id: Ia8157655e21adaf11b7ace90a98a9cca3c8a476c
2014-05-15Merge "Fix crash in AAPT dump badging with bad StringPool"Adam Lesinski
2014-05-15Fix crash in AAPT dump badging with bad StringPoolAdam Lesinski
With a malformed StringPool, AAPT dump badging would crash trying to retrieve the name of an XML tag. Bug:14658555 Change-Id: I6aa6c53c60b20725a461da2d3a39685c174b4d35
2014-05-13Quick fix to ensure mipmap doesn't get stripped by AAPTAdam Lesinski
This is a quick fix. A refactoring is already underway to properly solve this problem. Bug:14857725 Change-Id: Ic0c475aa0b180803a687904ad9f71eb87e137a25
2014-05-11Add support for building split APKsAdam Lesinski
Build multiple APKs, each containing a disjoint subset of configurations. These can then be loaded into the device AssetManager and should operate as if they were never split. Use the idea of building multiple sets of files, where each set represents an APK. An ApkBuilder can place files in a set based on its configuration, but you can actually add directly to a set, in the case of the resources.arsc and generated AndroidManifest.xml for splits. Change-Id: Ic65d3f0ac1bbd290185695b9971d425c85ab1de3
2014-04-18resolved conflicts for merge of 56ca8219 to masterElliott Hughes
Change-Id: I62f5804a5c4404eedce09188cda2e3b1bb990b36
2014-04-18resolved conflicts for merge of ec42199a to klp-modular-dev-plus-aospElliott Hughes
Change-Id: I9ecd5d51be4d073ab93dbb0bd60097735e76bf94
2014-04-09Pseudolocalizer improvements.Anton Krumin
Fixes accented pseudolocalization and adds RTL pseudolocale. This change contains following modifications in the pseudolocalization logic: 1) zz_ZZ pseudolocale was removed; 2) en_XA pseudolocale was added for pseudo-accented; 3) ar_XB pseudolocale was added for pseudo-rtl; 4) Pseudo RTL localization functionality was implemented; 5) Text expansion functionality was implemented; 6) Text bracketing was implemented; 7) Couple of issues of previous implementation were fixed. Change-Id: I9f7f27bed717e39e82717d15c398decffc8bec3c Signed-off-by: Anton Krumin <antkrumin@google.com>
2014-03-07resolved conflicts for merge of a81ee86b to masterTim Kilbourn
Change-Id: I7be3a64261d2405eda55b43c02b47657f393c095
2014-03-08am b559b371: Merge "Dump leanback info in aapt dump badging." into ↵Tim Kilbourn
klp-modular-dev * commit 'b559b37150d24411f0b5ef102ced8d5acf858a0e': Dump leanback info in aapt dump badging.
2014-03-07Dump leanback info in aapt dump badging.Tim Kilbourn
Leanback launcher activities are reported, including the banner. Change-Id: Ifa496736ad3ba4239ec95e166768af895ff4dc53
2014-02-17am 28879bbf: am be57fca4: Merge "Extended locales in AAPT / AssetManager."Narayan Kamath
* commit '28879bbfe89dc4bf2067a7183975ecffb82f68e6': Extended locales in AAPT / AssetManager.
2014-02-14Extended locales in AAPT / AssetManager.Narayan Kamath
Support 3 letter language codes, script codes & variants. The bulk of the changes are related to the implementation of command line filtering of locales etc. The previous code assumed that the value of each "axis" (locale, density, size etc.) could be represented by a 4 byte type. This is no longer the case. This change introduces a new class, AaptLocaleValue which holds a (normalized) locale parsed from a directory name or a filter string. This class takes responsibility for parsing locales as well as writing them to ResTable_config structures, which is their representation in the resource table. This includes minor changes at the java / JNI level for AssetManager. We now call locale.toLanguageTag() to give the native layer a well formed BCP-47 tag. I've removed some duplicated parsing code in AssetManager.cpp and replaced them with functions on ResTable_config. The native getLocales function has been changed to return well formed BCP-47 locales as well, so that the corresponding java function can use Locale.forLanguageTag to construct a Locale object out of it. Finally, this change introduces default and copy constructors for ResTable_config to prevent having to memset() the associated memory to 0 on every stack allocation. (cherry-picked from commit 91447d88f2bdf9c2bf8d1a53570efef6172fba74) Change-Id: I1b43086860661012f949fb8e5deb7df44519b854
2014-02-10Extended locales in AAPT / AssetManager.Narayan Kamath
Support 3 letter language codes, script codes & variants. The bulk of the changes are related to the implementation of command line filtering of locales etc. The previous code assumed that the value of each "axis" (locale, density, size etc.) could be represented by a 4 byte type. This is no longer the case. This change introduces a new class, AaptLocaleValue which holds a (normalized) locale parsed from a directory name or a filter string. This class takes responsibility for parsing locales as well as writing them to ResTable_config structures, which is their representation in the resource table. This includes minor changes at the java / JNI level for AssetManager. We now call locale.toLanguageTag() to give the native layer a well formed BCP-47 tag. I've removed some duplicated parsing code in AssetManager.cpp and replaced them with functions on ResTable_config. The native getLocales function has been changed to return well formed BCP-47 locales as well, so that the corresponding java function can use Locale.forLanguageTag to construct a Locale object out of it. Finally, this change introduces default and copy constructors for ResTable_config to prevent having to memset() the associated memory to 0 on every stack allocation. Change-Id: I899a56a9a182ee6be52b9389d1ae59266f5482e9
2014-02-04resolved conflicts for merge of 1b5b60d6 to masterAdam Lesinski
Change-Id: I2b713a55fcdf02c01afa99f175bf14248f210460
2014-02-04Merge "Add support for multiple asset dirs (-A)" into klp-modular-devAdam Lesinski
2014-01-27AssetManager cookies are now int32_t, not void*.Narayan Kamath
Change-Id: Id383e31922ca81c52dad52d422c5c1ab1a1365ce
2014-01-27Dump maxSdk of uses-permission during badgingAdam Lesinski
If the manifest specifies a maxSdkVersion for which to stop granting a certain permission, output that value when dumping badging. bug:11630700 Change-Id: I922a3186340383828e1af3ce0815efb407d9d535
2014-01-27Escape strings that are output by aapt dump badgingMaurice Chu
Also, changed getComponentName() to output a String8 object instead of a const char * because the const char * is an internal buffer of a String8 object which gets immediately destroyed after returning from getComponentName(). Bug: 11329761 Change-Id: Ic459dec0ad3b20162c36de0ee492bcc022863b12
2014-01-27Fix aapt when outputting meta-data tag valuesMaurice Chu
This fixes outputting string as well as not crashing when the <meta-data> element has an "android:resource" attribute instead of an "android:value" attribute. Bug: 11255844 Change-Id: Iadb62b5dcb18ea3db8dbd2ba3241f489606d535d
2014-01-27resolved conflicts for merge of 0c923b7c to masterAdam Lesinski
Change-Id: I4f314b48c7714706329509d931d2c53079f5e248
2014-01-27resolved conflicts for merge of 5223a5ff to masterAdam Lesinski
Change-Id: I6523e4b7df88f21fbe0ecd3ab8f493e5a9867305
2014-01-27Add support for supports-input element to aaptMichael Wright
Change-Id: Ie8c8c44f126383c351f2ebb9ae7c3694fb0a9b16
2014-01-27Revert "Move frameworks/base/tools/ to frameworks/tools/"Adam Lesinski
This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
2014-01-27AssetManager cookies should be int32_t and not void*.Narayan Kamath
Cookies are really indices into vectors and arrays, so they don't need to be void*. We choose int32_t instead of size_t to allow their width to be well specified. (cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7) (cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215) (cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd) Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
2014-01-23Add support for multiple asset dirs (-A)Adam Lesinski
Bug: 12608034 Change-Id: I02c5a1a73b83498d799570428cca3dd914f8ac11
2013-09-27Add badging of Payment appsAdam Lesinski
HCE apps that declare themselves as payment apps will receive that badge when running aapt dump badging. bug:10899864 Change-Id: I7c095214412465ad7a925285d6167e12de16b600
2013-09-27Add support for dumping new badgingAdam Lesinski
APKs with AccessibilityServices, PrintServices, and or DeviceAdmin will have those services dumped when running 'aapt dump badging'. bug:10899864 Change-Id: I9c1f1f36c397b128dca802510368573a54977459
2013-09-05Added support for supports-input manifest elementMichael Wright
Change-Id: Ifa7c87908081585c1940b5a47fdf5138a287d9ea
2013-08-28Move frameworks/base/tools/ to frameworks/tools/Mike Lockwood
Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8