Commit graph

41809 commits

Author SHA1 Message Date
Chih-hung Hsieh
7ac56836a1 Merge "Skip copying files from LINKED to PACKED directories." 2018-06-01 23:15:16 +00:00
Treehugger Robot
297db2d011 Merge "Mark more common variables and paths as readonly" 2018-06-01 21:58:14 +00:00
Chih-Hung Hsieh
9020c2323b Skip copying files from LINKED to PACKED directories.
When stand-alone relocation_packer is not used,
use the LINKED file and skip the copy to PACKED directory.

Test: make checkbuild
Change-Id: Ia1e5d1cd22ca6dfb68e406ffdcbb367b4d07d437
2018-06-01 14:11:15 -07:00
Treehugger Robot
2a801b3cd7 Merge "Call lld with --pack-dyn-relocs=none if my_pack_module_relocations is false" 2018-06-01 20:58:25 +00:00
Chih-Hung Hsieh
289e8d6011 Call lld with --pack-dyn-relocs=none if my_pack_module_relocations is false
* Factor out the logic that sets up my_pack_module_relocations
  from dynamic_binary.mk to pack_dyn_relocs_setup.mk.
* Use stand-alone relocation_packer only if my_pack_module_relocations
  is true and my_use_clang_lld is false.

Bug: 80093890
Bug: 73768157
Test: build and boot with USE_CLANG_LLD=true
Change-Id: I7c4b5fcdce0754c57cff4acf86185cac65a26c40
2018-05-31 16:18:22 -07:00
Yifan Hong
a873417a23 Merge "androidboot.lrap => logical_partitions" 2018-05-31 22:05:06 +00:00
Yifan Hong
dfaa860073 androidboot.lrap => logical_partitions
Test: boots with prototype
Bug: 79885414
Change-Id: I63c4d7a4b69d84809700cc71eee8ece33c365e9e
2018-05-31 13:08:11 -07:00
Tao Bao
d48f2a1408 Merge "Expose PLATFORM_SECURITY_PATCH_TIMESTAMP." 2018-05-29 21:07:18 +00:00
Treehugger Robot
f346fd4485 Merge "Remove unnecessary branch for BOARD_HAS_EXT4_RESERVED_BLOCKS." 2018-05-29 20:02:35 +00:00
Treehugger Robot
78f3983e98 Merge "Add ro.boot.logical_partitions" 2018-05-29 19:52:14 +00:00
Tao Bao
717d9d3ae2 Expose PLATFORM_SECURITY_PATCH_TIMESTAMP.
We have use case that uses the timestamp for PLATFORM_SECURITY_PATCH in
device specific Makefile, but need to handle the platform-dependent
`date` command. This CL computes and exposes
PLATFORM_SECURITY_PATCH_TIMESTAMP from the core build system.

Bug: 80311893
Test: Use PLATFORM_SECURITY_PATCH_TIMESTAMP in device-specific folder,
      on both of Linux and macOS. Check the value.
Change-Id: I27a88dcebde7a1c204491f5f5c45c5160398dbb6
2018-05-29 11:45:09 -07:00
Yifan Hong
ebba19759d Add ro.boot.logical_partitions
Test: boot and getprop
Bug: 79885414
Change-Id: I2c1468a7a625deda8887106c3a087204a1ee8353
2018-05-29 11:17:45 -07:00
Yifan Hong
5cf81a3cfa Remove unnecessary branch for BOARD_HAS_EXT4_RESERVED_BLOCKS.
The branch exist for file based OTA, but it is deprecated in O.
Test: m dist

Change-Id: I24275b550f89c2541ef8893fdeffc06f5da01f6e
2018-05-29 11:15:28 -07:00
Treehugger Robot
24fff76404 Merge "Add support when LOCAL_PRIVATE_PLATFORM_APIS is true." 2018-05-28 02:23:26 +00:00
Dan Willemsen
80ebd01032 Merge "Fix path to flex and bison with SANITIZE_HOST" 2018-05-26 01:29:55 +00:00
Dan Willemsen
3de78fdf35 Fix path to flex and bison with SANITIZE_HOST
We don't have sanitized versions of flex and bison currently.

Test: forrest on aosp_x86_64-eng
Change-Id: I536885a715c162e36b69282099784abd16a5300c
2018-05-25 16:13:52 -07:00
Treehugger Robot
6fe15a380d Merge "Use new flex binary" 2018-05-25 22:44:35 +00:00
Dan Willemsen
11677ed983 Mark more common variables and paths as readonly
We've had a report of Android.mk files changing one of these paths,
leading to very strange issues. Nobody should be writing to these
variables after they're set.

Bug: 76424357
Test: diff build-aosp_arm.ninja
Change-Id: I66a9740d89feae342af13341ee3a630a20d62b64
2018-05-25 21:45:57 +00:00
Colin Cross
bcc94297e0 Merge changes I9b67fd2a,I761f2d06
* changes:
  Revert "Revert "Use AAPT2 by default""
  Work around incorrect R8 proguard compatibility
2018-05-25 20:30:01 +00:00
Colin Cross
5b89ec4d42 Revert "Revert "Use AAPT2 by default""
This reverts commit 777cf2c450.

Reason for revert: manifest merger is used for libraries forced to aapt2 now

Bug: 79481102
Test: m checkbuild
Change-Id: I9b67fd2a9b3234798b2aac879b5242c2097b3863
2018-05-25 11:34:13 -07:00
Colin Cross
cf5180c198 Work around incorrect R8 proguard compatibility
Proguard treats -dontobfuscate -keepattributes *Annotations* the
same as -dontobufscate by keeping all attributes.  R8, even in
proguard compatibility mode, discards all attributes that don't
match, including EnclosingClass attributes that may be necessary.
Pass -keepattributes * whenever passing -dontobfuscate to make R8
act more like proguard.

This isn't a complete solution, some modules may set
LOCAL_PROGUARD_ENABLED := custom and then manually specify
-dontobfuscate on the command line or in a flags file, in which
case they will see the incorrect behavior of R8.

Bug: 80081393
Test: m checkbuild
Test: examine attributes on com.android.stk.BootCompletedReceiver
      in out/target/common/obj/APPS/Stk_intermediates/classes.dex

Change-Id: I761f2d0617c5295df8fc7adfc4fd00d2aa41961e
2018-05-25 11:34:13 -07:00
Treehugger Robot
93ca8d3789 Merge "Don't copy system/sbin/adbd to recovery" 2018-05-25 05:58:01 +00:00
Dan Willemsen
6535dd9891 Use new flex binary
Test: treehugger
Change-Id: Iee21114ae863eb50d26ee9562879a97f956274ab
2018-05-24 16:04:58 -07:00
Tao Bao
e2d0b0cc43 Merge "Pack additional AVB testkeys into otatools.zip." 2018-05-24 17:04:17 +00:00
Jiyong Park
ce3e34f6ac Don't copy system/sbin/adbd to recovery
adbd for recovery partition is built separately. No need to copy.
Instead, the recovery version adbd.recovery is added to
PRODUCT_PACKAGES.

Bug: 79146551
Test: m -j
Test: adb reboot recovery; adb devices
Change-Id: I7f0ee8b21cbafc0ab5a4eb1f9c8ee70774617013
2018-05-24 18:19:49 +09:00
Treehugger Robot
e56adeffef Merge "Install product shared libraries in /product/lib" 2018-05-24 03:04:48 +00:00
Treehugger Robot
bd842d0b64 Merge "Add minSdkVersion to default manifests" 2018-05-24 01:18:10 +00:00
Treehugger Robot
7f706cabac Merge "Fix missing class in manifest merger" 2018-05-24 01:15:54 +00:00
Treehugger Robot
fecdb5db65 Merge "Add PRODUCT_USE_LOGICAL_PARTITIONS" 2018-05-23 23:50:32 +00:00
Colin Cross
d45079a9ff Add minSdkVersion to default manifests
If the default manifest that doesn't set minSdkVersion is passed to
manifest merger along with a library manifest that does, it will fail
with:
.../DefaultManifest.xml Error:
	uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library ...

Translate LOCAL_MIN_SDK_VERSION or LOCAL_SDK_VERSION to minSdkVersion
in DefaultManifest.xml.

Bug: 79481102
Test: m checkbuild
Change-Id: I4d792d48612e6a1111e05a9e4a71bb4d87eae1ad
2018-05-23 16:35:40 -07:00
Colin Cross
0084dc8e2f Fix missing class in manifest merger
If manifest merger sees a manifest with an sdk codename instead
of a number it fails with:
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdklib/SdkVersionInfo
	at com.android.manifmerger.XmlDocument.getApiLevelFromAttribute(XmlDocument.java:384)
	at com.android.manifmerger.XmlDocument.addImplicitElements(XmlDocument.java:418)
	at com.android.manifmerger.XmlDocument.merge(XmlDocument.java:161)
	at com.android.manifmerger.ManifestMerger2.merge(ManifestMerger2.java:909)
	at com.android.manifmerger.ManifestMerger2.merge(ManifestMerger2.java:263)
	at com.android.manifmerger.ManifestMerger2.access$600(ManifestMerger2.java:61)
	at com.android.manifmerger.ManifestMerger2$Invoker.merge(ManifestMerger2.java:1530)
	at com.android.manifmerger.Merger.process(Merger.java:153)
	at com.android.manifmerger.Merger.main(Merger.java:42)
Caused by: java.lang.ClassNotFoundException: com.android.sdklib.SdkVersionInfo
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	... 9 more

Add sdklib to the classpath to fix it.

Test: m java
Bug: 77569197
Change-Id: I54fd9edb36aca32cff507340a76eee5e367529e6
2018-05-23 16:35:40 -07:00
Treehugger Robot
4a49af1ceb Merge "Support LOCAL_STATIC_JAVA_AAR_LIBRARIES with aapt2" 2018-05-23 23:14:41 +00:00
Yifan Hong
ef4cd71ebf Add PRODUCT_USE_LOGICAL_PARTITIONS
Test: Set a device with PRODUCT_USE_LOGICAL_PARTITIONS,
      boot, examine /proc/cmdline
Test: build with USE_LOGICAL_PARTITIONS=true

Fixes: 79885414

Change-Id: I593b457786f3cf1bc50dedbc9b603e5408461bcc
2018-05-23 15:10:17 -07:00
Colin Cross
71c5b95aa6 Support LOCAL_STATIC_JAVA_AAR_LIBRARIES with aapt2
LOCAL_STATIC_JAVA_AAR_LIBRARIES are slightly different from
LOCAL_STATIC_ANDROID_LIBRARIES, due to b/78447299 the
AndroidManifest.xml from ANDROID libraries are ignored.
Temporarily add support for LOCAL_STATIC_JAVA_AAR_LIBRARIES
when using LOCAL_USE_AAPT2 := true, treating them the same
as LOCAL_STATIC_ANDROID_LIBRARIES except that they are
merged by android_manifest.xml

Bug: 78447299
Bug: 79481102
Test: m FORCE_AAPT2=true checkbuild
Change-Id: Ia6210810c1ea6e776be97ae1c9a586b5de844125
2018-05-23 13:39:15 -07:00
Treehugger Robot
3b801ca7fb Merge "Use manifest-merger 26.1.0 for builds." 2018-05-23 20:03:08 +00:00
Tao Bao
2d0e5124b0 Pack additional AVB testkeys into otatools.zip.
Bug: 71372646
Test: `m -j otatools-package`; Check $OUT/otatools.zip.
Change-Id: I42ad9047d1c5873b7770dc1f92757cd9e5e047ba
2018-05-23 09:23:28 -07:00
Sundong Ahn
2b17041789 Add support when LOCAL_PRIVATE_PLATFORM_APIS is true.
LOCAL_PRIVATE_PLATFORM_APIS := ture means that the apps or packages can
use the private API. So, if LOCAL_PRIVATE_PLATFORM_APIS := true, they
are linked to ".impl" instead of ".stub".

Bug: 77577799
Test: build
Change-Id: I782e52078bb8c4139c3a24862cb381f6a84e53fe
2018-05-23 21:34:18 +09:00
Jiyong Park
68ad8057d7 Merge changes from topic "java_sdk_library"
* changes:
  org.apache.http.legacy.boot is renamed to org.apache.http.legacy.impl
  use the phony module name to install org.apache.http.legacy
2018-05-23 11:35:25 +00:00
Treehugger Robot
af076d240a Merge "Build System: Validate AndroidTest.xml Configs" 2018-05-23 03:21:51 +00:00
Colin Cross
4f553c750a Merge "Revert "Use AAPT2 by default"" 2018-05-22 23:14:53 +00:00
Jeff Gaston
777cf2c450 Revert "Use AAPT2 by default"
This reverts commit ba7699fb9a.

Reason for revert: Broke boot tests on walleye and taimen

Bug: 80142285
Change-Id: Ida54a0b875147420e6e9c0af41b14af50f6397e3
2018-05-22 23:13:41 +00:00
Treehugger Robot
33c3d7c1aa Merge "Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs" 2018-05-22 22:50:59 +00:00
Colin Cross
90b890f9f2 Merge "Use AAPT2 by default" 2018-05-22 17:45:20 +00:00
Tri Vo
494830879c Account for multiple BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR dirs
After https://android-review.googlesource.com/688488
BOARD_PLAT_PUBLIC[PRIVATE]_SEPOLICY_DIR can now specify multiple
directories.

Bug: n/a
Test: build sepolicy

Change-Id: Id850327c29bc626d3d721935edcb2b7afd2fd283
2018-05-22 09:24:10 -07:00
Treehugger Robot
62f6c1802e Merge "core: Remove explicit libpac dependency." 2018-05-22 12:24:33 +00:00
Jiyong Park
565ec59f1f org.apache.http.legacy.boot is renamed to org.apache.http.legacy.impl
The name of the runtime library name for the SDK library
org.apache.http.legacy has changed to org.apache.http.legacy.impl as it
is now built using java_sdk_library construct where *.impl suffix is
automatically added to the runtime lib.

Bug: 77577799
Test: m -j
Merged-In: Ie049d06d78cc403454c2885def88a167975b4204
Change-Id: Ie049d06d78cc403454c2885def88a167975b4204
(cherry picked from commit 7f9a1a49cf)
2018-05-22 20:37:30 +09:00
Jiyong Park
2317cf5e6e use the phony module name to install org.apache.http.legacy
org.apache.http.legacy.boot which is the runtime library for
org.apache.http.legacy API is now renamed to org.apache.http.legacy.impl
as a result of migration to java_sdk_library.

Installing the runtime library can now be done via the sdk lib name
(org.apache.http.legacy) which internally includes the .impl runtime
lib.

Bug: 77577799
Test: m -j
Test: device boots to the UI. No error related to org.apache.http.legacy
shown in the logcat log.
Test: adb shell cmd package list libraries | grep http shows the
library.

Merged-In: I224bc0f8c58958240130aa7874851ecfdf6f7317
Change-Id: I224bc0f8c58958240130aa7874851ecfdf6f7317
(cherry picked from commit 6ac30d5270)
2018-05-22 20:34:42 +09:00
Logan Chien
49cb47b2eb Merge "Remove PRODUCT_EXTRA_VNDK_VERSIONS from AOSP" 2018-05-22 07:55:51 +00:00
Logan Chien
0e9b3e9d5a Remove PRODUCT_EXTRA_VNDK_VERSIONS from AOSP
This commit removes PRODUCT_EXTRA_VNDK_VERSIONS from AOSP branches.
prebuilts/vndk/v27 is missing from these branches.

This commit partially reverts
https://android-review.googlesource.com/c/platform/build/+/682124

Bug: 78605339
Test: aosp_arm64_ab-userdebug builds
Change-Id: Ic64f40dab2d7730f6ebcdf124cd069ed3c845e40
Merged-In: Ibae4a393e6e69f26d7a2d493b93e5739f806147b
2018-05-22 13:45:26 +08:00
Logan Chien
fcf4d7200a Merge "Build a single GSI for O-MR1-VENDOR and Master-VENDOR" 2018-05-22 04:04:07 +00:00