Commit graph

52821 commits

Author SHA1 Message Date
Jaewoong Jung
57cbc990e9 Merge "Skip unneeded notice files for ETC modules." 2019-04-23 14:43:52 +00:00
Bowgo Tsai
d82a1549f1 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
Merged-In: I30137c3caef91805d9143d404e5e4d06c0fccc30
(cherry picked from commit 0013f55ef4)
2019-04-23 21:03:00 +08:00
Bowgo Tsai
08aca59c53 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
Merged-In: Ia5232949cb9582d2b4eaa171d9e9f3fe7317d418
(cherry picked from commit 78369ebbc1)
2019-04-23 21:00:08 +08: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
Bowgo Tsai
2835149987 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
Merged-In: I981db8e13216fbe0f066f4d3684ee149b1177d22
(cherry picked from commit 8966070431)
2019-04-23 16:24:29 +08:00
Bowgo Tsai
bf23e32478 Merge "Revert "Adding adb_debug.prop"" am: db57997c72
am: 3a4df557b0

Change-Id: I30d442f7e519684dfdb9824c02af5556d9218320
2019-04-23 00:52:26 -07:00
Bowgo Tsai
65feee7adb Merge "Avoid signing debuggable boot-debug.img" am: f0151b1514
am: 2b90184d5c

Change-Id: I9f04585f1d216cae12508372d873aa011fb36f45
2019-04-23 00:51:33 -07:00
Bowgo Tsai
3a4df557b0 Merge "Revert "Adding adb_debug.prop""
am: db57997c72

Change-Id: I505dcd655de0fe421848a57948ad4a0f32a137a5
2019-04-23 00:47:26 -07:00
Bowgo Tsai
2b90184d5c Merge "Avoid signing debuggable boot-debug.img"
am: f0151b1514

Change-Id: Id1c3d08c2ace0fb0189c51f2447fb866a71fc7c8
2019-04-23 00:46:29 -07: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
Lev Rumyantsev
9aacab8994 [automerger skipped] Move default native.bridge property to system set
am: 19ecb76b7b -s ours
am skip reason: change_id I8413b9b5b2ac24ac62b6cf22a5f14393420927f5 with SHA1 7e9f49c73c is in history

Change-Id: I9c2fc396c2c998539d89cdfb7a8e3a1fe75d5fdc
2019-04-22 22:39:16 -07: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
f9f4cce315 Merge "releasetools: Update the comment on common.AVB_PARTITIONS." am: 7b3e97b1ea
am: 5a5d4e0d63

Change-Id: Idb1beb657253e682edddeb4ca5ef1270f05dda7d
2019-04-22 20:32:45 -07:00
Tao Bao
5a5d4e0d63 Merge "releasetools: Update the comment on common.AVB_PARTITIONS."
am: 7b3e97b1ea

Change-Id: I7bdbd2e46c79a4ca5c138dd4681448a4ad032bbe
2019-04-22 20:27:34 -07:00
Tao Bao
7b3e97b1ea Merge "releasetools: Update the comment on common.AVB_PARTITIONS." 2019-04-23 03:09:26 +00:00
Lev Rumyantsev
19ecb76b7b 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
Merged-In: I8413b9b5b2ac24ac62b6cf22a5f14393420927f5
(cherry-picked from 7e9f49c73c)
2019-04-22 19:40:16 -07:00
Bowgo Tsai
93f0766d17 Merge "Adding boot-debug.img and ramdisk-debug.img" am: 7d7c08d6c4
am: 3b76f3be0c

Change-Id: Ib9f818f7c15c61c50803274199d83b1569f7722f
2019-04-22 19:27:42 -07:00
Bowgo Tsai
3b76f3be0c Merge "Adding boot-debug.img and ramdisk-debug.img"
am: 7d7c08d6c4

Change-Id: Ica3cb197565c3f6110f14e11551c77fcf96c4e0c
2019-04-22 19:17:30 -07: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
Colin Cross
dbd815d8d5 [automerger skipped] Allow codename.fingerprint format for targetSdkVersion
am: dc47df6439 -s ours
am skip reason: change_id Ie748d1963ff6f525f8d9e551b73846c3e1c7f9a2 with SHA1 d60401a59b is in history

Change-Id: I7c3116a2791de1b86a63206f80b83062ef3cb564
2019-04-22 17:10:17 -07:00
Colin Cross
6a69e019e3 [automerger skipped] Use framework.aidl built by Soong
am: 5180722c5e -s ours
am skip reason: change_id I24621b41860ce1fd1c3ba067430c8d62b49d03cb with SHA1 50bf3127d9 is in history

Change-Id: Ia19d6788e7da059b0cb335fc108863bc62b75693
2019-04-22 17:09:45 -07: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
1e5d0e7f98 Merge "Move update-payload-key.pub.pem into a module." am: 22c434e80f
am: bf3c47695c

Change-Id: Ibb99dbf190ff5e49d6ab79f56763e855ae523710
2019-04-22 10:40:34 -07:00
Tao Bao
bf3c47695c Merge "Move update-payload-key.pub.pem into a module."
am: 22c434e80f

Change-Id: I70366ba1981312f2f9109c868dc170e09a88a32c
2019-04-22 10:34:34 -07:00
Tao Bao
22c434e80f Merge "Move update-payload-key.pub.pem into a module." 2019-04-22 17:16:46 +00:00
Colin Cross
5761ffcbff Merge "Allow codename.fingerprint format for targetSdkVersion" am: 2d34ee923a
am: 4fab05065d

Change-Id: I4bee0e50acf830e846f8fb80252bd5185fd3792d
2019-04-22 10:09:25 -07:00
Colin Cross
4fab05065d Merge "Allow codename.fingerprint format for targetSdkVersion"
am: 2d34ee923a

Change-Id: Ibebd76390f1bfd86fecb9924d6db39f375acaa79
2019-04-22 10:04:15 -07:00
Colin Cross
dc47df6439 Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Test: manual
Bug: 130541924
Change-Id: Ie748d1963ff6f525f8d9e551b73846c3e1c7f9a2
Merged-In: Ie748d1963ff6f525f8d9e551b73846c3e1c7f9a2
(cherry picked from commit d60401a59b)
2019-04-22 09:58:24 -07:00
Colin Cross
5180722c5e Use framework.aidl built by Soong
Bug: 130798034
Test: m checkbuild
Change-Id: I24621b41860ce1fd1c3ba067430c8d62b49d03cb
Merged-In: I24621b41860ce1fd1c3ba067430c8d62b49d03cb
(cherry picked from commit 50bf3127d9)
2019-04-22 09:58:07 -07: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
SzuWei Lin
8f489d7f31 Merge "Disable non-AOSP nnapi extensions on product partition in GSI" am: 6a3d438aa0
am: 87381a80fc

Change-Id: I61bd5bc57ce58eb0572e1c0c0705de1f16ec3c7b
2019-04-22 05:06:58 -07:00
SzuWei Lin
87381a80fc Merge "Disable non-AOSP nnapi extensions on product partition in GSI"
am: 6a3d438aa0

Change-Id: Id7d4c9cb3c60d57d3fc107dfc93e798300483db1
2019-04-22 04:57:44 -07: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
c612fb1ba1 [automerger skipped] Merge "Build otacerts as a module." am: 967105ada9
am: 5873a854a4 -s ours
am skip reason: change_id I5abeb2da441fb3e3231e094063c2383eb3807852 with SHA1 4986e81160 is in history

Change-Id: I387cac7c1b0e0cbae248ad08a267131ef2aa92c8
2019-04-21 18:39:59 -07:00
Tao Bao
5873a854a4 Merge "Build otacerts as a module."
am: 967105ada9

Change-Id: I0e9a07ff2d267fb215d10fd5faf4d89dd1f2e3cb
2019-04-21 18:34:50 -07: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
Lev Rumyantsev
f2a71414d3 Merge "Move default native.bridge property to system set" am: 1a5e781659
am: 58cc3d3ee1

Change-Id: I25f2b4154b50b6c285ea39710f59590a758125d7
2019-04-21 14:24:55 -07: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
Lev Rumyantsev
58cc3d3ee1 Merge "Move default native.bridge property to system set"
am: 1a5e781659

Change-Id: I3db998589a706748164d8d649e08071c028d9f57
2019-04-21 14:19:45 -07:00
Tao Bao
3d19b2c941 Merge "Build otacerts as a module." into qt-dev-plus-aosp 2019-04-21 21:13:19 +00:00
Treehugger Robot
1a5e781659 Merge "Move default native.bridge property to system set" 2019-04-21 21:06:49 +00:00
Colin Cross
963a88aa80 Merge "Use framework.aidl built by Soong" am: ab2b34b8fd
am: 009981c5e4

Change-Id: I1913f5acb7d49c6d3b723b7510784b59d8f2ea5b
2019-04-21 10:38:42 -07:00