Commit graph

18462 commits

Author SHA1 Message Date
Tao Bao
d5ab10eed4 Update the references to verity tools.
Test: `m -j dist` with aosp_marlin-userdebug
Test: `atest releasetools_test`
Test: Run signing with otatools.
Test: TreeHugger
Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7
2019-05-02 18:32:11 -07:00
Mathieu Chartier
3b77053daf Merge "Add PRODUCT_DEX_PREOPT_RESOLVE_STARTUP_STRINGS" 2019-05-01 20:29:20 +00:00
Anton Hansson
f299889513 Remove unneeded bootimage properties
These were added as part of http://r.android.com/731514, but
most of these properties make no sense for the bootimage. Revert
to only defining date, date.utc and fingerprint.

Bug: 131066061
Test: inspect vendor/build.prop
Test: boot, no SELinux warnings for removed props
Change-Id: Ibbeff9870a5b71e83c2cceeb1327b12600077b23
2019-05-01 13:20:27 +01:00
Mathieu Chartier
b9dc792b19 Add PRODUCT_DEX_PREOPT_RESOLVE_STARTUP_STRINGS
For enabling per product configuration of resolving startup
const strings.

Bug: 130217075
Bug: 131310042
Test: make

(cherry picked from commit b37c79c3a2)

Merged-In: I51cb8931b915a710ab584f954b7a99c7a651d914
Change-Id: I0ecc7823620bca9f252b3d91b82982db91dd248d
2019-04-30 17:00:19 -07: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
Yifan Hong
8bfcc69e38 Merge "Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag." 2019-04-26 21:30:07 +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
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
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
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
Treehugger Robot
23cbf2b1b5 Merge "Build contexts files with Soong" 2019-04-25 07:46: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
Treehugger Robot
ff14c47182 Merge "Clean up LOCAL_DONT_DELETE_JAR_META_INF" 2019-04-24 15:08:28 +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
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
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
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
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
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
Colin Cross
ab2b34b8fd Merge "Use framework.aidl built by Soong" 2019-04-21 17:20:17 +00: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
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
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
Calin Juravle
442942c4de Merge changes I25b0c03e,I8a8a93ca
* changes:
  Add the entire boot image to boot.zip
  Disable iorapd by default
2019-04-19 01:57:09 +00:00
Calin Juravle
6bfdcda0e6 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 17:48:39 -07:00
Colin Cross
d60401a59b 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
2019-04-18 16:05:19 -07:00
Treehugger Robot
e55ec5ba1b Merge "Don't set LOCAL_SDK_RES_VERSION to current if LOCAL_SDK_VERSION is core_current" 2019-04-18 21:15:18 +00:00
Treehugger Robot
0d4ee006db Merge "TARGET_FS_CONFIG_GEN is a list, not a single path" 2019-04-18 19:37:49 +00:00
Colin Cross
50bf3127d9 Use framework.aidl built by Soong
Bug: 130798034
Test: m checkbuild
Change-Id: I24621b41860ce1fd1c3ba067430c8d62b49d03cb
2019-04-18 12:06:27 -07:00
Colin Cross
85f2b4a680 Don't set LOCAL_SDK_RES_VERSION to current if LOCAL_SDK_VERSION is core_current
Removing AAPT1 support removed the distinction between unset
LOCAL_USE_AAPT2 and LOCAL_USE_AAPT2 := true, which enabled the
LCOAL_SDK_RES_VERSION setting for some modules that had previously
bypassed it because of LOCAL_USE_AAPT2 := true.  The workaround
was too broad, it shouldn't apply if LOCAL_SDK_VERSION is already
set to *current.  In particular, if it is core_current to disable
using framework-res.apk completely, then LOCAL_SDK_RES_VERSION
must not be set to current.

Fixes: 130782219
Test: atest android.server.wm.PrereleaseSdkTest
Change-Id: I250d65b1ef66e591f2c9779580df4cc3f0f2b028
2019-04-18 11:14:58 -07:00
Dan Willemsen
c1a836bab0 Merge changes from topic "make_deprecation"
* changes:
  Add infrastructure for deprecating module types
  Mark BUILD_* as readonly
2019-04-18 17:44:19 +00:00
Dan Willemsen
7f25f2aed9 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
2019-04-18 17:16:50 +00:00
Bill Rassieur
43d98dc805 Master is now designated for R. Update MAX_PLATFORM_VERSION, etc.
Bug: 128934651
Test: treehugger
Change-Id: I352e02484fa73ee924c84846913b93f7713c77ef
Merged-In: I352e02484fa73ee924c84846913b93f7713c77ef
2019-04-17 18:09:53 -07:00
Dan Willemsen
695849ec88 Add infrastructure for deprecating module types
Also start the deprecation for BUILD_HOST_TEST_CONFIG and
BUILD_TARGET_TEST_CONFIG, which have no users.

Bug: 130720555
Bug: 130723115
Bug: 130734993
Test: treehugger
Test: Add entries to DEFAULT_ERROR / OBSOLETE to manually test behavior
Change-Id: Icfdff43a29b6512494d44b9be11d178333505010
2019-04-17 17:02:20 -07:00