This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: I371bd0b43e66bcc4be1e26decb95c70519ac3342
The lib hasn't been built using SDK and thus has been causing link-type
check warning from SimpleJNI which is built using SDK. Since the warning
will turn into error soon, fixing the warning by correctly building the
lib with SDK.
Bug: 69899800
Test: m -j SimpleJNI is successful and does not show any link-type check
warning
Change-Id: I51edfe296c70ac99ac7698b5e06ec0e0c678945c
This commit adds check_vndk_dep.py which checks the module dependencies
to ensure there are no modules violating VNDK requirements.
Test: check_vndk_dep.py [root-file]
Change-Id: Icfdc066b0f986bf0fb56aaf2d26957948f6fdd4d
The static libraries now come from prebuilts/ndk and the CRT sources
now come from bionic.
Test: treehugger
Bug: None
Change-Id: I2e8075d6acca60e64d0c3173713be2bf102a09d8
Remove the additional step of gzipping reference dumps manually.
Test: utils/create_reference_dumps.py --version current -ref-dump-dir
$ANDROID_BUILD_TOP/prebuilts/abi-dumps/vndk; mm -j64 in
external/libexif.
Change-Id: Ib22a3b4fa90e4f849529efc4b03ab43d87996458
The key being added to respective maps which facilitate diffing of
unreferenced user defined types was earlier the linker set key. The
unique id should be used instead. This is because linker set keys for C
and C++ types can be the same, but their unique id's cannot. Thus,
having linker set keys as a key leaves open the possibility of false
type aliasing, whereas the unique id does not.
Test: python3 tests/test.py
Test: python3 tests/test.py \
MyTest.test_libc_and_cpp_with_unused_struct_and_libc_and_cpp_with_unused_cstruct;
before this change, this test fails; after this change, the test
passes.
Change-Id: I91816167a48308a8c812d01e0a09e9bb70c60b50
This makes it easier to ascertain why the size of a record changed /
offsets of fields changed.
Bug: 72697345
Test: tests/test.py
Change-Id: I41ea02c0459043e8036398034a1b92761e49957e
The stubs are auto-generated and lack lots of annotations. Furthermore,
the originating code will already lead to warnings. So suppress all
Errorprone warnings for stub code.
Test: m
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: I214f348e2ecef5d640fa488f3d4cf9a18b942430
Still not ready to adopt the new static libraries, but we've needed
this for a while now. Copy it into place for now.
These came from the current prebuilts/ndk, which themselves came from
AOSP master build 4567395.
Test: ndk/checkbuild.py && ndk/run_tests.py
Bug: https://github.com/android-ndk/ndk/issues/294
Change-Id: Ia713a957df5c913b36d5f6c8fff35bbb11315ae8
Some checkers could read information from odm image. e.g.
sepolicy_checker could also check the compatibility between
system image and odm image. The patch revises the common image source
argument parser and CompositeMounter to support the odm image.
Bug: 72720671
Test: gsi_util pull --odm $OUT/system.img /odm/system/build.prop
Change-Id: I586decaf96640679c7a8e7ec52086d55510fbdeb
The sepolicy checker merges SEPolicy files from /system and
/vendor, /odm as the init process does when the device boots a GSI.
When the merge failed in init, the device will refuse to boot
Android OS and will jump to fastboot mode directly. It needs serial log
for diagnosis.
The action of SEPolicy merge can be done on host side, to do a trial
merge, prior to flash a GSI. The newly added sepolicy_checker is
designed for this.
Bug: 72069105
Test: m gsi_util
Test: gsi_util list_checks, output is 'vintf', 'sepolicy'
Test: gsi_util --debug check_compat --system $OUT/system.img --vendor adb sepolicy
Change-Id: I842067e447b96e2ba124f03f51831cd289f47dc1
This change includes several refactoring:
1. Adds more function/class comments.
2. Renames the fields in namedtuples 'CheckListItem' and 'CheckResultItem'.
3. Fixes the vintf check issue. It should do two checks:
system -> vendor and vendor -> system, instead of one direction.
4. Fixes import statements, should only import module or package name.
5. Use python3-style print() function instead of print statement.
6. Fix the missing 'import errno' in image_mounter.
7. Checks *.py under 'checker' folder can pass 'pylint'.
Disables the check for a given line if it cannot pass.
e.g., pylint: disable=too-few-public-methods
8. Changes 'summary' result from a string 'pass' to '#pass/#total'.
Bug: 70253825
Test: m gsi_util
Test: gsi_util --debug check_compat --system $OUT/system.img --vendor adb
Test: gsi_util --debug check_compat --system $OUT/system.img --vendor $OUT/vendor.img
Test: gsi_util check_compat --only-summary --system $OUT/system --vendor $OUT/vendor
Test: gsi_util --debug check_compat --system adb --vendor adb vintf
Change-Id: Ia08d1fbeee62f62667876b54778489c89e4228a1
This causes unnecessary verbosity in diff reports.
Test: The following:
Without this change:
header-abi-diff -arch arm64 -lib libcpp_referenced_records -old \
tests/reference_dumps/arm64/libgolden_cpp.so.lsdump -new \
tests/reference_dumps/arm64/libgolden_cpp_change_member_access.so.lsdump -o \
unref_diff -check-all-apis; unref_diff has LowVolumeSpeaker as an
unreferenced diff as well as a referenced diff.
With this change:
Run the same test command as above; unref_diff has LowVolumeSpeaker
only as a referenced diff.
Change-Id: Iddb2ed2f759637f53b00fd1398395a1b1c207116
Some applications declare their privileged permission as 'uses-permission-sdk-23(m)',
not 'uses-permission'. Adding '.*' to current regex expression to cover all the cases.
Test: python development/tools/privapp_permissions/privapp_permissions.py
Change-Id: I1ea8c9361bb53035481418631b34607ffecb238c
Signed-off-by: changho.shin <changho.shin@lge.com>
We aren't quite ready to fully move to the new static libraries, but
we need libdl.a for using libc++ in a static executable (the unwinder
uses dladdr).
Test: ndk/checkbuild.py && ndk/run_tests.py
Bug: None
Change-Id: Ibc2ba4b27cc1fc1fb229719ea3c3c37cb8819fd3
The original solution to access the content in an image file is
'mount' which needs root permision. Replaces 'mount' with 'debugfs',
which does not need root permission and will be useful on server
side usage.
Bug: 72027809
Test: ./gsi_util.py pull --system system.img /system/build.prop
Change-Id: I7d6d7b75527cd144d55465353531597afa3baedb
The patch unifies the code of arguments '--vendor' and '--system',
and to be an argument group 'image sources'.
Bug: 64817940
Test: gsi_util.py for each commands and check the output
Change-Id: I591ef4b922f931b7ceaacc362979156ef830a54e
This was done largely so automation can make use of
privapp-permissions.xml generation.
Privapp_permissions.py no longer requires the build environment
to be setup. Instead, system files can be pulled from a connected
device, and aapt & adb can be set via the commandline. Otherwise,
they will default to the environment's default aapt/adb.
Priv-apps and the permission lists can be queried from the device
using command flags as well, removing the need for an Android
image to be built locally.
Bug: None
Test: Diff between previous privapp_permissions output and the
output for these changes was empty for the following runs:
./old_privapp_permissions.py
vs
./new_privapp_permissions.py [-d && -s SERIAL]
./new_privapp_permissions.py --aapt /path/to/aapt
./old_privapp_permissions.py /path/to.apk
vs
./new_privapp_permissions.py /path/to.apk
./new_privapp_permissions.py device:/path/to/apk
Change-Id: Ifaf35607d38c1d74111fd2f05628c0192fc791cb
This commit scans vdex files for dependencies as well. This commit is
necessary because some apk files or jar files are stripped, i.e. not
containing dex files.
Test: ./vndk_definition_tool.py apk-deps --system ... --vendor ...
Change-Id: I3f9009e0147d244c141f1f4e13369e23801a495a
Python 3.5 adopts a fancy algorithm to detect the zip file. It will
search for the magic words in the file, i.e. magic word does not have to
be at the beginning. This commit adds an extra check to make sure "PK",
the magic word for zip file, is at the beginning of the file.
Test: ./vndk_definition_tool.py apk-deps --system ... --vendor ...
Change-Id: I3e633709bc39187ae807aef97c6e0396d02266ea
This commit adds a JNI lib filter to reduce the false positives that may
be found by apk-deps.
Test: ./tests/run.py
Test: ./vndk_definition_tool.py apk-deps --system ... --vendor ...
Change-Id: Ic5f1f55a3c92970aa5ddef9b5f6e53a33931d970
Also use non-mangled name for C structs and enums as their unique id.
We do this as attempt to protect against bugs similar to those mentioned
in https://android-review.googlesource.com/c/platform/external/clang/+/599002
which might not have been discovered yet.
Bug: 71486971
Test: Build android source tree for aosp_arm64_ab with -no-filter on
header-abi-dumper.
Test: tests/test.py
Change-Id: I3e25425d9f3015cd7dece3bd5a27f88e050c1acb