From 013b0d42dd5528ff798782215898b7a4536ec96f Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Wed, 6 Jun 2018 19:11:37 -0700 Subject: [PATCH 01/23] Changed droiddoc.mk to support Metalava annotations. Test: manually cp stub-annotations.jar to pi-dev; and m -j metalava_android_stubs Bug: b/78245848 Change-Id: If1ff99ca6d7c55a4d6880ad2fe85c66a0a62a490 Merged-In: I53bb68f7bdedd768a7e3dd7cb1c6fc18c2181b9b --- core/clear_vars.mk | 1 + core/droiddoc.mk | 35 +++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 1e2eda2fe6..bd86cfbd11 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -78,6 +78,7 @@ LOCAL_DROIDDOC_USE_METALAVA:= LOCAL_DROIDDOC_METALAVA_PREVIOUS_API:= LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED:= LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR:= +LOCAL_DROIDDOC_METALAVA_DOCS_STUB_OUT_DIR:= LOCAL_DX_FLAGS:= LOCAL_EMMA_COVERAGE_FILTER:= LOCAL_EMMA_INSTRUMENT:= diff --git a/core/droiddoc.mk b/core/droiddoc.mk index ae64052ee3..bcd2002e01 100644 --- a/core/droiddoc.mk +++ b/core/droiddoc.mk @@ -114,6 +114,7 @@ endif $(full_target): PRIVATE_OUT_DIR := $(out_dir) $(full_target): PRIVATE_DROIDDOC_OPTIONS := $(LOCAL_DROIDDOC_OPTIONS) $(full_target): PRIVATE_STUB_OUT_DIR := $(LOCAL_DROIDDOC_STUB_OUT_DIR) +$(full_target): PRIVATE_METALAVA_DOCS_STUB_OUT_DIR := $(LOCAL_DROIDDOC_METALAVA_DOCS_STUB_OUT_DIR) # Lists the input files for the doc build into a text file # suitable for the @ syntax of javadoc. @@ -165,17 +166,8 @@ endif $(full_target): PRIVATE_LOCAL_PATH := $(LOCAL_PATH) ifeq ($(strip $(LOCAL_DROIDDOC_USE_METALAVA)),true) -ifneq (,$(filter --generate-documentation,$(LOCAL_DROIDDOC_OPTIONS))) - -pos = $(if $(findstring $1,$2),$(call pos,$1,$(wordlist 2,$(words $2),$2),x $3),$3) -metalava_args := $(wordlist 1, $(words $(call pos,--generate-documentation,$(LOCAL_DROIDDOC_OPTIONS))), \ - $(LOCAL_DROIDDOC_OPTIONS)) -remaining_args := $(wordlist $(words $(call pos,--generate-documentation,$(LOCAL_DROIDDOC_OPTIONS))), \ - $(words $(LOCAL_DROIDDOC_OPTIONS)), $(LOCAL_DROIDDOC_OPTIONS)) -doclava_args := $(wordlist 2, $(words $(remaining_args)), $(remaining_args)) - ifneq ($(LOCAL_DROIDDOC_METALAVA_PREVIOUS_API),) -$(full_target): PRIVATE_DROIDDOC_METALAVA_PREVIOUS_API := --check-compatibility --previous-api $(LOCAL_DROIDDOC_METALAVA_PREVIOUS_API) +$(full_target): PRIVATE_DROIDDOC_METALAVA_PREVIOUS_API := --previous-api $(LOCAL_DROIDDOC_METALAVA_PREVIOUS_API) else $(full_target): PRIVATE_DROIDDOC_METALAVA_PREVIOUS_API := endif #!LOCAL_DROIDDOC_METALAVA_PREVIOUS_API @@ -198,6 +190,15 @@ else $(full_target): PRIVATE_DROIDDOC_METALAVA_ANNOTATIONS := endif #LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED=true +ifneq (,$(filter --generate-documentation,$(LOCAL_DROIDDOC_OPTIONS))) + +pos = $(if $(findstring $1,$2),$(call pos,$1,$(wordlist 2,$(words $2),$2),x $3),$3) +metalava_args := $(wordlist 1, $(words $(call pos,--generate-documentation,$(LOCAL_DROIDDOC_OPTIONS))), \ + $(LOCAL_DROIDDOC_OPTIONS)) +remaining_args := $(wordlist $(words $(call pos,--generate-documentation,$(LOCAL_DROIDDOC_OPTIONS))), \ + $(words $(LOCAL_DROIDDOC_OPTIONS)), $(LOCAL_DROIDDOC_OPTIONS)) +doclava_args := $(wordlist 2, $(words $(remaining_args)), $(remaining_args)) + $(full_target): \ $(full_src_files) $(LOCAL_GENERATED_SOURCES) \ $(droiddoc_templates) \ @@ -215,6 +216,7 @@ $(full_target): \ @echo metalava based docs: $(PRIVATE_OUT_DIR) $(hide) mkdir -p $(dir $@) $(hide) rm -rf $(PRIVATE_STUB_OUT_DIR) + $(hide) rm -rf $(PRIVATE_METALAVA_DOCS_STUB_OUT_DIR) $(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \ $(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR)) $(ZIPSYNC) -d $(PRIVATE_SRCJAR_INTERMEDIATES_DIR) -l $(PRIVATE_SRCJAR_LIST_FILE) -f "*.java" $(PRIVATE_SRCJARS) @@ -226,6 +228,7 @@ $(full_target): \ --sourcepath $(PRIVATE_SOURCE_PATH) \ --no-banner --color --quiet \ $(addprefix --stubs ,$(PRIVATE_STUB_OUT_DIR)) \ + $(addprefix --doc-stubs ,$(PRIVATE_METALAVA_DOCS_STUB_OUT_DIR)) \ --write-stubs-source-list $(intermediates.COMMON)/stubs-src-list \ $(metalava_args) $(PRIVATE_DROIDDOC_METALAVA_PREVIOUS_API) $(PRIVATE_DROIDDOC_METALAVA_ANNOTATIONS) \ $(JAVADOC) -encoding UTF-8 -source 1.8 STUBS_SOURCE_LIST \ @@ -239,10 +242,6 @@ $(full_target): \ -d $(PRIVATE_OUT_DIR) \ $(PRIVATE_CURRENT_BUILD) $(PRIVATE_CURRENT_TIME) $(doclava_args) \ && touch -f $@ ) || (rm -rf $(PRIVATE_OUT_DIR) $(PRIVATE_SRC_LIST_FILE); exit 45) - -ifeq ($(strip $(LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED)),true) -$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_annotations.zip: $(full_target) -endif else # no docs generation $(full_target): \ @@ -264,13 +263,17 @@ $(full_target): \ $(addprefix -bootclasspath ,$(PRIVATE_BOOTCLASSPATH)) \ $(addprefix -classpath ,$(PRIVATE_CLASSPATH)) \ --sourcepath $(PRIVATE_SOURCE_PATH) \ - $(PRIVATE_DROIDDOC_OPTIONS) --no-banner --color --quiet \ + $(PRIVATE_DROIDDOC_OPTIONS) $(PRIVATE_DROIDDOC_METALAVA_PREVIOUS_API) $(PRIVATE_DROIDDOC_METALAVA_ANNOTATIONS) \ + --no-banner --color --quiet \ $(addprefix --stubs ,$(PRIVATE_STUB_OUT_DIR)) \ && touch -f $@ ) || (rm -rf $(PRIVATE_SRC_LIST_FILE); exit 45) endif # stubs + docs generation +ifeq ($(strip $(LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED)),true) +$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_annotations.zip: $(full_target) +endif -else +else # doclava based droiddoc generation # TODO(tobiast): Clean this up once we move to -source 1.9. # OpenJDK 9 does not have the concept of a "boot classpath" so we should From f03faa93f5e71147c1dab7a59e25bf78cbf9e80e Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 8 Jun 2018 14:42:06 +0100 Subject: [PATCH 02/23] Dedupe mk rules in core_minimal.mk and core_tiny.mk. These two are the only ones inheriting base.mk, and were largely similar. This CL moves all the shared stuff up one level into base.mk. One thing not de-duped yet is the PRODUCT_SYSTEM_SERVER_JARS variable, as the order of that is significant. Also sort various lists that were ordered arbitrarily. Bug: 80410283 Test: diffed output of multiproduct_kati with aosp/703385 patched Change-Id: Iddffd6982df039f5daa8be345de338ba11c63c10 Merged-In: Iddffd6982df039f5daa8be345de338ba11c63c10 --- target/product/base.mk | 123 ++++++++++++++++++++++++++------- target/product/core_minimal.mk | 103 +++------------------------ target/product/core_tiny.mk | 111 +++-------------------------- 3 files changed, 116 insertions(+), 221 deletions(-) diff --git a/target/product/base.mk b/target/product/base.mk index 34c70d8c24..dbb9ac6724 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -14,70 +14,103 @@ # limitations under the License. # -# Base modules (will move elsewhere, previously user tagged) PRODUCT_PACKAGES += \ 20-dns.conf \ 95-configured \ - org.apache.http.legacy \ - appwidget \ - appops \ am \ + android.hardware.cas@1.0-service \ + android.hardware.media.omx@1.0-service \ + android.hidl.base-V1.0-java \ + android.hidl.manager-V1.0-java \ android.policy \ android.test.base \ android.test.mock \ android.test.runner \ - app_process \ applypatch \ + appops \ + app_process \ + appwidget \ audioserver \ + BackupRestoreConfirmation \ + bcc \ bit \ blkid \ bmgr \ bpfloader \ + bu \ bugreport \ bugreportz \ cameraserver \ + com.android.location.provider \ + com.android.location.provider.xml \ content \ + CtsShimPrebuilt \ + CtsShimPrivPrebuilt \ dnsmasq \ dpm \ + e2fsck \ + ExtServices \ + ExtShared \ framework \ + framework-res \ framework-sysconfig.xml \ fsck_msdos \ + gatekeeperd \ hid \ ime \ - incidentd \ + ims-common \ incident \ + incidentd \ incident_helper \ incident_report \ input \ + installd \ + ip \ + ip6tables \ + iptables \ + ip-up-vpn \ javax.obex \ + keystore \ + ld.config.txt \ + ld.mc \ + libaaudio \ libandroid \ libandroid_runtime \ libandroid_servers \ libaudioeffect_jni \ libaudioflinger \ - libaudiopolicyservice \ libaudiopolicymanager \ + libaudiopolicyservice \ libbundlewrapper \ + libcamera2ndk \ libcamera_client \ libcameraservice \ - libcamera2ndk \ - libdrmclearkeyplugin \ - libdynproc \ libclearkeycasplugin \ + libdownmix \ + libdrmclearkeyplugin \ + libdrmframework \ + libdrmframework_jni \ + libdynproc \ libeffectproxy \ libeffects \ + libfilterfw \ + libgatekeeper \ libinput \ libinputflinger \ libiprouteutil \ libjnigraphics \ + libkeystore \ libldnhncr \ libmedia \ libmedia_jni \ + libmediandk \ libmediaplayerservice \ libmtp \ libnetd_client \ libnetlink \ libnetutils \ + libOpenMAXAL \ + libOpenSLES \ libpdfium \ libradio_metadata \ libreference-ril \ @@ -102,66 +135,100 @@ PRODUCT_PACKAGES += \ libusbhost \ libvisualizer \ libvorbisidec \ - libmediandk \ libvulkan \ libwifi-service \ + libwilhelm \ locksettings \ + logd \ media \ media_cmd \ + media_profiles_V1_0.dtd \ mediadrmserver \ - mediaserver \ - mediametrics \ mediaextractor \ + mediametrics \ + mediaserver \ + mke2fs \ monkey \ mtpd \ ndc \ netd \ + org.apache.http.legacy \ perfetto \ ping \ ping6 \ platform.xml \ - privapp-permissions-platform.xml \ - pppd \ pm \ + pppd \ + privapp-permissions-platform.xml \ racoon \ + resize2fs \ run-as \ schedtest \ + screencap \ sdcard \ secdiscard \ + SecureElement \ + sensorservice \ services \ settings \ + SettingsProvider \ sgdisk \ + Shell \ sm \ statsd \ svc \ tc \ telecom \ + telephony-common \ traced \ traced_probes \ + tune2fs \ + uiautomator \ + uncrypt \ vdc \ + voip-common \ vold \ - wm + WallpaperBackup \ + wificond \ + wifi-service \ + wm \ + + +ifeq ($(TARGET_CORE_JARS),) +$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable) +endif + +# The order matters +PRODUCT_BOOT_JARS := \ + $(TARGET_CORE_JARS) \ + ext \ + framework \ + telephony-common \ + voip-common \ + ims-common \ + android.hidl.base-V1.0-java \ + android.hidl.manager-V1.0-java # Add the compatibility library that is needed when org.apache.http.legacy # is removed from the bootclasspath. ifeq ($(REMOVE_OAHL_FROM_BCP),true) PRODUCT_PACKAGES += framework-oahl-backward-compatibility +PRODUCT_BOOT_JARS += framework-oahl-backward-compatibility +else +PRODUCT_BOOT_JARS += org.apache.http.legacy.impl endif # Add the compatibility library that is needed when android.test.base # is removed from the bootclasspath. ifeq ($(REMOVE_ATB_FROM_BCP),true) PRODUCT_PACKAGES += framework-atb-backward-compatibility +PRODUCT_BOOT_JARS += framework-atb-backward-compatibility +else +PRODUCT_BOOT_JARS += android.test.base endif -# Essential HAL modules -PRODUCT_PACKAGES += \ - android.hardware.cas@1.0-service \ - android.hardware.media.omx@1.0-service - -# XML schema files -PRODUCT_PACKAGES += \ - media_profiles_V1_0.dtd +PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32 # Packages included only for eng or userdebug builds, previously debug tagged PRODUCT_PACKAGES_DEBUG := \ @@ -172,10 +239,15 @@ PRODUCT_PACKAGES_DEBUG := \ sqlite3 \ strace +# The set of packages whose code can be loaded by the system server. +PRODUCT_SYSTEM_SERVER_APPS += \ + SettingsProvider \ + WallpaperBackup + # Packages included only for eng/userdebug builds, when building with SANITIZE_TARGET=address PRODUCT_PACKAGES_DEBUG_ASAN := -PRODUCT_COPY_FILES := $(call add-to-product-copy-files-if-exists,\ +PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ frameworks/base/config/preloaded-classes:system/etc/preloaded-classes) # Note: it is acceptable to not have a dirty-image-objects file. In that case, the special bin @@ -183,4 +255,5 @@ PRODUCT_COPY_FILES := $(call add-to-product-copy-files-if-exists,\ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ frameworks/base/config/dirty-image-objects:system/etc/dirty-image-objects) +$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk) diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index ab28daf0fb..a057cc6ced 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -23,77 +23,32 @@ PRODUCT_DEVICE := generic PRODUCT_NAME := core PRODUCT_PACKAGES += \ - BackupRestoreConfirmation \ - CompanionDeviceManager \ - CtsShimPrebuilt \ - CtsShimPrivPrebuilt \ - DownloadProvider \ - ExtShared \ - ExtServices \ - HTMLViewer \ - MediaProvider \ - PackageInstaller \ - SecureElement \ - SettingsProvider \ - Shell \ - StatementService \ - WallpaperBackup \ - android.hidl.base-V1.0-java \ - android.hidl.manager-V1.0-java \ - bcc \ - bu \ com.android.future.usb.accessory \ - com.android.location.provider \ - com.android.location.provider.xml \ + com.android.mediadrm.signer \ com.android.media.remotedisplay \ com.android.media.remotedisplay.xml \ - com.android.mediadrm.signer \ + CompanionDeviceManager \ + DownloadProvider \ drmserver \ ethernet-service \ - framework-res \ + HTMLViewer \ idmap \ - installd \ - ims-common \ - ip \ - ip-up-vpn \ - ip6tables \ - iptables \ - gatekeeperd \ - keystore \ - ld.config.txt \ - ld.mc \ - libaaudio \ - libOpenMAXAL \ - libOpenSLES \ libdownmix \ libdrmframework \ libdrmframework_jni \ libfilterfw \ - libkeystore \ libgatekeeper \ + libkeystore \ libneuralnetworks \ libwebviewchromium_loader \ libwebviewchromium_plat_support \ - libwilhelm \ - logd \ - mke2fs \ - e2fsck \ - resize2fs \ - tune2fs \ - screencap \ - sensorservice \ - telephony-common \ - uiautomator \ - uncrypt \ + MediaProvider \ + PackageInstaller \ + StatementService \ vndk_snapshot_package \ - voip-common \ webview \ webview_zygote \ -# Wifi modules -PRODUCT_PACKAGES += \ - wifi-service \ - wificond \ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.software.webview.xml:system/etc/permissions/android.software.webview.xml @@ -103,57 +58,18 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.software.preview_sdk.xml:system/etc/permissions/android.software.preview_sdk.xml endif -ifeq ($(TARGET_CORE_JARS),) -$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable) -endif - -# The order of PRODUCT_BOOT_JARS matters. -PRODUCT_BOOT_JARS := \ - $(TARGET_CORE_JARS) \ - ext \ - framework \ - telephony-common \ - voip-common \ - ims-common \ - android.hidl.base-V1.0-java \ - android.hidl.manager-V1.0-java - -ifeq ($(REMOVE_OAHL_FROM_BCP),true) -PRODUCT_BOOT_JARS += framework-oahl-backward-compatibility -else -PRODUCT_BOOT_JARS += org.apache.http.legacy.impl -endif - -ifeq ($(REMOVE_ATB_FROM_BCP),true) -PRODUCT_BOOT_JARS += framework-atb-backward-compatibility -else -PRODUCT_BOOT_JARS += android.test.base -endif - -# The order of PRODUCT_SYSTEM_SERVER_JARS matters. +# The order here is the same order they end up on the classpath, so it matters. PRODUCT_SYSTEM_SERVER_JARS := \ services \ ethernet-service \ wifi-service \ com.android.location.provider \ -# The set of packages whose code can be loaded by the system server. -PRODUCT_SYSTEM_SERVER_APPS += \ - SettingsProvider \ - WallpaperBackup - # Adoptable external storage supports both ext4 and f2fs PRODUCT_PACKAGES += \ - e2fsck \ - mke2fs \ fsck.f2fs \ make_f2fs \ -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - ro.zygote=zygote32 -PRODUCT_COPY_FILES += \ - system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc - PRODUCT_COPY_FILES += \ system/core/rootdir/etc/public.libraries.android.txt:system/etc/public.libraries.txt @@ -175,7 +91,6 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.logd.size.stats=64K \ log.tag.stats_log=I -$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) # Enable CFI for security-sensitive components diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk index c10859885c..d64e08f821 100644 --- a/target/product/core_tiny.mk +++ b/target/product/core_tiny.mk @@ -17,106 +17,21 @@ # No telephony PRODUCT_PACKAGES := \ + audio.primary.default \ Bluetooth \ CalendarProvider \ - ContactsProvider \ CertInstaller \ - FusedLocation \ - InputDevices - -PRODUCT_PACKAGES += \ clatd \ clatd.conf \ - pppd - -PRODUCT_PACKAGES += \ - audio.primary.default \ - local_time.default \ - power.default - -PRODUCT_PACKAGES += \ - BackupRestoreConfirmation \ - CtsShimPrebuilt \ - CtsShimPrivPrebuilt \ + ContactsProvider \ DefaultContainerService \ - ExtShared \ - ExtServices \ - SecureElement \ - SettingsProvider \ - Shell \ - WallpaperBackup \ - android.hidl.base-V1.0-java \ - android.hidl.manager-V1.0-java \ - bcc \ - bu \ - com.android.location.provider \ - com.android.location.provider.xml \ - framework-res \ - installd \ - ims-common \ - ip \ - ip-up-vpn \ - ip6tables \ - iptables \ - gatekeeperd \ - keystore \ - ld.config.txt \ - ld.mc \ - libaaudio \ - libOpenMAXAL \ - libOpenSLES \ - libdownmix \ - libfilterfw \ - libgatekeeper \ - libkeystore \ - libwilhelm \ - libdrmframework_jni \ - libdrmframework \ - mke2fs \ - e2fsck \ - resize2fs \ - tune2fs \ - screencap \ - sensorservice \ - uiautomator \ - uncrypt \ - telephony-common \ - voip-common \ - logd \ + FusedLocation \ + InputDevices \ + local_time.default \ + power.default \ + pppd \ -# Wifi modules -PRODUCT_PACKAGES += \ - wifi-service \ - wificond \ - -ifeq ($(TARGET_CORE_JARS),) -$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable) -endif - -# The order matters -PRODUCT_BOOT_JARS := \ - $(TARGET_CORE_JARS) \ - ext \ - framework \ - telephony-common \ - voip-common \ - ims-common \ - android.hidl.base-V1.0-java \ - android.hidl.manager-V1.0-java - -ifeq ($(REMOVE_OAHL_FROM_BCP),true) -PRODUCT_BOOT_JARS += framework-oahl-backward-compatibility -else -PRODUCT_BOOT_JARS += org.apache.http.legacy.impl -endif - -ifeq ($(REMOVE_ATB_FROM_BCP),true) -PRODUCT_BOOT_JARS += framework-atb-backward-compatibility -else -PRODUCT_BOOT_JARS += android.test.base -endif - -# The order of PRODUCT_SYSTEM_SERVER_JARS matters. +# The order here is the same order they end up on the classpath, so it matters. PRODUCT_SYSTEM_SERVER_JARS := \ services \ wifi-service @@ -124,22 +39,14 @@ PRODUCT_SYSTEM_SERVER_JARS := \ # The set of packages whose code can be loaded by the system server. PRODUCT_SYSTEM_SERVER_APPS += \ FusedLocation \ - InputDevices \ - SettingsProvider \ - WallpaperBackup \ + InputDevices # The set of packages we want to force 'speed' compilation on. PRODUCT_DEXPREOPT_SPEED_APPS := \ -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - ro.zygote=zygote32 -PRODUCT_COPY_FILES += \ - system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc - PRODUCT_PROPERTY_OVERRIDES += \ ro.carrier=unknown -$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) $(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk) $(call inherit-product-if-exists, external/roboto-fonts/fonts.mk) From a2d754ce3a611bcd51945e17642cb52e920cc0ad Mon Sep 17 00:00:00 2001 From: Bjoern Johansson Date: Tue, 15 May 2018 15:03:12 -0700 Subject: [PATCH 03/23] Support new hostapd build target without HIDL The new build target for hostapd does not include the HIDL control interface and it's a separate binary from the hostapd used for WiFi hotspots. This new binary needs its own SELinux rules and it should be included in emulator builds since it's used to provide virtual access points. BUG: 74401469 Test: run cts -m CtsNetTestCases (cherry picked from commit a53c522678f9178038dfdda6260f5c1b69c416ba) Change-Id: I8fa4908d1bef8ff25573abb72bbac433ae3151de --- target/board/generic/sepolicy/execns.te | 13 +++---------- target/board/generic/sepolicy/file_contexts | 1 + target/board/generic/sepolicy/hostapd_nohidl.te | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 target/board/generic/sepolicy/hostapd_nohidl.te diff --git a/target/board/generic/sepolicy/execns.te b/target/board/generic/sepolicy/execns.te index 9675a99c74..dc6c42411b 100644 --- a/target/board/generic/sepolicy/execns.te +++ b/target/board/generic/sepolicy/execns.te @@ -6,7 +6,7 @@ init_daemon_domain(execns) allow execns varrun_file:dir search; allow execns varrun_file:file r_file_perms; -allow execns self:capability sys_admin; +allow execns self:capability { sys_admin setuid setgid }; allow execns nsfs:file { open read }; #Allow execns itself to be run by init in its own domain @@ -18,15 +18,8 @@ domain_auto_trans(execns, dhcpclient_exec, dhcpclient); # Allow dhcpserver to be run by execns in its own domain domain_auto_trans(execns, dhcpserver_exec, dhcpserver); -# Rules to allow execution of hostapd and allow it to run -allow execns hal_wifi_hostapd_default_exec:file { execute_no_trans }; -allow execns self:capability { net_admin net_raw }; -allow execns self:netlink_generic_socket { bind create getattr read setopt write }; -allow execns self:netlink_route_socket { bind create read write nlmsg_write }; -allow execns execns:udp_socket { create ioctl }; -allow execns self:packet_socket { create setopt }; -allow execns sysfs_net:dir { search }; -allowxperm execns self:udp_socket ioctl priv_sock_ioctls; +# Allow hostapd_nohidl to be run by execns in its own domain +domain_auto_trans(execns, hostapd_nohidl_exec, hostapd_nohidl); # Allow execns to read createns proc file to get the namespace file allow execns createns:file read; diff --git a/target/board/generic/sepolicy/file_contexts b/target/board/generic/sepolicy/file_contexts index 73fe75245b..7cd79fecda 100644 --- a/target/board/generic/sepolicy/file_contexts +++ b/target/board/generic/sepolicy/file_contexts @@ -24,6 +24,7 @@ /vendor/bin/ipv6proxy u:object_r:ipv6proxy_exec:s0 /vendor/bin/dhcpclient u:object_r:dhcpclient_exec:s0 /vendor/bin/dhcpserver u:object_r:dhcpserver_exec:s0 +/vendor/bin/hostapd_nohidl u:object_r:hostapd_nohidl_exec:s0 /vendor/bin/hw/android\.hardware\.drm@1\.0-service\.widevine u:object_r:hal_drm_widevine_exec:s0 diff --git a/target/board/generic/sepolicy/hostapd_nohidl.te b/target/board/generic/sepolicy/hostapd_nohidl.te new file mode 100644 index 0000000000..add648a014 --- /dev/null +++ b/target/board/generic/sepolicy/hostapd_nohidl.te @@ -0,0 +1,16 @@ +type hostapd_nohidl, domain; +type hostapd_nohidl_exec, exec_type, vendor_file_type, file_type; + +init_daemon_domain(hostapd_nohidl) +net_domain(hostapd_nohidl) + +allow hostapd_nohidl execns:fd use; + +allow hostapd_nohidl self:capability { net_admin net_raw }; +allow hostapd_nohidl self:netlink_generic_socket { bind create getattr read setopt write }; +allow hostapd_nohidl self:netlink_route_socket nlmsg_write; +allow hostapd_nohidl self:packet_socket { create setopt }; +allowxperm hostapd_nohidl self:udp_socket ioctl priv_sock_ioctls; + +# hostapd will attempt to search sysfs but it's not needed and will spam the log +dontaudit hostapd_nohidl sysfs_net:dir search; From 667685301600040c0006752bbf7ec0335efa9a56 Mon Sep 17 00:00:00 2001 From: bohu Date: Sun, 10 Jun 2018 00:11:30 -0700 Subject: [PATCH 04/23] emulator: factor vendor partition out of emulator.mk The emulator vendor paritions are better moved out of emulator.mk into device/generic/goldfish/vendor.mk so that changes in vendor.mk will just concentrate on vendor partition. this cl does not impact real devices, and it does not even impact emulator images (it does code refactoring only) BUG: 110030159 Change-Id: Ic5778cda8ca6ccf7bc2bc2f9028f801cda970143 --- target/product/aosp_arm.mk | 11 +-- target/product/aosp_arm64.mk | 11 +-- target/product/aosp_x86.mk | 12 +-- target/product/aosp_x86_64.mk | 8 +- target/product/emulator.mk | 134 +--------------------------------- 5 files changed, 8 insertions(+), 168 deletions(-) diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk index bda9a4212d..4b94b7eadf 100644 --- a/target/product/aosp_arm.mk +++ b/target/product/aosp_arm.mk @@ -14,16 +14,7 @@ # limitations under the License. # -PRODUCT_PROPERTY_OVERRIDES += \ - vendor.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/arm64/3.18/kernel-qemu2:kernel-ranchu-64 \ - device/generic/goldfish/fstab.ranchu.arm:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu +include device/generic/goldfish/arm32-vendor.mk # TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor PRODUCT_PACKAGES += \ diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk index 727762a5ed..4b566f0125 100644 --- a/target/product/aosp_arm64.mk +++ b/target/product/aosp_arm64.mk @@ -14,21 +14,12 @@ # limitations under the License. # -PRODUCT_PROPERTY_OVERRIDES += \ - vendor.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. -# 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:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu +include device/generic/goldfish/arm64-vendor.mk # Copy different zygote settings for vendor.img to select by setting property # ro.zygote=zygote64_32 or ro.zygote=zygote32_64: diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk index cd099e75e3..bfc7e3829f 100644 --- a/target/product/aosp_x86.mk +++ b/target/product/aosp_x86.mk @@ -14,17 +14,7 @@ # limitations under the License. # -PRODUCT_PROPERTY_OVERRIDES += \ - vendor.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_64/4.9/kernel-qemu2:kernel-ranchu-64 +include device/generic/goldfish/x86-vendor.mk # TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor PRODUCT_PACKAGES += \ diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk index 368600920f..a810368acb 100644 --- a/target/product/aosp_x86_64.mk +++ b/target/product/aosp_x86_64.mk @@ -14,18 +14,12 @@ # limitations under the License. # -PRODUCT_PROPERTY_OVERRIDES += \ - vendor.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. -PRODUCT_COPY_FILES += \ - development/sys-img/advancedFeatures.ini:advancedFeatures.ini \ - device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \ - prebuilts/qemu-kernel/x86_64/4.9/kernel-qemu2:kernel-ranchu +include device/generic/goldfish/x86_64-vendor.mk # Copy different zygote settings for vendor.img to select by setting property # ro.zygote=zygote64_32 or ro.zygote=zygote32_64: diff --git a/target/product/emulator.mk b/target/product/emulator.mk index 78d8e921ab..4d482fa860 100644 --- a/target/product/emulator.mk +++ b/target/product/emulator.mk @@ -18,151 +18,22 @@ # emulator-related modules to PRODUCT_PACKAGES. # -# Host modules -PRODUCT_PACKAGES += \ - - # Device modules PRODUCT_PACKAGES += \ - egl.cfg \ - gralloc.goldfish \ - gralloc.goldfish.default \ - gralloc.ranchu \ - libGLESv1_CM_emulation \ - lib_renderControl_enc \ - libEGL_emulation \ libGLES_android \ - libGLESv2_enc \ - libOpenglSystemCommon \ - libGLESv2_emulation \ - libGLESv1_enc \ - libEGL_swiftshader \ - libGLESv1_CM_swiftshader \ - libGLESv2_swiftshader \ - qemu-props \ - camera.goldfish \ - camera.goldfish.jpeg \ - camera.ranchu \ - camera.ranchu.jpeg \ - gatekeeper.ranchu \ - lights.goldfish \ - gps.goldfish \ - gps.ranchu \ - fingerprint.goldfish \ - sensors.goldfish \ - audio.primary.goldfish \ - audio.primary.goldfish_legacy \ - android.hardware.audio@2.0-service \ - android.hardware.wifi@1.0-service \ - vibrator.goldfish \ - power.goldfish \ - power.ranchu \ - fingerprint.ranchu \ - android.hardware.biometrics.fingerprint@2.1-service \ - sensors.ranchu \ - android.hardware.graphics.composer@2.1-impl \ - android.hardware.graphics.composer@2.1-service \ - android.hardware.graphics.allocator@2.0-service \ - android.hardware.graphics.allocator@2.0-impl \ - android.hardware.graphics.mapper@2.0-impl \ - hwcomposer.goldfish \ - hwcomposer.ranchu \ - sh_vendor \ vintf \ - toybox_vendor \ CarrierConfig \ - audio.primary.goldfish \ - audio.r_submix.default \ - local_time.default \ - SdkSetup - -PRODUCT_PACKAGES += \ - android.hardware.audio@2.0-impl \ - android.hardware.audio.effect@2.0-impl \ - android.hardware.broadcastradio@1.1-service \ - android.hardware.broadcastradio@1.0-impl \ - android.hardware.soundtrigger@2.0-impl - -PRODUCT_PACKAGES += \ - android.hardware.keymaster@3.0-impl \ - android.hardware.keymaster@3.0-service - -PRODUCT_PACKAGES += \ - android.hardware.keymaster@4.0-strongbox-service - -PRODUCT_PACKAGES += \ - android.hardware.gnss@1.0-service \ - android.hardware.gnss@1.0-impl - -PRODUCT_PACKAGES += \ - android.hardware.sensors@1.0-impl \ - android.hardware.sensors@1.0-service - -PRODUCT_PACKAGES += \ - android.hardware.drm@1.0-service \ - android.hardware.drm@1.0-impl - -PRODUCT_PACKAGES += \ - android.hardware.power@1.0-service \ - android.hardware.power@1.0-impl - -PRODUCT_PACKAGES += \ - camera.device@1.0-impl \ - android.hardware.camera.provider@2.4-service \ - android.hardware.camera.provider@2.4-impl \ - -PRODUCT_PACKAGES += \ - android.hardware.gatekeeper@1.0-impl \ - android.hardware.gatekeeper@1.0-service # need this for gles libraries to load properly # after moving to /vendor/lib/ PRODUCT_PACKAGES += \ vndk-sp -# WiFi +# WiFi: system side PRODUCT_PACKAGES += \ - createns \ - dhcpclient \ - dhcpserver \ - execns \ - hostapd \ ip \ - ipv6proxy \ iw \ wificond \ - wpa_supplicant \ - -PRODUCT_COPY_FILES += \ - device/generic/goldfish/data/etc/apns-conf.xml:data/misc/apns/apns-conf.xml \ - device/generic/goldfish/init.ranchu-core.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-core.sh \ - device/generic/goldfish/init.ranchu-net.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-net.sh \ - device/generic/goldfish/wifi/init.wifi.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.wifi.sh \ - device/generic/goldfish/init.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ranchu.rc \ - device/generic/goldfish/fstab.ranchu:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu \ - device/generic/goldfish/ueventd.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ - device/generic/goldfish/input/goldfish_rotary.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/goldfish_rotary.idc \ - device/generic/goldfish/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml \ - device/generic/goldfish/data/etc/permissions/privapp-permissions-goldfish.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/privapp-permissions-goldfish.xml \ - device/generic/goldfish/data/etc/config.ini:config.ini \ - device/generic/goldfish/wifi/simulated_hostapd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/simulated_hostapd.conf \ - device/generic/goldfish/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \ - device/generic/goldfish/wifi/WifiConfigStore.xml:data/misc/wifi/WifiConfigStore.xml \ - frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ - device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ - device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ - device/generic/goldfish/camera/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ - device/generic/goldfish/camera/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ - frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ - frameworks/native/data/etc/android.hardware.camera.autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml \ - frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \ - frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \ - frameworks/native/data/etc/android.software.autofill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.autofill.xml \ - frameworks/av/media/libeffects/data/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \ - device/generic/goldfish/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf PRODUCT_PACKAGE_OVERLAYS := device/generic/goldfish/overlay @@ -171,6 +42,9 @@ PRODUCT_CHARACTERISTICS := emulator PRODUCT_FULL_TREBLE_OVERRIDE := true +# goldfish vendor partition configurations +$(call inherit-product, device/generic/goldfish/vendor.mk) + #watchdog tiggers reboot because location service is not #responding, disble it for now. #still keep it on internal master as it is still working From fbde08eb073b690467aadb722da47bc287649dc4 Mon Sep 17 00:00:00 2001 From: bohu Date: Mon, 11 Jun 2018 23:23:10 -0700 Subject: [PATCH 05/23] emulator: base sdk_phone_armv7/64 on aosp Switch to GSI images for arm/arm64 sdk images. BUG: 79941736 This cl does not impact real device images Test: make -j110 PRODUCT-sdk_phone_armv7-sdk showcommands dist \ DIST_DIR=git_master-without-vendor-linux-sdk_x86-sdk sdk_repo Change-Id: Ia50be068cc5e5307cdf7ee3a8e11014ed8019992 --- target/product/sdk_phone_arm64.mk | 28 ++++------------------------ target/product/sdk_phone_armv7.mk | 20 ++++---------------- 2 files changed, 8 insertions(+), 40 deletions(-) diff --git a/target/product/sdk_phone_arm64.mk b/target/product/sdk_phone_arm64.mk index 56eb8c7911..c6b290f796 100644 --- a/target/product/sdk_phone_arm64.mk +++ b/target/product/sdk_phone_arm64.mk @@ -14,31 +14,11 @@ # limitations under the License. # -PRODUCT_PROPERTY_OVERRIDES += \ - rild.libpath=/vendor/lib64/libreference-ril.so +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_arm64.mk) -# 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. - -# 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:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu - -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/sdk_base.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) - -# AOSP emulator images build the AOSP messaging app. -# Google API images override with the Google API app. -# See vendor/google/products/sdk_google_phone_*.mk -PRODUCT_PACKAGES += \ - messaging +# Define the host tools and libs that are parts of the SDK. +$(call inherit-product, sdk/build/product_sdk.mk) +$(call inherit-product, development/build/product_sdk.mk) # Overrides PRODUCT_BRAND := Android diff --git a/target/product/sdk_phone_armv7.mk b/target/product/sdk_phone_armv7.mk index 73c42c381d..f2b51cfd70 100644 --- a/target/product/sdk_phone_armv7.mk +++ b/target/product/sdk_phone_armv7.mk @@ -14,24 +14,12 @@ # limitations under the License. # -PRODUCT_PROPERTY_OVERRIDES += \ - rild.libpath=/vendor/lib/libreference-ril.so +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_arm.mk) -# 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-64 \ - device/generic/goldfish/fstab.ranchu.arm:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu +# Define the host tools and libs that are parts of the SDK. +$(call inherit-product, sdk/build/product_sdk.mk) +$(call inherit-product, development/build/product_sdk.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/sdk_base.mk) - -# AOSP emulator images build the AOSP messaging app. -# Google API images override with the Google API app. -# See vendor/google/products/sdk_google_phone_*.mk -PRODUCT_PACKAGES += \ - messaging # Overrides PRODUCT_BRAND := Android From 0d749a7a3ea922bda49f00635e5abbb06b02c558 Mon Sep 17 00:00:00 2001 From: bohu Date: Wed, 13 Jun 2018 10:18:07 -0700 Subject: [PATCH 06/23] emulator: move sepolicy to goldfish project The sepolicies are emulator specific and are installed under vendor partition, move them to the right location. this cl does not impact real devices, as the selinux rules are for emulator only BUG: 110030159 Change-Id: I6acc27a3b787a3fafd9373c84492537185b184c5 Merged-In: I6acc27a3b787a3fafd9373c84492537185b184c5 --- target/board/generic/BoardConfig.mk | 2 +- target/board/generic/sepolicy/OWNERS | 4 -- target/board/generic/sepolicy/adbd.te | 1 - target/board/generic/sepolicy/audioserver.te | 1 - target/board/generic/sepolicy/bootanim.te | 9 ---- target/board/generic/sepolicy/cameraserver.te | 2 - target/board/generic/sepolicy/createns.te | 14 ------ target/board/generic/sepolicy/device.te | 1 - target/board/generic/sepolicy/dhcpclient.te | 20 -------- target/board/generic/sepolicy/dhcpserver.te | 12 ----- target/board/generic/sepolicy/domain.te | 3 -- target/board/generic/sepolicy/execns.te | 27 ----------- target/board/generic/sepolicy/file.te | 4 -- target/board/generic/sepolicy/file_contexts | 47 ------------------- target/board/generic/sepolicy/genfs_contexts | 20 -------- .../board/generic/sepolicy/goldfish_setup.te | 47 ------------------- .../generic/sepolicy/hal_camera_default.te | 3 -- .../board/generic/sepolicy/hal_cas_default.te | 1 - .../board/generic/sepolicy/hal_drm_default.te | 2 - .../generic/sepolicy/hal_drm_widevine.te | 14 ------ .../sepolicy/hal_fingerprint_default.te | 5 -- .../generic/sepolicy/hal_gnss_default.te | 3 -- .../hal_graphics_allocator_default.te | 2 - .../sepolicy/hal_graphics_composer_default.te | 3 -- .../generic/sepolicy/hal_wifi_default.te | 1 - target/board/generic/sepolicy/healthd.te | 2 - .../board/generic/sepolicy/hostapd_nohidl.te | 16 ------- target/board/generic/sepolicy/init.te | 2 - target/board/generic/sepolicy/ipv6proxy.te | 16 ------- target/board/generic/sepolicy/logpersist.te | 13 ----- target/board/generic/sepolicy/mediacodec.te | 1 - target/board/generic/sepolicy/netd.te | 3 -- target/board/generic/sepolicy/priv_app.te | 5 -- target/board/generic/sepolicy/property.te | 5 -- .../board/generic/sepolicy/property_contexts | 8 ---- target/board/generic/sepolicy/qemu_props.te | 10 ---- target/board/generic/sepolicy/radio.te | 3 -- target/board/generic/sepolicy/rild.te | 3 -- target/board/generic/sepolicy/shell.te | 1 - .../board/generic/sepolicy/surfaceflinger.te | 5 -- .../board/generic/sepolicy/system_server.te | 1 - target/board/generic/sepolicy/vendor_init.te | 1 - target/board/generic/sepolicy/vold.te | 1 - target/board/generic/sepolicy/zygote.te | 5 -- target/board/generic_arm64/BoardConfig.mk | 2 +- target/board/generic_x86/BoardConfig.mk | 4 +- target/board/generic_x86/sepolicy/OWNERS | 4 -- target/board/generic_x86/sepolicy/domain.te | 1 - target/board/generic_x86/sepolicy/healthd.te | 1 - target/board/generic_x86/sepolicy/init.te | 1 - target/board/generic_x86/sepolicy/installd.te | 1 - target/board/generic_x86/sepolicy/zygote.te | 2 - target/board/generic_x86_64/BoardConfig.mk | 4 +- target/board/generic_x86_arm/BoardConfig.mk | 2 +- 54 files changed, 7 insertions(+), 364 deletions(-) delete mode 100644 target/board/generic/sepolicy/OWNERS delete mode 100644 target/board/generic/sepolicy/adbd.te delete mode 100644 target/board/generic/sepolicy/audioserver.te delete mode 100644 target/board/generic/sepolicy/bootanim.te delete mode 100644 target/board/generic/sepolicy/cameraserver.te delete mode 100644 target/board/generic/sepolicy/createns.te delete mode 100644 target/board/generic/sepolicy/device.te delete mode 100644 target/board/generic/sepolicy/dhcpclient.te delete mode 100644 target/board/generic/sepolicy/dhcpserver.te delete mode 100644 target/board/generic/sepolicy/domain.te delete mode 100644 target/board/generic/sepolicy/execns.te delete mode 100644 target/board/generic/sepolicy/file.te delete mode 100644 target/board/generic/sepolicy/file_contexts delete mode 100644 target/board/generic/sepolicy/genfs_contexts delete mode 100644 target/board/generic/sepolicy/goldfish_setup.te delete mode 100644 target/board/generic/sepolicy/hal_camera_default.te delete mode 100644 target/board/generic/sepolicy/hal_cas_default.te delete mode 100644 target/board/generic/sepolicy/hal_drm_default.te delete mode 100644 target/board/generic/sepolicy/hal_drm_widevine.te delete mode 100644 target/board/generic/sepolicy/hal_fingerprint_default.te delete mode 100644 target/board/generic/sepolicy/hal_gnss_default.te delete mode 100644 target/board/generic/sepolicy/hal_graphics_allocator_default.te delete mode 100644 target/board/generic/sepolicy/hal_graphics_composer_default.te delete mode 100644 target/board/generic/sepolicy/hal_wifi_default.te delete mode 100644 target/board/generic/sepolicy/healthd.te delete mode 100644 target/board/generic/sepolicy/hostapd_nohidl.te delete mode 100644 target/board/generic/sepolicy/init.te delete mode 100644 target/board/generic/sepolicy/ipv6proxy.te delete mode 100644 target/board/generic/sepolicy/logpersist.te delete mode 100644 target/board/generic/sepolicy/mediacodec.te delete mode 100644 target/board/generic/sepolicy/netd.te delete mode 100644 target/board/generic/sepolicy/priv_app.te delete mode 100644 target/board/generic/sepolicy/property.te delete mode 100644 target/board/generic/sepolicy/property_contexts delete mode 100644 target/board/generic/sepolicy/qemu_props.te delete mode 100644 target/board/generic/sepolicy/radio.te delete mode 100644 target/board/generic/sepolicy/rild.te delete mode 100644 target/board/generic/sepolicy/shell.te delete mode 100644 target/board/generic/sepolicy/surfaceflinger.te delete mode 100644 target/board/generic/sepolicy/system_server.te delete mode 100644 target/board/generic/sepolicy/vendor_init.te delete mode 100644 target/board/generic/sepolicy/vold.te delete mode 100644 target/board/generic/sepolicy/zygote.te delete mode 100644 target/board/generic_x86/sepolicy/OWNERS delete mode 100644 target/board/generic_x86/sepolicy/domain.te delete mode 100644 target/board/generic_x86/sepolicy/healthd.te delete mode 100644 target/board/generic_x86/sepolicy/init.te delete mode 100644 target/board/generic_x86/sepolicy/installd.te delete mode 100644 target/board/generic_x86/sepolicy/zygote.te diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index 009fb32249..6c8284639d 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -77,7 +77,7 @@ BOARD_USES_METADATA_PARTITION := true BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 -BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy +BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/common BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true # Android Verified Boot (AVB): diff --git a/target/board/generic/sepolicy/OWNERS b/target/board/generic/sepolicy/OWNERS deleted file mode 100644 index 3828988948..0000000000 --- a/target/board/generic/sepolicy/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -jeffv@google.com -dcashman@google.com -jbires@google.com -sspatil@google.com diff --git a/target/board/generic/sepolicy/adbd.te b/target/board/generic/sepolicy/adbd.te deleted file mode 100644 index 9546c1a472..0000000000 --- a/target/board/generic/sepolicy/adbd.te +++ /dev/null @@ -1 +0,0 @@ -set_prop(adbd, ctl_mdnsd_prop); diff --git a/target/board/generic/sepolicy/audioserver.te b/target/board/generic/sepolicy/audioserver.te deleted file mode 100644 index c3c4a3a3d0..0000000000 --- a/target/board/generic/sepolicy/audioserver.te +++ /dev/null @@ -1 +0,0 @@ -allow audioserver bootanim:binder call; diff --git a/target/board/generic/sepolicy/bootanim.te b/target/board/generic/sepolicy/bootanim.te deleted file mode 100644 index bc84ee7399..0000000000 --- a/target/board/generic/sepolicy/bootanim.te +++ /dev/null @@ -1,9 +0,0 @@ -allow bootanim self:process execmem; -allow bootanim ashmem_device:chr_file execute; -#TODO: This can safely be ignored until b/62954877 is fixed -dontaudit bootanim system_data_file:dir read; - -allow bootanim graphics_device:chr_file { read ioctl open }; - -typeattribute bootanim system_writes_vendor_properties_violators; -set_prop(bootanim, qemu_prop) diff --git a/target/board/generic/sepolicy/cameraserver.te b/target/board/generic/sepolicy/cameraserver.te deleted file mode 100644 index 6cf5d6ae48..0000000000 --- a/target/board/generic/sepolicy/cameraserver.te +++ /dev/null @@ -1,2 +0,0 @@ -allow cameraserver system_file:dir { open read }; -allow cameraserver hal_allocator:fd use; diff --git a/target/board/generic/sepolicy/createns.te b/target/board/generic/sepolicy/createns.te deleted file mode 100644 index 1eaf9ef584..0000000000 --- a/target/board/generic/sepolicy/createns.te +++ /dev/null @@ -1,14 +0,0 @@ -# Network namespace creation -type createns, domain; -type createns_exec, exec_type, vendor_file_type, file_type; - -init_daemon_domain(createns) - -allow createns self:capability { sys_admin net_raw setuid setgid }; -allow createns varrun_file:dir { add_name search write }; -allow createns varrun_file:file { create mounton open read write }; - -#Allow createns itself to be run by init in its own domain -domain_auto_trans(goldfish_setup, createns_exec, createns); -allow createns goldfish_setup:fd use; - diff --git a/target/board/generic/sepolicy/device.te b/target/board/generic/sepolicy/device.te deleted file mode 100644 index d129441197..0000000000 --- a/target/board/generic/sepolicy/device.te +++ /dev/null @@ -1 +0,0 @@ -type qemu_device, dev_type, mlstrustedobject; diff --git a/target/board/generic/sepolicy/dhcpclient.te b/target/board/generic/sepolicy/dhcpclient.te deleted file mode 100644 index df71fca386..0000000000 --- a/target/board/generic/sepolicy/dhcpclient.te +++ /dev/null @@ -1,20 +0,0 @@ -# DHCP client -type dhcpclient, domain; -type dhcpclient_exec, exec_type, vendor_file_type, file_type; - -init_daemon_domain(dhcpclient) -net_domain(dhcpclient) - -allow dhcpclient execns:fd use; - -set_prop(dhcpclient, net_eth0_prop); -allow dhcpclient self:capability { net_admin net_raw }; -allow dhcpclient self:udp_socket create; -allow dhcpclient self:netlink_route_socket { write nlmsg_write }; -allow dhcpclient varrun_file:dir search; -allow dhcpclient self:packet_socket { create bind write read }; -allowxperm dhcpclient self:udp_socket ioctl { SIOCSIFFLAGS - SIOCSIFADDR - SIOCSIFNETMASK - SIOCSIFMTU - SIOCGIFHWADDR }; diff --git a/target/board/generic/sepolicy/dhcpserver.te b/target/board/generic/sepolicy/dhcpserver.te deleted file mode 100644 index 7e8ba263ac..0000000000 --- a/target/board/generic/sepolicy/dhcpserver.te +++ /dev/null @@ -1,12 +0,0 @@ -# DHCP server -type dhcpserver, domain; -type dhcpserver_exec, exec_type, vendor_file_type, file_type; - -init_daemon_domain(dhcpserver) -net_domain(dhcpserver) - -allow dhcpserver execns:fd use; - -get_prop(dhcpserver, net_eth0_prop); -allow dhcpserver self:udp_socket { ioctl create setopt bind }; -allow dhcpserver self:capability { net_raw net_bind_service }; diff --git a/target/board/generic/sepolicy/domain.te b/target/board/generic/sepolicy/domain.te deleted file mode 100644 index 3706dbaa09..0000000000 --- a/target/board/generic/sepolicy/domain.te +++ /dev/null @@ -1,3 +0,0 @@ -allow domain qemu_device:chr_file rw_file_perms; - -get_prop(domain, qemu_prop) diff --git a/target/board/generic/sepolicy/execns.te b/target/board/generic/sepolicy/execns.te deleted file mode 100644 index dc6c42411b..0000000000 --- a/target/board/generic/sepolicy/execns.te +++ /dev/null @@ -1,27 +0,0 @@ -# Network namespace transitions -type execns, domain; -type execns_exec, exec_type, vendor_file_type, file_type; - -init_daemon_domain(execns) - -allow execns varrun_file:dir search; -allow execns varrun_file:file r_file_perms; -allow execns self:capability { sys_admin setuid setgid }; -allow execns nsfs:file { open read }; - -#Allow execns itself to be run by init in its own domain -domain_auto_trans(init, execns_exec, execns); - -# Allow dhcpclient to be run by execns in its own domain -domain_auto_trans(execns, dhcpclient_exec, dhcpclient); - -# Allow dhcpserver to be run by execns in its own domain -domain_auto_trans(execns, dhcpserver_exec, dhcpserver); - -# Allow hostapd_nohidl to be run by execns in its own domain -domain_auto_trans(execns, hostapd_nohidl_exec, hostapd_nohidl); - -# Allow execns to read createns proc file to get the namespace file -allow execns createns:file read; -allow execns createns:dir search; -allow execns createns:lnk_file read; diff --git a/target/board/generic/sepolicy/file.te b/target/board/generic/sepolicy/file.te deleted file mode 100644 index b0aa217ae4..0000000000 --- a/target/board/generic/sepolicy/file.te +++ /dev/null @@ -1,4 +0,0 @@ -type sysfs_writable, fs_type, sysfs_type, mlstrustedobject; -type varrun_file, file_type, data_file_type, mlstrustedobject; -type mediadrm_vendor_data_file, file_type, data_file_type; -type nsfs, fs_type; diff --git a/target/board/generic/sepolicy/file_contexts b/target/board/generic/sepolicy/file_contexts deleted file mode 100644 index 7cd79fecda..0000000000 --- a/target/board/generic/sepolicy/file_contexts +++ /dev/null @@ -1,47 +0,0 @@ -# goldfish -/dev/block/mtdblock0 u:object_r:system_block_device:s0 -/dev/block/mtdblock1 u:object_r:userdata_block_device:s0 -/dev/block/mtdblock2 u:object_r:cache_block_device:s0 - -# ranchu -/dev/block/vda u:object_r:system_block_device:s0 -/dev/block/vdb u:object_r:cache_block_device:s0 -/dev/block/vdc u:object_r:userdata_block_device:s0 -/dev/block/vdd u:object_r:metadata_block_device:s0 -/dev/block/vde u:object_r:system_block_device:s0 - -/dev/goldfish_pipe u:object_r:qemu_device:s0 -/dev/goldfish_sync u:object_r:qemu_device:s0 -/dev/qemu_.* u:object_r:qemu_device:s0 -/dev/ttyGF[0-9]* u:object_r:serial_device:s0 -/dev/ttyS2 u:object_r:console_device:s0 -/vendor/bin/init\.ranchu-core\.sh u:object_r:goldfish_setup_exec:s0 -/vendor/bin/init\.ranchu-net\.sh u:object_r:goldfish_setup_exec:s0 -/vendor/bin/init\.wifi\.sh u:object_r:goldfish_setup_exec:s0 -/vendor/bin/qemu-props u:object_r:qemu_props_exec:s0 -/vendor/bin/createns u:object_r:createns_exec:s0 -/vendor/bin/execns u:object_r:execns_exec:s0 -/vendor/bin/ipv6proxy u:object_r:ipv6proxy_exec:s0 -/vendor/bin/dhcpclient u:object_r:dhcpclient_exec:s0 -/vendor/bin/dhcpserver u:object_r:dhcpserver_exec:s0 -/vendor/bin/hostapd_nohidl u:object_r:hostapd_nohidl_exec:s0 - -/vendor/bin/hw/android\.hardware\.drm@1\.0-service\.widevine u:object_r:hal_drm_widevine_exec:s0 - -/vendor/lib(64)?/hw/gralloc\.ranchu\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/hw/gralloc\.goldfish\.default\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libEGL_emulation\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libGLESv1_CM_emulation\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libGLESv2_emulation\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libEGL_swiftshader\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libGLESv1_CM_swiftshader\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libGLESv2_swiftshader\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libOpenglSystemCommon\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/lib_renderControl_enc\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libGLESv1_enc\.so u:object_r:same_process_hal_file:s0 -/vendor/lib(64)?/libGLESv2_enc\.so u:object_r:same_process_hal_file:s0 - -# data -/data/vendor/mediadrm(/.*)? u:object_r:mediadrm_vendor_data_file:s0 -/data/vendor/var/run(/.*)? u:object_r:varrun_file:s0 - diff --git a/target/board/generic/sepolicy/genfs_contexts b/target/board/generic/sepolicy/genfs_contexts deleted file mode 100644 index 1b816263b0..0000000000 --- a/target/board/generic/sepolicy/genfs_contexts +++ /dev/null @@ -1,20 +0,0 @@ -# On the emulator, device tree dir is configured to be -# /sys/bus/platform/devices/ANDR0001:00/properties/android/ which is a symlink to -# /sys/devices/platform/ANDR0001:00/properties/android/ -genfscon sysfs /devices/platform/ANDR0001:00/properties/android u:object_r:sysfs_dt_firmware_android:s0 - -# We expect /sys/class/power_supply/* and everything it links to to be labeled -# as sysfs_batteryinfo. -genfscon sysfs /devices/platform/GFSH0001:00/power_supply u:object_r:sysfs_batteryinfo:s0 - -# /sys/class/rtc -genfscon sysfs /devices/pnp0/00:00/rtc u:object_r:sysfs_rtc:s0 -genfscon sysfs /devices/platform/GFSH0007:00/rtc u:object_r:sysfs_rtc:s0 - -# /sys/class/net -genfscon sysfs /devices/pci0000:00/0000:00:08.0/virtio5/net u:object_r:sysfs_net:s0 -genfscon sysfs /devices/virtual/mac80211_hwsim/hwsim0/net u:object_r:sysfs_net:s0 -genfscon sysfs /devices/virtual/mac80211_hwsim/hwsim1/net u:object_r:sysfs_net:s0 - -# /proc//ns -genfscon nsfs / u:object_r:nsfs:s0 diff --git a/target/board/generic/sepolicy/goldfish_setup.te b/target/board/generic/sepolicy/goldfish_setup.te deleted file mode 100644 index 3041436b31..0000000000 --- a/target/board/generic/sepolicy/goldfish_setup.te +++ /dev/null @@ -1,47 +0,0 @@ -# goldfish-setup service: runs init.goldfish.sh script -type goldfish_setup, domain; -type goldfish_setup_exec, vendor_file_type, exec_type, file_type; - -init_daemon_domain(goldfish_setup) - -# TODO(b/79502552): Invalid property access from emulator vendor -#set_prop(goldfish_setup, debug_prop); -allow goldfish_setup self:capability { net_admin net_raw }; -allow goldfish_setup self:udp_socket { create ioctl }; -allow goldfish_setup vendor_toolbox_exec:file execute_no_trans; -allowxperm goldfish_setup self:udp_socket ioctl priv_sock_ioctls; -wakelock_use(goldfish_setup); -allow goldfish_setup vendor_shell_exec:file { rx_file_perms }; - -# Set system properties to start services -set_prop(goldfish_setup, ctl_default_prop); - -# Set up WiFi -allow goldfish_setup self:netlink_route_socket { create nlmsg_write setopt bind getattr read write nlmsg_read }; -allow goldfish_setup self:netlink_generic_socket create_socket_perms_no_ioctl; -allow goldfish_setup self:capability { sys_module sys_admin }; -allow goldfish_setup varrun_file:dir { mounton open read write add_name search remove_name }; -allow goldfish_setup varrun_file:file { mounton getattr create read write open unlink }; -allow goldfish_setup execns_exec:file rx_file_perms; -allow goldfish_setup proc_net:file rw_file_perms; -allow goldfish_setup proc:file r_file_perms; -allow goldfish_setup nsfs:file r_file_perms; -allow goldfish_setup system_data_file:dir getattr; -allow goldfish_setup kernel:system module_request; -set_prop(goldfish_setup, qemu_prop); -get_prop(goldfish_setup, net_share_prop); -# Allow goldfish_setup to run /system/bin/ip and /system/bin/iw -allow goldfish_setup system_file:file execute_no_trans; -# Allow goldfish_setup to run init.wifi.sh -allow goldfish_setup goldfish_setup_exec:file execute_no_trans; -#Allow goldfish_setup to run createns in its own domain -domain_auto_trans(goldfish_setup, createns_exec, createns); -# iw -allow goldfish_setup sysfs:file { read open }; -# iptables -allow goldfish_setup system_file:file lock; -allow goldfish_setup self:rawip_socket { create getopt setopt }; -# Allow goldfish_setup to read createns proc file to get the namespace file -allow goldfish_setup createns:file { read }; -allow goldfish_setup createns:dir { search }; -allow goldfish_setup createns:lnk_file { read }; diff --git a/target/board/generic/sepolicy/hal_camera_default.te b/target/board/generic/sepolicy/hal_camera_default.te deleted file mode 100644 index eb88c36f0e..0000000000 --- a/target/board/generic/sepolicy/hal_camera_default.te +++ /dev/null @@ -1,3 +0,0 @@ -vndbinder_use(hal_camera_default); -allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find; -hal_client_domain(hal_camera_default, hal_graphics_composer) diff --git a/target/board/generic/sepolicy/hal_cas_default.te b/target/board/generic/sepolicy/hal_cas_default.te deleted file mode 100644 index 3ed3bee869..0000000000 --- a/target/board/generic/sepolicy/hal_cas_default.te +++ /dev/null @@ -1 +0,0 @@ -vndbinder_use(hal_cas_default); diff --git a/target/board/generic/sepolicy/hal_drm_default.te b/target/board/generic/sepolicy/hal_drm_default.te deleted file mode 100644 index 5a07433c8c..0000000000 --- a/target/board/generic/sepolicy/hal_drm_default.te +++ /dev/null @@ -1,2 +0,0 @@ -vndbinder_use(hal_drm_default); -hal_client_domain(hal_drm_default, hal_graphics_composer) diff --git a/target/board/generic/sepolicy/hal_drm_widevine.te b/target/board/generic/sepolicy/hal_drm_widevine.te deleted file mode 100644 index d49000d149..0000000000 --- a/target/board/generic/sepolicy/hal_drm_widevine.te +++ /dev/null @@ -1,14 +0,0 @@ -# define SELinux domain -type hal_drm_widevine, domain; -hal_server_domain(hal_drm_widevine, hal_drm) - -type hal_drm_widevine_exec, exec_type, vendor_file_type, file_type; -init_daemon_domain(hal_drm_widevine) - -allow hal_drm mediacodec:fd use; -allow hal_drm { appdomain -isolated_app }:fd use; - -vndbinder_use(hal_drm_widevine); -hal_client_domain(hal_drm_widevine, hal_graphics_composer); -allow hal_drm_widevine mediadrm_vendor_data_file:dir create_dir_perms; -allow hal_drm_widevine mediadrm_vendor_data_file:file create_file_perms; diff --git a/target/board/generic/sepolicy/hal_fingerprint_default.te b/target/board/generic/sepolicy/hal_fingerprint_default.te deleted file mode 100644 index e5b06f12de..0000000000 --- a/target/board/generic/sepolicy/hal_fingerprint_default.te +++ /dev/null @@ -1,5 +0,0 @@ -# TODO(b/36644492): Remove data_between_core_and_vendor_violators once -# hal_fingerprint no longer directly accesses fingerprintd_data_file. -typeattribute hal_fingerprint_default data_between_core_and_vendor_violators; -allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms; -allow hal_fingerprint_default fingerprintd_data_file:dir rw_dir_perms; diff --git a/target/board/generic/sepolicy/hal_gnss_default.te b/target/board/generic/sepolicy/hal_gnss_default.te deleted file mode 100644 index 0dd3d0356e..0000000000 --- a/target/board/generic/sepolicy/hal_gnss_default.te +++ /dev/null @@ -1,3 +0,0 @@ -#============= hal_gnss_default ============== -allow hal_gnss_default vndbinder_device:chr_file { ioctl open read write }; - diff --git a/target/board/generic/sepolicy/hal_graphics_allocator_default.te b/target/board/generic/sepolicy/hal_graphics_allocator_default.te deleted file mode 100644 index 0c8e27de96..0000000000 --- a/target/board/generic/sepolicy/hal_graphics_allocator_default.te +++ /dev/null @@ -1,2 +0,0 @@ -allow hal_graphics_allocator_default graphics_device:dir search; -allow hal_graphics_allocator_default graphics_device:chr_file { ioctl open read write }; diff --git a/target/board/generic/sepolicy/hal_graphics_composer_default.te b/target/board/generic/sepolicy/hal_graphics_composer_default.te deleted file mode 100644 index 034bdeff9e..0000000000 --- a/target/board/generic/sepolicy/hal_graphics_composer_default.te +++ /dev/null @@ -1,3 +0,0 @@ -#============= hal_graphics_composer_default ============== -allow hal_graphics_composer_default vndbinder_device:chr_file { ioctl open read write }; - diff --git a/target/board/generic/sepolicy/hal_wifi_default.te b/target/board/generic/sepolicy/hal_wifi_default.te deleted file mode 100644 index de4b9969be..0000000000 --- a/target/board/generic/sepolicy/hal_wifi_default.te +++ /dev/null @@ -1 +0,0 @@ -allow hal_wifi_default hal_wifi_default:netlink_route_socket { create bind write read nlmsg_read }; diff --git a/target/board/generic/sepolicy/healthd.te b/target/board/generic/sepolicy/healthd.te deleted file mode 100644 index ced6704993..0000000000 --- a/target/board/generic/sepolicy/healthd.te +++ /dev/null @@ -1,2 +0,0 @@ -# Allow to read /sys/class/power_supply directory -allow healthd sysfs:dir r_dir_perms; diff --git a/target/board/generic/sepolicy/hostapd_nohidl.te b/target/board/generic/sepolicy/hostapd_nohidl.te deleted file mode 100644 index add648a014..0000000000 --- a/target/board/generic/sepolicy/hostapd_nohidl.te +++ /dev/null @@ -1,16 +0,0 @@ -type hostapd_nohidl, domain; -type hostapd_nohidl_exec, exec_type, vendor_file_type, file_type; - -init_daemon_domain(hostapd_nohidl) -net_domain(hostapd_nohidl) - -allow hostapd_nohidl execns:fd use; - -allow hostapd_nohidl self:capability { net_admin net_raw }; -allow hostapd_nohidl self:netlink_generic_socket { bind create getattr read setopt write }; -allow hostapd_nohidl self:netlink_route_socket nlmsg_write; -allow hostapd_nohidl self:packet_socket { create setopt }; -allowxperm hostapd_nohidl self:udp_socket ioctl priv_sock_ioctls; - -# hostapd will attempt to search sysfs but it's not needed and will spam the log -dontaudit hostapd_nohidl sysfs_net:dir search; diff --git a/target/board/generic/sepolicy/init.te b/target/board/generic/sepolicy/init.te deleted file mode 100644 index 84a4e8dbfe..0000000000 --- a/target/board/generic/sepolicy/init.te +++ /dev/null @@ -1,2 +0,0 @@ -allow init tmpfs:lnk_file create_file_perms; -dontaudit init kernel:system module_request; diff --git a/target/board/generic/sepolicy/ipv6proxy.te b/target/board/generic/sepolicy/ipv6proxy.te deleted file mode 100644 index 22976fe9b6..0000000000 --- a/target/board/generic/sepolicy/ipv6proxy.te +++ /dev/null @@ -1,16 +0,0 @@ -# IPv6 proxying -type ipv6proxy, domain; -type ipv6proxy_exec, exec_type, vendor_file_type, file_type; - -init_daemon_domain(ipv6proxy) -net_domain(ipv6proxy) - -# Allow ipv6proxy to be run by execns in its own domain -domain_auto_trans(execns, ipv6proxy_exec, ipv6proxy); -allow ipv6proxy execns:fd use; - -allow ipv6proxy self:capability { sys_admin sys_module net_admin net_raw }; -allow ipv6proxy self:packet_socket { bind create read }; -allow ipv6proxy self:netlink_route_socket nlmsg_write; -allow ipv6proxy varrun_file:dir search; -allowxperm ipv6proxy self:udp_socket ioctl { SIOCSIFFLAGS SIOCGIFHWADDR }; diff --git a/target/board/generic/sepolicy/logpersist.te b/target/board/generic/sepolicy/logpersist.te deleted file mode 100644 index 3fc025019c..0000000000 --- a/target/board/generic/sepolicy/logpersist.te +++ /dev/null @@ -1,13 +0,0 @@ -# goldfish logcat service: runs logcat -Q in logpersist domain - -# See global logcat.te/logpersist.te, only set for eng & userdebug, -# allow for all builds in a non-conflicting manner. - -domain_auto_trans(init, logcat_exec, logpersist) - -# Read from logd. -unix_socket_connect(logpersist, logdr, logd) - -# Write to /dev/ttyS2 and /dev/ttyGF2. -allow logpersist serial_device:chr_file { write open }; -get_prop(logpersist, qemu_cmdline) diff --git a/target/board/generic/sepolicy/mediacodec.te b/target/board/generic/sepolicy/mediacodec.te deleted file mode 100644 index acf4e59b94..0000000000 --- a/target/board/generic/sepolicy/mediacodec.te +++ /dev/null @@ -1 +0,0 @@ -allow mediacodec system_file:dir { open read }; diff --git a/target/board/generic/sepolicy/netd.te b/target/board/generic/sepolicy/netd.te deleted file mode 100644 index 09a28b9967..0000000000 --- a/target/board/generic/sepolicy/netd.te +++ /dev/null @@ -1,3 +0,0 @@ -dontaudit netd self:capability sys_module; -#TODO: This can safely be ignored until b/62954877 is fixed -dontaudit netd kernel:system module_request; diff --git a/target/board/generic/sepolicy/priv_app.te b/target/board/generic/sepolicy/priv_app.te deleted file mode 100644 index 3d16f32b0f..0000000000 --- a/target/board/generic/sepolicy/priv_app.te +++ /dev/null @@ -1,5 +0,0 @@ -#TODO: b/62908025 -dontaudit priv_app firstboot_prop:file { getattr open }; -dontaudit priv_app device:dir { open read }; -dontaudit priv_app proc_interrupts:file { getattr open read }; -dontaudit priv_app proc_modules:file { getattr open read }; diff --git a/target/board/generic/sepolicy/property.te b/target/board/generic/sepolicy/property.te deleted file mode 100644 index 3593a39ddc..0000000000 --- a/target/board/generic/sepolicy/property.te +++ /dev/null @@ -1,5 +0,0 @@ -type qemu_prop, property_type; -type qemu_cmdline, property_type; -type radio_noril_prop, property_type; -type net_eth0_prop, property_type; -type net_share_prop, property_type; diff --git a/target/board/generic/sepolicy/property_contexts b/target/board/generic/sepolicy/property_contexts deleted file mode 100644 index f7a241cfbc..0000000000 --- a/target/board/generic/sepolicy/property_contexts +++ /dev/null @@ -1,8 +0,0 @@ -qemu. u:object_r:qemu_prop:s0 -qemu.cmdline u:object_r:qemu_cmdline:s0 -vendor.qemu u:object_r:qemu_prop:s0 -ro.emu. u:object_r:qemu_prop:s0 -ro.emulator. u:object_r:qemu_prop:s0 -ro.radio.noril u:object_r:radio_noril_prop:s0 -net.eth0. u:object_r:net_eth0_prop:s0 -net.shared_net_ip u:object_r:net_share_prop:s0 diff --git a/target/board/generic/sepolicy/qemu_props.te b/target/board/generic/sepolicy/qemu_props.te deleted file mode 100644 index b3e2d9552b..0000000000 --- a/target/board/generic/sepolicy/qemu_props.te +++ /dev/null @@ -1,10 +0,0 @@ -# qemu-props service: Sets system properties on boot. -type qemu_props, domain; -type qemu_props_exec, vendor_file_type, exec_type, file_type; - -init_daemon_domain(qemu_props) - -set_prop(qemu_props, qemu_prop) -# TODO(b/79502552): Invalid property access from emulator vendor -#set_prop(qemu_props, qemu_cmdline) -set_prop(qemu_props, qemu_cmdline) diff --git a/target/board/generic/sepolicy/radio.te b/target/board/generic/sepolicy/radio.te deleted file mode 100644 index 742d3b2d20..0000000000 --- a/target/board/generic/sepolicy/radio.te +++ /dev/null @@ -1,3 +0,0 @@ -# Allow the radio to read these properties, they only have an SELinux label in -# the emulator. -get_prop(radio, net_eth0_prop); diff --git a/target/board/generic/sepolicy/rild.te b/target/board/generic/sepolicy/rild.te deleted file mode 100644 index ea183739a2..0000000000 --- a/target/board/generic/sepolicy/rild.te +++ /dev/null @@ -1,3 +0,0 @@ -# Allow rild to read these properties, they only have an SELinux label in the -# emulator. -get_prop(rild, net_eth0_prop); diff --git a/target/board/generic/sepolicy/shell.te b/target/board/generic/sepolicy/shell.te deleted file mode 100644 index b246d7e3c1..0000000000 --- a/target/board/generic/sepolicy/shell.te +++ /dev/null @@ -1 +0,0 @@ -allow shell serial_device:chr_file rw_file_perms; diff --git a/target/board/generic/sepolicy/surfaceflinger.te b/target/board/generic/sepolicy/surfaceflinger.te deleted file mode 100644 index 2bba8a78b1..0000000000 --- a/target/board/generic/sepolicy/surfaceflinger.te +++ /dev/null @@ -1,5 +0,0 @@ -allow surfaceflinger self:process execmem; -allow surfaceflinger ashmem_device:chr_file execute; - -typeattribute surfaceflinger system_writes_vendor_properties_violators; -set_prop(surfaceflinger, qemu_prop) diff --git a/target/board/generic/sepolicy/system_server.te b/target/board/generic/sepolicy/system_server.te deleted file mode 100644 index dd70b12dde..0000000000 --- a/target/board/generic/sepolicy/system_server.te +++ /dev/null @@ -1 +0,0 @@ -get_prop(system_server, radio_noril_prop) diff --git a/target/board/generic/sepolicy/vendor_init.te b/target/board/generic/sepolicy/vendor_init.te deleted file mode 100644 index b18d3913fb..0000000000 --- a/target/board/generic/sepolicy/vendor_init.te +++ /dev/null @@ -1 +0,0 @@ -set_prop(vendor_init, qemu_prop) diff --git a/target/board/generic/sepolicy/vold.te b/target/board/generic/sepolicy/vold.te deleted file mode 100644 index 5f3bdd446e..0000000000 --- a/target/board/generic/sepolicy/vold.te +++ /dev/null @@ -1 +0,0 @@ -dontaudit vold kernel:system module_request; diff --git a/target/board/generic/sepolicy/zygote.te b/target/board/generic/sepolicy/zygote.te deleted file mode 100644 index da403b5dd7..0000000000 --- a/target/board/generic/sepolicy/zygote.te +++ /dev/null @@ -1,5 +0,0 @@ -typeattribute zygote system_writes_vendor_properties_violators; -set_prop(zygote, qemu_prop) -# TODO (b/63631799) fix this access -# Suppress denials to storage. Webview zygote should not be accessing. -dontaudit webview_zygote mnt_expand_file:dir getattr; diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index d4a85533d1..0fa05e86c4 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -94,7 +94,7 @@ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true -BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy +BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/common # Android Verified Boot (AVB): # Builds a special vbmeta.img that disables AVB verification. diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk index 5af7e5a92c..684dfc7ef7 100644 --- a/target/board/generic_x86/BoardConfig.mk +++ b/target/board/generic_x86/BoardConfig.mk @@ -67,8 +67,8 @@ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 BOARD_SEPOLICY_DIRS += \ - build/target/board/generic/sepolicy \ - build/target/board/generic_x86/sepolicy + device/generic/goldfish/sepolicy/common \ + device/generic/goldfish/sepolicy/x86 # Android Verified Boot (AVB): # Builds a special vbmeta.img that disables AVB verification. diff --git a/target/board/generic_x86/sepolicy/OWNERS b/target/board/generic_x86/sepolicy/OWNERS deleted file mode 100644 index 3828988948..0000000000 --- a/target/board/generic_x86/sepolicy/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -jeffv@google.com -dcashman@google.com -jbires@google.com -sspatil@google.com diff --git a/target/board/generic_x86/sepolicy/domain.te b/target/board/generic_x86/sepolicy/domain.te deleted file mode 100644 index 0bc8d871ff..0000000000 --- a/target/board/generic_x86/sepolicy/domain.te +++ /dev/null @@ -1 +0,0 @@ -allow domain cpuctl_device:dir search; diff --git a/target/board/generic_x86/sepolicy/healthd.te b/target/board/generic_x86/sepolicy/healthd.te deleted file mode 100644 index 95fa8079b0..0000000000 --- a/target/board/generic_x86/sepolicy/healthd.te +++ /dev/null @@ -1 +0,0 @@ -allow healthd self:capability sys_nice; diff --git a/target/board/generic_x86/sepolicy/init.te b/target/board/generic_x86/sepolicy/init.te deleted file mode 100644 index 3aa81d1b58..0000000000 --- a/target/board/generic_x86/sepolicy/init.te +++ /dev/null @@ -1 +0,0 @@ -allow init tmpfs:lnk_file create_file_perms; diff --git a/target/board/generic_x86/sepolicy/installd.te b/target/board/generic_x86/sepolicy/installd.te deleted file mode 100644 index 7a558b129b..0000000000 --- a/target/board/generic_x86/sepolicy/installd.te +++ /dev/null @@ -1 +0,0 @@ -allow installd self:process execmem; diff --git a/target/board/generic_x86/sepolicy/zygote.te b/target/board/generic_x86/sepolicy/zygote.te deleted file mode 100644 index 93993a47f1..0000000000 --- a/target/board/generic_x86/sepolicy/zygote.te +++ /dev/null @@ -1,2 +0,0 @@ -allow zygote self:process execmem; -allow zygote self:capability sys_nice; diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk index 81e325ea50..5bcb9adf90 100755 --- a/target/board/generic_x86_64/BoardConfig.mk +++ b/target/board/generic_x86_64/BoardConfig.mk @@ -65,8 +65,8 @@ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 BOARD_SEPOLICY_DIRS += \ - build/target/board/generic/sepolicy \ - build/target/board/generic_x86/sepolicy + device/generic/goldfish/sepolicy/common \ + device/generic/goldfish/sepolicy/x86 # Android Verified Boot (AVB): # Builds a special vbmeta.img that disables AVB verification. diff --git a/target/board/generic_x86_arm/BoardConfig.mk b/target/board/generic_x86_arm/BoardConfig.mk index 131c0014ff..c66aacc844 100644 --- a/target/board/generic_x86_arm/BoardConfig.mk +++ b/target/board/generic_x86_arm/BoardConfig.mk @@ -61,4 +61,4 @@ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 512 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true -BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy +BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/common From d7dd3e2d3d3d3828b53a688f8cc965df1ba1b60c Mon Sep 17 00:00:00 2001 From: bohu Date: Wed, 13 Jun 2018 09:04:30 -0700 Subject: [PATCH 07/23] emualtor: cleanup media configuration The media configuration is handled by goldfish/vendor.mk already; clean them up from device.mk files. this cl does not impact arm devices; and it does the right thing for x86/64 devices because the media configuration should go to vendor instead of staying on system BUG: 110030159 Change-Id: If492f1e01f600b1c969e9ef04598f7af6783970e --- target/board/generic/device.mk | 11 ----------- target/board/generic_arm64/device.mk | 10 ---------- target/board/generic_x86/device.mk | 14 -------------- target/board/generic_x86_64/device.mk | 14 -------------- 4 files changed, 49 deletions(-) diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk index 82c6657f58..273ac71455 100644 --- a/target/board/generic/device.mk +++ b/target/board/generic/device.mk @@ -14,17 +14,6 @@ # limitations under the License. # -# This is a build configuration for the product aspects that -# are specific to the emulator. - -PRODUCT_COPY_FILES := \ - device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ - hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf - # minimal configuration for audio policy. PRODUCT_COPY_FILES += \ frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk index c0fbdcda4b..8e26700bcf 100644 --- a/target/board/generic_arm64/device.mk +++ b/target/board/generic_arm64/device.mk @@ -14,16 +14,6 @@ # limitations under the License. # -# This is a build configuration for the product aspects that -# are specific to the emulator. - -PRODUCT_COPY_FILES := \ - device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml - # minimal configuration for audio policy. PRODUCT_COPY_FILES += \ frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk index ecf8697354..273ac71455 100644 --- a/target/board/generic_x86/device.mk +++ b/target/board/generic_x86/device.mk @@ -14,16 +14,6 @@ # limitations under the License. # -# This is a build configuration for the product aspects that -# are specific to the emulator. - -PRODUCT_COPY_FILES := \ - device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml - # minimal configuration for audio policy. PRODUCT_COPY_FILES += \ frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ @@ -40,7 +30,3 @@ PRODUCT_COPY_FILES += \ # NFC configuration file should be in vendor/etc, instead of system/etc PRODUCT_COPY_FILES += \ device/generic/common/nfc/libnfc-nci.conf:system/etc/libnfc-nci.conf - -PRODUCT_PACKAGES := \ - audio.primary.goldfish \ - vibrator.goldfish diff --git a/target/board/generic_x86_64/device.mk b/target/board/generic_x86_64/device.mk index ecf8697354..273ac71455 100755 --- a/target/board/generic_x86_64/device.mk +++ b/target/board/generic_x86_64/device.mk @@ -14,16 +14,6 @@ # limitations under the License. # -# This is a build configuration for the product aspects that -# are specific to the emulator. - -PRODUCT_COPY_FILES := \ - device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml - # minimal configuration for audio policy. PRODUCT_COPY_FILES += \ frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ @@ -40,7 +30,3 @@ PRODUCT_COPY_FILES += \ # NFC configuration file should be in vendor/etc, instead of system/etc PRODUCT_COPY_FILES += \ device/generic/common/nfc/libnfc-nci.conf:system/etc/libnfc-nci.conf - -PRODUCT_PACKAGES := \ - audio.primary.goldfish \ - vibrator.goldfish From 3eea079ecf56f9ac1c6ac387d0d3651a5f841657 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 14 Jun 2018 16:23:57 +0100 Subject: [PATCH 08/23] Move a few packages from core_minimal.mk to base.mk. All the products that inherit from base.mk add these packages, so moving them up the hierarchy eliminates some duplication. DownloadProvider idmap libneuralnetworks mdnsd MediaProvider Bug: 80410283 Test: diff all product variables with multiproduct_kati Change-Id: I133a385b3bc64261d73f616c416f7a905675c09d --- target/product/base.mk | 5 +++++ target/product/core_minimal.mk | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/product/base.mk b/target/product/base.mk index c18d049644..8ca5d29eef 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -47,6 +47,7 @@ PRODUCT_PACKAGES += \ CtsShimPrebuilt \ CtsShimPrivPrebuilt \ dnsmasq \ + DownloadProvider \ dpm \ e2fsck \ ExtServices \ @@ -57,6 +58,7 @@ PRODUCT_PACKAGES += \ fsck_msdos \ gatekeeperd \ hid \ + idmap \ ime \ ims-common \ incident \ @@ -110,6 +112,7 @@ PRODUCT_PACKAGES += \ libnetd_client \ libnetlink \ libnetutils \ + libneuralnetworks \ libOpenMAXAL \ libOpenSLES \ libpdfium \ @@ -141,12 +144,14 @@ PRODUCT_PACKAGES += \ libwilhelm \ locksettings \ logd \ + mdnsd \ media \ media_cmd \ media_profiles_V1_0.dtd \ mediadrmserver \ mediaextractor \ mediametrics \ + MediaProvider \ mediaserver \ mke2fs \ monkey \ diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index c59e133b53..3fb4a73f06 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -30,11 +30,9 @@ PRODUCT_PACKAGES += \ CompanionDeviceManager \ ContactsProvider \ DefaultContainerService \ - DownloadProvider \ drmserver \ ethernet-service \ HTMLViewer \ - idmap \ libaudiopreprocessing \ libdownmix \ libdrmframework \ @@ -44,7 +42,6 @@ PRODUCT_PACKAGES += \ libgabi++ \ libgatekeeper \ libkeystore \ - libneuralnetworks \ libstagefright_soft_aacdec \ libstagefright_soft_aacenc \ libstagefright_soft_amrdec \ @@ -68,8 +65,6 @@ PRODUCT_PACKAGES += \ libstagefright_soft_vpxenc \ libwebviewchromium_loader \ libwebviewchromium_plat_support \ - mdnsd \ - MediaProvider \ PackageInstaller \ requestsync \ StatementService \ From 16e7004e3fc05ecb829e74e19bee4c1bf66c5316 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Thu, 14 Jun 2018 16:08:47 -0700 Subject: [PATCH 09/23] Fix unbundled branch by not having it pick up goldfish dependency Bug: 110165361 Change-Id: I0824b140fdfee296288c03fd03a3bac7966e9179 --- target/product/aosp_arm.mk | 2 +- target/product/aosp_arm64.mk | 2 +- target/product/aosp_x86.mk | 2 +- target/product/aosp_x86_64.mk | 2 +- target/product/emulator.mk | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk index 4b94b7eadf..b872f48fc9 100644 --- a/target/product/aosp_arm.mk +++ b/target/product/aosp_arm.mk @@ -14,7 +14,7 @@ # limitations under the License. # -include device/generic/goldfish/arm32-vendor.mk +-include device/generic/goldfish/arm32-vendor.mk # TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor PRODUCT_PACKAGES += \ diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk index 4b566f0125..33defe1444 100644 --- a/target/product/aosp_arm64.mk +++ b/target/product/aosp_arm64.mk @@ -19,7 +19,7 @@ # build quite specifically for the emulator, and might not be # entirely appropriate to inherit from for on-device configurations. -include device/generic/goldfish/arm64-vendor.mk +-include device/generic/goldfish/arm64-vendor.mk # Copy different zygote settings for vendor.img to select by setting property # ro.zygote=zygote64_32 or ro.zygote=zygote32_64: diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk index bfc7e3829f..9ba9523432 100644 --- a/target/product/aosp_x86.mk +++ b/target/product/aosp_x86.mk @@ -14,7 +14,7 @@ # limitations under the License. # -include device/generic/goldfish/x86-vendor.mk +-include device/generic/goldfish/x86-vendor.mk # TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor PRODUCT_PACKAGES += \ diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk index a810368acb..7afc7825d5 100644 --- a/target/product/aosp_x86_64.mk +++ b/target/product/aosp_x86_64.mk @@ -19,7 +19,7 @@ # build quite specifically for the emulator, and might not be # entirely appropriate to inherit from for on-device configurations. -include device/generic/goldfish/x86_64-vendor.mk +-include device/generic/goldfish/x86_64-vendor.mk # Copy different zygote settings for vendor.img to select by setting property # ro.zygote=zygote64_32 or ro.zygote=zygote32_64: diff --git a/target/product/emulator.mk b/target/product/emulator.mk index 4d482fa860..f6e1011437 100644 --- a/target/product/emulator.mk +++ b/target/product/emulator.mk @@ -43,7 +43,7 @@ PRODUCT_CHARACTERISTICS := emulator PRODUCT_FULL_TREBLE_OVERRIDE := true # goldfish vendor partition configurations -$(call inherit-product, device/generic/goldfish/vendor.mk) +$(call inherit-product-if-exists, device/generic/goldfish/vendor.mk) #watchdog tiggers reboot because location service is not #responding, disble it for now. From f65e8066184f749a963af87373e4f84a4e105788 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 15 Jun 2018 11:30:45 +0100 Subject: [PATCH 10/23] Remove sdk_base.mk. Not used anymore, and it's in pretty bad shape, so delete it. Bug: 80410283 Test: N/A. Change-Id: I1353aa24024ece38857be6b489d36b0a612355cb Merged-In: I1353aa24024ece38857be6b489d36b0a612355cb --- target/product/sdk_base.mk | 174 ------------------------------------- 1 file changed, 174 deletions(-) delete mode 100644 target/product/sdk_base.mk diff --git a/target/product/sdk_base.mk b/target/product/sdk_base.mk deleted file mode 100644 index 1e5ed19281..0000000000 --- a/target/product/sdk_base.mk +++ /dev/null @@ -1,174 +0,0 @@ -# -# Copyright (C) 2007 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -PRODUCT_PROPERTY_OVERRIDES := - -PRODUCT_PACKAGES := \ - CellBroadcastReceiver \ - CubeLiveWallpapers \ - CustomLocale \ - Development \ - Dialer \ - Gallery2 \ - Launcher3QuickStep \ - Camera2 \ - librs_jni \ - LiveWallpapersPicker \ - Mms \ - Music \ - Protips \ - rild \ - screenrecord \ - SdkSetup \ - SoftKeyboard \ - sqlite3 \ - SystemUI \ - SysuiDarkThemeOverlay \ - EasterEgg \ - WallpaperPicker \ - WidgetPreview \ - -# Define the host tools and libs that are parts of the SDK. --include sdk/build/product_sdk.mk --include development/build/product_sdk.mk - -# audio libraries. -PRODUCT_PACKAGES += \ - audio.primary.goldfish \ - audio.r_submix.default \ - local_time.default - -# CDD mandates following codecs -PRODUCT_PACKAGES += \ - libstagefright_soft_aacdec \ - libstagefright_soft_aacenc \ - libstagefright_soft_amrdec \ - libstagefright_soft_amrnbenc \ - libstagefright_soft_amrwbenc \ - libstagefright_soft_avcdec \ - libstagefright_soft_avcenc \ - libstagefright_soft_flacenc \ - libstagefright_soft_g711dec \ - libstagefright_soft_gsmdec \ - libstagefright_soft_hevcdec \ - libstagefright_soft_mp3dec \ - libstagefright_soft_mpeg2dec \ - libstagefright_soft_mpeg4dec \ - libstagefright_soft_mpeg4enc \ - libstagefright_soft_opusdec \ - libstagefright_soft_rawdec \ - libstagefright_soft_vorbisdec \ - libstagefright_soft_vpxdec \ - libstagefright_soft_vpxenc - -PRODUCT_PACKAGE_OVERLAYS := development/sdk_overlay - -PRODUCT_COPY_FILES := \ - device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ - device/sample/etc/old-apns-conf.xml:system/etc/old-apns-conf.xml \ - frameworks/base/data/sounds/effects/camera_click.ogg:system/media/audio/ui/camera_click.ogg \ - frameworks/base/data/sounds/effects/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg \ - frameworks/base/data/sounds/effects/VideoStop.ogg:system/media/audio/ui/VideoStop.ogg \ - device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ - device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ - device/generic/goldfish/camera/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ - device/generic/goldfish/camera/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ - frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ - frameworks/native/data/etc/android.hardware.camera.autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml \ - frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \ - frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \ - frameworks/native/data/etc/android.software.autofill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.autofill.xml \ - frameworks/av/media/libeffects/data/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \ - device/generic/goldfish/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf - -include $(SRC_TARGET_DIR)/product/emulator.mk - -$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk) -$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk) -$(call inherit-product-if-exists, external/google-fonts/dancing-script/fonts.mk) -$(call inherit-product-if-exists, external/google-fonts/carrois-gothic-sc/fonts.mk) -$(call inherit-product-if-exists, external/google-fonts/coming-soon/fonts.mk) -$(call inherit-product-if-exists, external/google-fonts/cutive-mono/fonts.mk) -$(call inherit-product-if-exists, external/noto-fonts/fonts.mk) -$(call inherit-product-if-exists, external/roboto-fonts/fonts.mk) -$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk) -$(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk) - -# locale. en_US is both first and in alphabetical order to -# ensure this is the default locale. -PRODUCT_LOCALES := \ - en_US \ - ar_EG \ - ar_IL \ - bg_BG \ - ca_ES \ - cs_CZ \ - da_DK \ - de_AT \ - de_CH \ - de_DE \ - de_LI \ - el_GR \ - en_AU \ - en_CA \ - en_GB \ - en_IE \ - en_IN \ - en_NZ \ - en_SG \ - en_US \ - en_ZA \ - es_ES \ - es_US \ - fi_FI \ - fr_BE \ - fr_CA \ - fr_CH \ - fr_FR \ - he_IL \ - hi_IN \ - hr_HR \ - hu_HU \ - id_ID \ - it_CH \ - it_IT \ - ja_JP \ - ko_KR \ - lt_LT \ - lv_LV \ - nb_NO \ - nl_BE \ - nl_NL \ - pl_PL \ - pt_BR \ - pt_PT \ - ro_RO \ - ru_RU \ - sk_SK \ - sl_SI \ - sr_RS \ - sv_SE \ - th_TH \ - tl_PH \ - tr_TR \ - uk_UA \ - vi_VN \ - zh_CN \ - zh_TW From d0d862d794448657688134187c55ad3a435788c4 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 15 Jun 2018 11:35:46 +0100 Subject: [PATCH 11/23] Remove core.mk. It only has one mk inheriting it now, so it's redundant. Push its packages into the single child (generic_no_telephony.mk). Bug: 80410283 Test: diff product variables with multiproduct_kati Change-Id: Ie56e22be7f43558fdd259c808e5a6a937bd12ea6 --- target/product/AndroidProducts.mk | 1 - target/product/core.mk | 76 ---------------------- target/product/core_base.mk | 2 - target/product/core_minimal.mk | 2 +- target/product/generic_no_telephony.mk | 90 +++++++++++++++++++------- 5 files changed, 67 insertions(+), 104 deletions(-) delete mode 100644 target/product/core.mk diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index 89b66d31b0..f445a8091a 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -42,7 +42,6 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/aosp_x86_64.mk else PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/core.mk \ $(LOCAL_DIR)/generic.mk \ $(LOCAL_DIR)/generic_x86.mk \ $(LOCAL_DIR)/aosp_arm.mk \ diff --git a/target/product/core.mk b/target/product/core.mk deleted file mode 100644 index dd3f221aec..0000000000 --- a/target/product/core.mk +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (C) 2007 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Base configuration for communication-oriented android devices -# (phones, tablets, etc.). If you want a change to apply to ALMOST ALL -# devices (including non-phones and non-tablets), modify -# core_minimal.mk instead. If you care about wearables, you need to modify -# core_tiny.mk in addition to core_minimal.mk. - -PRODUCT_PACKAGES += \ - BasicDreams \ - BlockedNumberProvider \ - BookmarkProvider \ - Browser2 \ - BuiltInPrintService \ - Calendar \ - CalendarProvider \ - CaptivePortalLogin \ - CertInstaller \ - Contacts \ - DeskClock \ - DocumentsUI \ - DownloadProviderUi \ - Email \ - ExactCalculator \ - ExternalStorageProvider \ - FusedLocation \ - InputDevices \ - KeyChain \ - Keyguard \ - LatinIME \ - Launcher3QuickStep \ - ManagedProvisioning \ - MtpDocumentsProvider \ - PacProcessor \ - PrintSpooler \ - PrintRecommendationService \ - ProxyHandler \ - QuickSearchBox \ - SecureElement \ - Settings \ - SettingsIntelligence \ - SharedStorageBackup \ - SimAppDialog \ - StorageManager \ - Telecom \ - TeleService \ - Traceur \ - VpnDialogs \ - vr \ - MmsService - -# The set of packages whose code can be loaded by the system server. -PRODUCT_SYSTEM_SERVER_APPS += \ - FusedLocation \ - InputDevices \ - KeyChain \ - Telecom \ - -# The set of packages we want to force 'speed' compilation on. -PRODUCT_DEXPREOPT_SPEED_APPS += \ - -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_base.mk) diff --git a/target/product/core_base.mk b/target/product/core_base.mk index dd55e6020a..575bd60feb 100644 --- a/target/product/core_base.mk +++ b/target/product/core_base.mk @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Note that components added here will be also shared in PDK. Components -# that should not be in PDK should be added in lower level like core.mk. PRODUCT_PROPERTY_OVERRIDES := \ ro.config.notification_sound=OnTheHunt.ogg \ diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index 3fb4a73f06..811fccdcca 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -16,7 +16,7 @@ # Base configuration for most consumer android devices. Do not put # things that are specific to communication devices (phones, tables, -# etc.) here -- for that, use core.mk. +# etc.) here -- for that, use generic_no_telephony.mk. PRODUCT_BRAND := generic PRODUCT_DEVICE := generic diff --git a/target/product/generic_no_telephony.mk b/target/product/generic_no_telephony.mk index 126bd91e0a..05ccc56f8e 100644 --- a/target/product/generic_no_telephony.mk +++ b/target/product/generic_no_telephony.mk @@ -18,41 +18,83 @@ # It includes the base Android platform. PRODUCT_PACKAGES := \ + audio.primary.default \ + BasicDreams \ + BlockedNumberProvider \ Bluetooth \ BluetoothMidiService \ + BookmarkProvider \ + Browser2 \ + BuiltInPrintService \ + Calendar \ + CalendarProvider \ Camera2 \ + CaptivePortalLogin \ + CertInstaller \ + clatd \ + clatd.conf \ + Contacts \ + DeskClock \ + DisplayCutoutEmulationCornerOverlay \ + DisplayCutoutEmulationDoubleOverlay \ + DisplayCutoutEmulationTallOverlay \ + DocumentsUI \ + DownloadProviderUi \ + EasterEgg \ + Email \ + ExactCalculator \ + ExternalStorageProvider \ + FusedLocation \ Gallery2 \ + InputDevices \ + KeyChain \ + Keyguard \ + LatinIME \ + Launcher3QuickStep \ + librs_jni \ + libvideoeditor_core \ + libvideoeditor_jni \ + libvideoeditor_osal \ + libvideoeditorplayer \ + libvideoeditor_videofilters \ + local_time.default \ + ManagedProvisioning \ + MmsService \ + MtpDocumentsProvider \ Music \ MusicFX \ NfcNci \ OneTimeInitializer \ + PacProcessor \ + power.default \ + PrintRecommendationService \ + PrintSpooler \ Provision \ + ProxyHandler \ + QuickSearchBox \ + screenrecord \ + SecureElement \ + Settings \ + SettingsIntelligence \ + SharedStorageBackup \ + SimAppDialog \ + StorageManager \ SystemUI \ SysuiDarkThemeOverlay \ - DisplayCutoutEmulationDoubleOverlay \ - DisplayCutoutEmulationCornerOverlay \ - DisplayCutoutEmulationTallOverlay \ - EasterEgg \ - WallpaperCropper - -PRODUCT_PACKAGES += \ - clatd \ - clatd.conf \ - screenrecord - -PRODUCT_PACKAGES += \ - librs_jni \ - libvideoeditor_jni \ - libvideoeditor_core \ - libvideoeditor_osal \ - libvideoeditor_videofilters \ - libvideoeditorplayer \ - -PRODUCT_PACKAGES += \ - audio.primary.default \ - local_time.default \ + Telecom \ + TeleService \ + Traceur \ vibrator.default \ - power.default + VpnDialogs \ + vr \ + WallpaperCropper \ + + +PRODUCT_SYSTEM_SERVER_APPS += \ + FusedLocation \ + InputDevices \ + KeyChain \ + Telecom \ PRODUCT_COPY_FILES := \ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf @@ -70,7 +112,7 @@ $(call inherit-product-if-exists, external/roboto-fonts/fonts.mk) $(call inherit-product-if-exists, external/hyphenation-patterns/patterns.mk) $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk) $(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_base.mk) # Overrides PRODUCT_BRAND := generic From 31b2f7e57f852d96ff94c911f72f4f5926989208 Mon Sep 17 00:00:00 2001 From: Weilun Du Date: Sun, 17 Jun 2018 15:37:53 -0700 Subject: [PATCH 12/23] Increase system image size to 2.5 GB Fixed build breakge caused by insufficient image size. BUG: 110198136 Change-Id: I12a4a43b522b7867ff789854cf5b76d13f2f5499 Signed-off-by: Weilun Du --- target/board/generic_arm64/BoardConfig.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index 0fa05e86c4..56f15deec3 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -73,8 +73,7 @@ BUILD_QEMU_IMAGES := true USE_OPENGL_RENDERER := true TARGET_USERIMAGES_USE_EXT4 := true -# Partition size is default 1.5GB (1536MB) for 64 bits projects -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5 GB BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 TARGET_COPY_OUT_VENDOR := vendor # ~100 MB vendor image. Please adjust system image / vendor image sizes From 22a70c43797a23d30bedbe34c3401ebfe17913a4 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 18 Jun 2018 12:21:17 +0100 Subject: [PATCH 13/23] Remove embedded.mk The common mk files form a long chain of generic sounding names that don't make much sense. For instance, embedded, base, core_minimal, core and core_base all inherit each other, but there's no logical ordering of these names. The common mks will be split based on destination partition, which will create many new files. Merging some of the common ones before this split keeps the total number of mks under control. There are only 2 products inheriting this mk excluding base.mk (which has over 300 descendants). The other levels in the hierarchy all have multiple device categories rooted at them (e.g. wearables from base.mk, tvs and cars from core_minimal.mk), but embedded.mk has not which makes it a compelling target to remove. Bug: 80410283 Test: diff products variables with multiproduct_kati Change-Id: I35c05973dfefefb7a31686476215386b8b89a557 --- target/product/base.mk | 97 ++++++++++++++++++++++++++++- target/product/embedded.mk | 124 ------------------------------------- 2 files changed, 94 insertions(+), 127 deletions(-) delete mode 100644 target/product/embedded.mk diff --git a/target/product/base.mk b/target/product/base.mk index 48e0745c39..35cb0e29c7 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -17,11 +17,18 @@ PRODUCT_PACKAGES += \ 20-dns.conf \ 95-configured \ + adb \ + adbd \ + adbd.recovery \ am \ android.hardware.cas@1.0-service \ + android.hardware.configstore@1.1-service \ android.hardware.media.omx@1.0-service \ + android.hidl.allocator@1.0-service \ android.hidl.base-V1.0-java \ android.hidl.manager-V1.0-java \ + android.hidl.memory@1.0-impl \ + android.hidl.memory@1.0-impl.vendor \ android.policy \ android.test.base \ android.test.mock \ @@ -30,33 +37,47 @@ PRODUCT_PACKAGES += \ appops \ app_process \ appwidget \ + atrace \ audioserver \ BackupRestoreConfirmation \ bcc \ bit \ + blank_screen \ blkid \ bmgr \ + bootanimation \ + bootstat \ bpfloader \ bu \ bugreport \ bugreportz \ cameraserver \ + charger \ + cmd \ com.android.location.provider \ content \ + crash_dump \ CtsShimPrebuilt \ CtsShimPrivPrebuilt \ + debuggerd\ dnsmasq \ DownloadProvider \ dpm \ + dumpstate \ + dumpsys \ e2fsck \ ExtServices \ ExtShared \ + fastboot \ framework \ framework-res \ framework-sysconfig.xml \ fsck_msdos \ gatekeeperd \ + gralloc.default \ + healthd \ hid \ + hwservicemanager \ idmap \ ime \ ims-common \ @@ -64,6 +85,9 @@ PRODUCT_PACKAGES += \ incidentd \ incident_helper \ incident_report \ + init \ + init.environ.rc \ + init.rc \ input \ installd \ ip \ @@ -72,8 +96,8 @@ PRODUCT_PACKAGES += \ ip-up-vpn \ javax.obex \ keystore \ - ld.config.txt \ ld.config.recovery.txt \ + ld.config.txt \ ld.mc \ libaaudio \ libandroid \ @@ -83,11 +107,17 @@ PRODUCT_PACKAGES += \ libaudioflinger \ libaudiopolicymanager \ libaudiopolicyservice \ + libbinder \ libbundlewrapper \ + libc \ libcamera2ndk \ libcamera_client \ libcameraservice \ libclearkeycasplugin \ + libc_malloc_debug \ + libc_malloc_hooks \ + libcutils \ + libdl \ libdownmix \ libdrmclearkeyplugin \ libdrmframework \ @@ -95,14 +125,26 @@ PRODUCT_PACKAGES += \ libdynproc \ libeffectproxy \ libeffects \ + libEGL \ + libETC1 \ + libFFTEm \ libfilterfw \ libgatekeeper \ + libGLESv1_CM \ + libGLESv2 \ + libGLESv3 \ + libgui \ + libhardware \ + libhardware_legacy \ libinput \ libinputflinger \ libiprouteutil \ libjnigraphics \ + libjpeg \ libkeystore \ libldnhncr \ + liblog \ + libm \ libmedia \ libmedia_jni \ libmediandk \ @@ -115,12 +157,15 @@ PRODUCT_PACKAGES += \ libOpenMAXAL \ libOpenSLES \ libpdfium \ + libpixelflinger \ + libpower \ libradio_metadata \ libreference-ril \ libreverbwrapper \ libril \ librtp_jni \ libsensorservice \ + libsigchain \ libskia \ libsonic \ libsonivox \ @@ -135,21 +180,32 @@ PRODUCT_PACKAGES += \ libstagefright_foundation \ libstagefright_omx \ libstagefright_yuv \ + libstdc++ \ + libsurfaceflinger \ + libsurfaceflinger_ddmconnection \ + libsysutils \ + libui \ libusbhost \ + libutils \ libvisualizer \ libvorbisidec \ libvulkan \ libwifi-service \ libwilhelm \ + linker \ + linker.recovery \ + lmkd \ locksettings \ + logcat \ logd \ + lshal \ mdnsd \ media \ media_cmd \ - media_profiles_V1_0.dtd \ mediadrmserver \ mediaextractor \ mediametrics \ + media_profiles_V1_0.dtd \ MediaProvider \ mediaserver \ mke2fs \ @@ -166,6 +222,7 @@ PRODUCT_PACKAGES += \ pppd \ privapp-permissions-platform.xml \ racoon \ + recovery \ resize2fs \ run-as \ schedtest \ @@ -173,24 +230,36 @@ PRODUCT_PACKAGES += \ sdcard \ secdiscard \ SecureElement \ + selinux_policy \ sensorservice \ + service \ + servicemanager \ services \ settings \ SettingsProvider \ sgdisk \ Shell \ + shell_and_utilities \ sm \ statsd \ + storaged \ + surfaceflinger \ svc \ tc \ telecom \ telephony-common \ + thermalserviced \ + tombstoned \ traced \ traced_probes \ tune2fs \ + tzdatacheck \ uiautomator \ uncrypt \ + usbd \ vdc \ + vndservice \ + vndservicemanager \ voip-common \ vold \ WallpaperBackup \ @@ -198,6 +267,20 @@ PRODUCT_PACKAGES += \ wifi-service \ wm \ +# VINTF data +PRODUCT_PACKAGES += \ + device_compatibility_matrix.xml \ + device_manifest.xml \ + framework_manifest.xml \ + framework_compatibility_matrix.xml \ + +# AID Generation for +# and +PRODUCT_PACKAGES += \ + passwd \ + group \ + fs_config_files \ + fs_config_dirs ifeq ($(TARGET_CORE_JARS),) $(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable) @@ -223,6 +306,12 @@ else PRODUCT_BOOT_JARS += org.apache.http.legacy.impl endif +PRODUCT_COPY_FILES += \ + system/core/rootdir/init.usb.rc:root/init.usb.rc \ + system/core/rootdir/init.usb.configfs.rc:root/init.usb.configfs.rc \ + system/core/rootdir/ueventd.rc:root/ueventd.rc \ + system/core/rootdir/etc/hosts:system/etc/hosts + # Add the compatibility library that is needed when android.test.base # is removed from the bootclasspath. ifeq ($(REMOVE_ATB_FROM_BCP),true) @@ -235,8 +324,11 @@ endif PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32 +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += debug.atrace.tags.enableflags=0 + # Packages included only for eng or userdebug builds, previously debug tagged PRODUCT_PACKAGES_DEBUG := \ + adb_keys \ iotop \ logpersist.start \ micro_bench \ @@ -261,4 +353,3 @@ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ frameworks/base/config/dirty-image-objects:system/etc/dirty-image-objects) $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk) diff --git a/target/product/embedded.mk b/target/product/embedded.mk deleted file mode 100644 index e7c3b2a115..0000000000 --- a/target/product/embedded.mk +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (C) 2009 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This is a build configuration for a very minimal build of the -# Open-Source part of the tree. - -PRODUCT_PACKAGES += \ - adb \ - adbd \ - adbd.recovery \ - usbd \ - android.hardware.configstore@1.1-service \ - android.hidl.allocator@1.0-service \ - android.hidl.memory@1.0-impl \ - android.hidl.memory@1.0-impl.vendor \ - atrace \ - blank_screen \ - bootanimation \ - bootstat \ - charger \ - cmd \ - crash_dump \ - debuggerd\ - dumpstate \ - dumpsys \ - fastboot \ - gralloc.default \ - healthd \ - hwservicemanager \ - init \ - init.environ.rc \ - init.rc \ - libEGL \ - libETC1 \ - libFFTEm \ - libGLESv1_CM \ - libGLESv2 \ - libGLESv3 \ - libbinder \ - libc \ - libc_malloc_debug \ - libc_malloc_hooks \ - libcutils \ - libdl \ - libgui \ - libhardware \ - libhardware_legacy \ - libjpeg \ - liblog \ - libm \ - libpixelflinger \ - libpower \ - libsigchain \ - libstdc++ \ - libsurfaceflinger \ - libsurfaceflinger_ddmconnection \ - libsysutils \ - libui \ - libutils \ - linker \ - linker.recovery \ - lmkd \ - logcat \ - lshal \ - recovery \ - service \ - servicemanager \ - shell_and_utilities \ - storaged \ - surfaceflinger \ - thermalserviced \ - tombstoned \ - tzdatacheck \ - vndservice \ - vndservicemanager \ - -# VINTF data -PRODUCT_PACKAGES += \ - device_compatibility_matrix.xml \ - device_manifest.xml \ - framework_manifest.xml \ - framework_compatibility_matrix.xml \ - -# SELinux packages are added as dependencies of the selinux_policy -# phony package. -PRODUCT_PACKAGES += \ - selinux_policy \ - -# AID Generation for -# and -PRODUCT_PACKAGES += \ - passwd \ - group \ - fs_config_files \ - fs_config_dirs - -# If there are product-specific adb keys defined, install them on debuggable -# builds. -PRODUCT_PACKAGES_DEBUG += \ - adb_keys - -# Ensure that this property is always defined so that bionic_systrace.cpp -# can rely on it being initially set by init. -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - debug.atrace.tags.enableflags=0 - -PRODUCT_COPY_FILES += \ - system/core/rootdir/init.usb.rc:root/init.usb.rc \ - system/core/rootdir/init.usb.configfs.rc:root/init.usb.configfs.rc \ - system/core/rootdir/ueventd.rc:root/ueventd.rc \ - system/core/rootdir/etc/hosts:system/etc/hosts From f6bee62b8eb5819f23e31d1dfb1622d48f5ab554 Mon Sep 17 00:00:00 2001 From: Adam Seaton Date: Mon, 18 Jun 2018 09:38:40 -0700 Subject: [PATCH 14/23] [DO NOT MERGE] Update Platform Security String to 2018-08-05 for August Bug:109889880 --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index e23b9af30c..395442e2b6 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -181,7 +181,7 @@ ifndef PLATFORM_SECURITY_PATCH # It must be of the form "YYYY-MM-DD" on production devices. # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2018-07-05 + PLATFORM_SECURITY_PATCH := 2018-08-05 endif ifndef PLATFORM_BASE_OS From 552dcaf7d9c61b04f211a8ee466b1881b6f4b1a2 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 19 Jun 2018 14:57:39 +0100 Subject: [PATCH 15/23] Delete core_tiny.mk Only inherited by a single mk, so inline its contents there, with a few exceptions: - pppd was redundant (already in base) - ContactsProvider and DefaultContainerService were duped in base.mk's only two children (core_tiny and core_minimal) Bug: 80410283 Test: diff product variables with multiproduct_kati Change-Id: I95431b3db789e9c347bb37109a3ac7f627025f96 Merged-In: I95431b3db789e9c347bb37109a3ac7f627025f96 --- target/product/base.mk | 2 ++ target/product/core_minimal.mk | 2 -- target/product/core_tiny.mk | 57 ---------------------------------- 3 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 target/product/core_tiny.mk diff --git a/target/product/base.mk b/target/product/base.mk index 35cb0e29c7..dd102c1b60 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -55,11 +55,13 @@ PRODUCT_PACKAGES += \ charger \ cmd \ com.android.location.provider \ + ContactsProvider \ content \ crash_dump \ CtsShimPrebuilt \ CtsShimPrivPrebuilt \ debuggerd\ + DefaultContainerService \ dnsmasq \ DownloadProvider \ dpm \ diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index 811fccdcca..8f21517949 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -28,8 +28,6 @@ PRODUCT_PACKAGES += \ com.android.media.remotedisplay \ com.android.media.remotedisplay.xml \ CompanionDeviceManager \ - ContactsProvider \ - DefaultContainerService \ drmserver \ ethernet-service \ HTMLViewer \ diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk deleted file mode 100644 index d64e08f821..0000000000 --- a/target/product/core_tiny.mk +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2013 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Tiny configuration for small devices such as wearables. Includes base and embedded. -# No telephony - -PRODUCT_PACKAGES := \ - audio.primary.default \ - Bluetooth \ - CalendarProvider \ - CertInstaller \ - clatd \ - clatd.conf \ - ContactsProvider \ - DefaultContainerService \ - FusedLocation \ - InputDevices \ - local_time.default \ - power.default \ - pppd \ - -# The order here is the same order they end up on the classpath, so it matters. -PRODUCT_SYSTEM_SERVER_JARS := \ - services \ - wifi-service - -# The set of packages whose code can be loaded by the system server. -PRODUCT_SYSTEM_SERVER_APPS += \ - FusedLocation \ - InputDevices - -# The set of packages we want to force 'speed' compilation on. -PRODUCT_DEXPREOPT_SPEED_APPS := \ - -PRODUCT_PROPERTY_OVERRIDES += \ - ro.carrier=unknown - -$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) -$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk) -$(call inherit-product-if-exists, external/roboto-fonts/fonts.mk) - -# Overrides -PRODUCT_BRAND := tiny -PRODUCT_DEVICE := tiny -PRODUCT_NAME := core_tiny From 2276fb95cff97375ca38b6901480a94f8c8806cc Mon Sep 17 00:00:00 2001 From: Weilun Du Date: Fri, 22 Jun 2018 13:48:21 -0700 Subject: [PATCH 16/23] Copy dummy userdata.img to sdk_addon images. Avd manager in Android Studio requires userdata.img in the downloaded system image. As we no longer inlcude the real userdata.img, we copy the dummy userdata.img to pass the check. This cl does not impact real devices. BUG: 110492064 Test: Manual 1, Build with command "make -j110 PRODUCT-sdk_gphone_x86-sdk_addon". 2, Check if the dummy userdata.img appears in sdk addon image zip. Change-Id: Icb88aac42921502288efe7355b8cd76704d5eb30 Signed-off-by: Weilun Du --- core/tasks/sdk-addon.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk index 2a20f070e4..55a55d4bb5 100644 --- a/core/tasks/sdk-addon.mk +++ b/core/tasks/sdk-addon.mk @@ -67,6 +67,7 @@ files_to_copy += \ $(addon_dir_img):$(INSTALLED_QEMU_VENDORIMAGE):images/$(TARGET_CPU_ABI)/vendor.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 \ + $(addon_dir_img):device/generic/goldfish/data/etc/userdata.img:images/$(TARGET_CPU_ADI)/userdata.img \ $(addon_dir_img):$(target_notice_file_txt):images/$(TARGET_CPU_ABI)/NOTICE.txt \ $(addon_dir_img):$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP):images/source.properties From a83fc0e482a91f7c860198d06dda0d0fac95b28e Mon Sep 17 00:00:00 2001 From: bohu Date: Mon, 25 Jun 2018 15:33:14 -0700 Subject: [PATCH 17/23] emulator: fix a typo when copying userdata.img replaced TARGET_CPU_ADI with TARGET_CPU_ABI BUG: 110492064 this cl does not impact real devices Test: nohup make -j100 ANDROID_USE_BUILDCACHE=false PRODUCT-sdk_gphone_x86-sdk_addon showcommands dist DIST_DIR=${PWD}/dist/x86 sdk_repo unzip the image package sdk-repo-linux-system-images-eng.zip and make sure userdata.img is inside Change-Id: I24101c78d789c9b72132efc41a2e98d5274b5ff1 --- core/tasks/sdk-addon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk index 55a55d4bb5..bc11b4941b 100644 --- a/core/tasks/sdk-addon.mk +++ b/core/tasks/sdk-addon.mk @@ -67,7 +67,7 @@ files_to_copy += \ $(addon_dir_img):$(INSTALLED_QEMU_VENDORIMAGE):images/$(TARGET_CPU_ABI)/vendor.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 \ - $(addon_dir_img):device/generic/goldfish/data/etc/userdata.img:images/$(TARGET_CPU_ADI)/userdata.img \ + $(addon_dir_img):device/generic/goldfish/data/etc/userdata.img:images/$(TARGET_CPU_ABI)/userdata.img \ $(addon_dir_img):$(target_notice_file_txt):images/$(TARGET_CPU_ABI)/NOTICE.txt \ $(addon_dir_img):$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP):images/source.properties From 5e72788937f1f4a7e0b9b0d3e88cca4effe38136 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 26 Jun 2018 11:20:34 +0100 Subject: [PATCH 18/23] Split base.mk into system and vendor parts. Put all packages that end up on the vendor partition in a separate mk, to allow creating products with artifact path requirements. Bug: 80410283 Test: diff product vars with multiproduct_kati Change-Id: Ia35adaed2c8f9989c180bfdbbeeb2a5ecf634aa5 Merged-In: Ia35adaed2c8f9989c180bfdbbeeb2a5ecf634aa5 --- target/product/base.mk | 348 +-------------------------------- target/product/base_system.mk | 335 +++++++++++++++++++++++++++++++ target/product/base_vendor.mk | 40 ++++ target/product/core_minimal.mk | 3 +- 4 files changed, 382 insertions(+), 344 deletions(-) create mode 100644 target/product/base_system.mk create mode 100644 target/product/base_vendor.mk diff --git a/target/product/base.mk b/target/product/base.mk index 53533f9675..1ecbf4a011 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2012 The Android Open Source Project +# Copyright (C) 2018 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,345 +14,7 @@ # limitations under the License. # -PRODUCT_PACKAGES += \ - 20-dns.conf \ - 95-configured \ - adb \ - adbd \ - adbd.recovery \ - am \ - android.hardware.cas@1.0-service \ - android.hardware.configstore@1.1-service \ - android.hardware.media.omx@1.0-service \ - android.hidl.allocator@1.0-service \ - android.hidl.base-V1.0-java \ - android.hidl.manager-V1.0-java \ - android.hidl.memory@1.0-impl \ - android.hidl.memory@1.0-impl.vendor \ - android.policy \ - android.test.base \ - android.test.mock \ - android.test.runner \ - applypatch \ - appops \ - app_process \ - appwidget \ - atest \ - atrace \ - audioserver \ - BackupRestoreConfirmation \ - bcc \ - bit \ - blank_screen \ - blkid \ - bmgr \ - bootanimation \ - bootstat \ - bpfloader \ - bu \ - bugreport \ - bugreportz \ - cameraserver \ - charger \ - cmd \ - com.android.location.provider \ - ContactsProvider \ - content \ - crash_dump \ - CtsShimPrebuilt \ - CtsShimPrivPrebuilt \ - debuggerd\ - DefaultContainerService \ - dnsmasq \ - DownloadProvider \ - dpm \ - dumpstate \ - dumpsys \ - e2fsck \ - ExtServices \ - ExtShared \ - fastboot \ - framework \ - framework-res \ - framework-sysconfig.xml \ - fsck_msdos \ - gatekeeperd \ - gralloc.default \ - healthd \ - hid \ - hwservicemanager \ - idmap \ - ime \ - ims-common \ - incident \ - incidentd \ - incident_helper \ - incident_report \ - init \ - init.environ.rc \ - init.rc \ - input \ - installd \ - ip \ - ip6tables \ - iptables \ - ip-up-vpn \ - javax.obex \ - keystore \ - ld.config.recovery.txt \ - ld.config.txt \ - ld.mc \ - libaaudio \ - libandroid \ - libandroid_runtime \ - libandroid_servers \ - libaudioeffect_jni \ - libaudioflinger \ - libaudiopolicymanager \ - libaudiopolicyservice \ - libbinder \ - libbundlewrapper \ - libc \ - libcamera2ndk \ - libcamera_client \ - libcameraservice \ - libclearkeycasplugin \ - libc_malloc_debug \ - libc_malloc_hooks \ - libcutils \ - libdl \ - libdownmix \ - libdrmclearkeyplugin \ - libdrmframework \ - libdrmframework_jni \ - libdynproc \ - libeffectproxy \ - libeffects \ - libEGL \ - libETC1 \ - libFFTEm \ - libfilterfw \ - libgatekeeper \ - libGLESv1_CM \ - libGLESv2 \ - libGLESv3 \ - libgui \ - libhardware \ - libhardware_legacy \ - libinput \ - libinputflinger \ - libiprouteutil \ - libjnigraphics \ - libjpeg \ - libkeystore \ - libldnhncr \ - liblog \ - libm \ - libmedia \ - libmedia_jni \ - libmediandk \ - libmediaplayerservice \ - libmtp \ - libnetd_client \ - libnetlink \ - libnetutils \ - libneuralnetworks \ - libOpenMAXAL \ - libOpenSLES \ - libpdfium \ - libpixelflinger \ - libpower \ - libradio_metadata \ - libreference-ril \ - libreverbwrapper \ - libril \ - librtp_jni \ - libsensorservice \ - libsigchain \ - libskia \ - libsonic \ - libsonivox \ - libsoundpool \ - libsoundtrigger \ - libsoundtriggerservice \ - libsqlite \ - libstagefright \ - libstagefright_amrnb_common \ - libstagefright_avc_common \ - libstagefright_enc_common \ - libstagefright_foundation \ - libstagefright_omx \ - libstagefright_yuv \ - libstdc++ \ - libsurfaceflinger \ - libsurfaceflinger_ddmconnection \ - libsysutils \ - libui \ - libusbhost \ - libutils \ - libvisualizer \ - libvorbisidec \ - libvulkan \ - libwifi-service \ - libwilhelm \ - linker \ - linker.recovery \ - lmkd \ - locksettings \ - logcat \ - logd \ - lshal \ - mdnsd \ - media \ - media_cmd \ - mediadrmserver \ - mediaextractor \ - mediametrics \ - media_profiles_V1_0.dtd \ - MediaProvider \ - mediaserver \ - mke2fs \ - monkey \ - mtpd \ - ndc \ - netd \ - org.apache.http.legacy \ - perfetto \ - ping \ - ping6 \ - platform.xml \ - pm \ - pppd \ - privapp-permissions-platform.xml \ - racoon \ - recovery \ - resize2fs \ - run-as \ - schedtest \ - screencap \ - sdcard \ - secdiscard \ - SecureElement \ - selinux_policy \ - sensorservice \ - service \ - servicemanager \ - services \ - settings \ - SettingsProvider \ - sgdisk \ - Shell \ - shell_and_utilities \ - sm \ - statsd \ - storaged \ - surfaceflinger \ - svc \ - tc \ - telecom \ - telephony-common \ - thermalserviced \ - tombstoned \ - traced \ - traced_probes \ - tune2fs \ - tzdatacheck \ - uiautomator \ - uncrypt \ - usbd \ - vdc \ - vndservice \ - vndservicemanager \ - voip-common \ - vold \ - WallpaperBackup \ - wificond \ - wifi-service \ - wm \ - -# VINTF data -PRODUCT_PACKAGES += \ - device_compatibility_matrix.xml \ - device_manifest.xml \ - framework_manifest.xml \ - framework_compatibility_matrix.xml \ - -# AID Generation for -# and -PRODUCT_PACKAGES += \ - passwd \ - group \ - fs_config_files \ - fs_config_dirs - -ifeq ($(TARGET_CORE_JARS),) -$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable) -endif - -# The order matters -PRODUCT_BOOT_JARS := \ - $(TARGET_CORE_JARS) \ - ext \ - framework \ - telephony-common \ - voip-common \ - ims-common \ - android.hidl.base-V1.0-java \ - android.hidl.manager-V1.0-java - -# Add the compatibility library that is needed when org.apache.http.legacy -# is removed from the bootclasspath. -ifeq ($(REMOVE_OAHL_FROM_BCP),true) -PRODUCT_PACKAGES += framework-oahl-backward-compatibility -PRODUCT_BOOT_JARS += framework-oahl-backward-compatibility -else -PRODUCT_BOOT_JARS += org.apache.http.legacy.impl -endif - -PRODUCT_COPY_FILES += \ - system/core/rootdir/init.usb.rc:root/init.usb.rc \ - system/core/rootdir/init.usb.configfs.rc:root/init.usb.configfs.rc \ - system/core/rootdir/ueventd.rc:root/ueventd.rc \ - system/core/rootdir/etc/hosts:system/etc/hosts - -# Add the compatibility library that is needed when android.test.base -# is removed from the bootclasspath. -ifeq ($(REMOVE_ATB_FROM_BCP),true) -PRODUCT_PACKAGES += framework-atb-backward-compatibility -PRODUCT_BOOT_JARS += framework-atb-backward-compatibility -else -PRODUCT_BOOT_JARS += android.test.base -endif - -PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32 - -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += debug.atrace.tags.enableflags=0 - -# Packages included only for eng or userdebug builds, previously debug tagged -PRODUCT_PACKAGES_DEBUG := \ - adb_keys \ - iotop \ - logpersist.start \ - micro_bench \ - perfprofd \ - sqlite3 \ - strace - -# The set of packages whose code can be loaded by the system server. -PRODUCT_SYSTEM_SERVER_APPS += \ - SettingsProvider \ - WallpaperBackup - -# Packages included only for eng/userdebug builds, when building with SANITIZE_TARGET=address -PRODUCT_PACKAGES_DEBUG_ASAN := - -PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ - frameworks/base/config/preloaded-classes:system/etc/preloaded-classes) - -# Note: it is acceptable to not have a dirty-image-objects file. In that case, the special bin -# for known dirty objects in the image will be empty. -PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ - frameworks/base/config/dirty-image-objects:system/etc/dirty-image-objects) - -$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) +# This makefile is suitable to inherit by products that don't need to be split +# up by partition. +$(call inherit-product, $(SRC_TARGET_DIR)/product/base_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/base_vendor.mk) diff --git a/target/product/base_system.mk b/target/product/base_system.mk new file mode 100644 index 0000000000..5acc95fe0e --- /dev/null +++ b/target/product/base_system.mk @@ -0,0 +1,335 @@ +# +# Copyright (C) 2018 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Base modules and settings for the system partition. +PRODUCT_PACKAGES += \ + 20-dns.conf \ + 95-configured \ + adb \ + adbd \ + adbd.recovery \ + am \ + android.hidl.allocator@1.0-service \ + android.hidl.base-V1.0-java \ + android.hidl.manager-V1.0-java \ + android.hidl.memory@1.0-impl \ + android.hidl.memory@1.0-impl.vendor \ + android.policy \ + android.test.base \ + android.test.mock \ + android.test.runner \ + applypatch \ + appops \ + app_process \ + appwidget \ + atest \ + atrace \ + audioserver \ + BackupRestoreConfirmation \ + bcc \ + bit \ + blank_screen \ + blkid \ + bmgr \ + bootanimation \ + bootstat \ + bpfloader \ + bu \ + bugreport \ + bugreportz \ + cameraserver \ + charger \ + cmd \ + com.android.location.provider \ + ContactsProvider \ + content \ + crash_dump \ + CtsShimPrebuilt \ + CtsShimPrivPrebuilt \ + debuggerd\ + DefaultContainerService \ + dnsmasq \ + DownloadProvider \ + dpm \ + dumpstate \ + dumpsys \ + e2fsck \ + ExtServices \ + ExtShared \ + fastboot \ + framework \ + framework-res \ + framework-sysconfig.xml \ + fsck_msdos \ + gatekeeperd \ + healthd \ + hid \ + hwservicemanager \ + idmap \ + ime \ + ims-common \ + incident \ + incidentd \ + incident_helper \ + incident_report \ + init \ + init.environ.rc \ + init.rc \ + input \ + installd \ + ip \ + ip6tables \ + iptables \ + ip-up-vpn \ + javax.obex \ + keystore \ + ld.config.recovery.txt \ + ld.config.txt \ + ld.mc \ + libaaudio \ + libandroid \ + libandroid_runtime \ + libandroid_servers \ + libaudioeffect_jni \ + libaudioflinger \ + libaudiopolicymanager \ + libaudiopolicyservice \ + libbinder \ + libc \ + libcamera2ndk \ + libcamera_client \ + libcameraservice \ + libc_malloc_debug \ + libc_malloc_hooks \ + libcutils \ + libdl \ + libdrmclearkeyplugin \ + libdrmframework \ + libdrmframework_jni \ + libdynproc \ + libEGL \ + libETC1 \ + libFFTEm \ + libfilterfw \ + libgatekeeper \ + libGLESv1_CM \ + libGLESv2 \ + libGLESv3 \ + libgui \ + libhardware \ + libhardware_legacy \ + libinput \ + libinputflinger \ + libiprouteutil \ + libjnigraphics \ + libjpeg \ + libkeystore \ + liblog \ + libm \ + libmedia \ + libmedia_jni \ + libmediandk \ + libmediaplayerservice \ + libmtp \ + libnetd_client \ + libnetlink \ + libnetutils \ + libneuralnetworks \ + libOpenMAXAL \ + libOpenSLES \ + libpdfium \ + libpixelflinger \ + libpower \ + libradio_metadata \ + librtp_jni \ + libsensorservice \ + libsigchain \ + libskia \ + libsonic \ + libsonivox \ + libsoundpool \ + libsoundtrigger \ + libsoundtriggerservice \ + libsqlite \ + libstagefright \ + libstagefright_amrnb_common \ + libstagefright_avc_common \ + libstagefright_enc_common \ + libstagefright_foundation \ + libstagefright_omx \ + libstagefright_yuv \ + libstdc++ \ + libsurfaceflinger \ + libsurfaceflinger_ddmconnection \ + libsysutils \ + libui \ + libusbhost \ + libutils \ + libvorbisidec \ + libvulkan \ + libwifi-service \ + libwilhelm \ + linker \ + linker.recovery \ + lmkd \ + locksettings \ + logcat \ + logd \ + lshal \ + mdnsd \ + media \ + media_cmd \ + mediadrmserver \ + mediaextractor \ + mediametrics \ + media_profiles_V1_0.dtd \ + MediaProvider \ + mediaserver \ + mke2fs \ + monkey \ + mtpd \ + ndc \ + netd \ + org.apache.http.legacy \ + perfetto \ + ping \ + ping6 \ + platform.xml \ + pm \ + pppd \ + privapp-permissions-platform.xml \ + racoon \ + recovery \ + resize2fs \ + run-as \ + schedtest \ + screencap \ + sdcard \ + secdiscard \ + SecureElement \ + selinux_policy \ + sensorservice \ + service \ + servicemanager \ + services \ + settings \ + SettingsProvider \ + sgdisk \ + Shell \ + shell_and_utilities_recovery \ + shell_and_utilities_system \ + sm \ + statsd \ + storaged \ + surfaceflinger \ + svc \ + tc \ + telecom \ + telephony-common \ + thermalserviced \ + tombstoned \ + traced \ + traced_probes \ + tune2fs \ + tzdatacheck \ + uiautomator \ + uncrypt \ + usbd \ + vdc \ + voip-common \ + vold \ + WallpaperBackup \ + wificond \ + wifi-service \ + wm \ + +# VINTF data +PRODUCT_PACKAGES += \ + device_manifest.xml \ + framework_manifest.xml \ + framework_compatibility_matrix.xml \ + +ifeq ($(TARGET_CORE_JARS),) +$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable) +endif + +# The order matters +PRODUCT_BOOT_JARS := \ + $(TARGET_CORE_JARS) \ + ext \ + framework \ + telephony-common \ + voip-common \ + ims-common \ + android.hidl.base-V1.0-java \ + android.hidl.manager-V1.0-java + +# Add the compatibility library that is needed when org.apache.http.legacy +# is removed from the bootclasspath. +ifeq ($(REMOVE_OAHL_FROM_BCP),true) +PRODUCT_PACKAGES += framework-oahl-backward-compatibility +PRODUCT_BOOT_JARS += framework-oahl-backward-compatibility +else +PRODUCT_BOOT_JARS += org.apache.http.legacy.impl +endif + +PRODUCT_COPY_FILES += \ + system/core/rootdir/init.usb.rc:root/init.usb.rc \ + system/core/rootdir/init.usb.configfs.rc:root/init.usb.configfs.rc \ + system/core/rootdir/ueventd.rc:root/ueventd.rc \ + system/core/rootdir/etc/hosts:system/etc/hosts + +# Add the compatibility library that is needed when android.test.base +# is removed from the bootclasspath. +ifeq ($(REMOVE_ATB_FROM_BCP),true) +PRODUCT_PACKAGES += framework-atb-backward-compatibility +PRODUCT_BOOT_JARS += framework-atb-backward-compatibility +else +PRODUCT_BOOT_JARS += android.test.base +endif + +PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32 + +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += debug.atrace.tags.enableflags=0 + +# Packages included only for eng or userdebug builds, previously debug tagged +PRODUCT_PACKAGES_DEBUG := \ + adb_keys \ + iotop \ + logpersist.start \ + micro_bench \ + perfprofd \ + sqlite3 \ + strace + +# The set of packages whose code can be loaded by the system server. +PRODUCT_SYSTEM_SERVER_APPS += \ + SettingsProvider \ + WallpaperBackup + +# Packages included only for eng/userdebug builds, when building with SANITIZE_TARGET=address +PRODUCT_PACKAGES_DEBUG_ASAN := + +PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ + frameworks/base/config/preloaded-classes:system/etc/preloaded-classes) + +# Note: it is acceptable to not have a dirty-image-objects file. In that case, the special bin +# for known dirty objects in the image will be empty. +PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ + frameworks/base/config/dirty-image-objects:system/etc/dirty-image-objects) + +$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk new file mode 100644 index 0000000000..6c2ea15f44 --- /dev/null +++ b/target/product/base_vendor.mk @@ -0,0 +1,40 @@ +# +# Copyright (C) 2018 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Base modules and settings for the vendor partition. +PRODUCT_PACKAGES += \ + android.hardware.cas@1.0-service \ + android.hardware.configstore@1.1-service \ + android.hardware.media.omx@1.0-service \ + device_compatibility_matrix.xml \ + fs_config_files \ + fs_config_dirs \ + gralloc.default \ + group \ + libbundlewrapper \ + libclearkeycasplugin \ + libdownmix \ + libeffectproxy \ + libeffects \ + libldnhncr \ + libreference-ril \ + libreverbwrapper \ + libril \ + libvisualizer \ + passwd \ + shell_and_utilities_vendor \ + vndservice \ + vndservicemanager diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk index 8f21517949..65a7a2e397 100644 --- a/target/product/core_minimal.mk +++ b/target/product/core_minimal.mk @@ -112,7 +112,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.logd.size.stats=64K \ log.tag.stats_log=I -$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/base_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/base_vendor.mk) # Enable CFI for security-sensitive components $(call inherit-product, $(SRC_TARGET_DIR)/product/cfi-common.mk) From 6bc223c9af044ad06e2f1abc0c4570a7371f9a3a Mon Sep 17 00:00:00 2001 From: Adam Seaton Date: Mon, 16 Jul 2018 10:17:21 -0700 Subject: [PATCH 19/23] Updating Platform Security String to 2018-09-05 Bug: 111501777 --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 395442e2b6..a4185b1ed7 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -181,7 +181,7 @@ ifndef PLATFORM_SECURITY_PATCH # It must be of the form "YYYY-MM-DD" on production devices. # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2018-08-05 + PLATFORM_SECURITY_PATCH := 2018-09-05 endif ifndef PLATFORM_BASE_OS From cc5a1aac0e1b61ebce9e7e00b2aaedaa76b059c7 Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Mon, 25 Jun 2018 17:53:49 +0800 Subject: [PATCH 20/23] Add A/B update to GSI The feature should work fine on the devices with partition _a and _b. and will not be enabled on the devices without partition _a and _b. Bug: 110763858 Test: build aosp_arm64-userdebug and aosp_arm64_ab-userdebug Change-Id: I9f783dd6fe69eff2536a6aac0506e41c724510b2 Merged-In: I9f783dd6fe69eff2536a6aac0506e41c724510b2 --- target/product/aosp_arm.mk | 14 ++++++++++++++ target/product/aosp_arm64.mk | 14 ++++++++++++++ target/product/aosp_arm64_ab.mk | 12 ++++++++++++ target/product/aosp_arm_ab.mk | 12 ++++++++++++ target/product/aosp_x86.mk | 14 ++++++++++++++ target/product/aosp_x86_64.mk | 14 ++++++++++++++ target/product/aosp_x86_64_ab.mk | 12 ++++++++++++ target/product/aosp_x86_ab.mk | 12 ++++++++++++ 8 files changed, 104 insertions(+) diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk index b872f48fc9..6f7314a1a7 100644 --- a/target/product/aosp_arm.mk +++ b/target/product/aosp_arm.mk @@ -14,6 +14,13 @@ # limitations under the License. # +# The system image of aosp_arm-userdebug is a GSI for the devices with: +# - ARM 32 bits user space +# - 64 bits binder interface +# - system-as-root +# - VNDK enforcement +# - compatible property override enabled + -include device/generic/goldfish/arm32-vendor.mk # TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor @@ -22,6 +29,13 @@ PRODUCT_PACKAGES += \ include $(SRC_TARGET_DIR)/product/full.mk +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + # Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk index 33defe1444..297056d38a 100644 --- a/target/product/aosp_arm64.mk +++ b/target/product/aosp_arm64.mk @@ -14,6 +14,13 @@ # limitations under the License. # +# The system image of aosp_arm64-userdebug is a GSI for the devices with: +# - ARM 64 bits user space +# - 64 bits binder interface +# - system-as-root +# - VNDK enforcement +# - compatible property override enabled + # 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 @@ -38,6 +45,13 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + # Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true diff --git a/target/product/aosp_arm64_ab.mk b/target/product/aosp_arm64_ab.mk index 6ff11579eb..d389c74d0f 100644 --- a/target/product/aosp_arm64_ab.mk +++ b/target/product/aosp_arm64_ab.mk @@ -19,8 +19,20 @@ # on the generic system image, place them in build/make/target/board/ # treble_system.prop. +# aosp_arm64_ab-userdebug is a Legacy GSI for the devices with: +# - ARM 64 bits user space +# - 64 bits binder interface +# - system-as-root + include build/make/target/product/treble_common_64.mk +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + PRODUCT_NAME := aosp_arm64_ab PRODUCT_DEVICE := generic_arm64_ab PRODUCT_BRAND := Android diff --git a/target/product/aosp_arm_ab.mk b/target/product/aosp_arm_ab.mk index 9a4688e50d..5845d3ba87 100644 --- a/target/product/aosp_arm_ab.mk +++ b/target/product/aosp_arm_ab.mk @@ -19,8 +19,20 @@ # on the generic system image, place them in build/make/target/board/ # treble_system.prop. +# aosp_arm_ab-userdebug is a Legacy GSI for the devices with: +# - ARM 32 bits user space +# - 32 bits binder interface +# - system-as-root + include build/make/target/product/treble_common_32.mk +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + PRODUCT_NAME := aosp_arm_ab PRODUCT_DEVICE := generic_arm_ab PRODUCT_BRAND := Android diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk index 9ba9523432..6b1d36fc8b 100644 --- a/target/product/aosp_x86.mk +++ b/target/product/aosp_x86.mk @@ -14,6 +14,13 @@ # limitations under the License. # +# The system image of aosp_x86-userdebug is a GSI for the devices with: +# - x86 32 bits user space +# - 64 bits binder interface +# - system-as-root +# - VNDK enforcement +# - compatible property override enabled + -include device/generic/goldfish/x86-vendor.mk # TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor @@ -22,6 +29,13 @@ PRODUCT_PACKAGES += \ include $(SRC_TARGET_DIR)/product/full_x86.mk +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + # Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk index 7afc7825d5..de9c6268c3 100644 --- a/target/product/aosp_x86_64.mk +++ b/target/product/aosp_x86_64.mk @@ -14,6 +14,13 @@ # limitations under the License. # +# The system image of aosp_x86_64-userdebug is a GSI for the devices with: +# - x86 64 bits user space +# - 64 bits binder interface +# - system-as-root +# - VNDK enforcement +# - compatible property override enabled + # 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 @@ -38,6 +45,13 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + # Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true diff --git a/target/product/aosp_x86_64_ab.mk b/target/product/aosp_x86_64_ab.mk index 3524dbc54d..d9163d76b2 100644 --- a/target/product/aosp_x86_64_ab.mk +++ b/target/product/aosp_x86_64_ab.mk @@ -19,8 +19,20 @@ # on the generic system image, place them in build/make/target/board/ # treble_system.prop. +# aosp_x86_64_ab-userdebug is a Legacy GSI for the devices with: +# - x86 64 bits user space +# - 64 bits binder interface +# - system-as-root + include build/make/target/product/treble_common_64.mk +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + PRODUCT_NAME := aosp_x86_64_ab PRODUCT_DEVICE := generic_x86_64_ab PRODUCT_BRAND := Android diff --git a/target/product/aosp_x86_ab.mk b/target/product/aosp_x86_ab.mk index e72b38db7f..4fff3d155b 100644 --- a/target/product/aosp_x86_ab.mk +++ b/target/product/aosp_x86_ab.mk @@ -19,8 +19,20 @@ # on the generic system image, place them in build/make/target/board/ # treble_system.prop. +# aosp_x86_ab-userdebug is a Legacy GSI for the devices with: +# - x86 32 bits user space +# - 32 bits binder interface +# - system-as-root + include build/make/target/product/treble_common_32.mk +# Enable A/B update +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS := system +PRODUCT_PACKAGES += \ + update_engine \ + update_verifier + PRODUCT_NAME := aosp_x86_ab PRODUCT_DEVICE := generic_x86_ab PRODUCT_BRAND := Android From f36085bff94c31cf4a168e3e2f0dca68c21a8616 Mon Sep 17 00:00:00 2001 From: Kevin Rocard Date: Mon, 18 Jun 2018 15:23:38 -0700 Subject: [PATCH 21/23] Add emulator audio policy config in /vendor not /system audio_policy_configuration_generic.xml is pushed in /system as the default configuration (used if the vendor does not provide one in /vendor or /odm) and for the emulator. As a result it can be parsed by 2.0 and 4.0 audio HALs. The format is retro-compatible, but not forward-compatible. Additionally, the generic config pushed in /system should never be used as the vendor should always provide a configuration file describing its target architecture. Thus it should not be part of the GSI. Those files were originally pushed in /system the emulator target does not provide its own configuration file. The emulator should provide config file instead in /vendor instead. Bug: 78543061 Bug: 111963599 Test: sdk_gphone_x86 and aosp_x86_64 emulator has audio Test: adb shell cat /vendor/etc/audio_policy_configuration.xml | diff - \ frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml Change-Id: Ice43cb4670a82f4e60fcccc58a636d224f240b5a Merged-In: Ice43cb4670a82f4e60fcccc58a636d224f240b5a Signed-off-by: Kevin Rocard (cherry picked from commit dad3ad6126f0d5a5e5e658a8fa0c146fb94e3f3f) --- target/board/generic/device.mk | 8 -------- target/board/generic_arm64/device.mk | 8 -------- target/board/generic_x86/device.mk | 8 -------- target/board/generic_x86_64/device.mk | 8 -------- target/product/treble_common.mk | 9 --------- 5 files changed, 41 deletions(-) diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk index 273ac71455..0a3241511a 100644 --- a/target/board/generic/device.mk +++ b/target/board/generic/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk index 8e26700bcf..2004624ca3 100644 --- a/target/board/generic_arm64/device.mk +++ b/target/board/generic_arm64/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk index 273ac71455..0a3241511a 100644 --- a/target/board/generic_x86/device.mk +++ b/target/board/generic_x86/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/board/generic_x86_64/device.mk b/target/board/generic_x86_64/device.mk index 273ac71455..0a3241511a 100755 --- a/target/board/generic_x86_64/device.mk +++ b/target/board/generic_x86_64/device.mk @@ -14,14 +14,6 @@ # limitations under the License. # -# minimal configuration for audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # NFC: # Provide default libnfc-nci.conf file for devices that does not have one in # vendor/etc because aosp system image (of aosp_$arch products) is going to diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk index f12df91711..a2841c6d82 100644 --- a/target/product/treble_common.mk +++ b/target/product/treble_common.mk @@ -31,15 +31,6 @@ PRODUCT_FULL_TREBLE_OVERRIDE := true PRODUCT_PACKAGES += \ messaging -# The following policy XML files are used as fallback for -# vendors/devices not using XML to configure audio policy. -PRODUCT_COPY_FILES += \ - frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:system/etc/audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:system/etc/primary_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:system/etc/audio_policy_volumes.xml \ - frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ - # Telephony: # Provide a default APN configuration PRODUCT_COPY_FILES += \ From aadbd3084c363161f393619ba78ee4cf97606dc0 Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Wed, 18 Jul 2018 18:06:25 +0800 Subject: [PATCH 22/23] Enable dyanmic image size for GSI The original size number of GSI are fixed size. Change to give size by the content with appending 64M bytes space. Bug: 71970853 Test: `make systemimage` and check the out system.img Change-Id: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1 --- target/board/BoardConfigGsiCommon.mk | 3 +++ target/board/generic/BoardConfig.mk | 2 -- target/board/generic_arm64/BoardConfig.mk | 1 - target/board/generic_arm_a/BoardConfig.mk | 3 --- target/board/generic_arm_ab/BoardConfig.mk | 3 --- target/board/generic_x86/BoardConfig.mk | 1 - target/board/generic_x86_64/BoardConfig.mk | 1 - target/board/treble_common.mk | 3 +++ target/board/treble_common_32.mk | 4 ---- target/board/treble_common_64.mk | 3 --- target/product/aosp_arm.mk | 3 +++ target/product/aosp_arm64.mk | 3 +++ target/product/aosp_x86.mk | 3 +++ target/product/aosp_x86_64.mk | 3 +++ target/product/treble_common.mk | 3 +++ 15 files changed, 21 insertions(+), 18 deletions(-) diff --git a/target/board/BoardConfigGsiCommon.mk b/target/board/BoardConfigGsiCommon.mk index 24614dedc0..e91051493a 100644 --- a/target/board/BoardConfigGsiCommon.mk +++ b/target/board/BoardConfigGsiCommon.mk @@ -10,6 +10,9 @@ TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true TARGET_USES_MKE2FS := true +# Enable dyanmic system image size and reserved 64MB in it. +BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 + # Android Verified Boot (AVB): # Builds a special vbmeta.img that disables AVB verification. # Otherwise, AVB will prevent the device from booting the generic system.img. diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index 19d1b03c78..738c037312 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -48,8 +48,6 @@ TARGET_CPU_ABI2 := armeabi include build/make/target/board/BoardConfigEmuCommon.mk include build/make/target/board/BoardConfigGsiCommon.mk -# Partition size is default 1.5GB (1536MB) for 64 bits projects -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 # Wifi. diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index 020d8a97ac..c1983ad465 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -55,7 +55,6 @@ endif include build/make/target/board/BoardConfigEmuCommon.mk include build/make/target/board/BoardConfigGsiCommon.mk -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5 GB BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 # Emulator system image is going to be used as GSI and some vendor still hasn't diff --git a/target/board/generic_arm_a/BoardConfig.mk b/target/board/generic_arm_a/BoardConfig.mk index f0e1a39498..57a5196a96 100644 --- a/target/board/generic_arm_a/BoardConfig.mk +++ b/target/board/generic_arm_a/BoardConfig.mk @@ -16,9 +16,6 @@ include build/make/target/board/treble_common_32.mk -# Overwrite the setting in treble_common_32.mk for non-A/B arm GSI -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 943718400 # 900MB - TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_ABI := armeabi-v7a diff --git a/target/board/generic_arm_ab/BoardConfig.mk b/target/board/generic_arm_ab/BoardConfig.mk index 7c04cd5733..7d9ea9c0e5 100644 --- a/target/board/generic_arm_ab/BoardConfig.mk +++ b/target/board/generic_arm_ab/BoardConfig.mk @@ -16,9 +16,6 @@ include build/make/target/board/treble_common_32.mk -# Overwrite the setting in treble_common_32.mk for non-A/B arm GSI -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 943718400 # 900MB - TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_ABI := armeabi-v7a diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk index ae2e6414d8..650073e68b 100644 --- a/target/board/generic_x86/BoardConfig.mk +++ b/target/board/generic_x86/BoardConfig.mk @@ -23,7 +23,6 @@ TARGET_PRELINK_MODULE := false include build/make/target/board/BoardConfigEmuCommon.mk include build/make/target/board/BoardConfigGsiCommon.mk -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # Resize to 4G to accomodate ASAN and CTS BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296 diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk index 7fc822d607..1426630443 100755 --- a/target/board/generic_x86_64/BoardConfig.mk +++ b/target/board/generic_x86_64/BoardConfig.mk @@ -27,7 +27,6 @@ TARGET_PRELINK_MODULE := false include build/make/target/board/BoardConfigEmuCommon.mk include build/make/target/board/BoardConfigGsiCommon.mk -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5 GB BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/x86 diff --git a/target/board/treble_common.mk b/target/board/treble_common.mk index c347060e01..7da7b30d4b 100644 --- a/target/board/treble_common.mk +++ b/target/board/treble_common.mk @@ -36,6 +36,9 @@ TARGET_USERIMAGES_USE_F2FS := true TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false TARGET_USES_MKE2FS := true +# Enable dyanmic system image size and reserved 64MB in it. +BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 + # Generic AOSP image always requires separate vendor.img TARGET_COPY_OUT_VENDOR := vendor diff --git a/target/board/treble_common_32.mk b/target/board/treble_common_32.mk index dbe0899488..b66c41eb04 100644 --- a/target/board/treble_common_32.mk +++ b/target/board/treble_common_32.mk @@ -15,7 +15,3 @@ # include build/make/target/board/treble_common.mk - -# Partition size defaults to 1 GB (1024 MB) for 32-bit products. It can -# be overwritten in specific BoardConfig.mk, if so desired. -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 diff --git a/target/board/treble_common_64.mk b/target/board/treble_common_64.mk index 0a6eb172d4..8980dfde1d 100644 --- a/target/board/treble_common_64.mk +++ b/target/board/treble_common_64.mk @@ -18,6 +18,3 @@ include build/make/target/board/treble_common.mk # Enable 64-bits binder TARGET_USES_64_BIT_BINDER := true - -# Partition size is default 1.5GB (1536MB) for 64 bits projects -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk index bc62e60b03..f0752a8e2d 100644 --- a/target/product/aosp_arm.mk +++ b/target/product/aosp_arm.mk @@ -25,6 +25,9 @@ include $(SRC_TARGET_DIR)/product/full.mk +# Enable dynamic partition size +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true + # Enable A/B update AB_OTA_UPDATER := true AB_OTA_PARTITIONS := system diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk index 9c1a164163..ab231110cf 100644 --- a/target/product/aosp_arm64.mk +++ b/target/product/aosp_arm64.mk @@ -41,6 +41,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) +# Enable dynamic partition size +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true + # Enable A/B update AB_OTA_UPDATER := true AB_OTA_PARTITIONS := system diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk index 8ca88dce06..9d1b14bc97 100644 --- a/target/product/aosp_x86.mk +++ b/target/product/aosp_x86.mk @@ -25,6 +25,9 @@ include $(SRC_TARGET_DIR)/product/full_x86.mk +# Enable dynamic partition size +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true + # Enable A/B update AB_OTA_UPDATER := true AB_OTA_PARTITIONS := system diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk index 0948149b82..b38c4173e7 100644 --- a/target/product/aosp_x86_64.mk +++ b/target/product/aosp_x86_64.mk @@ -41,6 +41,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) +# Enable dynamic partition size +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true + # Enable A/B update AB_OTA_UPDATER := true AB_OTA_PARTITIONS := system diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk index f12df91711..a2173906e8 100644 --- a/target/product/treble_common.mk +++ b/target/product/treble_common.mk @@ -23,6 +23,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) +# Enable dynamic partition size +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true + # Split selinux policy PRODUCT_FULL_TREBLE_OVERRIDE := true From 972ecb8caf37570ebab762f16f11d750f06b03a1 Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Tue, 18 Sep 2018 10:48:35 -0700 Subject: [PATCH 23/23] Copy api-versions.xml to out/target/common/obj/PACKAGING Test: m -j out/target/common/obj/PACKAGING/api-stubs-docs_generated-api-versions.xml Bug: b/78245848 Change-Id: I77ecc43cd17baf7d7c414bb11e60045724865f43 --- core/clear_vars.mk | 1 + core/soong_droiddoc_prebuilt.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index f738ab409b..637a93b0bb 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -68,6 +68,7 @@ LOCAL_DONT_MERGE_MANIFESTS:= LOCAL_DPI_FILE_STEM:= LOCAL_DPI_VARIANTS:= LOCAL_DROIDDOC_ANNOTATIONS_ZIP := +LOCAL_DROIDDOC_API_VERSIONS_XML := LOCAL_DROIDDOC_ASSET_DIR:= LOCAL_DROIDDOC_CUSTOM_ASSET_DIR:= LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:= diff --git a/core/soong_droiddoc_prebuilt.mk b/core/soong_droiddoc_prebuilt.mk index 510609b9af..252cc1e6f3 100644 --- a/core/soong_droiddoc_prebuilt.mk +++ b/core/soong_droiddoc_prebuilt.mk @@ -23,3 +23,7 @@ endif ifdef LOCAL_DROIDDOC_ANNOTATIONS_ZIP $(eval $(call copy-one-file,$(LOCAL_DROIDDOC_ANNOTATIONS_ZIP),$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_annotations.zip)) endif + +ifdef LOCAL_DROIDDOC_API_VERSIONS_XML +$(eval $(call copy-one-file,$(LOCAL_DROIDDOC_API_VERSIONS_XML),$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_generated-api-versions.xml)) +endif