The error code will give us some clue on what caused the loss (e.g., EBUSY, or ENOENT)
Test: manual
Bug: 80538532
Change-Id: I446c6e2255bdae063dfb8803ad0b702ead87c645
A resource marked SPEC_OVERLAYABLE in the base package was not marked as
such in the corresponding split packages. Add missing copy statement.
Test: manual (aapt2 dump test content in libandroidfw)
Change-Id: I800e92111a9da7c6f5e83f8a546d260c8d93b308
(cherry picked from commit ee41b3a36dcd87f79f3c2a21383a97743530099d)
<overlayable> tags can now have policy elements that indicate which
partition the overlay apk must reside on in order to be allowed to
overlay a resource. This change only adds parsing of <policy> and
encoding of policy in the proto ResourceTable. A later change will add
the encoding of policy and overlayable in the binary APK.
<overlayable>
<policy type="system|vendor|product|product_services|public" >
<item type="string" name="oof" />
</policy>
</overlayable>
Bug: 110869880
Test: make aapt2_tests
Change-Id: I8d4ed7b0e01f981149c6e3190af1681073b79b03
There are an increasing number of requests to log data in complex format to statsd, while the data
is not expected to be parsed or aggregated by statsd and only to be uploaded as events.
Instead of making an exception for each of these cases in a hard coded way, this CL add a feature to
annotate these field in atoms.proto and the stats-log-api-gen tool will produce byte array
interfaces for them.
Note that log_msg does not have byte array type, and only has string type, when statsd receives the
log, these fields are in string type. Only when the atom is written to proto, we will check if this
field should be bytes field and write it to protobuf in message format.
Change-Id: If53dd95c5826710c76d7fe982bf951a435dfc738
Fix: 118386797
Test: unit test & manual test
It will be a global error by default.
Test: make checkbuild
Bug: 112564944
Change-Id: I26616fd50ccf3639fa7c01d850a14d079273ede7
Exempt-From-Owner-Approval: do not block on new warnings
If a proto apk is missing resources.pb, AAPT2 would fail to detrmine the
apk format because of an incorrect check. This fixes that check and
removes the checking fuction from the LoadedApk header.
Bug: 117820549
Test: removed resources.pb from proto apks and confirmed that loading in
apks still works
Change-Id: If3628a821e7b59c7dfcbefb502b6080be083cec1
Add a python script to merge the CSV files, dealing with the fact that the
source columns may differ due to the annotation properties present in the
source.
Add this new file and the existing greylist.txt files as dependencies of
the 'dist' target, so that they appear as artifacts on the build server.
This allows them to be processed later by reading them from the build
server.
Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
Bug: 117314178
Change-Id: Ib9e5da90e4c32333a3f4f02ee7f159f77086ae5e
This will contain greylist entries accessible by apps with a
targetSdkVersion of less than Q. Currently empty, will be populated in
follow up CLs.
For now, these APIs are just merged into the light greylist at build time,
pending support in the runtime for implementing the correct runtime
behavior.
Also fix a bug in sort_api.sh so it deals with empty API lists
correctly.
Bug: 115609023
Test: m
Change-Id: I213874062f393f96d120648a934ae5ad7aba93af
Respect the compression the original compression of xml files when using
aapt2 convert. Uncompressed files should remain uncompressed, and
compressed files should remain compressed.
Bug: 117289326
Test: manual
Change-Id: I81b431b4a4abd81f5694ea7dc3b3c6ec8c13ca32
As a preparation in refactoring how we handle dist, I'm making
everything use dist-for-goals. In this case, instead of fully relying on
a phony rule, write the gtest xml into an intermediate folder, and use
dist-for-goals to copy that into the dist dir.
Bug: 117463001
Test: DIST_DIR=dist m aapt2_run_host_unit_tests dist
Test: DIST_DIR=dist m aapt2_run_host_unit_tests dist (reruns test)
Change-Id: I166c2b3088703875c6028c3479aec7cf09f3f635
This command prints out the parent graph of a given style
Test: out/host/linux-x86/bin/aapt2 dump styleparents \
--style Widget.MaterialComponents.TextInputLayout.FilledBox \
out/target/product/generic_x86/system/priv-app/SystemUIGoogle/SystemUIGoogle.apk
Change-Id: Ib2ace7e90bee6f1c4b6a184edc591b1a3993db75
This change refactors the dump commands to inherit from a base
DumpApkCommand and adds a command that prints out an ASCII
image of a badger if the user wrote "badger" instead of
"badging". The command is hidden from the help menu.
Bug: 73535002
Test: manual
Change-Id: I9bdd8a7bbf6a4282c4933e5c478f6d1d8e32d99e
Teach "aapt2 link" about a new flag --no-resource-removal. When given,
aapt2 will not filter out resources that lack default values. This is
useful mostly when building overlay packages that define resources for
non-default configurations, such as only for values-sv.
Test: manual: build package with resource only in values-vs, verify apk with aapt2 dump
Change-Id: Idc513bcb3f43bbff7f073163562c3dfccdb9bc9b
Merged-In: Idc513bcb3f43bbff7f073163562c3dfccdb9bc9b
Teach "aapt2 link" about a new flag --no-resource-removal. When given,
aapt2 will not filter out resources that lack default values. This is
useful mostly when building overlay packages that define resources for
non-default configurations, such as only for values-sv.
Test: manual: build package with resource only in values-vs, verify apk with aapt2 dump
Change-Id: Idc513bcb3f43bbff7f073163562c3dfccdb9bc9b
This is to allow idmap2 to access ConfigDescription.
Test: libandroidfw_tests
Test: aapt2_tests
Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5
Merged-In: I54210bbbd8dad5903cb7100807df977efa394ad5
You can now do a new form of <uses-package> that allows you to
specify a type of package along with required cert digests (like
uses-static-library).
This defines the new attribute needed for this and XML tag, and
updates aapt2 to actually allow uses-library in the manifest and
output this data with "dump badging".
While doing this I realized that "dump badging" was not printing
the data for uses-static-library or uses-library, so do those too.
Bug: 112113117
Test: manual
Change-Id: I5d02010aad9cb44675504a317df9cced421be8a1
Integer meta data values were not printing correctly and instead were
printing as empty strings. Attempt to retrieve the integer value of the
attribute if the value is not a string.
Bug: 117260085
Test: manual
Change-Id: I1cef672e03d07728819ca584b484dc372984c823