Commit graph

49198 commits

Author SHA1 Message Date
Bill Peckham
d540f5a9a5 Merge "Sort content of merged target files package." 2019-04-25 16:19:47 +00: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
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
Colin Cross
2d34ee923a Merge "Allow codename.fingerprint format for targetSdkVersion" 2019-04-22 16:48:35 +00:00
Bowgo Tsai
0013f55ef4 Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.

File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.

It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.

Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.

Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
      are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
       in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-debug.img and $OUT/boot.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`

Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
2019-04-22 21:50:07 +08:00
Treehugger Robot
6a3d438aa0 Merge "Disable non-AOSP nnapi extensions on product partition in GSI" 2019-04-22 11:46:13 +00:00
Bowgo Tsai
8966070431 Revert "Adding adb_debug.prop"
This reverts commit a280a66b5a.

/init now switched to read adb_debug.prop from debug ramdisk instead
of GSI or other system.img. No need to keep the file in GSI.

See the following for more details:
  https://android-review.googlesource.com/c/platform/system/core/+/946517

Bug: 126493225
Test: tree hugger
Change-Id: I981db8e13216fbe0f066f4d3684ee149b1177d22
2019-04-22 18:39:44 +08:00
SzuWei Lin
3c6fde2d90 Disable non-AOSP nnapi extensions on product partition in GSI
The extensions is for OEM. To avoid AOSP code using OEM
extensions mistakenly. GSI denys product to use the extensions
by enabling the following property:

    ro.nnapi.extensions.deny_on_product=true


Bug: 129900377
Test: make gsi_arm64-userdebug, check /system/build.prop
Change-Id: Ia679f1f9c108bd5a164c8cdeb1d73f57da755608
2019-04-22 06:28:13 +00:00
Tao Bao
0733fbeaf8 Move update-payload-key.pub.pem into a module.
This allows update_engine listing the file as a required module,
regardless of the value in AB_OTA_UPDATER.

Bug: 130516531
Test: Build aosp_arm64-userdebug w/o setting AB_OTA_UPDATER. Check that
      /system/etc/update_engine/update-payload-key.pub.pem is available.
Change-Id: Ied041aca750e7260402ae8dbf65ff740d0b87205
2019-04-21 18:25:24 -07:00
Tao Bao
967105ada9 Merge "Build otacerts as a module." 2019-04-22 01:20:42 +00:00
Tao Bao
6f34013ba6 Build otacerts as a module.
Bug: 30414428
Test: `m -j dist` with aosp_taimen-userdebug. Check
      /system/etc/security/otacerts.zip available under system and
      recovery images.
Change-Id: I5abeb2da441fb3e3231e094063c2383eb3807852
Merged-In: I5abeb2da441fb3e3231e094063c2383eb3807852
2019-04-21 14:24:43 -07:00
Treehugger Robot
1a5e781659 Merge "Move default native.bridge property to system set" 2019-04-21 21:06:49 +00:00
Colin Cross
ab2b34b8fd Merge "Use framework.aidl built by Soong" 2019-04-21 17:20:17 +00:00
Lev Rumyantsev
7e9f49c73c Move default native.bridge property to system set
So that it can be overridden by PRODUCT_PROPERTY_OVERRIDES.

Test: native bridge property is overridden when requested
Bug: 130825973
Bug: 130564502
Change-Id: I8413b9b5b2ac24ac62b6cf22a5f14393420927f5
2019-04-20 23:02:16 -07:00
Treehugger Robot
a8abd3beb7 Merge "Fix typo of PRODUCT_BUILD_ODM_IMAGE" 2019-04-20 06:26:04 +00:00
Dan Willemsen
91871f3692 Merge "Master is now designated for R. Update MAX_PLATFORM_VERSION, etc." 2019-04-20 01:06:00 +00:00
Treehugger Robot
0b683a8f8d Merge changes from topics "obsolete_broken_dup_copy_headers", "obsolete_broken_phony_targets"
* changes:
  Obsolete BUILD_BROKEN_DUP_COPY_HEADERS
  Obsolete BUILD_BROKEN_PHONY_TARGETS
2019-04-19 23:56:14 +00:00
Dan Willemsen
25a6937d34 Fix typo of PRODUCT_BUILD_ODM_IMAGE
Bug: 130879723
Test: treehugger
Change-Id: Ibe6523ca77aeb1ff6fdd138dcf2bfa46bcdeee59
2019-04-19 15:00:12 -07:00
Dan Willemsen
1d4a56f1a0 Obsolete BUILD_BROKEN_DUP_COPY_HEADERS
There are no remaining users.

Test: treehugger
Change-Id: I1fd5b933372e3ea391c121d265f41c35b832b206
2019-04-19 18:28:53 +00:00
Dan Willemsen
407ca587be Obsolete BUILD_BROKEN_PHONY_TARGETS
There are no remaining users.

Test: treehugger
Change-Id: Ice6f25a59265305e7e5d3dd041b16cd04674dd1e
2019-04-19 11:26:14 -07:00
Tao Bao
2a41c7e48a Merge "Add support for TARGET_SCREEN_DENSITY" 2019-04-19 17:19:49 +00:00
Anton Hansson
45a40da0d5 Add support for TARGET_SCREEN_DENSITY
This variable is used to populate the ro.sf.lcd_density property
in /vendor/build.prop, as well as choosing the correct density
bucket for assets in recovery.

Bug: 118676832
Test: inspect taimen and crosshatch in recovery
Test: adb shell getprop ro.sf.lcd_density
Change-Id: I80cf4d28ecfbae17f1ee206a279e7d9144bd7c05
Merged-In: I80cf4d28ecfbae17f1ee206a279e7d9144bd7c05
(cherry picked from commit 0dc9878af0)
2019-04-19 09:19:53 -07:00
Treehugger Robot
235f7d7686 Merge "Adds --output-img flag to enable building the IMG package." 2019-04-19 02:43:20 +00:00