|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| cmd/ | | 04-Jul-2025 | - | 10,869 | 8,458 |
| compile/ | | 04-Jul-2025 | - | 3,244 | 2,405 |
| configuration/ | | 04-Jul-2025 | - | 2,524 | 1,266 |
| dump/ | | 04-Jul-2025 | - | 3,168 | 2,556 |
| filter/ | | 04-Jul-2025 | - | 619 | 308 |
| format/ | | 04-Jul-2025 | - | 9,125 | 6,856 |
| integration-tests/ | | 04-Jul-2025 | - | 4,679 | 3,611 |
| io/ | | 04-Jul-2025 | - | 1,495 | 958 |
| java/ | | 04-Jul-2025 | - | 3,767 | 2,719 |
| link/ | | 04-Jul-2025 | - | 8,412 | 6,162 |
| optimize/ | | 04-Jul-2025 | - | 2,286 | 1,518 |
| process/ | | 04-Jul-2025 | - | 1,303 | 880 |
| split/ | | 04-Jul-2025 | - | 624 | 436 |
| test/ | | 04-Jul-2025 | - | 1,601 | 1,183 |
| text/ | | 04-Jul-2025 | - | 1,319 | 983 |
| tools/ | | 04-Jul-2025 | - | 666 | 494 |
| trace/ | | 04-Jul-2025 | - | 252 | 168 |
| util/ | | 04-Jul-2025 | - | 1,771 | 1,220 |
| xml/ | | 04-Jul-2025 | - | 2,367 | 1,620 |
| .clang-format | D | 04-Jul-2025 | 194 | 8 | 7 |
| Android.bp | D | 04-Jul-2025 | 6.7 KiB | 237 | 228 |
| ApkInfo.proto | D | 04-Jul-2025 | 7.8 KiB | 340 | 288 |
| AppInfo.h | D | 04-Jul-2025 | 1.6 KiB | 53 | 17 |
| Configuration.proto | D | 04-Jul-2025 | 5.1 KiB | 217 | 170 |
| Debug.cpp | D | 04-Jul-2025 | 32.4 KiB | 997 | 826 |
| Debug.h | D | 04-Jul-2025 | 1.6 KiB | 50 | 25 |
| Diagnostics.h | D | 04-Jul-2025 | 1.7 KiB | 70 | 42 |
| DominatorTree.cpp | D | 04-Jul-2025 | 2.9 KiB | 96 | 62 |
| DominatorTree.h | D | 04-Jul-2025 | 3.2 KiB | 122 | 62 |
| DominatorTree_test.cpp | D | 04-Jul-2025 | 8.8 KiB | 230 | 179 |
| LoadedApk.cpp | D | 04-Jul-2025 | 13.1 KiB | 362 | 299 |
| LoadedApk.h | D | 04-Jul-2025 | 4.2 KiB | 130 | 73 |
| Main.cpp | D | 04-Jul-2025 | 6.4 KiB | 206 | 146 |
| NameMangler.h | D | 04-Jul-2025 | 2.9 KiB | 99 | 47 |
| NameMangler_test.cpp | D | 04-Jul-2025 | 1.4 KiB | 48 | 22 |
| OWNERS | D | 04-Jul-2025 | 63 | 5 | 4 |
| Resource.cpp | D | 04-Jul-2025 | 4.9 KiB | 172 | 140 |
| Resource.h | D | 04-Jul-2025 | 15.6 KiB | 573 | 354 |
| ResourceMetadata.proto | D | 04-Jul-2025 | 1.5 KiB | 50 | 43 |
| ResourceParser.cpp | D | 04-Jul-2025 | 71.4 KiB | 1,901 | 1,513 |
| ResourceParser.h | D | 04-Jul-2025 | 6.3 KiB | 153 | 82 |
| ResourceParser_test.cpp | D | 04-Jul-2025 | 53.3 KiB | 1,422 | 1,159 |
| ResourceTable.cpp | D | 04-Jul-2025 | 32.4 KiB | 860 | 678 |
| ResourceTable.h | D | 04-Jul-2025 | 12.9 KiB | 382 | 236 |
| ResourceTable_test.cpp | D | 04-Jul-2025 | 16.3 KiB | 389 | 305 |
| ResourceUtils.cpp | D | 04-Jul-2025 | 31.8 KiB | 1,032 | 821 |
| ResourceUtils.h | D | 04-Jul-2025 | 11.6 KiB | 326 | 90 |
| ResourceUtils_test.cpp | D | 04-Jul-2025 | 13.3 KiB | 313 | 248 |
| ResourceValues.cpp | D | 04-Jul-2025 | 33.5 KiB | 1,210 | 974 |
| ResourceValues.h | D | 04-Jul-2025 | 14.6 KiB | 448 | 279 |
| ResourceValues_test.cpp | D | 04-Jul-2025 | 11.9 KiB | 325 | 239 |
| Resource_test.cpp | D | 04-Jul-2025 | 8 KiB | 232 | 153 |
| Resources.proto | D | 04-Jul-2025 | 19 KiB | 663 | 533 |
| ResourcesInternal.proto | D | 04-Jul-2025 | 2 KiB | 61 | 47 |
| SdkConstants.cpp | D | 04-Jul-2025 | 3.5 KiB | 120 | 83 |
| SdkConstants.h | D | 04-Jul-2025 | 1.8 KiB | 74 | 48 |
| SdkConstants_test.cpp | D | 04-Jul-2025 | 2 KiB | 52 | 27 |
| ValueTransformer.cpp | D | 04-Jul-2025 | 1.8 KiB | 51 | 28 |
| ValueTransformer.h | D | 04-Jul-2025 | 4.2 KiB | 131 | 61 |
| ValueTransformer_inline.h | D | 04-Jul-2025 | 1.6 KiB | 48 | 24 |
| ValueVisitor.h | D | 04-Jul-2025 | 5.9 KiB | 217 | 160 |
| ValueVisitor_test.cpp | D | 04-Jul-2025 | 2.5 KiB | 88 | 50 |
| development.md | D | 04-Jul-2025 | 715 | 11 | 7 |
| formats.md | D | 04-Jul-2025 | 3.4 KiB | 46 | 34 |
| readme.md | D | 04-Jul-2025 | 9.4 KiB | 188 | 165 |
readme.md
1# Android Asset Packaging Tool 2.0 (AAPT2) release notes
2
3## Version 2.20
4- Too many features, bug fixes, and improvements to list since the last minor version update in
5 2017. This README will be updated more frequently in the future.
6- Added a new flag `--no-compress-fonts`. This can significantly speed up loading fonts from APK
7 assets, at the cost of increasing the storage size of the APK.
8- Changed the behavior of `--enable-sparse-encoding`. Sparse encoding is only applied if the
9 minSdkVersion is >= 32.
10- Changed the behavior of `--force-sparse-encoding`. Sparse encoding is only applied if the
11 minSdkVersion is >= 32 or is not set.
12
13## Version 2.19
14- Added navigation resource type.
15- Fixed issue with resource deduplication. (bug 64397629)
16- Added a daemon mode for issuing commands. This is invoked with `aapt2 daemon`.
17 Command line arguments are separated by newlines, with an empty line signalling the
18 end of a command. Sending `EOF (Ctrl+D)` to the daemon will exit.
19- Fixed an issue where multiple permissions defined in AndroidManifest.xml would generate
20 conflicting definitions for the same Java constant in Manifest.java. Changed the implementation
21 to match that of `aapt`, which will take the last definition as the sole definition.
22 A warning is logged if such a scenario occurs. (bug 64472942)
23- Made improvements to handling of paths on Windows. This should resolve a lot of issues with
24 Unicode paths. (bug 62336414, 63830502)
25
26## Version 2.18
27### `aapt2 ...`
28- Fixed issue where enum values were interpreted as integers and range checked. (bug 62358540)
29- Fixed issue where ints and floats with trailing whitespace would not be parsed. (bug 62902869)
30- Fixed issue where `--custom-package` was not honored when writing Manifest.java. (bug 62826426)
31- Add `<key-sets>` and its nested tags to the allowed set of XML tags in AndroidManifest.xml.
32 (bug 62839863)
33- Fixed issue where Java classes referenced from fragments and menus were not added to
34 the set of Proguard keep rules. (bug 62216174)
35- Fixed issue where escaped unicode characters would generate malformed UTF-8. (bug 62839202)
36- Fixed issue where apostrophes or quotes used in XML attribute values were ignored.
37 (bug 62840406, 62840718)
38
39## Version 2.17
40### `aapt2 ...`
41- Fixed issue where symlinks would not be followed when compiling PNGs. (bug 62144459)
42- Fixed issue where overlays that declared `<add-resource>` did not compile. (bug 38355988)
43- Fixed issue where `%n` in a string resource was interpreted as a format argument. (bug 37132275)
44- Allow empty resources to compile, giving them a value of `""` or `@null`, depending on the
45 accepted formats. (bug 38425050)
46- Resources declared via `<item>` with no format attribute were changed to accept all
47 resource types. (bug 62260121)
48- Allow `<layout>` element under `<activity>` in AndroidManifest.xml. (bug 62189611)
49- Fix issue where `--no-version-vector` did not apply to `pathInterpolator` and `objectAnimator`.
50 (bug 62211148)
51- Fix issue where overlaid `<style>` would not be merged, and would replace the original resource
52 instead. This fix brings behavior in-line with AAPT. (bug 38355988)
53
54## Version 2.16
55### `aapt2 link ...`
56- Versioning of XML files is more intelligent, using a small set of rules to degrade
57 specific newer attributes to backwards compatible versions of them.
58 Ex: `android:paddingHorizontal` degrades to `android:paddingLeft` and `android:paddingRight`.
59
60## Version 2.15
61### `aapt2 compile ...`
62- Add `--no-crunch` option to avoid processing PNGs during the compile phase. Note that this
63 shouldn't be used as a performance optimization, as once the PNG is processed, its result is
64 cached for incremental linking. This should only be used if the developer has specially
65 pre-processed the PNG and wants it byte-for-byte identical to the input.
66 NOTE: 9-patches will not be processed correctly with this flag set.
67
68## Version 2.14
69### `aapt2 link ...`
70- If an app is building with a minSdkVersion < 26 and a --package-id XX where XX > 7F, aapt2
71 will automatically convert any 'id' resource references from the resource ID 0xPPTTEEEE to
72 0x7FPPEEEE.
73- This is done to workaround a bug in previous versions of the platform that would validate
74 a resource ID by assuming it is larger than 0. In Java, a resource ID with package ID greater
75 than 0x7F is interpreted as a negative number, causing valid feature split IDs like 0x80010000
76 to fail the check.
77- '@id/foo' resources are just sentinel values and do not actually need to resolve to anything.
78 Rewriting these resource IDs to use the package ID 7F while maintaining their definitions under
79 the original package ID is safe. Collisions against the base APK are checked to ensure these
80 rewritten IDs to not overlap with the base.
81
82## Version 2.13
83### `aapt2 optimize ...`
84- aapt2 optimize can now split a binary APK with the same --split parameters as the link
85 phase.
86
87## Version 2.12
88### `aapt2 optimize ...`
89- aapt2 optimize now understands map (complex) values under the type `id`. It ignores their
90 contents and interprets them as a sentinel `id` type. This was added to support existing
91 apps that build with their `id` types as map values.
92 AAPT and AAPT2 always generate a simple value for the type `ID`, so it is unclear how some
93 these apps are encoded.
94
95## Version 2.11
96### `aapt2 link ...`
97- Adds the ability to specify assets directories with the -A parameter. Assets work just like
98 assets in the original AAPT. It is not recommended to package assets with aapt2, however,
99 since the resulting APK is post-processed by other tools anyways. Assets do not get processed
100 by AAPT2, just copied, so incremental building gets slower if they are included early on.
101
102## Version 2.10
103### `aapt2 link ...`
104- Add ability to specify package ID to compile with for regular apps (not shared or static libs).
105 This package ID is limited to the range 0x7f-0xff inclusive. Specified with the --package-id
106 flag.
107- Fixed issue with <plurals> resources being stripped for locales and other configuration.
108- Fixed issue with escaping strings in XML resources.
109
110## Version 2.9
111### `aapt2 link ...`
112- Added sparse resource type encoding, which encodes resource entries that are sparse with
113 a binary search tree representation. Only available when minSdkVersion >= API O or resource
114 qualifier of resource types is >= v26 (or whatever API level O becomes). Enabled with
115 `--enable-sparse-encoding` flag.
116### `aapt2 optimize ...`
117- Adds an optimization pass that supports:
118 - stripping out any density assets that do not match the `--target-densities` list of
119 densities.
120 - resource deduping when the resources are dominated and identical (already happens during
121 `link` phase but this covers apps built with `aapt`).
122 - new sparse resource type encoding with the `--enable-sparse-encoding` flag if possible
123 (minSdkVersion >= O or resource qualifier >= v26).
124
125## Version 2.8
126### `aapt2 link ...`
127- Adds shared library support. Build a shared library with the `--shared-lib` flag.
128 Build a client of a shared library by simply including it via `-I`.
129
130## Version 2.7
131### `aapt2 compile ...`
132- Fixes bug where psuedolocalization auto-translated strings marked 'translateable="false"'.
133
134## Version 2.6
135### `aapt2`
136- Support legacy `configVarying` resource type.
137- Support `<bag>` tag and treat as `<style>` regardless of type.
138- Add `<feature-group>` manifest tag verification.
139- Add `<meta-data>` tag support to `<instrumentation>`.
140
141## Version 2.5
142### `aapt2 link ...`
143- Transition XML versioning: Adds a new flag `--no-version-transitions` to disable automatic
144 versioning of Transition XML resources.
145
146## Version 2.4
147### `aapt2 link ...`
148- Supports `<meta-data>` tags in `<manifest>`.
149
150## Version 2.3
151### `aapt2`
152- Support new `font` resource type.
153
154## Version 2.2
155### `aapt2 compile ...`
156- Added support for inline complex XML resources. See
157 https://developer.android.com/guide/topics/resources/complex-xml-resources.html
158### `aapt link ...`
159- Duplicate resource filtering: removes duplicate resources in dominated configurations
160 that are always identical when selected at runtime. This can be disabled with
161 `--no-resource-deduping`.
162
163## Version 2.1
164### `aapt2 link ...`
165- Configuration Split APK support: supports splitting resources that match a set of
166 configurations to a separate APK which can be loaded alongside the base APK on
167 API 21+ devices. This is done using the flag
168 `--split path/to/split.apk:<config1>[,<config2>,...]`.
169- SDK version resource filtering: Resources with an SDK version qualifier that is unreachable
170 at runtime due to the minimum SDK level declared by the AndroidManifest.xml are stripped.
171
172## Version 2.0
173### `aapt2 compile ...`
174- Pseudo-localization: generates pseudolocalized versions of default strings when the
175 `--pseudo-localize` option is specified.
176- Legacy mode: treats some class of errors as warnings in order to be more compatible
177 with AAPT when `--legacy` is specified.
178- Compile directory: treats the input file as a directory when `--dir` is
179 specified. This will emit a zip of compiled files, one for each file in the directory.
180 The directory must follow the Android resource directory structure
181 (res/values-[qualifiers]/file.ext).
182
183### `aapt2 link ...`
184- Automatic attribute versioning: adds version qualifiers to resources that use attributes
185 introduced in a later SDK level. This can be disabled with `--no-auto-version`.
186- Min SDK resource filtering: removes resources that can't possibly be selected at runtime due
187 to the application's minimum supported SDK level.
188