summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Bundle.h
Commit message (Collapse)AuthorAgeFilesLines
* Added a daemon mode to aapt to receive streams of commands from gradle.Jerome Dochez2014-10-021-0/+1
| | | | | | | | | | | | | | | | | | | When crunching png, we used to spawn a separate aapt process from java which is slow and resource intensive. Introduced a daemon mode to appt which when invoked with -m parameter will listen from commands on stdin and give report of command execution on stdout. One one command is supported so far : s f1 f2 This command perform a single png crunch, f1 pointing to the input png file to crunch, and f2 pointing to the path for the resulting crunced file. Expected output from the command is "Done" or "Error". Change-Id: Iaf1d865e8d5ee5d36abe39dea6443715865a98d3
* Stamp platform version code into app ApksAdam Lesinski2014-08-271-0/+6
| | | | | | | | | | 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
* Introduce anydpi density resource qualifierAdam Lesinski2014-08-251-0/+1
| | | | | | | | | | This is meant to be used with scaleable vector drawables, and are chosen as the best match unless there is a configuration that matches the density requested exactly. Bug:17007265 Change-Id: Ic3288d0236fe0bff20bb1599aba2582c25b0db32
* AAPT support for feature splitsAdam Lesinski2014-08-041-3/+9
| | | | | | | | | | | | | | | | | | | | | | | This change allows the developer to add a base package for which to build a feature split. The generated resource types will begin after the base APK's defined types so as not to collide or override resources. Multiple features can be generated by first choosing an arbitrary order for the features. Then for each feature, the base APK and any preceding features are specified with the --feature-of flags. So with a base APK 'A' and features, 'B', and 'C', 'B' would be built with aapt package [...] --feature-of A [...] and 'C' would be built with aapt package [...] --feature-of A --feature-of B [...] Change-Id: I1be66e3f8df9a737b21c71f8a93685376c7e6780
* Add support for building split APKsAdam Lesinski2014-05-111-4/+7
| | | | | | | | | | | | | | 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
* resolved conflicts for merge of 56ca8219 to masterElliott Hughes2014-04-181-4/+13
|\ | | | | | | Change-Id: I62f5804a5c4404eedce09188cda2e3b1bb990b36
| * resolved conflicts for merge of ec42199a to klp-modular-dev-plus-aospElliott Hughes2014-04-181-4/+13
| |\ | | | | | | | | | Change-Id: I9ecd5d51be4d073ab93dbb0bd60097735e76bf94
| | * Pseudolocalizer improvements.Anton Krumin2014-04-091-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Shared library resource supportAdam Lesinski2014-03-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shared libraries can now export resources for applications to use. Exporting resources works the same way the framework exports resources, by defining the public symbols in res/values/public.xml. Building a shared library requires aapt to be invoked with the --shared-lib option. Shared libraries will be assigned a package ID of 0x00 at build-time. At runtime, all loaded shared libraries will be assigned a new package ID. Currently, shared libraries should not import other shared libraries, as those dependencies will not be loaded at runtime. At runtime, reflection is used to update the package ID of resource symbols in the shared library's R class file. The package name of the R class file is assumed to be the same as the shared library's package name declared in its manifest. This will be customizable in a future commit. See /tests/SharedLibrary/ for examples of a shared library and its client. Bug:12724178 Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
* | | Add --replace-version flag to aapt.Jeff Davidson2014-02-251-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: we'd like to programmatically specify the version name/code (i.e. to include the build number from the build server). However, this means that we cannot specify version info in the AndroidManifest.xml file, as this takes precedence. Not doing so makes IDE use more difficult, as the IDE gets version code 0 and won't install over an existing non-IDE version unless you first force a downgrade to an IDE build from the command line. This flag allows us to specify a very high version code in the AndroidManifest.xml file, making IDE builds take precedence, while still allowing us to override this info when performing command-line (official) builds. Change-Id: I5d01048698af5c26bdf19066c6cd4eca1115112a
* | | resolved conflicts for merge of 1b5b60d6 to masterAdam Lesinski2014-02-041-4/+3
|\ \ \ | |/ / | | | | | | Change-Id: I2b713a55fcdf02c01afa99f175bf14248f210460
| * | Add support for multiple asset dirs (-A)Adam Lesinski2014-01-231-3/+3
| |/ | | | | | | | | Bug: 12608034 Change-Id: I02c5a1a73b83498d799570428cca3dd914f8ac11
* | Add new aapt flag --error-on-missing-config-entryYing Wang2014-01-271-2/+6
| | | | | | | | | | | | | | | | It forces aapt to return an error if aapt fails to find an resource entry for a configuration. Bug: 11259444 Change-Id: Ie5674a29dff5d4455e7d7c94f6b25560fb1305b7
* | Revert "Move frameworks/base/tools/ to frameworks/tools/"Adam Lesinski2014-01-271-0/+309
| | | | | | | | This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
* | Move frameworks/base/tools/ to frameworks/tools/Mike Lockwood2013-08-281-309/+0
| | | | | | | | Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
* | Modify 'aapt dump badging' to output <meta-data> tagsMaurice Chu2013-08-211-1/+4
|/ | | | | | | | | | | This enables output of <meta-data> tags within the <application> element of the AndroidManifest.xml if the --include-meta-data command line option is invoked. For example, by aapt dump --include-meta-data badging Foo.apk Bug: 10257318 Change-Id: I88da1a14ab21146b64ac947e0eeb1107816acd4d
* Add single crunch command to aapt.Xavier Ducrohet2013-01-021-0/+8
| | | | | | | | | | | | Previously the crunch command would work on a full res folder and output a full res folder (with only the drawables). This was only used in the SDK. The incremental logic is moved to the SDK build system so we change the crunch command (or rather add a new one) to only crunch a single file. Change-Id: I635ee3e871d035b9db2fb593802d914e48241abf
* Add --output-text-symbols option to aapt.Xavier Ducrohet2012-09-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Library projects in the SDK are built using --non-constant-id to generate a temporary R.java class. When the library is packaged with the application to generate an apk, the R class is recreated with the proper IDs due to all the resources coming from the app and all the libraries. However for large apps with many libraries (each with their own R class in their package), this means a lot of unnecessary IDs: all R classes contains all the IDs including for resources from by projects they don't have access through the dependency graph. For really large apps (X,000 resources), with lots of libraries (10+), this can generate tens of thousands of resources, which can trigger dalvik's limit of 65K fields and methods per dex files. This changes lets aapt generate not only the R class but a simple text file containing the list of all those IDs so that it is easier to parse back. The SDK build system will not ask aapt to generate the R class of the libraries (through the --extra-packages option), instead it will then read this file to know what IDs are needed for each library and generate a much smaller R class for each library (using the same text file output from compiling all the resources to get the final integer value). Change-Id: I4db959fec372cf3ead9950e4b2b82fa1ae7eed2d
* Add --error-on-failed-insert option to aapt.Xavier Ducrohet2012-09-111-1/+4
| | | | | | | | | | | | | | | | The new SDK build system give the ability to insert versionCode/Name and min/targetSdkVersion in the manifest but aapt won't replace those if they already exist. The main problem is that aapt doesn't actually fail when it doesn't replace them, making the output not what the developer wanted. This patch set adds an option to aapt to make it return an error if the insert failed because the attribute already existed. Change-Id: I8938ec1238da407a8562c974e9598db39001ffd9
* am 8c71784e: Merge "Initialize mJunkPath to false"Jean-Baptiste Queru2012-06-221-1/+1
|\ | | | | | | | | * commit '8c71784e9e83e914135e996591aa7903edd2fd96': Initialize mJunkPath to false
| * Initialize mJunkPath to falseHaitao Feng2012-06-221-1/+1
| | | | | | | | Change-Id: Ib48bb1d91736d27f055528c3ba275237ff5ada07
* | resolved conflicts for merge of bc2fb7b9 to jb-dev-plus-aospJean-Baptiste Queru2012-05-011-4/+0
|\ \ | |/ | | | | Change-Id: I5386585e473201268c6ed8b05e0a16569d434ea2
| * Build overlay packages just like regular packages.Mårten Kongstad2012-02-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | Previously, building overlay packages required passing aapt its -o flag. This commit decouples the idmap generation code from the effects of the -o flag. Since this commit renders the -o flag obsolete, support for the flag was removed from aapt as well. Change-Id: Ied2e0ab8cb800e49623f0a2044b06cd4935473d5
* | aapt: Preprocess images in parallel.Jeff Brown2012-03-171-4/+4
| | | | | | | | | | | | | | | | | | Currently hardcoded to use up to 4 threads. This change substantially reduces the amount of time spent preprocessing framework resources to just a few seconds. Change-Id: I02fdd283fb529a152aeb22ac87f278779fd77983
* | aapt now sorts the strings in the resource string pool.Dianne Hackborn2012-01-311-1/+16
|/ | | | | | | | | | | In our current environment with very many translations, this can save a lot of RAM -- for example over 200K in Gmail just by sorting the strings in the Gmail .apk (not the framework). Also add a new aapt command to print the contents of the resource table string pool. Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
* New aapt feature to do smarter filtering of configurations.Dianne Hackborn2011-10-161-0/+3
| | | | | | | | | | | | | | | | | | | This adds a --preferred-configurations flag that specifies the specific configurations you would like to have. It is smarter than "-c" because it will avoid stripping a configuration if that would result in there being no value for the resource. It is dumber than "-c" because it can't process as many kinds of resources. It is really only intended for bitmaps and use with density configs. This required re-arranging AaptAssets to group files together by config again, like they used to be. I think this hasn't broken anything. Hopefully. Change-Id: I4e9d12ff6e6dbd1abb8fd4cb1814c6674b19d0e5
* Added Caching for PreProcessed PNGsJosiah Gaskin2011-07-201-2/+10
| | | | | | | | | | Added a cache management system for pre-processed PNG files along with unit tests. The cache system will be used if the --no-crunch flag is passed to AAPT during the package phase. The cache can be updated by a call to 'aapt crunch' (see usage statement). Also put in benchmarking code. Change-Id: I58271fb2ee2f5f9075fd74d4ff6f15e7afabd05c
* Add dependency generation to Aapt for R.javaJosiah Gaskin2011-06-271-1/+5
| | | | | | | | | Make Aapt generate a dependency file in the location specified by RClassDir for R.java if the --generate-dependencies flag is set. This dependency file is then read by the ant exec loop task to see whether to recreate R.java. Change-Id: I7152dac86b6ea0e448ef65e3a95694afe233c789
* Copy once-created R.java into library projectsJosiah Gaskin2011-06-271-1/+4
| | | | | | | | This change adds functionality in Aapt to allow specification of library projects to copy the generated R.java file into rather than regenerating the file for each library project. Change-Id: I05939d1dc875bd875be9298ca47cb639235070c6
* Runtime resource overlay, iteration 1.Mårten Kongstad2011-04-011-0/+4
| | | | | | | | | | | | | | | | Runtime resource overlay allows unmodified applications to appear as if they had been compiled with additional resources defined. See libs/utils/README for more information. This commit is the first iteration of runtime resource overlay. It provides the actual overlay modifications and loading of trusted overlay packages (ie residing in /vendor) targeting framework-res.apk. This commit loads exactly one overlay package. The overlay, if present, must target framework-res.apk and be located at /vendor/overlay/framework/framework-res.apk. Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db
* Add --non-constant-id to aapt.Xavier Ducrohet2011-02-141-1/+4
| | | | | | | | | | | | | | | | | | | | | This option enbables creating resource constant in the R class that are not actual constant, but simply static fields. The goal is to build library projects with these types of IDs so that the constant does not get inlined in the library code, since the ID for the library resources only are not the final values. The final resource IDs, generated from the main project and its library(ies), will have proper constant with the final values. This allows us to generate binary library bundle (a jar file and associated resources) that can be distributed. Additionally, this will let us make the library project support in Eclipse much more robust and a better user experience overall. Change-Id: Ibe2f08d68493fde658fc3f7606abf7446f312ad2
* Add an aapt option to allow string variations for different devices.Eric Fischer2010-09-231-1/+4
| | | | | | | | | | | | | | | | | | | | The --product option to aapt is a comma-separated list of characteristics of the device being built for. For example, --product nosdcard,grayscale for a device with no SD card and a grayscale screen. Strings can specify a product="characteristic" option to cause that version of the string to be used only for that type of device. All such strings should also specify, at the end of the block, product="default", which will be used if none of the variations match. For example: <string name="choose" product="bw">Choose black or white</string> <string name="choose" product="grayscale">Choose a shade of gray</string> <string name="choose" product="default">Choose a color</string> The default characteristic will also be used when no --product option is specified. Change-Id: Ie6c1505599e02e15b7818e8be6ec47bc6ce71aaa
* Add a --debug-mode option to aapt.Xavier Ducrohet2010-08-311-1/+4
| | | | | | | | | | | When passed (with no needed parameters) to the aapt command line, aapt will insert debuggable=true in the application node of the manifest automatically. This is to be used by the SDK tools to make true "debug" builds that require no code/file change. Change-Id: I6f0a7af7b7d51f26bb0ec012e6f142a6060b8618
* Add --max-res-version flag to aapt.Ficus Kirkpatrick2010-08-131-0/+4
| | | | | | | | | | aapt will ignore any versioned resource directories over the specified version (if used). e.g. --max-res-version=6 will cause layout-land-v7 to be ignored. Merged from froyo. Change-Id: Ia4eabae535b95b75d18b0c83135d44ed9a95b9eb
* Use correct API version for UTF-8 checkingKenny Root2010-03-241-4/+5
| | | | | | | | Use the constant for checking the API version in aapt instead of a bare number. Bug: 2541326 Change-Id: Ice7af7b393363a00f1832dd84753b8138d057fb4
* Fix minSdkVersion scanning to not throw warningsKenny Root2010-03-181-27/+37
| | | | | | | | | | | | | | For the UTF8/UTF16 switch code, we needed to know what was the minSdkVersion specified as early as possible. Unfortunately, this threw warnings when the SDK was compiling since we always set this field in the Bundle. This splits out the field used by the initial AndroidManifest.xml scan to a separate one that we won't attempt to re-insert into the AndroidManifest.xml This also switches the logic to better reflect the preference of UTF-8 over UTF-16; previously UTF-16 was the default. Change-Id: Ia81f6b21047043ebb711eb24c2c3718534979ef6
* Fix issue #2448075: aapt doesn't fix up activity-alias ↵Dianne Hackborn2010-03-011-1/+5
| | | | | | | | | | | | | | android:targetActivity links And related: - The aapt tool now sets a resource configurations sdk level to match any configs that have been set (for example if you specify density your sdk level will be at least 4). - New option to modify the targetPackage attribute of instrumentation. - Clean up of aapt options help. - Fix of UI type values to leave 0 for "unspecified". - Make the UI mode config APIs public.
* Add --auto-add-overlay option to aapt.Xavier Ducrohet2010-02-041-1/+4
| | | | | | | This option allows resources only present in overlays to be added automatically instead of being declared through <add-resource> Change-Id: Iff782311056f6a045193e57d204f7d3413e11b26
* Add the --rename-manifest-package option to aapt.Jeff Hamilton2010-02-011-1/+4
| | | | | | | It allows you to force override the manifest package listed in the AndroidManifest.xml when creating an APK file. Change-Id: I7eac7943c4e56610b65728ae54773a273634fd9d
* Revise aapt options for UTF8/16 encodingKenny Root2009-12-111-2/+7
| | | | | | | | Remove option to force UTF-8 encoding which could corrupt packages meant for systems before API level 7. Added switch to allow encoding for UTF-16 which will allow API 7 and later to encode resources in UTF-16. Change-Id: I70d0bddb0dfd12dcbd08c95f613dcfe896ae680b
* Default to UTF8 resources when packaging with aaptKenny Root2009-12-101-1/+18
| | | | | | | | | | This change makes it so with API level 7 and above all resources will be packaged in UTF-8 format. Any minSdkVersion level that is named will also have resources packaged in UTF-8, because it is assumed that previous releases will only be rebuilt with their proper integer number and only future releases will temporarily have names. Change-Id: If5d1ee5e48fbaf31798816b068ac44b14a93121b
* resolved conflicts for merge of ce307f88 to eclair-mr2Jean-Baptiste Queru2009-12-101-1/+4
|\
| * Add --custom-package to aaptXavier Ducrohet2009-11-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is needed to add library support to the SDK. The goal is to have libraries and main project use the same package for the R/Manifest classes to that they can share code and resources. BUG 2293994 Change-Id: Ie4cdb5a3bdabe1760a91316fd8969e4f53344bf9
| * add "junk path" -k option to aapt (DO NOT MERGE)Doug Zongker2009-10-191-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a "junk path" option to aapt so that you can do: aapt add -k archive.zip path/to/some.file and have the file stored in the zip under the name "some.file" (without the path). Needed so that we can use 'aapt add' in place of 'zip -j' when building jar files, which will lead to smaller incremental OTAs. (This is a cherry-pick of a change already submitted to eclair-mr2; the change was approved for mr1.)
* | Optional use of UTF-8 strings in resource bundlesKenny Root2009-12-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the use of UTF-8 for packing resources instead of the default of UTF-16 for Java. When strings are extracted from the ResStringPool, they are converted to UTF-16 and the result is cached for subsequent calls. When using aapt to package, add in the "-8" switch to pack the resources using UTF-8. This will result in the value, key, and type strings as well as the compiled XML string values taking significantly less space in the final application package in most scenarios. Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
* | add "junk path" -k option to aaptDoug Zongker2009-10-131-5/+8
|/ | | | | | | | | | | Adds a "junk path" option to aapt so that you can do: aapt add -k archive.zip path/to/some.file and have the file stored in the zip under the name "some.file" (without the path). Needed so that we can use 'aapt add' in place of 'zip -j' when building jar files, which will lead to smaller incremental OTAs.
* Add a flag (-G) to aapt to have it output the classes that shouldn't be ↵Joe Onorato2009-08-301-1/+4
| | | | obfuscated by ProGuard.
* am 1585bd24: Merge change 4828 into donutAndroid (Google) Code Review2009-06-191-0/+4
|\ | | | | | | | | | | | | Merge commit '1585bd24c10d16351f89e32dddbfa799f18db6bd' * commit '1585bd24c10d16351f89e32dddbfa799f18db6bd': Report densities in badging, debugging for nine patch bug.
| * Report densities in badging, debugging for nine patch bug.Dianne Hackborn2009-06-191-0/+4
| | | | | | | | | | | | | | The aapt tool now reports all available densities like it already did for locales. Also this includes more resource data output, which I was using to examine bug #1867049 (which at this point I am unable to reproduce).
* | get rid of utils.hMathias Agopian2009-05-311-1/+4
|/