Commit graph

15607 commits

Author SHA1 Message Date
David Brazdil
7adbde4cd6 hiddenapi: Split stubs into public/system/test classpaths
The hiddenapi tool needs to build a class hierarchy from API stubs.
These are inconsistent between public, system and test API stubs.
This patch splits stubs into the three corresponding categories
and groups the JARs being passed to hiddenapi.

Test: m appcompat
Bug: 76424618
Change-Id: I3f707070d44f04578bc6148a45f2283bcf060703
2018-08-03 17:02:37 +01:00
Yifan Hong
567df6214f Merge "target_files: copy to PRODUCT-SERVICES instead" 2018-08-02 21:53:57 +00:00
Tao Bao
1ebda8d4d2 Add the missing args for building AVB-enabled product-services.img.
Change-Id: I1a6fddee5512509b43f71a53cd1ad023ceacdb3c
Fixes: 112109844
Test: Set up a target with product-services.img. `m dist`
2018-08-01 17:22:50 -07:00
Yifan Hong
4d6b38c47a target_files: copy to PRODUCT-SERVICES instead
The add_img_to_target_files.py script uses upper() to determine
the name of sub-directory under target_files_intermediates. The
name of the image is product-services.img but the sub-directory
name was PRODUCT_SERVICES. Change it to PRODUCT-SERVICES so that
'm dist' works.

Test: m dist
Change-Id: I8cad841c674b5d62c1d803d0383fc3aee14f272a
2018-08-01 16:46:16 -07:00
Yifan Hong
a42e5f976d Remove USE_LOGICAL_PARTITIONS override
... so that its requirements does not fallback
on the overridden USE_LOGICAL_PARTITIONS, but
PRODUCT_USE_LOGICAL_PARTITIONS.

Test: m superimage -j
Change-Id: Ib14aaf83cc8bd4336125d503d11c69a60566530e
2018-08-01 18:29:44 +00:00
Yifan Hong
d1c308bf40 Merge "Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags." 2018-08-01 18:29:29 +00:00
David Brazdil
cfe591c565 Merge "Remove android.test.{mock,runner}.stubs from private-list.txt" 2018-08-01 15:24:09 +00:00
Treehugger Robot
a2b0e478d3 Merge "Revert "Build GSIs (aosp_$arch products) in sparse format"" 2018-08-01 09:24:25 +00:00
Colin Cross
132748cb80 Revert "Build GSIs (aosp_$arch products) in sparse format"
This reverts commit bc0248f211.

Reason for revert: Triggered preexisting issue with e2fsck and ASAN

Bug: 112062612
Change-Id: I7b52fe539252ab1bb7229d32accb7abd6417f470
2018-08-01 06:26:03 +00:00
Treehugger Robot
989ba9d502 Merge "Change the content of lsdump_paths.txt to newline-separated paths" 2018-08-01 06:02:30 +00:00
Treehugger Robot
ca52cd4b64 Merge "aapt2: use clean-path on paths to resource files" 2018-08-01 02:44:27 +00:00
Yifan Hong
2dae5721d4 Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags.
Split the flag into PRODUCT_USE_DYNAMIC_PARTITION_SIZE
and PRODUCT_BUILD_SUPER_PARTITION. More sub-flags can be
added with the same way.

Also change some checks with USE_LOGICAL_PARTITIONS with
the appropriate sub-flags.

This allows easier device bring-up to fulfill the requirements
separately.

This also enables dynamic partition size without logical patition.
Originally, to enable BOARD_*_PARTITION_RESERVED_SIZE must also
enable PRODUCT_USE_LOGICAL_PARTITIONS. The patch fix the rule to
let dynamic partition size is able to be used independently.

Fixes: 111966003

Test: make superimage with PRODUCT_USE_LOGICAL_PARTITIONS
Change-Id: I45b29c87bf94356d8416bbd58a14c8982039c222
2018-08-01 00:39:13 +00:00
Dario Freni
716e9b686c Run appcompat on vendor and product-services.
Also add some more relevant information at the beginning of each report,
to make triaging of the reports easier.

To test this I declared ExactCalculator as
LOCAL_PRODUCT_SERVICES_MODULE, and this is the resulting log:

"""
Package name: com.android.calculator2
Module name in Android tree: ExactCalculator
Local path in Android tree: packages/apps/ExactCalculator
Install path on aosp_marlin-eng: out/target/product/marlin/system/product-services/app/ExactCalculator/ExactCalculator.apk

appcompat.sh output:
NOTE: appcompat.sh is still under development. It can report
API uses that do not execute at runtime, and reflection uses
that do not exist. It can also miss on reflection uses.
1: Reflection light greylist Landroid/os/Bundle;->getIBinder use(s):
       Landroid/support/v4/app/BundleCompat$BundleCompatBaseImpl;->getBinder(Landroid/os/Bundle;Ljava/lang/String;)Landroid/os/IBinder;

2: Reflection light greylist Landroid/view/View;->mAccessibilityDelegate use(s):
       Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->hasAccessibilityDelegate(Landroid/view/View;)Z

3: Reflection light greylist Landroid/view/View;->mMinHeight use(s):
       Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->getMinimumHeight(Landroid/view/View;)I

4: Reflection light greylist Landroid/view/View;->mMinWidth use(s):
       Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->getMinimumWidth(Landroid/view/View;)I

4 hidden API(s) used: 0 linked against, 4 through reflection
       0 in blacklist
       0 in dark greylist
       4 in light greylist
To run an analysis that can give more reflection accesses,
but could include false positives, pass the --imprecise flag.
"""

Test: m (also on internal)
Bug: 110073830
Change-Id: I5114f51d1ab163e954fcffb159ef335abc289cf6
2018-08-01 00:22:08 +01:00
Colin Cross
0cade20918 aapt2: use clean-path on paths to resource files
The aapt2 rules need to generate an output path for each resource
file.  Use $(call clean-path) on the input path so the output path
doesn't contain "..".

Bug: 112037828
Test: m checkbuild
Change-Id: Ib4e255e7a7f1d069cd3871a12ac232f231f19646
2018-07-31 20:47:38 +00:00
David Brazdil
7b59994751 Merge "Do not run veridex on unbundled app builds" 2018-07-31 16:01:58 +00:00
Treehugger Robot
44c61176e8 Merge "Build GSIs (aosp_$arch products) in sparse format" 2018-07-31 15:52:08 +00:00
David Brazdil
825770ebad Do not run veridex on unbundled app builds
Unbundled app builds do not build the framework, only apps against
the prebuilt public API. Running veridex from the local tree does,
however, depend on the framework to generate the list of non-SDK
APIs. Disable veridex on such builds and remove appcompat.zip from
artifacts.

Test: make ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I16289adc7fc660109d61260e8a49e992228e727c
2018-07-31 15:15:27 +01:00
David Brazdil
bb5bf2e2a3 Remove android.test.{mock,runner}.stubs from private-list.txt
Generation of the full list of non-SDK APIs resolves public API
stubs against the boot class path. Remove stubs which do not
correspond to libraries on the boot class path.

This removes "Unresolved" warnings while building the API lists.

Bug: 112002105
Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Change-Id: I1a73ed9ee50affed5284692e829a433ec1484f01
2018-07-31 10:55:31 +01:00
Treehugger Robot
2e0fb33af8 Merge "Add more ro.vendor.build.*" 2018-07-31 08:07:57 +00:00
Treehugger Robot
7654023bcd Merge "Adding VENDOR_SECURITY_PATCH to vendor partition build.prop" 2018-07-31 03:33:36 +00:00
Yi-yo Chiang
ac0d49fe1e Change the content of lsdump_paths.txt to newline-separated paths
This commit changes the delimiters from space characters to newline
characters so that lsdump_paths.txt can be easily read and parsed by
human.

Bug: 111814844
Test: m vndk findlsdumps -j18
Change-Id: I5c50934a0f035244cff71351d9f4be4203222590
2018-07-30 18:45:17 +00:00
Yifan Hong
bb937a6b69 Merge changes I1459d62f,I4c2b975e
* changes:
  Build image for super partition
  productservices => product_services
2018-07-30 18:23:38 +00:00
Yifan Hong
9c1264417f Merge changes from topic "lrap_sysprop"
* changes:
  ro.boot.logical_partitions moved to product image
  Fix collapse-pairs for last empty property
2018-07-30 17:30:50 +00:00
Yifan Hong
4f85bace12 Merge "Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS." 2018-07-30 17:29:51 +00:00
Treehugger Robot
6e5b55bf7f Merge "Remove workaround for libclang_rt.ubsan* vndk libs" 2018-07-30 04:24:29 +00:00
Yifan Hong
af9e7f04c3 ro.boot.logical_partitions moved to product image
Test: m productimage -j && cat $OUT/product/build.prop
Bug: 111909365
Change-Id: I62abd5602f6b2fe7eead9d636ffb7708df23fd02
2018-07-27 16:24:38 -07:00
Yifan Hong
285083e475 Fix collapse-pairs for last empty property
If the last token in the argument for collapse-pairs is
key=, then the following lines were written:
    key
    =
This patch fixes it so that key= is written instead.

Test: specify ro.boot.logical_partitions= at the end of
ADDITIONAL_PRODUCT_PROPERTIES and `cat $OUT/product/build.prop`
shows:
ro.boot.logical_partitions=

Change-Id: I33a0efb59871f0e36a93c8fae0d75f2735994301
2018-07-27 16:24:38 -07:00
Yifan Hong
37c0c7c82d Build image for super partition
... for bootstrapping / initializing the device.
Image is built to $(PRODUCT_OUT)/super.img when running
`m dist`. For A/B devices, the image contains other
partitions in the _a slot.

Change-Id: I1459d62f02b95f142dfb3b7608f88ec6801dbf37
Fixes: 111758129
Test: m superimage -j
2018-07-27 13:45:43 -07:00
Yifan Hong
0c3eb63eb3 Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS.
When it is true, all kernel requirements are enforced during OTA.
Otherwise:
- Kernel minor revision is not enforced.
- Kernel configs are not enforced.

Bug: 111840577
Test: `m dist` and inspect system_matrix.xml in OTA zip

Change-Id: I965ee5ef59ff48b600ebfab858ecf0909397fe6b
2018-07-27 12:42:11 -07:00
Isaac Chen
bc0248f211 Build GSIs (aosp_$arch products) in sparse format
After aosp/719235 is merged, mk_qemu_image.sh now accepts
images in both raw and sparse formats. So We can build GSIs
(system images of aosp_$arch products) in sparse format, which,
historically, is expected by users of GSIs.

Bug: 111775319
Test: The system images below are all in sparse format:
    $ lunch aosp_x86-userdebug; $m -j; emulator
    $ lunch aosp_x86_64-userdebug; $m -j; emulator
    $ lunch aosp_arm-userdebug; $m -j; emulator
    $ lunch aosp_arm64-userdebug; $m -j; emulator

Change-Id: I4cb8df0908c4618376117249b61c853fac947e47
2018-07-27 10:33:57 +08:00
Treehugger Robot
f2bea1b296 Merge "ATest: Sync auto_test_config for multilib modules" 2018-07-27 01:49:45 +00:00
Yifan Hong
ebc041af56 productservices => product_services
Make names consistent.
Some things that does not change:
- productservicesimage target and intermediates

Test: build product services image
Bug: 111609632
Change-Id: I4c2b975e194577aad3d51b908b103880625deb5e
2018-07-26 17:19:02 -07:00
Colin Cross
7b21221d2a Merge changes from topic "manifest_fixer_targetSdkVersion"
* changes:
  Pass --library to manifest_fixer.py for android libraries
  Fix dependencies for obfuscated instrumentation tests
  Move manifest fixing to a separate rule
2018-07-26 22:02:36 +00:00
Treehugger Robot
df899f64d0 Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk" 2018-07-26 21:44:05 +00:00
Treehugger Robot
aa2abc3324 Merge "Add a version.txt file to compatibility suite zips" 2018-07-26 21:30:51 +00:00
Treehugger Robot
8e472bc42e Merge "Update default template for suites native tests" 2018-07-26 20:38:11 +00:00
Julien Desprez
7a10601e7c Add a version.txt file to compatibility suite zips
This will avoid having to tag jar file with a manifest
implementation version.

Test: make cts, check the zip
Bug: 111834256
Change-Id: Id809217cefb36b4779fdf41c02f5809ba22d03a1
2018-07-26 11:47:46 -07:00
Yifan Hong
78ae26132d BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk
... because variable checks should go there.

Test: pass
Change-Id: I484f928d848fd4f3b3936d1c7fd03976ee64feb2
2018-07-26 10:50:45 -07:00
Treehugger Robot
d453f6245d Merge "Generate unstripped .oat files in the symbols directory." 2018-07-26 12:10:53 +00:00
Anton Hansson
362fff4fcd Merge "Don't apply path enforcements for non-full builds." 2018-07-26 10:02:44 +00:00
Hung-ying Tyan
c565f5c2ed Add more ro.vendor.build.*
to facilitate independent updates of vendor/odm images.

Bug: 78600951 (#56,#57)
Bug: 111491184
Test: build aosp_marlin-userdebug and check vendor/build.prop

Change-Id: I798c13822695259375fbc8d5c7fe08d43a540e46
2018-07-26 17:39:47 +08:00
Mathew Inwood
48a7929962 Merge "Build rules to derive greylists from annotations." 2018-07-26 07:37:29 +00:00
Max Bires
b64277de4c Adding VENDOR_SECURITY_PATCH to vendor partition build.prop
This will add ro.vendor.build.security_patch to /vendor/build.prop on
device

Bug: 76428542
Test: ro.vendor.build.security_patch entry shows up under
/vendor/build.prop

Change-Id: I3d3ec2d0e76fc5e62cd283ed4bce3894423cabdd
Merged-In: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
(cherry picked from 56d444b98f)
2018-07-26 14:35:32 +08:00
yangbill
86f441d899 ATest: Sync auto_test_config for multilib modules
auto_test_config will only be set once for the same
$(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)
ATest should also treat the multilib variant modules as testable.

Fix auto_generated config may have chance to be set as 2nd_arch name

BUG: 111397357
BUG: 110820867
BUG: 80298359

Test: . build/envseup.sh
      lunch aosp_x86_64-eng
      make -j out/target/product/generic_x86_64/module-info.json
      (check module-info.json for hello_world_test)
      make -j hello_world_test
      cat out/target/product/generic_x86_64/testcases/hello_world_test/hello_world_test.config

Change-Id: I69895b6373476c0053f2c6e657770d606ccfbcd1
2018-07-26 14:00:55 +08:00
Jae Shin
4b6ba7e0df Remove workaround for libclang_rt.ubsan* vndk libs
libclang_rt.ubsan* VNDK core libraries are no longer built
for all arch flavors. Now, only the TARGET[_2ND]_ARCH-specific
libs are builts. Therefore no need to filter-out and re-add
libclang_rt.ubsan* VNDK core libraries.

Test: m -j vndk
Change-Id: I48080c1cd546cfc9f14313a3c9559d5c1bb2fdbe
2018-07-26 12:14:12 +09:00
Colin Cross
acebb3266f Pass --library to manifest_fixer.py for android libraries
manifest_fixer.py needs to know the difference between apps
and android libraries in order to change its behavior around
inserting targetSdkVersion.

Bug: 111347801
Test: m checkbuild
Change-Id: Ic21f1b98e3bcbd782612370c46134fc9dd157512
2018-07-25 16:21:41 -07:00
Colin Cross
fcb441b2b7 Fix dependencies for obfuscated instrumentation tests
This path is never used, otherwise the dependency on
proguard.classes.jar would have triggered the checkbuild
dangling rules errors.  Remove the dependency on the
proguarded classes, which don't exist any more, and depend
on the proguard_options and proguard_dictionary files
instead.

Test: none
Change-Id: Ia3ebc3bc71f0d6fdfa4a7a6850e2f7021adfdd1a
2018-07-25 14:30:10 -07:00
Colin Cross
a90b6070c7 Move manifest fixing to a separate rule
Manifest fixing is getting complicated, move it to a separate rule
so that it doesn't have to be a function in definitions.mk.

Bug: 111347801
Test: m checkbuild
Change-Id: Ibc60ad79c9c4f4a63a0e1c8f7779534954fb6585
2018-07-25 14:30:05 -07:00
Nan Zhang
527c295cf5 Fix the broken build: aosp-master/sdk_x86-sdk
metalava-api-stubs-docs_annotations.zip needs to be added as part of
sdk.atree dependencies.

Bug: b/78245848
Test: make -j80 PRODUCT-sdk_x86-sdk sdk_repo; and check ninja file.
Change-Id: I6be5d59c6f91a519f8d16ff273daa35c349d18aa
2018-07-24 17:15:54 -07:00
Nan Zhang
28af1e7484 Merge "Copy annotations.zip to out/target/common/obj/PACKAGING/" 2018-07-24 22:44:12 +00:00