Commit graph

49269 commits

Author SHA1 Message Date
Yifan Hong
a2488b7d85 Merge "Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag." 2019-04-30 19:49:12 +00:00
Treehugger Robot
ab0ed975f0 Merge "Removing --flag 2 when building GSI vbmeta.img" 2019-04-30 08:06:34 +00:00
Yifan Hong
0e97dbb8ca Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag.
When set, product-img-tag.zip contains super.img instead of individual
user images from target files. For virtual devices, super.img is needed
to boot the device, but individual user images aren't needed.

Test: on A/B DAP, with flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor / system_other
Test: on non-A/B DAP, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor
Test: on A/B retrofit, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super_*.img and system_other.img, but not system / vendor
Bug: 113175337

Change-Id: I94e33091d0c837cae40776176b4dcfdd338aba90
2019-04-29 10:50:42 -07:00
Colin Cross
91f53fddc7 Remove reverse-list from java static libraries.
Make was reversing the list of static library dependencies when passing
it to merge_zips.  This was originally done to match the behavior of
unzipping each static library in order into the same directory,
overwriting duplicates each time.  This order is counter-intuitive,
and Soong does it the sensible way (first one takes priority, the same
as the compile classpath).  Fix Make to match Soong.

Bug: 131603999
Test: m checkbuild
Test: compare target_files.zip
Change-Id: Idad125068ed2f750dc2dd95ab82bacb6e074489d
2019-04-29 10:31:02 -07:00
Tao Bao
0376d7dcbb Merge "releasetools: GetCareMap supports non-sparse image." 2019-04-26 22:59:30 +00:00
Yifan Hong
8bfcc69e38 Merge "Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag." 2019-04-26 21:30:07 +00:00
Yifan Hong
484a6e53c1 Merge "Fix mainline_mixed build" 2019-04-26 20:56:25 +00:00
Yifan Hong
7e6397c2d5 Fix mainline_mixed build
build_mixed script can't merge system and product VINTF
data yet.

Fixes: 131418170
Bug: 131425279
Test: build 'target_files_package' for 'mainline_system_google_arm64',
see META/system_manifest.xml

Change-Id: I366d9bc802ee0e6bdf8fe480303f3fee827c579d
2019-04-26 12:30:31 -07:00
Treehugger Robot
4ec15d2c50 Merge "Remove libjavacrypto from system image." 2019-04-26 18:00:38 +00:00
Treehugger Robot
eccbfd5f4e Merge "Ignore vndk-* subdirectories in the library absence check." 2019-04-26 14:23:54 +00:00
Martin Stjernholm
60bb358221 Ignore vndk-* subdirectories in the library absence check.
They only contain prebuilts from older releases.

Test: m systemimage on affected internal lunch targets
Bug: 124293228
Change-Id: I059c9d0edb78e52838a25cef0472807847d77417
2019-04-26 12:12:34 +00:00
Pete Bentley
f9dd05f1bf Remove libjavacrypto from system image.
The only copy needed is the one in the Conscrypt APEX.

Bug: 123925742
Test: m
Change-Id: Ieea8549d047750cf3580d6fe0204fdf55b6b8394
2019-04-26 10:28:16 +01:00
Bill Peckham
3129d2c971 Merge "Fix missing import." 2019-04-26 02:38:08 +00:00
Yifan Hong
001ebfcb30 Merge changes from topic "productmanifest"
* changes:
  ota_from_target_files: include metadata when odm / product is changed.
  Add product manifest.
2019-04-25 22:51:27 +00:00
Bill Peckham
540d91ae3f Fix missing import.
Test: Verify that script runs properly now that import is present.
Change-Id: I255bc6ca2ba1f2cc387001c6f4bf9690a90eb47c
2019-04-25 14:18:16 -07:00
Yifan Hong
acd862aed3 Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag.
If set to true,
- super.img is built from images in $PRODUCT_OUT
- super.img is built to $PRODUCT_OUT
- super.img is built when 'make'.

'make dist' still builds super image from images in target files to
intermediates directory.

This flag is useful for virtual devices, but isn't intended to be set for
actual devices. For actual devices, userspace fastboot should flash
super_empty.img and individual user images separately.

Test: on cuttlefish (flag is set),
      make            # generates $OUT/super.img
      make superimage # generates $OUT/super.img
Test: on real non-retrofit DAP device (flag is not set)
      make            # no super.img is generated
      make superimage # generates $OUT/obj/PACKAGING/.../super.img
      make dist       # generates out/dist/super.img

Bug: 113175337

Change-Id: Ieb81e4fbb663bb4b69e9962c3fa9f16b03aeb907
2019-04-25 10:51:35 -07:00
Yifan Hong
51d375610c ota_from_target_files: include metadata when odm / product is changed.
When odm is changed, device manifest/matrices should be included.
When product is changed, framework manifest/matrices should be included.

Bug: 130714844
Bug: 126770403
Test: build with odm and product VINTF metadata

Change-Id: I49c8083e0e7185ae7b96047d68f1f624b1113dfc
2019-04-25 10:22:39 -07:00
Yifan Hong
51e87262c2 Add product manifest.
- Rename framework_manifest.xml to system_manifest.xml since that's more accurate.
- Add product_manifest.xml to base_product.mk
- Add product_manifest.xml to verified_assembled_framework_manifest.xml to check
  it at build time.

Bug: 126770403
Bug: 130714844
Bug: 80547152

Test: build and inspect output
Test: lshal

Change-Id: I1b447d8c36f72768e28e9bcaa4d06afdeba08c2a
2019-04-25 10:22:36 -07:00
Bill Peckham
d540f5a9a5 Merge "Sort content of merged target files package." 2019-04-25 16:19:47 +00:00
Tao Bao
8bdfb990ea releasetools: GetCareMap supports non-sparse image.
Test: `atest --host releasetools_test`
Test: `m dist` with a target that uses non-sparse images.
Test: Run UpdateVerifierTest on blueline.
Change-Id: I8fdebee42fcaac78c2d1be2a84ddb69f46ec701d
2019-04-25 09:15:07 -07:00
Tao Bao
b5b055ab50 Merge "releasetools: Accept PRESIGNED keys in apexkeys.txt." 2019-04-25 14:34:00 +00:00
Treehugger Robot
23cbf2b1b5 Merge "Build contexts files with Soong" 2019-04-25 07:46:19 +00:00
Tao Bao
f454c3a0b4 releasetools: Accept PRESIGNED keys in apexkeys.txt.
For an PRESIGNED APEX, it has the following format, which should be
considered as a valid input.

name="foo.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED"

Bug: 131153746
Test: Run sign_target_files_apks.py on a target_files.zip with PRESIGNED
      APEXes.
Test: python -m unittest sign_target_files_apks
Change-Id: I51076b0c6eddfb75637d37659a08009f0a88e931
2019-04-25 00:10:07 -07:00
Tao Bao
a212ab59df Merge "releasetools: PRESIGNED APEX container entails PRESIGNED payload." 2019-04-25 02:03:50 +00:00
Bill Peckham
9662cfb234 Sort content of merged target files package.
By sorting the content of the final output merged target files package, the
merged target files package is more like the target files packages generated by
a build.

Test: Generate merged target files package, verify that content is sorted.
Change-Id: Ic0c198630ebd7692a3f3f9663d85e4b45229175c
2019-04-24 17:59:01 -07:00
Treehugger Robot
74a679d963 Merge "Adds support to create img from target files directory instead of zip." 2019-04-24 23:53:19 +00:00
Treehugger Robot
7d9b575fb3 Merge "Support LOCAL_SOONG_PROGUARD_DICT in soong_java_prebuilt.mk" 2019-04-24 22:30:12 +00:00
Tao Bao
f98fa1094e releasetools: PRESIGNED APEX container entails PRESIGNED payload.
We used to require explicitly setting both (e.g. `-e foo.apex=` and
`--extra_apex_payload_key foo.apex=` to skip signing `foo.apex`).

This CL allows specifying `-e` alone to achieve the same result.
However, if a conflicting `--extra_apex_payload_key` is also specified,
that would be considered as a config error.

Bug: 131153746
Test: Run sign_target_files_apks.py with `-e foo.apex=` alone to skip
      signing foo.apex.
Test: Run sign_target_files_apks.py with `-e foo.apex=` and
      `--extra_apex_payload_key foo.apex=key` and expect assertion error.
Change-Id: Ia747f59ee726b60bdb1445024e749320171064c2
2019-04-24 15:17:23 -07:00
Daniel Norman
b8a2f9df51 Adds support to create img from target files directory instead of zip.
This is used by merge_target_files to prevent an unnecessary unzip and
copy.

Test: Ran merge_target_files.py and booted using the img.zip.
Change-Id: I6fe0dd025b30b3f4965c9b22fb6943019bf5899b
2019-04-24 20:53:22 +00:00
Treehugger Robot
ff14c47182 Merge "Clean up LOCAL_DONT_DELETE_JAR_META_INF" 2019-04-24 15:08:28 +00:00
Treehugger Robot
2938f08385 Merge "Fix build error for no-ramdisk targets" 2019-04-24 14:48:59 +00:00
Bowgo Tsai
1578e23991 Fix build error for no-ramdisk targets
In some build targets, e.g., aosp_arm64_ab, $OUT/ramdisk is an empty
dir, and leads to rsync $OUT/ramdisk/* failure. Removing the trailing
asterisk to avoid throwing an error if it's empty. Note that the
trailing slash still needs to be kept to avoid creating an additional
directory level at the destination.

Bug: 126493225
Test: `make ramdisk_debug` on aosp_arm64_ab
Test: flash boot-debug.img on crosshatch still can adb root
Change-Id: I44937324379fa78fc26a4471ba94eb7694911c2d
Merged-In: I44937324379fa78fc26a4471ba94eb7694911c2d
2019-04-24 09:01:49 +00:00
Treehugger Robot
913478401a Merge "Fix aosp_arm64 build error when make ramdisk_debug" 2019-04-24 06:53:14 +00:00
Bowgo Tsai
c3e8cc9bd1 Fix aosp_arm64 build error when make ramdisk_debug
Some targets have ramdisk.img but no boot.img, howerver,
ramdisk-debug.img only depends on boot.img. Fix this by making
ramdisk-debug.img depends on ramdisk.img.

Bug: 126493225
Test: make ramdisk_debug
Change-Id: I65120a3b3372712fafc26442354ee031eede0bd3
2019-04-24 04:55:10 +00:00
Tao Bao
2f401655a9 Merge "Write ro.build.ab_update to /vendor/build.prop." 2019-04-23 22:16:48 +00:00
Colin Cross
691335af21 Support LOCAL_SOONG_PROGUARD_DICT in soong_java_prebuilt.mk
Test: m checkbuild
Change-Id: I60a14be7d8bc4992b0519397b0e1933819f6e773
2019-04-23 20:05:35 +00:00
Colin Cross
aebe1e9fe9 Clean up LOCAL_DONT_DELETE_JAR_META_INF
Allow setting it for host modules, it is necessary for
RoboLectric.

Remove some unused PRIVATE_DONT_DELETE_JAR_META_INF variables.

Remove unzip-jar-files, it is obsolete since merge_zips was
introduced.

Test: m checkbuild
Change-Id: I3f2fc466321904eace31525cbac99ad524f39188
2019-04-23 13:05:11 -07:00
Colin Cross
f6105e595b Merge "Remove unsupported option from R8 flags" 2019-04-23 19:31:38 +00:00
Jaewoong Jung
57cbc990e9 Merge "Skip unneeded notice files for ETC modules." 2019-04-23 14:43:52 +00:00
Bowgo Tsai
2e2a7682ba Removing --flag 2 when building GSI vbmeta.img
With the support of enabling AVB on standalone partitions in libfs_avb,
devices can boot GSI with dm-verity. No need to disable AVB anymore.

Devices still can use the following command to disable AVB on
device-specific vbmeta.img if needed:

    `fastboot flash --disable-verification vbmeta vbmeta.img`

Bug: 130595457
Test: Tree Hugger
Change-Id: I067dcda15f14f04428e0b60ce1f49227d61e4349
2019-04-23 18:10:01 +08:00
Treehugger Robot
db57997c72 Merge "Revert "Adding adb_debug.prop"" 2019-04-23 07:40:53 +00:00
Treehugger Robot
f0151b1514 Merge "Avoid signing debuggable boot-debug.img" 2019-04-23 07:32:47 +00:00
Bowgo Tsai
78369ebbc1 Avoid signing debuggable boot-debug.img
The boot-debug.img should NOT be release signed and can only be used
if the device is unlocked. Adding a check to prevent the tool from
signing this debuggable boot.img.

See the following for more details about boot-debug.img:

  https://android-review.googlesource.com/c/platform/build/+/947857

Bug: 126493225
Test: put a file /force_debuggable into boot.img, checks the following
      command fails:
        ./build/tools/releasetools/sign_target_files_apks \
        out/dist/*-target_files-*.zip signed-target_files.zip
Change-Id: Ia5232949cb9582d2b4eaa171d9e9f3fe7317d418
2019-04-23 12:55:10 +08:00
Tao Bao
67932ab694 Write ro.build.ab_update to /vendor/build.prop.
It's a vendor-specific property, which was historically included into
/system/build.prop prior to this change.

Whether a target uses A/B OTA shouldn't affect anything on the system
image, including the `ro.build_ab_update` property. Moving it to vendor
partition will also make it consistent with other A/B specific configs,
such as the `slotselect` flag in device fstab
(/vendor/etc/fstab.$(PRODUCT_PLATFORM)).

Bug: 130516531
Test: Build and flash crosshatch-userdebug. Check /system/build.prop,
      /vendor/build.prop and the runtime property.
Change-Id: I927625fbcc02c4a875a1f39850b51576f5ff6c66
2019-04-22 21:08:25 -07:00
Tao Bao
7b3e97b1ea Merge "releasetools: Update the comment on common.AVB_PARTITIONS." 2019-04-23 03:09:26 +00:00
Treehugger Robot
7d7c08d6c4 Merge "Adding boot-debug.img and ramdisk-debug.img" 2019-04-23 02:01:36 +00:00
Inseob Kim
cd0e477d8f Build contexts files with Soong
This is to migrate sepolicy Makefiles into Soong. For the first part,
file_contexts, hwservice_contexts, property_contexts, and
service_contexts are migrated. Build-time tests for contexts files are
still in Makefile; they will also be done with Soong after porting the
module sepolicy.

The motivation of migrating is based on generating property_contexts
dynamically: if we were to amend contexts files at build time in the
future, it would be nicer to manage them in Soong. To do that, building
contexts files with Soong can be very helpful.

Bug: 127949646
Bug: 129377144
Test: 1) Build blueline-userdebug, flash, and boot.
Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash,
and boot.
Test: 3) Build aosp_arm-userdebug.

Change-Id: I486f7065207468697320776f726b732077656c6c
2019-04-23 10:11:14 +09:00
Jaewoong Jung
dca3186b84 Skip unneeded notice files for ETC modules.
Non-installable, non-library modules can still have notice files
attached if they are bundled in an apex module, in which case the
current make setting would generate an error. This change makes it just
ignore them silently if the module is ETC. Other classes will still
trigger an error.

Test: manual build + TreeHugger
Change-Id: Ic7931f990369f744c8de62956a1a0a9c0451d6ab
2019-04-22 21:39:10 +00:00
Luca Stefani
765d2aed94 Remove unsupported option from R8 flags
See I71cd2d0e54f24c61043ac0a67df0a22c1e74deb3

Bug: 112338230
Change-Id: Ia4f19555fb86464c19d3e9cd07cba1870b215181
2019-04-22 20:00:37 +00:00
Tao Bao
22c434e80f Merge "Move update-payload-key.pub.pem into a module." 2019-04-22 17:16:46 +00:00