This is the desired behavior if resource IDs may overlap, and also happens to
improve the behavior of:
aapt dump -I base.apk badging feature.apk
when both APKs use the same package name with different package IDs
(base=0x7F, feature=0x80). Previously, the final call to
DynamicRefTable::addMapping was for base.apk, and all references to 0x80 were
rewritten in DynamicRefTable::lookupResourceId to 0x7F. After this
change resources defined in both APKs are resolved correctly.
Note that this is a bit of kludge, and APKs should use different names
to avoid conflating the package IDs.
Fixes: 67070085
Bug: 64058531
Test: manual with sample in b/67070085#comment2
Change-Id: I285adb6f44a297440b08fc7a1f9ad73c700eb9bc
Only do that for the aapt binary itself. This will allow libaapt to be
converted to Soong.
Also remove a few lines that weren't doing anything: aaptCppflags was
never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied.
Test: m aapt
Test: aapt version
Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c
Feature splits depend on their base. The dump badging command
does resource resolution, and needs to be able to find resources
located in the base APK of a feature split.
Bug: 38038608
Test: manual
Change-Id: I8c22f0083c46a853a3a56a4049715409ac2723fe
Two new attributes for <uses-permission>: android:requiredFeature and
android:requiredNotFeature.
Also update aapt to include this information in badging:
uses-permission: name='android.content.cts.REQUIRED_NOT_FEATURE_UNDEFINED' requiredNotFeature='android.software.cts.undefined'
uses-permission: name='android.content.cts.REQUIRED_MULTI_DENY' requiredFeature='android.software.cts.undefined' requiredNotFeature='android.software.cts'
Test: new PermissionFeatureTest suite.
Change-Id: Icc1f815a4675ae9dd2cb7f61730ab28b5c11228a
A lot of the vendor/locale specific code existed pre-1.0
and was reworked into the current system.
Test: refactoring CL, all code except setLocale() was not being executed.
Test: setLocale() change tested manually
Change-Id: Ifb098f9808763a6cf5fb4336e089430adc09e198
Permissions such as android.permission.ACCESS_FINE_LOCATION
and android.permission.ACCESS_COARSE_LOCATION assumed the underlying feature
technology and aapt dump badging would emit an implied feature.
This is no longer accurate, so the only implied feature is on the general
android.hardware.location when the target SDK of the app is 21+.
Bug:25218770
Change-Id: Ica9ebf7d4f360b137af54a8c8fd6c0358cd9be6a
* Add explicit keyword to conversion constructors.
* Add NOLINT(implicit) comments for implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: Id6d21961f313a1ad92b15a37fdaa5be9e8ab48e1
This changes the default implied feature of 'android.hardware.touchscreen'
to 'android.hardware.faketouch' if no 'android.hardware.touchscreen'
feature is requested, required or otherwise.
Bug:30571641
Change-Id: I1e41242d4b1dc549cf69741d2a309baf476d084e
AAPT dump badging errors have been cryptic and difficult
to debug for app developers. Added some line info to the
error statements.
Change-Id: Ieeeb903a1274a91b77329b445e0248b1e67c9568
am: 1d58c18081
* commit '1d58c18081a2f17afc964de2f261a699e11d6f02':
AAPT: ProGuard config for components in main dex.
Change-Id: I156e1805ad64798be891747a81561589d9543424
Create an analogue of "aapt -G" which outputs a proguard configuration
that keeps only components which need to be in the main dex.
Bug: 27383099
Bug: 28425556
Change-Id: Ic18c8c563794ff27a5598a214111d1b446a005f1
(cherry picked from commit 86229cb622fccde8ab8cbe85eead91a34313a708)
Create an analogue of "aapt -G" which outputs a proguard configuration
that keeps only components which need to be in the main dex.
BUG: 27383099
Change-Id: Ic18c8c563794ff27a5598a214111d1b446a005f1
(cherry picked from commit 86229cb622fccde8ab8cbe85eead91a34313a708)
Create an analogue of "aapt -G" which outputs a proguard configuration
that keeps only components which need to be in the main dex.
BUG: 27383099
Change-Id: Ic18c8c563794ff27a5598a214111d1b446a005f1
Include <uses-permission-sdk-23> permissions in dump badging and dump permissions.
This will also add implied features for that permission, marked as -sdk-23 features.
Ex:
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission-sdk-23: name='android.permission.CAMERA'
feature-group: label=''
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='...'
uses-feature-sdk-23: name='android.hardware.camera'
uses-implied-feature-sdk-23: name='android.hardware.camera' reason='...'
Bug:24939655
Change-Id: Ifb374696ed4760b0ba2f1cc3516f3bf08e6cb6a3
(cherry picked from commit 5f3b2ecb3e9d27e77bd59c7b9006a6239b773944)
Include <uses-permission-sdk-23> permissions in dump badging and dump permissions.
This will also add implied features for that permission, marked as -sdk-23 features.
Ex:
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission-sdk-23: name='android.permission.CAMERA'
feature-group: label=''
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='...'
uses-feature-sdk-23: name='android.hardware.camera'
uses-implied-feature-sdk-23: name='android.hardware.camera' reason='...'
Bug:24939655
Change-Id: Ifb374696ed4760b0ba2f1cc3516f3bf08e6cb6a3
- Added aapt command line flag --app-as-shared-lib to build app resources
that could be loaded as shared lib at runtime.
- Added new method AssetManager.addAssetPathAsSharedLibrary() to load an
app resource as shared library.
Bug 22487604
Change-Id: Ib9b33c35f9c2b7129f3ba205de03d4564623ea39
Outside of a feature-group, the legacy uses-feature tag
has a boolean required flag that should be emitted in
dump badging.
Bug:17790999
Change-Id: I43023af00e9c9ed4bc35795c3a983fc719bf9b7a
- Output whether an app claims to be a game (android:isGame)
- Output android:banner if it is specified at the application level.
Change-Id: I7118b524f62cdfc4effeef21b32b3cdd814d9bfa
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
The address of a reference will never be null in well formed C++ code.
The function returning the value being checked simply returns a
dereferenced pointer (which is just going to segfault if it is null!).
Change-Id: I3a4eb6adfc003c63ebf21b81d46088d52154d99d
When compiling in C++ mode, the compiler will complain about conversions
from uint16_t to char16_t. Be consistent in using char16_t for strings.
Change-Id: I052b6176ced635162920b31560052d9a64f92764
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