Commit Graph

52301 Commits

Author SHA1 Message Date
Tao Bao 548db7d797 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
(cherry picked from commit f454c3a0b4)
2019-04-25 00:20:00 -07:00
TreeHugger Robot beba6256d0 Merge "Disable non-AOSP nnapi extensions on product partition in GSI" into qt-dev 2019-04-24 16:17:44 +00:00
SzuWei Lin d312ca82ed Merge "Fix build error for no-ramdisk targets" into qt-dev 2019-04-24 08:57:44 +00:00
Bowgo Tsai 6e38628664 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
Merged-In: I65120a3b3372712fafc26442354ee031eede0bd3
(cherry picked from commit c3e8cc9bd1)
2019-04-24 08:42:09 +00:00
Bowgo Tsai f00885f299 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
(cherry picked from commit 85f292939647fb9bd659a6a5deebd3f07dd3a079)
2019-04-24 16:25:10 +08:00
SzuWei Lin ac7cb67870 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
Merged-In: Ia679f1f9c108bd5a164c8cdeb1d73f57da755608
(cherry picked from commit 3c6fde2d90)
2019-04-24 15:36:14 +08:00
TreeHugger Robot 764d48ecb2 Merge "Avoid signing debuggable boot-debug.img" into qt-dev 2019-04-23 19:28:45 +00:00
TreeHugger Robot cb0fee9157 Merge "Revert "Adding adb_debug.prop"" into qt-dev 2019-04-23 19:26:25 +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 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
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
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
Dan Willemsen 97548ef31b Fix typo of PRODUCT_BUILD_ODM_IMAGE
Bug: 130879723
Test: treehugger
Change-Id: Ibe6523ca77aeb1ff6fdd138dcf2bfa46bcdeee59
Merged-In: Ibe6523ca77aeb1ff6fdd138dcf2bfa46bcdeee59
2019-04-19 15:02:21 -07:00
TreeHugger Robot 706fa88b91 Merge "TARGET_FS_CONFIG_GEN is a list, not a single path" into qt-dev 2019-04-18 22:46:22 +00:00
Calin Juravle 471c9170c4 Add the entire boot image to boot.zip
Add all the boot image files necessary of offline inspection and
compilation in a single zip file (boot.zip).

This replaces the previous boot_profiles_jars.zip which contained only the
jar files.

Bug: 130376456
Test: m dist

Change-Id: I25b0c03ee9e7a2c2ff25db406656ce79baff5a46
Merged-In: Ib71c4fcc0d451570d0bb0584745487c54f884fd9
(cherry picked from commit 3dfae3f149)
2019-04-18 14:28:24 -07:00
Dan Willemsen e531685ba5 TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: I5186b378fea8865f46cfd891420ba576f36e2565
Merged-In: I5186b378fea8865f46cfd891420ba576f36e2565
(cherry picked from commit 7f25f2aed9)
2019-04-18 14:26:48 -07:00
TreeHugger Robot 498aa08221 Merge "Change emulator system image to unsparse format" into qt-dev 2019-04-18 14:37:22 +00:00
TreeHugger Robot 54768ddf3a Merge "Always use aapt2 for prebuilt appcompat" into qt-dev 2019-04-17 20:14:40 +00:00
Jiyong Park c5fc637c20 Temporarily not inheriting updatable_apex.mk
It broke camera.

Bug: 130652892
Test: m
Test: adb shell getprop ro.apex.updatable should return false or nothing
Change-Id: Id2df926e152411cb5d0bc4331cfd43e0dcd8ad6c
2019-04-17 16:21:36 +00:00
Colin Cross 081e9b5363 Always use aapt2 for prebuilt appcompat
Running appcompat is missing a dependency on aapt/aapt2.  There
is no need to switch between aapt and aapt2, so always use aapt2
and add the missing dependency.

Fixes: 130575935
Test: treehugger
Change-Id: If32c03410fbdb3945bf20f7405de13dc8cd83038
Merged-In: If32c03410fbdb3945bf20f7405de13dc8cd83038
(cherry picked from commit a0d89b994f)
2019-04-16 23:00:52 -07:00
TreeHugger Robot af11c9f4fd Merge "Add updatable_apex.mk" into qt-dev 2019-04-16 14:26:41 +00:00
Victor Chang 603574b1d0 Merge "Remove libicu*.so from /system" into qt-dev 2019-04-16 11:04:37 +00:00
Isaac Chen fda36e9839 Change emulator system image to unsparse format
Currently, emulator system image is the non-legasy GSI, which is in sparse
format. Several internal clients don't support sparse format, and other
internal/external clients usually support both. The reason to choose sparse
format for GSI may not be valid any more. See bug for detail.

Bug: 130341962
Test: Checked the header of system.img to see if it's unsparse.
      Boot emulator aosp_x86 successfully.

Change-Id: I839f49809429227607b2e876a4a3628df43a97b4
Merged-In: I839f49809429227607b2e876a4a3628df43a97b4
(cherry picked from commit 90bfda1cc4)
2019-04-16 12:00:18 +08:00
David Brazdil 38cd7f3c8b Enable core platform API warnings on non-user builds
Core platform API violation reporting is disabled by default and can be
enabled by setting the persist.debug.dalvik.vm.core_platform_api_policy
property. Set it to "just-warn" for non-user builds and leave disabled
on user builds.

Test: builds, boots
Bug: 125701194
Change-Id: I2f4be42373de9fdbc71c3178de6d34e07809f13a
Merged-In: I2f4be42373de9fdbc71c3178de6d34e07809f13a
(cherry picked from commit f5b3fc854f)
2019-04-15 22:06:39 +01:00
Victor Chang c3538a4ac0 Remove libicu*.so from /system
Bug: 120659668
Test: CtsJniTestCases
Merged-In: I1c2ab41aa0b19f71025e2dd09be9b9bd306e8616
Change-Id: I1c2ab41aa0b19f71025e2dd09be9b9bd306e8616
(cherry picked from commit c164b8ef13)
2019-04-15 12:36:50 +01:00
Jiyong Park fa51bedf8b Add updatable_apex.mk
The product abstracts configs that need to be set to support updating of
APEXes.

Bug: 130418467
Test: m
Test: adb shell getprop ro.apex.updatable in Pixel 2 and 3
Test: adb shell /system/apex/com.android.apex.cts.shim.apex exists.
Change-Id: Idb44388a0cf6338f8b4500a1d0d2762ed59476bf
2019-04-15 20:34:18 +09:00
Alistair Strachan e4a2c3af61 Merge "FileImage: make thread-safe" into qt-dev 2019-04-13 23:23:33 +00:00
Paul Scovanner 94278a7c2e Update Security String to 2019-06-05 Bug:129374896 Merged-In: 2c26c3d4c0 am: 3ae4e858b7 am: cce67c52c9 am: e90b407c2f
am: 593be3c494

Change-Id: I7e489272790ad882be94a95886e2c474f7b1f84a
2019-04-13 01:07:31 -07:00
Paul Scovanner 593be3c494 Update Security String to 2019-06-05 Bug:129374896 Merged-In: 2c26c3d4c0 am: 3ae4e858b7 am: cce67c52c9
am: e90b407c2f

Change-Id: I451be3f8467540539c00be5d02798be830f89ff1
2019-04-12 20:54:41 -07:00
Paul Scovanner e90b407c2f Update Security String to 2019-06-05 Bug:129374896 Merged-In: 2c26c3d4c0 am: 3ae4e858b7
am: cce67c52c9

Change-Id: Iad4a6c33c50cc2fd213a6a207c920ee540ae1c43
2019-04-12 20:25:15 -07:00
Paul Scovanner cce67c52c9 Update Security String to 2019-06-05 Bug:129374896 Merged-In: 2c26c3d4c0
am: 3ae4e858b7

Change-Id: I02ef18033096d4e6d22f0eb945b4b630104e4609
2019-04-12 19:35:43 -07:00
TreeHugger Robot 6d5a72368d Merge changes from topic "dap_cuttlefish" into qt-dev
* changes:
  Allow generating OTA package from non-sparse images.
  Fix DataImage.ReadRangeSet()
  releasetools: Remove the name restriction in common.GetSparseImage.
2019-04-13 00:36:02 +00:00
Paul Scovanner 3d6b8b2896 Merge "Update Security String to 2019-06-05 Bug:129374896" into qt-dev 2019-04-12 23:42:34 +00:00
Yifan Hong 210ede323f FileImage: make thread-safe
FileImage needs to be thread-safe because multiple
threads gets data from it when an incremental OTA
package is created.

Test: apply incremental OTA on cuttlefish
Bug: 113175337
Change-Id: I31637fce0fbd66f3fa6c5c478da09bae65a52229
Merged-In: I31637fce0fbd66f3fa6c5c478da09bae65a52229
2019-04-12 15:59:03 -07:00
Paul Scovanner 3ae4e858b7 Update Security String to 2019-06-05
Bug:129374896
Merged-In: 2c26c3d4c0
2019-04-12 18:40:01 +00:00
Yifan Hong 50db54519e Allow generating OTA package from non-sparse images.
Test: build OTA package in cuttlefish

Bug: 120041578
Bug: 113175337
Change-Id: I246c38e08376c837b7f126aa19cb8c1d73ed1e26
Merged-In: I246c38e08376c837b7f126aa19cb8c1d73ed1e26
2019-04-12 10:48:29 -07:00
Yifan Hong 508850e298 Fix DataImage.ReadRangeSet()
It returns a list of one generator object, not a list
of strings.

Test: test_blockimgdiff
Bug: 113175337

Change-Id: I8962c539c2ce3fae90d428b38c4b0e52c5a2cdad
Merged-In: I8962c539c2ce3fae90d428b38c4b0e52c5a2cdad
2019-04-12 10:48:21 -07:00
Tao Bao 222bba6253 releasetools: Remove the name restriction in common.GetSparseImage.
The function used to be serving system and vendor partitions only (as
they were the only partitions using sparse image at the point). The code
itself doesn't rely on anything specific to system/vendor.

Test: python -m unittest test_common
Bug: 113175337

Change-Id: Ia4ecdeedb262f3d9db082128eaf9bab299983333
Merged-In: Ia4ecdeedb262f3d9db082128eaf9bab299983333
2019-04-12 10:47:53 -07:00
TreeHugger Robot 93b2a10b6e Merge "Export more config values to Soong" into qt-dev 2019-04-12 17:24:18 +00:00
Paul Scovanner 2c26c3d4c0 Update Security String to 2019-06-05 Bug:129374896 2019-04-12 16:39:24 +00:00
TreeHugger Robot f9dca5e1d8 Merge "Convert oemaids_headers / passwd / group to Soong" into qt-dev 2019-04-12 16:06:59 +00:00
Anton Hansson a7d290cbad Merge "Add libdrm to mainline_system" into qt-dev 2019-04-12 10:54:57 +00:00
Tianjie Xu cd797a289f Merge "Pass the correct signature size to payload generator" into qt-dev 2019-04-12 01:21:45 +00:00
TreeHugger Robot ec5b536446 Merge "DO NOT MERGE BUILD_ID=QT" into qt-dev 2019-04-12 00:41:32 +00:00
Dan Willemsen b9d45c7d47 Convert oemaids_headers / passwd / group to Soong
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers passwd group
Change-Id: Ie3b92a499b44391e0692da5d9ad067089a62aabb
Merged-In: Ie3b92a499b44391e0692da5d9ad067089a62aabb
(cherry picked from commit d32e6d1314)
2019-04-11 16:41:22 -07:00
Ian Pedowitz 6136d945b3 DO NOT MERGE BUILD_ID=QT
Bug: 128934651
Change-Id: Icad27eb43a782c6bf97e78076a365b0d31aefd54
2019-04-11 15:55:57 -07:00
TreeHugger Robot c028b0e155 Merge "docker: update sha256sum for repo version 1.25" into qt-dev 2019-04-11 21:52:23 +00:00
xunchang 3c5de18f5d Pass the correct signature size to payload generator
The signature size will be 512 bytes when signing the payload
with 4096 bits key. This cl determines the key size with
"openssl rsa -modulus"

The new key in testdata is generated by
"openssl genrsa -out testkey 4096"

Bug: 129163830
Test: generate and verify an OTA package
Change-Id: I6662b0a0c553dc0fd84711312a1256b887e332fd
(cherry picked from commit 376cc7c452)
2019-04-11 21:04:28 +00:00