From 753e9e4462cb5350f0ba98c76a720cb7b408c3a1 Mon Sep 17 00:00:00 2001 From: bohu Date: Thu, 10 Aug 2017 00:20:01 -0700 Subject: [PATCH] emulator: squash misc modifications from oc-emu-dev Change-Id: I7380292cd4dc851a987683bdf61d511dbf74aff6 --- core/Makefile | 3 +-- core/tasks/sdk-addon.mk | 4 +++- target/board/generic/BoardConfig.mk | 1 + target/board/generic/device.mk | 3 +-- target/board/generic_arm64/BoardConfig.mk | 1 + target/board/generic_arm64/device.mk | 3 +-- target/board/generic_mips/BoardConfig.mk | 1 + target/board/generic_mips/device.mk | 3 +-- target/board/generic_mips64/BoardConfig.mk | 1 + target/board/generic_mips64/device.mk | 3 +-- target/board/generic_x86/BoardConfig.mk | 3 ++- target/board/generic_x86/device.mk | 3 +-- target/board/generic_x86_64/BoardConfig.mk | 1 + target/board/generic_x86_64/device.mk | 3 +-- target/product/aosp_arm.mk | 15 ++++++++++++++- target/product/aosp_arm64.mk | 16 ++++++++++++---- target/product/aosp_x86.mk | 13 +++++++++++++ target/product/aosp_x86_64.mk | 14 +++++++------- target/product/sdk_base.mk | 4 ++-- target/product/sdk_phone_arm64.mk | 2 ++ 20 files changed, 67 insertions(+), 30 deletions(-) diff --git a/core/Makefile b/core/Makefile index 3b9960812..c6c9ebf60 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2768,8 +2768,7 @@ INTERNAL_EMULATOR_PACKAGE_FILES += \ prebuilts/qemu-kernel/$(TARGET_ARCH)/kernel-qemu \ $(INSTALLED_RAMDISK_TARGET) \ $(INSTALLED_SYSTEMIMAGE) \ - $(INSTALLED_USERDATAIMAGE_TARGET) \ - $(INSTALLED_VENDORIMAGE_TARGET) + $(INSTALLED_USERDATAIMAGE_TARGET) name := $(TARGET_PRODUCT)-emulator-$(FILE_NAME_TAG) diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk index e3bd47d13..e26773ce8 100644 --- a/core/tasks/sdk-addon.mk +++ b/core/tasks/sdk-addon.mk @@ -64,6 +64,7 @@ endif # Files copied in the system-image directory files_to_copy += \ $(addon_dir_img):$(INSTALLED_QEMU_SYSTEMIMAGE):images/$(TARGET_CPU_ABI)/system.img \ + $(addon_dir_img):$(INSTALLED_QEMU_VENDORIMAGE):images/$(TARGET_CPU_ABI)/vendor.img \ $(addon_dir_img):$(BUILT_USERDATAIMAGE_TARGET):images/$(TARGET_CPU_ABI)/userdata.img \ $(addon_dir_img):$(BUILT_RAMDISK_TARGET):images/$(TARGET_CPU_ABI)/ramdisk.img \ $(addon_dir_img):$(PRODUCT_OUT)/system/build.prop:images/$(TARGET_CPU_ABI)/build.prop \ @@ -114,9 +115,10 @@ $(full_target): $(sdk_addon_deps) | $(ACP) $(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rqX $$F $(notdir $(PRIVATE_STAGING_DIR)) ) $(full_target_img): PRIVATE_STAGING_DIR := $(call append-path,$(staging),$(addon_dir_img))/images/$(TARGET_CPU_ABI) -$(full_target_img): $(full_target) $(addon_img_source_prop) +$(full_target_img): $(full_target) $(addon_img_source_prop) | $(ACP) @echo Packaging SDK Addon System-Image: $@ $(hide) mkdir -p $(dir $@) + $(ACP) -r $(PRODUCT_OUT)/data $(PRIVATE_STAGING_DIR)/data $(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rqX $$F $(notdir $(PRIVATE_STAGING_DIR)) ) diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index 016fa6344..8bb3ed0d9 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -61,6 +61,7 @@ BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true +DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk index e56a4d1d3..e18c1652b 100644 --- a/target/board/generic/device.mk +++ b/target/board/generic/device.mk @@ -19,8 +19,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.ril.hsxpa=1 \ - ro.ril.gprsclass=10 \ - ro.adb.qemud=1 + ro.ril.gprsclass=10 PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index b2441a39b..a7a8943ef 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -92,6 +92,7 @@ BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true +DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk index 9647a4ebe..ca287eb8b 100644 --- a/target/board/generic_arm64/device.mk +++ b/target/board/generic_arm64/device.mk @@ -19,8 +19,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.ril.hsxpa=1 \ - ro.ril.gprsclass=10 \ - ro.adb.qemud=1 + ro.ril.gprsclass=10 PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ diff --git a/target/board/generic_mips/BoardConfig.mk b/target/board/generic_mips/BoardConfig.mk index e12fb73ee..a9e46b42a 100644 --- a/target/board/generic_mips/BoardConfig.mk +++ b/target/board/generic_mips/BoardConfig.mk @@ -69,5 +69,6 @@ BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true +DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy diff --git a/target/board/generic_mips/device.mk b/target/board/generic_mips/device.mk index 06a7d8a3e..a2633e187 100644 --- a/target/board/generic_mips/device.mk +++ b/target/board/generic_mips/device.mk @@ -19,8 +19,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.ril.hsxpa=1 \ - ro.ril.gprsclass=10 \ - ro.adb.qemud=1 + ro.ril.gprsclass=10 PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ diff --git a/target/board/generic_mips64/BoardConfig.mk b/target/board/generic_mips64/BoardConfig.mk index 4a6ca0245..6cb6c11a5 100644 --- a/target/board/generic_mips64/BoardConfig.mk +++ b/target/board/generic_mips64/BoardConfig.mk @@ -84,6 +84,7 @@ BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true +DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy diff --git a/target/board/generic_mips64/device.mk b/target/board/generic_mips64/device.mk index 66ec9db9b..2ccbcbd18 100644 --- a/target/board/generic_mips64/device.mk +++ b/target/board/generic_mips64/device.mk @@ -19,8 +19,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.ril.hsxpa=1 \ - ro.ril.gprsclass=10 \ - ro.adb.qemud=1 + ro.ril.gprsclass=10 PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk index cd03c4c9c..bb2166b53 100644 --- a/target/board/generic_x86/BoardConfig.mk +++ b/target/board/generic_x86/BoardConfig.mk @@ -40,7 +40,7 @@ BUILD_QEMU_IMAGES := true USE_OPENGL_RENDERER := true TARGET_USERIMAGES_USE_EXT4 := true -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 TARGET_COPY_OUT_VENDOR := vendor BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true @@ -52,6 +52,7 @@ BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true +DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_SEPOLICY_DIRS += \ build/target/board/generic/sepolicy \ diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk index b5b0fafb0..24c39a5cc 100644 --- a/target/board/generic_x86/device.mk +++ b/target/board/generic_x86/device.mk @@ -19,8 +19,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.ril.hsxpa=1 \ - ro.ril.gprsclass=10 \ - ro.adb.qemud=1 + ro.ril.gprsclass=10 PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk index c7d6a25c3..b49a10ca0 100755 --- a/target/board/generic_x86_64/BoardConfig.mk +++ b/target/board/generic_x86_64/BoardConfig.mk @@ -55,6 +55,7 @@ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true +DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_SEPOLICY_DIRS += \ build/target/board/generic/sepolicy \ diff --git a/target/board/generic_x86_64/device.mk b/target/board/generic_x86_64/device.mk index b5b0fafb0..24c39a5cc 100755 --- a/target/board/generic_x86_64/device.mk +++ b/target/board/generic_x86_64/device.mk @@ -19,8 +19,7 @@ PRODUCT_PROPERTY_OVERRIDES := \ ro.ril.hsxpa=1 \ - ro.ril.gprsclass=10 \ - ro.adb.qemud=1 + ro.ril.gprsclass=10 PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk index 781cae6a0..9ed528499 100644 --- a/target/product/aosp_arm.mk +++ b/target/product/aosp_arm.mk @@ -1,5 +1,5 @@ # -# Copyright 2013 The Android Open-Source Project +# Copyright 2017 The Android Open-Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +PRODUCT_PROPERTY_OVERRIDES += \ + rild.libpath=/vendor/lib/libreference-ril.so + +# Note: the following lines need to stay at the beginning so that it can +# take priority and override the rules it inherit from other mk files +# see copy file rules in core/Makefile +PRODUCT_COPY_FILES += \ + development/sys-img/advancedFeatures.ini.arm:advancedFeatures.ini \ + prebuilts/qemu-kernel/arm/3.18/kernel-qemu2:kernel-ranchu \ + device/generic/goldfish/fstab.ranchu.arm:root/fstab.ranchu \ + device/generic/goldfish/fstab.ranchu.early.arm:root/fstab.ranchu.early + include $(SRC_TARGET_DIR)/product/full.mk PRODUCT_NAME := aosp_arm diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk index 98afe5f92..18d613bd8 100644 --- a/target/product/aosp_arm64.mk +++ b/target/product/aosp_arm64.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2013 The Android Open-Source Project +# Copyright (C) 2017 The Android Open-Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,14 +14,22 @@ # limitations under the License. # +PRODUCT_PROPERTY_OVERRIDES += \ + rild.libpath=/vendor/lib64/libreference-ril.so + # This is a build configuration for a full-featured build of the # Open-Source part of the tree. It's geared toward a US-centric # build quite specifically for the emulator, and might not be # entirely appropriate to inherit from for on-device configurations. -# This is for enabling ethernet support for ranchu. -# Consider removing this after RIL support is provided in ranchu. -PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml +# Note: the following lines need to stay at the beginning so that it can +# take priority and override the rules it inherit from other mk files +# see copy file rules in core/Makefile +PRODUCT_COPY_FILES += \ + development/sys-img/advancedFeatures.ini.arm:advancedFeatures.ini \ + prebuilts/qemu-kernel/arm64/3.18/kernel-qemu2:kernel-ranchu \ + device/generic/goldfish/fstab.ranchu.arm:root/fstab.ranchu \ + device/generic/goldfish/fstab.ranchu.early.arm:root/fstab.ranchu.early $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk index cba43c429..03203ced3 100644 --- a/target/product/aosp_x86.mk +++ b/target/product/aosp_x86.mk @@ -13,6 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +PRODUCT_PROPERTY_OVERRIDES += \ + rild.libpath=/vendor/lib/libreference-ril.so + +# This is a build configuration for a full-featured build of the +# Open-Source part of the tree. It's geared toward a US-centric +# build quite specifically for the emulator, and might not be +# entirely appropriate to inherit from for on-device configurations. +PRODUCT_COPY_FILES += \ + development/sys-img/advancedFeatures.ini:advancedFeatures.ini \ + device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \ + prebuilts/qemu-kernel/x86/3.18/kernel-qemu2:kernel-ranchu + include $(SRC_TARGET_DIR)/product/full_x86.mk PRODUCT_NAME := aosp_x86 diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk index 4006346a8..693bdaf0b 100644 --- a/target/product/aosp_x86_64.mk +++ b/target/product/aosp_x86_64.mk @@ -14,18 +14,18 @@ # limitations under the License. # +PRODUCT_PROPERTY_OVERRIDES += \ + rild.libpath=/vendor/lib64/libreference-ril.so + # This is a build configuration for a full-featured build of the # Open-Source part of the tree. It's geared toward a US-centric # build quite specifically for the emulator, and might not be # entirely appropriate to inherit from for on-device configurations. -# If running on an emulator or some other device that has a LAN connection -# that isn't a wifi connection. This will instruct init.rc to enable the -# network connection so that you can use it with ADB - -# This is for enabling ethernet support for ranchu. -# Consider removing this after RIL support is provided in ranchu. -PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml +PRODUCT_COPY_FILES += \ + development/sys-img/advancedFeatures.ini:advancedFeatures.ini \ + device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \ + prebuilts/qemu-kernel/x86_64/3.18/kernel-qemu2:kernel-ranchu $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) diff --git a/target/product/sdk_base.mk b/target/product/sdk_base.mk index 0b14203b0..6d4d59f0b 100644 --- a/target/product/sdk_base.mk +++ b/target/product/sdk_base.mk @@ -24,11 +24,10 @@ PRODUCT_PACKAGES := \ Development \ Dialer \ EmulatorSmokeTests \ - Fallback \ Gallery2 \ GestureBuilder \ Launcher3 \ - LegacyCamera \ + Camera2 \ librs_jni \ libwnndict \ libWnnEngDic \ @@ -102,6 +101,7 @@ PRODUCT_COPY_FILES := \ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \ frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml \ + frameworks/native/data/etc/android.software.autofill.xml:system/etc/permissions/android.software.autofill.xml \ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf \ device/generic/goldfish/audio_policy.conf:system/etc/audio_policy.conf diff --git a/target/product/sdk_phone_arm64.mk b/target/product/sdk_phone_arm64.mk index 599673ae5..2aa688b13 100644 --- a/target/product/sdk_phone_arm64.mk +++ b/target/product/sdk_phone_arm64.mk @@ -46,3 +46,5 @@ PRODUCT_BRAND := Android PRODUCT_NAME := sdk_phone_arm64 PRODUCT_DEVICE := generic_arm64 PRODUCT_MODEL := Android SDK built for arm64 + +