Commit Graph

23747 Commits

Author SHA1 Message Date
Logan Chien
3a449be4e2 sourcedr: Skip the modules without names
Test: ./run_tests.sh
Change-Id: Ic8659bce14d398828b79d5c5c0beaeaa7bd98c76
2018-02-27 09:10:03 +08:00
Logan Chien
16f0587d95 sourcedr: Fix checks on hidl_interface
hidl_interface defines two shared libraries.  This commit allows vendor
modules to depend on hidl_interfaces.  In addition, hidl_interfaces are
vendor_available by default.

Test: Run check_vndk_dep.py against the source tree
Change-Id: I0b24c90a8f41e56a451a9659edc240cd1a28db72
2018-02-27 09:10:03 +08:00
Logan Chien
6fb7948794 sourcedr: Treat proprietary modules as vendor modules
This commit changes check_vndk_dep.py so that proprietary modules are
treated as vendor modules.

Test: Run check_vndk_dep.py against the source tree
Change-Id: I203ffb3c661bf46cb5d2c9cd92a51e2fc8b345c0
2018-02-27 09:10:03 +08:00
Logan Chien
b41803118b Merge changes I36674e2a,I7b54582f,I499d39e3
* changes:
  vndk-def: Refactor update_dataset.py
  vndk-def: Add workaround for extra VNDK-SP-Private
  vndk-def: Rename Indirect to Private
2018-02-27 00:17:35 +00:00
Anton Hansson
76ce83e999 Merge "development: Set LOCAL_SDK_VERSION where possible." 2018-02-26 16:24:58 +00:00
Treehugger Robot
60d31dd2f3 Merge "Fix system-as-root detection on Pi" 2018-02-26 08:39:24 +00:00
Logan Chien
99a18bb208 vndk-def: Refactor update_dataset.py
Test: update_dataset.py generates identical output
Change-Id: I36674e2ad9dcfd209a3e0b9a96561c024997ad79
2018-02-26 15:01:49 +08:00
Logan Chien
8292ef0a67 vndk-def: Add workaround for extra VNDK-SP-Private
This commit adds a workaround for extra VNDK-SP-Private libraries that
are VNDK-SP-Private when BOARD_VNDK_VERSION is NOT set.

Test: Run definition tool on marlin/sailfish
Change-Id: I7b54582f71a4febbcd0658338499b8f98afbbbfa
2018-02-26 15:01:49 +08:00
Logan Chien
a62f7bd394 vndk-def: Rename Indirect to Private
This commit adds LL-NDK-Private, VNDK-Private, and VNDK-SP-Private.

* LL-NDK-Private stands for the dependencies of LL-NDK shared libraries
  that must be inaccessible to vendor modules.

* VNDK-Private stands for the VNDK shared libraries that can be used by
  other VNDK shared libraries but must be inaccessible to vendor modules.
  This is the replacement for VNDK-Indirect, which was defined as an
  alias of VNDK previously.

* VNDK-SP-Private stands for the VNDK shared libraries that can be used
  by other VNDK-SP shared libraries but must be inaccessible to vendor
  modules.  This is the replacement for VNDK-SP-Indirect-Private.

This commit also renames:

* LL-NDK-Indirect          --> LL-NDK-Private
* VNDK-Indirect            --> VNDK-Private
* VNDK-SP-Indirect-Private --> VNDK-SP-Private

Test: ./tests/run.py
Change-Id: I499d39e393cf265d59ec529e69ea15b670384e99
2018-02-26 15:01:49 +08:00
Logan Chien
f5c48f51cf Merge changes I457a6659,Ice835d9e,If361adb9
* changes:
  vndk-def: Add libclang_rt to eligible list
  vndk-def: Remove workaround for VNDK-SP-Indirect
  vndk-def: Support compact dex file format
2018-02-26 01:46:13 +00:00
Logan Chien
e985b82d4b vndk-def: Add libclang_rt to eligible list
This commit makes sure libclang_rt.asan and libclang_rt.ubsan_standalone
for all architectures are tagged correctly.  Prior to this commit, some
human tweaks are necessary for other architectures.

Test: Update the latest eligible list.
Change-Id: I457a66593966b7439b28c70779202ec95c7cb167
2018-02-23 19:45:26 +08:00
Logan Chien
0e5cdef7be vndk-def: Remove workaround for VNDK-SP-Indirect
This commit removes several workarounds for VNDK-SP-Indirect.  Now,
update_dataset.py derives VNDK-SP-Indirect-Private and VNDK-Indirect
from SOONG_VNDK_PRIVATE_LIBRARIES.

Test: Update the latest eligible list.
Change-Id: Ice835d9e39d6e3a768cc2eeb8b98ed7dc0777ecc
2018-02-23 19:43:30 +08:00
Logan Chien
fcf5c56a5c vndk-def: Support compact dex file format
This commit add compact dex file format support to check-dep subcommand.

Test: Run vndk_definition_tool.py on latest branch.
Change-Id: If361adb96a52b19c488d486003986d01cf179d42
2018-02-23 19:07:35 +08:00
SzuWei Lin
d7fdfa181e Fix system-as-root detection on Pi
From Pi, the manifest.xml had been moved from system folder,
so remove this file from system-as-root detection.

Bug: 73799919
Test: gsi_util dump --system some-aosp_arm64_ab-on-pi.img
Change-Id: I77e024d1200c46eb3bcdf6a853e1e02ae1493f52
2018-02-23 17:18:32 +08:00
Logan Chien
f192bc8d50 Merge "vndk-def: Fix template" 2018-02-23 06:50:40 +00:00
TheScarastic
cabfdc29e7 vndk-def: Fix template
Change-Id: I997c432187c569277e217ce909733985d5ce2b35
2018-02-23 01:32:28 +00:00
Anton Hansson
44b2e0dfcb development: Set LOCAL_SDK_VERSION where possible.
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
2018-02-21 19:02:11 +00:00
Treehugger Robot
86c0968a05 Merge "Build libsimplejni using SDK" 2018-02-15 07:41:37 +00:00
Treehugger Robot
6f08ea2f38 Merge "Python 3 compatibility." 2018-02-14 22:40:43 +00:00
Dan Albert
1b06c6e40d Python 3 compatibility.
Test: ndk/run_tests.py
Bug: None
Change-Id: Id0d2d8024adec880c1a41b524704df1641cda065
2018-02-14 12:46:58 -08:00
Jayant Chowdhary
2cfca9462e Merge "Add an additional test for ODR." 2018-02-14 18:19:11 +00:00
Jiyong Park
6a91a9ad8a Build libsimplejni using SDK
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
2018-02-14 17:10:57 +09:00
Treehugger Robot
dc4e0eb605 Merge "Purge more of development/ndk." 2018-02-14 07:30:18 +00:00
Jayant Chowdhary
6a9e6fb6d3 Merge "Show added record fields in diff report as well." 2018-02-14 00:26:54 +00:00
Logan Chien
c81c54bad7 Merge "sourcedr: Add VNDK dependency check tool" 2018-02-13 04:42:22 +00:00
Logan Chien
b460981888 sourcedr: Add VNDK dependency check tool
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
2018-02-13 10:33:34 +08:00
Andreas Gampe
94d4d65137 Merge "Stubs: Disable Errorprone warnings" 2018-02-13 00:20:38 +00:00
Jayant Chowdhary
3bc023f373 Add an additional test for ODR.
Also add missing test source files.

Test: tests/test.py

Change-Id: I44ec2cab9596e4722600995855d0a035e304e7ae
2018-02-12 13:43:54 -08:00
Dan Albert
72e43ce150 Purge more of development/ndk.
The static libraries now come from prebuilts/ndk and the CRT sources
now come from bionic.

Test: treehugger
Bug: None
Change-Id: I2e8075d6acca60e64d0c3173713be2bf102a09d8
2018-02-12 11:25:09 -08:00
Treehugger Robot
8337ffeae2 Merge "Support mounting the odm image" 2018-02-12 05:44:47 +00:00
Treehugger Robot
9240289080 Merge "gzip reference dumps while copying to ref-dump-dir." 2018-02-09 20:25:17 +00:00
Jayant Chowdhary
d1f8fc226b gzip reference dumps while copying to ref-dump-dir.
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
2018-02-09 10:29:57 -08:00
Jayant Chowdhary
326a4ed367 Merge "Fix map key in header-abi-diff while extracting user defined types." 2018-02-07 23:47:19 +00:00
Jayant Chowdhary
7cc00996e5 Fix map key in header-abi-diff while extracting user defined types.
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
2018-02-07 13:04:30 -08:00
Jayant Chowdhary
0e9140f645 Show added record fields in diff report as well.
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
2018-02-06 18:47:46 -08:00
Andreas Gampe
bd40595d86 Stubs: Disable Errorprone warnings
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
2018-02-05 14:52:17 -08:00
Treehugger Robot
499490e7e1 Merge "Add libcompiler_rt-extras from prebuilts/ndk." 2018-02-01 23:54:43 +00:00
Dan Albert
bbdeccffb3 Add libcompiler_rt-extras from prebuilts/ndk.
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
2018-02-01 22:03:22 +00:00
SzuWei Lin
e6a22f3ca5 Support mounting the odm image
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
2018-02-01 15:09:40 +08:00
Treehugger Robot
51d992d60d Merge "gsi_util: adds sepolicy_checker" 2018-02-01 07:08:28 +00:00
Logan Chien
59b5e45274 Merge "vndk-def: Add --check-apk to check-dep command" 2018-02-01 02:01:05 +00:00
Treehugger Robot
5c4b70c509 Merge "gsi_util: refactors Checker and VintfChecker" 2018-01-31 23:47:03 +00:00
Bowgo Tsai
3128bff672 gsi_util: adds sepolicy_checker
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
2018-01-31 20:07:28 +08:00
Bowgo Tsai
97a65926d2 gsi_util: refactors Checker and VintfChecker
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
2018-01-31 18:47:27 +08:00
Logan Chien
eed2296559 vndk-def: Add --check-apk to check-dep command
This commit adds --check-apk to check-dep command to discover the
JNI dependencies in the APK files.

Test: ./vndk_definition_tool.p check-dep --check-apk \
  --system ...  --vendor ... --tag-file ... --module-info ...

Bug: 71880346
Change-Id: Ie464f3e6f96ebc0c4d9dcdfc5513002f555e758b
2018-01-31 15:51:26 +08:00
Treehugger Robot
3f7d731fbd Merge "Support 'uses-permission.*' case" 2018-01-31 02:50:43 +00:00
Jayant Chowdhary
336b2ecfbb Merge "Don't diff records / enums already diffed through referenced type diffs." 2018-01-30 23:34:38 +00:00
Jayant Chowdhary
9c9a34b081 Don't diff records / enums already diffed through referenced type diffs.
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
2018-01-30 13:45:51 -08:00
changho.shin
b7efebb0bb Support 'uses-permission.*' case
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>
2018-01-30 12:37:11 +09:00
Treehugger Robot
a553f9832c Merge "Remove root permission requirement" 2018-01-30 03:26:18 +00:00