Commit Graph

23984 Commits

Author SHA1 Message Date
Antoan Angelov
e6964f00a8 Merge "Revert "Move SdkSetup.apk to vendor partition"" 2018-07-19 12:59:18 +00:00
Antoan Angelov
e867e27a3b Revert "Move SdkSetup.apk to vendor partition"
This reverts commit 3bf31401fe.

Reason for revert: Build cop revert because this change is breaking Blueline builds. 

Change-Id: I54f87f21eec0e93873ffedec6b0bbe154584ba4b
2018-07-19 12:57:33 +00:00
Treehugger Robot
2cf91f337c Merge "Move SdkSetup.apk to vendor partition" 2018-07-19 06:18:25 +00:00
Bowgo Tsai
3bf31401fe Move SdkSetup.apk to vendor partition
Otherwise, it causes the CTS-on-GSI failure on non-emulator devices:
  CtsPermission2TestCases android.permission2.cts.PrivappPermissionsTest#testPrivappPermissionsEnforcement

Because non-emulator devices lack the permission file in their /vendor.
  /system/priv-app/SdkSetup/SdkSetup.apk
  /vendor/etc/permissions/privapp-permissions-goldfish.xml

Bug: 110517983
Test: boot a GSI and checks that SdkSetup.apk is moved to /vendor
Change-Id: I3086f99c477eeca38f42041e1809a5aa3b8bfa7a
2018-07-17 18:18:46 +08:00
Christopher Ferris
cd2f1cfed2 Merge "Refactor native heap viewer to add tests." 2018-07-16 21:05:20 +00:00
Christopher Ferris
dfb5368b57 Refactor native heap viewer to add tests.
This only includes a few tests to start with.

Bug: 62492960

Test: Ran new unit tests.
Test: Ran with all different options and verified it produces the same
Test: output as the previous script.
Change-Id: Iad29a5f04f49986139c92030a3259cae512859af
2018-07-13 14:09:43 -07:00
Treehugger Robot
6a226c1aca Merge "Add vndk-lib-extra-list-current.txt" 2018-07-13 16:03:48 +00:00
Logan Chien
55a421eaeb Add vndk-lib-extra-list-current.txt
This commit adds `vndk-lib-extra-list-current.txt`.  This file contains
the LLNDK/VNDK/SP-HAL shared libraries (and dependencies) that cannot be
specified in Android.bp.

Bug: 80521281
Test: make vts
Change-Id: If7b414589786dab424a21773bfd33f10b415d899
Merged-In: If7b414589786dab424a21773bfd33f10b415d899
(cherry picked from commit 7e177685d8)
2018-07-13 16:44:18 +08:00
Treehugger Robot
524fc465ec Merge changes I5199a7e9,I386ab7c1,I2038c77c
* changes:
  sourcedr: Add more project analysis filters
  sourcedr: Check whether paths map to projects
  vtable-dumper: Update test script
2018-07-12 14:58:30 +00:00
Logan Chien
bec07164e5 sourcedr: Add more project analysis filters
This commit adds `--has-group`, `--only-has-group`, and
`--without-group` to filter projects.

Test: analyze_manifest_split.py -b Android.bp -m .repo/manifest.xml \
  --has-group=system_only
Test: analyze_manifest_split.py -b Android.bp -m .repo/manifest.xml \
  --only-has-group=vendor_only
Test: analyze_manifest_split.py -b Android.bp -m .repo/manifest.xml \
  --without-group=both

Change-Id: I5199a7e940538e73a1af19cfd78afbe4427d6e3b
2018-07-12 20:29:23 +08:00
Logan Chien
7e9606dc3e sourcedr: Check whether paths map to projects
This commit checks whether the path maps to a git project specified in
`manifest.xml`.  If it does not map to a git project, emit an error and
skip it.  If we don't do so, an exception will be raised because the
`sorted()` function cannot compare `None` object with `str` object.

Test: Add a project to external and it does not stop the analyzer.
Change-Id: I386ab7c1f76d5630a2c5f43186f38a791a3bb7b9
2018-07-12 19:32:23 +08:00
Logan Chien
83fec1025c vtable-dumper: Update test script
Test: tests/test_vndk_vtable_dumper.py
Change-Id: I2038c77c930ab9b0d70b54d7e73c1a88a0c7f725
2018-07-12 19:25:00 +08:00
Treehugger Robot
1ae3edd54b Merge "Detect if num field is valid on v1.0 version." 2018-07-10 21:13:38 +00:00
Christopher Ferris
ad7d5fb378 Detect if num field is valid on v1.0 version.
In Android P, the version field did not get incremented properly in
all places. So if a file with a v1.0 version is found, do a further check
to verify if the num field is really valid.

Test: Verified that a file with v1.0 gets checked and the valid num field
Test: is set correctly.
Test: Verified that a file with v1.1 automatically gets num field set to
Test: valid.
Change-Id: I7f828294c833e334cad76a866bbaa1d78ac02cfb
Merged-In: I7f828294c833e334cad76a866bbaa1d78ac02cfb
(cherry picked from commit b558fe4d53)
2018-07-10 12:25:33 -07:00
David Brazdil
252f328bc9 Merge "Compile API stubs to dex" 2018-07-10 15:59:35 +00:00
David Brazdil
51c1288030 Compile API stubs to dex
Add 'compile_dex' flag to API stub rules. Soong will generate build
targets which compile the JARs into dex files. Those will be compared
against the boot class path dex files to determine the public API surface.

Bug: 79409988
Test: m android_stubs_current, check javalib.jar contains classes.dex
Change-Id: Ie7238572ece0678133ba08203108a923ea2f56ba
2018-07-10 10:31:11 +00:00
Treehugger Robot
532d1aa70f Merge "vtable-dumper: Add loganchien to OWNERS" 2018-07-06 10:38:18 +00:00
Treehugger Robot
3369b670ac Merge "Fix vtable boundary check in vndk-vtable-dumper" 2018-07-06 10:31:38 +00:00
Logan Chien
502af5c406 vtable-dumper: Add loganchien to OWNERS
Test: n/a
Change-Id: I40d89fa90fdd1bf1be0b02ba7986ebdac98847ef
2018-07-06 16:08:40 +08:00
Yi-yo Chiang
a203b62ab9 Fix vtable boundary check in vndk-vtable-dumper
Add check for vtable boundary in identifyVTable().
Fix check for section boundary in identifyAddend().

Test: vndk-vtable-dumper libtest1.so -mangled
Bug: 111146760
Change-Id: If1369760823323f3bc5094121a5ce510714f8a93
2018-07-05 17:37:13 +08:00
Logan Chien
f35b6297a1 Merge "repo-review: Add abandon command line option" 2018-07-03 04:29:33 +00:00
Logan Chien
b260a60264 repo-review: Add abandon command line option
This commit adds `--abandon` comand line option to abandon several
change lists.

Test: repo-review.py -g [url] [query] --abandon '[reason]'
Change-Id: I5360e95a284a2d3e77a66d52ea01cec7872b9334
2018-07-03 10:29:30 +08:00
Hsin-Yi Chen
321b110998 Merge "Show thunk symbols in vtables" 2018-07-02 02:11:04 +00:00
Hsin-Yi Chen
cd1eada7b0 Show thunk symbols in vtables
- Convert method declarations to thunk symbols if thunk information
  exists.
- Add a test case and reference dumps for virtual inheritance.

Bug: 80671888
Test: ./tests/test.py
Change-Id: I55ecbd7c8b0f5b0f534d81e6c6967f99ffd1d42e
2018-06-29 10:57:31 +00:00
Logan Chien
c79e4a961b Merge "header-checkers: Add loganchien to OWNERS" 2018-06-29 05:03:32 +00:00
Logan Chien
d014da7490 header-checkers: Add loganchien to OWNERS
Test: n/a
Change-Id: I2fde4fc8927fcfd6ddceadc9e6f75d3d9fabfe66
2018-06-29 10:47:24 +08:00
Treehugger Robot
2e4640f468 Merge "Allow restart in gdbclient." 2018-06-26 20:09:08 +00:00
Dan Albert
d124bc7562 Allow restart in gdbclient.
Switching from remote to extended-remote allows the program being
debugged to be restarted like a normal non-remote program.

Test: Used gdbclient debugging ICU things for a while, restarted often
Bug: None
Change-Id: Ia295749b9aa86727479d760d7c743f98a06fa6d4
2018-06-26 11:15:16 -07:00
Treehugger Robot
50fb8c3029 Merge changes I283fe25a,Iabef0b10
* changes:
  Support new binder32bit property
  Expand a leading '~' to $HOME in arg for --local
2018-06-26 06:22:43 +00:00
Jae Shin
af0c00328a Support new binder32bit property
Starting in VNDK snapshot v28 (P), prebuilts built for 32-bit
binder interface are isolated in separate 'binder32' subdirectory
under prebuilts/vndk/v{VER}/{ARCH}/. All other prebuilts are
assumed to use 64-bit binder interface.

To differentiate prebuilts per binder bitness, the following
changes are made:
1) a new 'binder32bit' property added to the Android.bp files
autogenerated for the vndk_prebuilt_shared soong module
2) new phony modules, vndk_v{ver}_{arch}_binder32, defined for
32-bit binder prebuilts,
3) 'binder32' suffix added to the prebuilt versioned name,
e.g. libfoo.vndk.{ver}.{arch}.binder32.vendor

Test: python gen_buildfiles.py 28 -vv
Test: python gen_buildfiles.py 27 -vv
Bug: 78279738
Change-Id: I283fe25a34d3381d13097ede34c428c83dffe11e
2018-06-25 17:58:35 +09:00
Jae Shin
bd82ebbe49 Expand a leading '~' to $HOME in arg for --local
Test: python update.py --local=~/some/local/path
Bug: 78279738
Change-Id: Iabef0b10ff9ad7a5008f63a1b558351a240b4227
2018-06-25 17:45:34 +09:00
Logan Chien
92a4974663 Merge changes I5f3b98aa,I6077d014,I276dbb46
* changes:
  sourcedr: Remove incomplete sourcedr
  sourcedr: Add missing __init__.py
  sourcedr: Move sub-projects to parent directory
2018-06-22 02:12:17 +00:00
Logan Chien
b9a95fc5b4 Merge "vndk-def: Fix check-dep --check-apk in Python 2" 2018-06-22 02:11:28 +00:00
Logan Chien
8ab92e5685 sourcedr: Remove incomplete sourcedr
This commit removes the incomplete source dependency review tool.

Test: n/a
Change-Id: I5f3b98aace3198262f35b45db552d64828533707
2018-06-21 16:52:21 +08:00
Logan Chien
8f6fbbc467 sourcedr: Add missing __init__.py
This commit adds a missing `__init__.py` to `ninja/tests`, so that
unit test discovery can find unit tests without any arguments.

Test: sourcedr/ninja/tests/run_tests.sh
Change-Id: I6077d014f33ccb176bf2138e3a0035c871c8eead
2018-06-21 16:40:05 +08:00
Logan Chien
e0a1300b46 sourcedr: Move sub-projects to parent directory
Test: sourcedr/blueprint/tests/run_tests.sh
Test: sourcedr/ninja/tests/run_tests.sh tests
Test: definition-tool/tools/update_dataset_auto.py
Change-Id: I276dbb46115622f4f562d2ff176433c56f8d945b
2018-06-21 16:39:52 +08:00
Logan Chien
888bb4a54f vndk-def: Fix check-dep --check-apk in Python 2
`string.decode('mutf-8')` converts `bytes` into `str` in Python 3.  On
the other hand, `string.decode('mutf-8')` converts `str` to `unicode` in
Python 2.  However, finding a `str` object in a set of `unicode`
objects may lead to false negatives.

This commit fixes the problem by encoding strings into `utf-8` after
decoding from `mutf-8`.

Bug: 110450167
Test: ./tests/run.py
Change-Id: Ifa6e97fffb5f364d0488cc98b6c59fbf4fb7869f
2018-06-21 10:23:56 +08:00
Logan Chien
c796fe9b64 Merge "sourcedr: Add manifest split analyzer" 2018-06-21 02:01:34 +00:00
Logan Chien
c3d8566699 Merge changes I61fd754e,I71bdc5e2,I1371b9ca
* changes:
  vndk-def: Ignore dex strings w/ invalid surrogates
  vndk-def: DexFileReader should return ModifiedUTF8
  vndk-def: Add command that dumps dex strings
2018-06-21 02:00:56 +00:00
Logan Chien
1cbfd683b8 sourcedr: Add manifest split analyzer
This commit adds a manifest split analysis tool.  This tool classifies
the Android.bp modules into 3 categories (i.e. system-only modules,
vendor-only modules, and both-side module) and list the git repositories
that define modules in two or more categories.

Test: analyze_manifest_split.py \
  -m ${ANDROID_BUILD_TOP}/.repo/manifest.xml \
  -b ${ANDROID_BUILD_TOP}/Android.bp

Change-Id: I74c4acc3cac8fc2795cbc03806e71685e1910818
2018-06-20 21:33:21 +08:00
Logan Chien
10af0bf908 vndk-def: Ignore dex strings w/ invalid surrogates
The previous CL silently ignores all dex strings that cannot be decoded
with Modified UTF-8 decoder.  However, bad unicode encodings are
usually a good indicator that the dex file format is changed.  Thus,
this commit separates invalid surrogates as special cases and only
ignore those dex strings.  Exceptions for other invalid encodings are
propagated after this CL.

Bug: 110450167
Test: ./tests/run.py
Change-Id: I61fd754eab76f0b9eb3c58ac7f48321258e46514
2018-06-20 19:11:12 +08:00
Logan Chien
afc9c01a36 vndk-def: DexFileReader should return ModifiedUTF8
This commit lifts the decoding logic from DexFileReader.  After this
commit, DexFileReader simply returns modified UTF-8 so that the user can
decide whether to decode it or not.

Bug: 110450167
Test: ./tests/run.py
Change-Id: I71bdc5e20553a17e9eab3eac597648e397e99730
2018-06-20 19:11:12 +08:00
Logan Chien
29153b915d vndk-def: Add command that dumps dex strings
This commit adds a subcommand to dump string constant literals from dex
files.

Bug: 110450167
Test: vndk_definition_tool.py dump-dex-string [apk]
Change-Id: I1371b9caa6844dfd2fb49a375c09632b6f2c4bb6
2018-06-20 19:10:48 +08:00
Treehugger Robot
3481d7e29f Merge "vndk-def: Check access in _enumerate_path()" 2018-06-20 04:01:25 +00:00
Treehugger Robot
b6e8719350 Merge changes I98a86296,I2950b566,If51918fd
* changes:
  Allow user to specificy local_dir value
  Check parent commit if revision is from *-release
  Allow logging across modules
2018-06-20 02:29:08 +00:00
Jae Shin
01268ffbea Allow user to specificy local_dir value
Previously the --local option assumed the local dir to be DIST_DIR.
Since in the actual use case, the branch where the VNDK snapshot is
built is different from the branch where this VNDK snapshot is
uploaded to, allow the user to specify the local dir as a command
line parameter.

Test: python update.py --local=<path to local dir> 28 -vv
Bug: 78279738
Change-Id: I98a86296076994c951b98457ef47c384d4cc940c
2018-06-19 20:50:49 +09:00
Jae Shin
ce3bb75034 Check parent commit if revision is from *-release
Revisions in a *-release branch include merge CLs that merge
*-dev to *-release. These revisions will not be in the source
of a GPL git project, so in these cases need to extract the parent
revision of the merge commit.

Test: python check_gpl_license.py --branch pi-release --build
<bid> 27 -vv
Bug: 78279738
Change-Id: I2950b56605b9af39c3ab012ae7a1ad407942d419
2018-06-19 20:49:33 +09:00
Logan Chien
3d0c1643ed vndk-def: Check access in _enumerate_path()
This commit add an access check in _enumerate_path() so that soft links
that cannot be resolved on host can be ignored.

Bug: 80459974
Test: vndk_definition_tool.py check-dep --check-apk \
  --system ${ANDROID_PRODUCT_OUT}/system \
  --vendor ${ANDROID_PRODUCT_OUT}/vendor

Change-Id: I0b0b793784b005139a62c5a48a5bd8f48cdd55c3
2018-06-19 16:12:11 +08:00
Logan Chien
c85814676d Merge changes Ie7318b61,Ie0d350f2
* changes:
  repo-pull: Fix pylint errors
  repo-pull: Fix undefined variable in except clause
2018-06-19 03:21:52 +00:00
Treehugger Robot
e7636d2e30 Merge "Add Metalava based android.jar targets in Androi.bp" 2018-06-18 16:55:28 +00:00