Copy the input jar's timestamps to the output jar to ensure
deterministic results.
Test: m checkbuild
Change-Id: Ifdd3ddc36c35429a0396b968dd3dd20b8cc57793
Adds support for generating app code to allow java mainline modules to
call the StatsLog.writeRaw public API. Supports primitives, enums,
attribution chains, MODE_BYTES. Does not support key value pairs,
worksource methods (because worksource uses hidden apis in the
worksource object).
Test: manually tested atom logging from DocumentsUI
Test: existing autogenerated code is not modified
Test: cts will follow
Bug: 126134616
Change-Id: Ia321cf2d9952e3875ed0c7a28db1f4113711513f
Merged-In: I97ac1890fda2262e343acafbbb8822e1de5f6515
This change adds parsing, encoding, and validating of odm and oem
overlayable policies to aapt2, libandroidfw, and idmap2.
Bug: 121033532
Test: aapt2_tests, idmap2_tests
Change-Id: Ifc0d4b6c9f9c37e06b2988abade69dbb277c50c2
This changes adds the build id to the version printed by "aapt2
version". This change also adds a field to the ResourceTable proto that
specifies the fingerprints of tools used to build the table.
Bug: 123663089
Test: manual
Change-Id: Ifaf33c1e506b68e9f1d921fdbeddf36485e65790
Do not use the framework's exception handler. Rather use the default
behavior and print the exception to stdout, so that it appears in the
test failure.
Test: atest --test-mapping frameworks/base/tools/preload-check
Test: manual
Change-Id: I3563392408a72c97788452f467c027112f52f193
Add some reflection hackery to retrieve boot classpath dex files. This
requires unstripped jars. Then use DexFile APIs to retrieve all classes,
and run a check if the given regular exception matches.
Use the new infrastructure to check that NoPreloadHolder classes are
not initialized.
Test: atest --test-mapping frameworks/base/tools/preload-check
Change-Id: Ic19e950647e5827d3c3ec4a7109553f39be7f43a
For applications that remove the names of resources from the string
pool, check that the attribute has a name before attempting to print it.
Test: manual
Bug: 130553900
Change-Id: I05e5d59f01b2c02c8a024d06fd896074d6bf465b
This is a cherry pick to aosp.
Sets up a public api for logging atoms to statsd. The API excepts a
buffer which is already encoded in the proper format for the socket, as
well as the number of bytes of the buffer to write. It performs a JNI
call to perform the socket write. Autogenerated app code will be built
for each mainline module that needs to use this API to log.
Test: builds
Test: existing logs flow properly
Bug: 126134616
Change-Id: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
Merged-In: I8a9a91e638d730e3ff69cb9345692e49e0db3c96
Embed the preloaded-classes-blacklist file and check all classes
in it.
Test: atest --test-mapping frameworks/base/tools/preload-check
Change-Id: I4292cae1eb24eafe1f63e914143433b57cc74751
Add an agent-based lock inversion checker. The agent will dynamically
rewrite bytecode to inject calls to LockHook, which runs a checker
on these.
Implement a simple on-thread checker that keeps a per-thread stack
of locks and a global map of lock ordering. As-is, transitivity of
checks is not guaranteed, but should be captured in most practical
cases.
To run a process with the lock checker, start the process with the
agent. The helper script start_with_lockagent.sh can be used for this:
adb shell setprop wrap.pkg-name script start_with_lockagent
(cherry picked from commit aeb6fce5b3)
Bug: 124744938
Test: manual
Merged-In: Idd9a7066a5b8cb8c0de2e995f08759c98d9473e1
Change-Id: Idd9a7066a5b8cb8c0de2e995f08759c98d9473e1
Use app_process and reflection to find the class state.
This is expected to break when internals change, so include a test
for expectations.
Bug: 130206915
Test: atest PreloadCheck
Change-Id: I7ecdb88a19efcfcfa1c7aa5c7e67d1990306166e
We use "%zu" for a size_t argumet.
Test: TreeHugger
Bug: 126134616
Change-Id: I02916829dfb71a63f78eda0d45129b4dc0732a82
Merged-In: I02916829dfb71a63f78eda0d45129b4dc0732a82
(cherry picked from commit f87e93835a)
Adds support for generating app code to allow java mainline modules to
call the StatsLog.writeRaw public API. Supports primitives, enums,
attribution chains, MODE_BYTES. Does not support key value pairs,
worksource methods (because worksource uses hidden apis in the
worksource object).
Test: manually tested atom logging from DocumentsUI
Test: existing autogenerated code is not modified
Test: cts will follow
Bug: 126134616
Change-Id: Ia321cf2d9952e3875ed0c7a28db1f4113711513f
If a resource is redefined with the same overlayable name, actor, and
policies, do not error.
Bug: 128843658
Test: m -j Launcher3 && aapt2_tests
Change-Id: I2c79f7d9fa7ff16b38ec41cec7e9804d39b372d5
generate_hidden_api_lists now receives a file containing package names
which need to be greylisted (although it could be made to work with any
api list required).
Also took the opportunity to clean up the tests to reflect the more
strict code.
Bug: 129387816
Test: m appcompat
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I619f8581d166aa48eda572bc0053d8739d6420eb
Bug: 126423638
Test: After building android doing this in the 'out' folder:
Test:
Test: ./soong/host/linux-x86/bin/aapt d --values resources \
Test: ./target/product/sailfish/system/product/priv-app/SystemUIGoogle/SystemUIGoogle.apk \
Test: | less
Test:
Test: search for `system_ui_aod_date_pattern` in the output, found this:
Test: (string8) "[éééḾḾḾð one two]"
Test: (string8) "<U+200F><U+202E>eeeMMMd<U+202C><U+200F>"
Test: (the en-XA and ar-XB pseudo-translated versions of the string)
Test:
Test: After the fix and rebuild the dump only finds the original English string ("eeeMMMd")
Test: Also flashed the image, switched to en-XA, and left the phone around for more than 24 hours.
Change-Id: I2fb7c5b5ee7d3d3200410593346682ed16559056
See build/soong/README.md for more information.
Also converts the rest of frameworks/base/tools/streaming_proto.
Bug: 122332340
Test: m checkbuild
Change-Id: I87c500c5464fb1722b4b518d89065f5e1ee29a97
Merged-In: Ieb54feb3902bddfd5a571369fbf50161ae646647
This is a cherry pick to aosp.
Creates an annotation to specify if an atom needs to be logged from a
specific mainline module. Creates options in stats-log-api-gen so that
if the same module name is passed in, cpp/h files will be generated with
only those atoms that are specified. These files can be used to create a
static library per mainline module to log to statsd.
Test: builds
Test: atest stats-log-api-gen-test
Test: does not affect existing shared libstatslog
Test: manually created a static lib for netd and used it to log to
statsd. Used testdrive to validate the data was properly flowing.
Bug: 126134616
Change-Id: I78064f81fb4971eede8e97dacce5424e3eefd8bb
Merged-In: I78064f81fb4971eede8e97dacce5424e3eefd8bb
Previously, the decision to include or not include them was
done at runtime. This changes them to be behind a compile
time flag. It's just safer, because the code just isn't there
instead of being dependent on a system property.
Test: bit GtsIncidentManagerTestCases:*
Bug: 123543706
Change-Id: If4e611914a7b0acd399ae27e55af8f718aee3ec8