Merge "Do not override wallpaper picker package" into sc-v2-dev am: b70d5cc43b
Original change: https://googleplex-android-review.googlesource.com/c/device/generic/goldfish/+/15828145
Change-Id: I4c90d3ffee1cf4436af38e084a140630f4ccdfcf
diff --git a/64bitonly/product/vendor.mk b/64bitonly/product/vendor.mk
index 9798fab..41652e6 100644
--- a/64bitonly/product/vendor.mk
+++ b/64bitonly/product/vendor.mk
@@ -82,10 +82,14 @@
libGLESv2_angle
endif
+# Enable bluetooth
PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.1-service.sim \
- android.hardware.bluetooth.audio@2.0-impl
-PRODUCT_PROPERTY_OVERRIDES += vendor.bt.rootcanal_test_console=off
+ bt_vhci_forwarder \
+ android.hardware.bluetooth@1.1-service.btlinux \
+ android.hardware.bluetooth.audio@2.1-impl
+ #
+# Bluetooth se policies
+BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
PRODUCT_PACKAGES += \
android.hardware.health@2.1-service \
diff --git a/data/etc/advancedFeatures.ini b/data/etc/advancedFeatures.ini
index d6cb066..97206bf 100644
--- a/data/etc/advancedFeatures.ini
+++ b/data/etc/advancedFeatures.ini
@@ -26,4 +26,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/advancedFeatures.ini.arm b/data/etc/advancedFeatures.ini.arm
index a7bc7f9..ccdc623 100644
--- a/data/etc/advancedFeatures.ini.arm
+++ b/data/etc/advancedFeatures.ini.arm
@@ -25,4 +25,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/64bit/user/advancedFeatures.ini b/data/etc/google/64bit/user/advancedFeatures.ini
index 91f7635..b4e274b 100644
--- a/data/etc/google/64bit/user/advancedFeatures.ini
+++ b/data/etc/google/64bit/user/advancedFeatures.ini
@@ -27,4 +27,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/64bit/user/arm64/advancedFeatures.ini b/data/etc/google/64bit/user/arm64/advancedFeatures.ini
index dbfb12c..2b3e93c 100644
--- a/data/etc/google/64bit/user/arm64/advancedFeatures.ini
+++ b/data/etc/google/64bit/user/arm64/advancedFeatures.ini
@@ -26,4 +26,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/64bit/userdebug/advancedFeatures.ini b/data/etc/google/64bit/userdebug/advancedFeatures.ini
index 91f7635..b4e274b 100644
--- a/data/etc/google/64bit/userdebug/advancedFeatures.ini
+++ b/data/etc/google/64bit/userdebug/advancedFeatures.ini
@@ -27,4 +27,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini b/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini
index 372836d..3ee0185 100644
--- a/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini
+++ b/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini
@@ -25,4 +25,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/user/advancedFeatures.ini b/data/etc/google/user/advancedFeatures.ini
index 1e9327b..f5220af 100644
--- a/data/etc/google/user/advancedFeatures.ini
+++ b/data/etc/google/user/advancedFeatures.ini
@@ -27,4 +27,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/user/arm64/advancedFeatures.ini b/data/etc/google/user/arm64/advancedFeatures.ini
index 64ede30..6e9f34c 100644
--- a/data/etc/google/user/arm64/advancedFeatures.ini
+++ b/data/etc/google/user/arm64/advancedFeatures.ini
@@ -26,4 +26,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/userdebug/advancedFeatures.ini b/data/etc/google/userdebug/advancedFeatures.ini
index ceef674..85616d5 100644
--- a/data/etc/google/userdebug/advancedFeatures.ini
+++ b/data/etc/google/userdebug/advancedFeatures.ini
@@ -28,4 +28,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/data/etc/google/userdebug/arm64/advancedFeatures.ini b/data/etc/google/userdebug/arm64/advancedFeatures.ini
index a7bc7f9..ccdc623 100644
--- a/data/etc/google/userdebug/arm64/advancedFeatures.ini
+++ b/data/etc/google/userdebug/arm64/advancedFeatures.ini
@@ -25,4 +25,4 @@
DeviceSkinOverlay = on
VulkanQueueSubmitWithCommands = on
VulkanBatchedDescriptorSetUpdate = on
-DeviceStateOnBoot = on
+DeviceStateOnBoot = on
\ No newline at end of file
diff --git a/fvp.mk b/fvp.mk
index cfaa717..9022a8a 100644
--- a/fvp.mk
+++ b/fvp.mk
@@ -60,18 +60,19 @@
android.hardware.graphics.composer@2.1-impl \
android.hardware.graphics.mapper@2.0-impl \
android.hardware.health@2.0-service \
+ android.hardware.neuralnetworks@1.3-service-sample-all \
+ android.hardware.neuralnetworks@1.3-service-sample-float-fast \
+ android.hardware.neuralnetworks@1.3-service-sample-float-slow \
+ android.hardware.neuralnetworks@1.3-service-sample-minimal \
+ android.hardware.neuralnetworks@1.3-service-sample-quant \
android.hardware.keymaster@4.0-service \
android.hardware.keymaster@4.0-impl \
gralloc.minigbm \
hwcomposer.drm_minigbm \
- libEGL_swiftshader \
- libGLESv1_CM_swiftshader \
- libGLESv2_swiftshader \
-
-PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.1-service.sim \
- android.hardware.bluetooth.audio@2.0-impl
-PRODUCT_PROPERTY_OVERRIDES += vendor.bt.rootcanal_test_console=off
+ libEGL_angle \
+ libGLESv1_CM_angle \
+ libGLESv2_angle \
+ vulkan.pastel \
PRODUCT_HOST_PACKAGES += bind_to_localhost
@@ -85,11 +86,8 @@
PRODUCT_COPY_FILES += \
device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
- frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
- frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
- system/bt/vendor_libs/test_vendor_lib/data/controller_properties.json:vendor/etc/bluetooth/controller_properties.json \
device/generic/goldfish/fvpbase/fstab.fvpbase:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.fvpbase \
device/generic/goldfish/fvpbase/fstab.qemu:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.qemu \
device/generic/goldfish/fvpbase/fstab.initrd:$(TARGET_COPY_OUT_RAMDISK)/fstab.fvpbase \
@@ -109,9 +107,10 @@
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
qemu.hw.mainkeys=0 \
- ro.hardware.egl=swiftshader \
ro.hw_timeout_multiplier=50 \
debug.sf.nobootanimation=1 \
+ ro.hardware.egl=angle \
+ ro.hardware.vulkan=pastel \
PRODUCT_REQUIRES_INSECURE_EXECMEM_FOR_SWIFTSHADER := true
diff --git a/fvpbase/README.md b/fvpbase/README.md
index 03e0302..2247956 100644
--- a/fvpbase/README.md
+++ b/fvpbase/README.md
@@ -9,13 +9,25 @@
## Building the kernel
+If you're building the kernel for the first time, get the kernel source
+code by running the following:
+
```
mkdir android-kernel-mainline
cd android-kernel-mainline
-export FVP_KERNEL_PATH=$(pwd)
repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline
-repo sync
-repo start fvp-patches common -r 79f312ba371eeba2f3ab043b9b56823a459052c8
+```
+
+Now, update the kernel and setup for building:
+```
+export FVP_KERNEL_PATH=$(pwd)
+# Remove any old fvp-patches cherry-pick branch.
+cd common && git checkout aosp/android-mainline && \
+ git branch -D fvp-patches 2> /dev/null; cd ..
+repo sync -j$(nproc) -q
+# One cherrypick currently required due to a bug with BoundsSan+EHCI.
+repo start fvp-patches common
+repo download -c kernel/common 1634850
```
To support graphics on FVP, one additional cherry pick is required. This only
@@ -23,7 +35,7 @@
for QEMU.
```
-repo download -c common 1463463
+repo download -c kernel/common 1768866
```
Then, build the kernel.
diff --git a/fvpbase/manifest.xml b/fvpbase/manifest.xml
index 51c7f93..f88e377 100644
--- a/fvpbase/manifest.xml
+++ b/fvpbase/manifest.xml
@@ -1,23 +1,5 @@
<manifest version="1.0" type="device" target-level="3">
<hal format="hidl">
- <name>android.hardware.bluetooth</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IBluetoothHci</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>android.hardware.bluetooth.audio</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IBluetoothAudioProvidersFactory</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
<name>android.hardware.audio</name>
<transport>hwbinder</transport>
<version>6.0</version>
diff --git a/fvpbase/sepolicy/file_contexts b/fvpbase/sepolicy/file_contexts
index 88865bf..9367312 100644
--- a/fvpbase/sepolicy/file_contexts
+++ b/fvpbase/sepolicy/file_contexts
@@ -3,9 +3,14 @@
/dev/block/vda u:object_r:userdata_block_device:s0
/dev/dri/card0 u:object_r:gpu_device:s0
/dev/dri/renderD128 u:object_r:gpu_device:s0
-/vendor/bin/hw/android\.hardware\.bluetooth@1\.1-service\.sim u:object_r:hal_bluetooth_sim_exec:s0
/vendor/bin/hw/android\.hardware\.drm@[0-9]+\.[0-9]+-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service.software u:object_r:hal_gatekeeper_default_exec:s0
+/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.3-service-sample-.* u:object_r:hal_neuralnetworks_sample_exec:s0
/vendor/lib(64)?/hw/gralloc\.minigbm\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libdrm\.so u:object_r:same_process_hal_file:s0
/system/bin/mini_network.sh u:object_r:mini_network_exec:s0
+/vendor/lib(64)?/hw/vulkan.pastel.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libEGL_angle\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libGLESv1_CM_angle\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libGLESv2_angle\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libminigbm_gralloc.so u:object_r:same_process_hal_file:s0
diff --git a/fvpbase/sepolicy/hal_bluetooth_sim.te b/fvpbase/sepolicy/hal_bluetooth_sim.te
deleted file mode 120000
index 47e3f6c..0000000
--- a/fvpbase/sepolicy/hal_bluetooth_sim.te
+++ /dev/null
@@ -1 +0,0 @@
-../../sepolicy/common/hal_bluetooth_sim.te
\ No newline at end of file
diff --git a/fvpbase/sepolicy/hal_neuralnetworks_sample.te b/fvpbase/sepolicy/hal_neuralnetworks_sample.te
new file mode 120000
index 0000000..1477ac3
--- /dev/null
+++ b/fvpbase/sepolicy/hal_neuralnetworks_sample.te
@@ -0,0 +1 @@
+../../sepolicy/common/hal_neuralnetworks_sample.te
\ No newline at end of file
diff --git a/fvpbase/sepolicy/property_contexts b/fvpbase/sepolicy/property_contexts
index 3ab9778..c389bdd 100644
--- a/fvpbase/sepolicy/property_contexts
+++ b/fvpbase/sepolicy/property_contexts
@@ -1,3 +1 @@
vendor.all.modules.ready u:object_r:vendor_device_prop:s0
-vendor.bt.rootcanal_mac_address u:object_r:vendor_bt_rootcanal_prop:s0
-vendor.bt.rootcanal_test_console u:object_r:vendor_bt_rootcanal_prop:s0
diff --git a/fvpbase/sepolicy/vendor_init.te b/fvpbase/sepolicy/vendor_init.te
deleted file mode 100644
index 2f93fa7..0000000
--- a/fvpbase/sepolicy/vendor_init.te
+++ /dev/null
@@ -1 +0,0 @@
-set_prop(vendor_init, vendor_bt_rootcanal_prop);
diff --git a/init.ranchu.rc b/init.ranchu.rc
index d62215d..1c3841f 100644
--- a/init.ranchu.rc
+++ b/init.ranchu.rc
@@ -6,7 +6,6 @@
on late-fs
# Mount RW partitions which need run fsck
- exec_start wait_for_keymaster
mount_all /vendor/etc/fstab.ranchu --late
on early-init
@@ -229,6 +228,15 @@
oneshot
disabled
+on property:vendor.qemu.vport.bluetooth=*
+ symlink ${vendor.qemu.vport.bluetooth} /dev/bluetooth0
+
+
+service bt_vhci_forwarder /vendor/bin/bt_vhci_forwarder -virtio_console_dev=/dev/bluetooth0
+ class main
+ user bluetooth
+ group root bluetooth
+
# Enable zram only once per boot. From:
# We want one opportunity per boot to enable zram, so we
diff --git a/overlay/frameworks/base/packages/overlays/pixel_4/SystemUIOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_4/SystemUIOverlay/Android.mk
index 17948e6..a815458 100644
--- a/overlay/frameworks/base/packages/overlays/pixel_4/SystemUIOverlay/Android.mk
+++ b/overlay/frameworks/base/packages/overlays/pixel_4/SystemUIOverlay/Android.mk
@@ -26,4 +26,6 @@
LOCAL_PACKAGE_NAME := SystemUIEmulationPixel4Overlay
LOCAL_SDK_VERSION := current
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_5/AndroidOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_5/AndroidOverlay/Android.mk
index b410659..08bbd95 100644
--- a/overlay/frameworks/base/packages/overlays/pixel_5/AndroidOverlay/Android.mk
+++ b/overlay/frameworks/base/packages/overlays/pixel_5/AndroidOverlay/Android.mk
@@ -26,4 +26,6 @@
LOCAL_PACKAGE_NAME := EmulationPixel5Overlay
LOCAL_SDK_VERSION := current
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_5/SystemUIOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_5/SystemUIOverlay/Android.mk
index cf4d5f5..9bace18 100644
--- a/overlay/frameworks/base/packages/overlays/pixel_5/SystemUIOverlay/Android.mk
+++ b/overlay/frameworks/base/packages/overlays/pixel_5/SystemUIOverlay/Android.mk
@@ -26,4 +26,6 @@
LOCAL_PACKAGE_NAME := SystemUIEmulationPixel5Overlay
LOCAL_SDK_VERSION := current
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
include $(BUILD_RRO_PACKAGE)
diff --git a/sepolicy/common/bt_device.te b/sepolicy/common/bt_device.te
new file mode 100644
index 0000000..5c88bfb
--- /dev/null
+++ b/sepolicy/common/bt_device.te
@@ -0,0 +1 @@
+type bt_device, dev_type;
\ No newline at end of file
diff --git a/sepolicy/common/bt_vhci_forwarder.te b/sepolicy/common/bt_vhci_forwarder.te
new file mode 100644
index 0000000..7175e73
--- /dev/null
+++ b/sepolicy/common/bt_vhci_forwarder.te
@@ -0,0 +1,7 @@
+type bt_vhci_forwarder, domain;
+type bt_vhci_forwarder_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(bt_vhci_forwarder)
+
+allow bt_vhci_forwarder bt_device:chr_file { open read write ioctl};
+
diff --git a/sepolicy/common/file.te b/sepolicy/common/file.te
index 6df2ef4..5311c2f 100644
--- a/sepolicy/common/file.te
+++ b/sepolicy/common/file.te
@@ -1,6 +1,6 @@
type sysfs_iio_devices, fs_type, sysfs_type;
type sysfs_writable, fs_type, sysfs_type, mlstrustedobject;
-type sysfs_virtio_block, sysfs_type, fs_type;
+type sysfs_virtio_block, sysfs_type, fs_type, sysfs_block_type;
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/sepolicy/common/file_contexts b/sepolicy/common/file_contexts
index e259c3b..c5987df 100644
--- a/sepolicy/common/file_contexts
+++ b/sepolicy/common/file_contexts
@@ -25,6 +25,10 @@
/dev/hvc0 u:object_r:serial_device:s0
# logcat
/dev/hvc1 u:object_r:serial_device:s0
+# Bluetooth
+/dev/vhci u:object_r:bt_device:s0
+/dev/bluetooth0 u:object_r:bt_device:s0
+
/system_ext/bin/init\.qemu-adb-keys\.sh u:object_r:goldfish_system_setup_exec:s0
/vendor/bin/init\.ranchu-core\.sh u:object_r:goldfish_setup_exec:s0
@@ -43,8 +47,8 @@
/vendor/bin/hostapd_nohidl u:object_r:hostapd_nohidl_exec:s0
/vendor/bin/netmgr u:object_r:netmgr_exec:s0
/vendor/bin/wifi_forwarder u:object_r:wifi_forwarder_exec:s0
+/vendor/bin/bt_vhci_forwarder u:object_r:bt_vhci_forwarder_exec:s0
-/vendor/bin/hw/android\.hardware\.bluetooth@1\.1-service\.sim u:object_r:hal_bluetooth_sim_exec:s0
/vendor/bin/hw/android\.hardware\.drm@[0-9]+\.[0-9]+-service\.widevine u:object_r:hal_drm_widevine_exec:s0
/vendor/bin/hw/android\.hardware\.drm@[0-9]+\.[0-9]+-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service.software u:object_r:hal_gatekeeper_default_exec:s0
diff --git a/sepolicy/common/genfs_contexts b/sepolicy/common/genfs_contexts
index bf5fe76..d81c423 100644
--- a/sepolicy/common/genfs_contexts
+++ b/sepolicy/common/genfs_contexts
@@ -15,7 +15,11 @@
genfscon sysfs /devices/platform/rtc-test.2/rtc/rtc3/hctosys u:object_r:sysfs_rtc:s0
# /sys/class/net
+# x86_64
genfscon sysfs /devices/pci0000:00/0000:00:08.0/virtio5/net u:object_r:sysfs_net:s0
+# arm64
+genfscon sysfs /devices/platform/a003400.virtio_mmio/virtio1/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
@@ -23,12 +27,17 @@
genfscon sysfs /devices/virtual/block/ram u:object_r:sysfs_devices_block:s0
genfscon sysfs /devices/virtual/block/md u:object_r:sysfs_devices_block:s0
+# Old PCI IDs
genfscon sysfs /devices/pci0000:00/0000:00:03.0/virtio0/block/vda u:object_r:sysfs_virtio_block:s0
genfscon sysfs /devices/pci0000:00/0000:00:04.0/virtio1/block/vdb u:object_r:sysfs_virtio_block:s0
genfscon sysfs /devices/pci0000:00/0000:00:05.0/virtio2/block/vdc u:object_r:sysfs_virtio_block:s0
genfscon sysfs /devices/pci0000:00/0000:00:06.0/virtio3/block/vdd u:object_r:sysfs_virtio_block:s0
genfscon sysfs /devices/pci0000:00/0000:00:07.0/virtio4/block/vde u:object_r:sysfs_virtio_block:s0
genfscon sysfs /devices/pci0000:00/0000:00:08.0/virtio5/block/vdf u:object_r:sysfs_virtio_block:s0
+# New PCI IDs
+genfscon sysfs /devices/pci0000:00/0000:00:08.0/virtio7/block/vda u:object_r:sysfs_virtio_block:s0
+genfscon sysfs /devices/pci0000:00/0000:00:09.0/virtio8/block/vdb u:object_r:sysfs_virtio_block:s0
+genfscon sysfs /devices/pci0000:00/0000:00:0a.0/virtio9/block/vdc u:object_r:sysfs_virtio_block:s0
# for arm64 virtio block devices
genfscon sysfs /devices/platform/a003600.virtio_mmio/virtio2/block/vda/stat u:object_r:sysfs_virtio_block:s0
@@ -41,6 +50,17 @@
genfscon sysfs /devices/platform/9020000.goldfish_battery/power_supply u:object_r:sysfs_batteryinfo:s0
# symlinks from /sys/class/wakeup
+# On arm64 emulator, wakeup[0-5] are symlinks to the following nodes under /sys
+genfscon sysfs /devices/platform/9010000.pl031/wakeup/wakeup0 u:object_r:sysfs_wakeup:s0
+# For arm64 GKI 5.4
+genfscon sysfs /devices/platform/9010000.pl031/rtc/rtc0/wakeup1 u:object_r:sysfs_wakeup:s0
+# For arm64 GKI 5.10
+genfscon sysfs /devices/platform/9010000.pl031/rtc/rtc0/alarmtimer.0.auto/wakeup/wakeup1 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/a040000.goldfish_battery/power_supply/ac/wakeup2 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/a040000.goldfish_battery/power_supply/battery/wakeup3 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/rtc-test.1/wakeup/wakeup4 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/rtc-test.2/wakeup/wakeup5 u:object_r:sysfs_wakeup:s0
+
genfscon sysfs /devices/LNXSYSTM:00/LNXPWRBN:00/wakeup/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/LNXSYSTM:00/LNXSYBUS:00/GFSH0001:00/wakeup/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/LNXSYSTM:00/LNXSYBUS:00/GFSH0003:00/wakeup/wakeup u:object_r:sysfs_wakeup:s0
diff --git a/sepolicy/common/hal_bluetooth_sim.te b/sepolicy/common/hal_bluetooth_sim.te
deleted file mode 100644
index d29b1a9..0000000
--- a/sepolicy/common/hal_bluetooth_sim.te
+++ /dev/null
@@ -1,9 +0,0 @@
-type hal_bluetooth_sim, domain;
-type hal_bluetooth_sim_exec, exec_type, vendor_file_type, file_type;
-vendor_internal_prop(vendor_bt_rootcanal_prop)
-
-hal_server_domain(hal_bluetooth_sim, hal_bluetooth)
-
-init_daemon_domain(hal_bluetooth_sim)
-
-get_prop(hal_bluetooth_sim, vendor_bt_rootcanal_prop)
diff --git a/sepolicy/common/property_contexts b/sepolicy/common/property_contexts
index a776b0d..2c3c14e 100644
--- a/sepolicy/common/property_contexts
+++ b/sepolicy/common/property_contexts
@@ -25,7 +25,5 @@
vendor.net.radio0.dns4 u:object_r:vendor_net_radio0_prop:s0 exact string
vendor.net.shared_net_ip u:object_r:vendor_net_share_prop:s0 exact string
vendor.net.wifi_mac_prefix u:object_r:vendor_net_share_prop:s0 exact string
-vendor.bt.rootcanal_mac_address u:object_r:vendor_bt_rootcanal_prop:s0 exact string
-vendor.bt.rootcanal_test_console u:object_r:vendor_bt_rootcanal_prop:s0 exact string
vendor.wlan.firmware.version u:object_r:vendor_wlan_versions_prop:s0 exact string
vendor.wlan.driver.version u:object_r:vendor_wlan_versions_prop:s0 exact string
diff --git a/sepolicy/common/qemu_adb_keys.te b/sepolicy/common/qemu_adb_keys.te
index 8a09c16..5691743 100644
--- a/sepolicy/common/qemu_adb_keys.te
+++ b/sepolicy/common/qemu_adb_keys.te
@@ -11,3 +11,5 @@
# Permission to write to /data/vendor/adb/adb_keys.
allow qemu_adb_keys vendor_data_file:dir create_dir_perms;
allow qemu_adb_keys vendor_data_file:file create_file_perms;
+allow qemu_adb_keys sysfs_dt_firmware_android:dir search;
+allow qemu_adb_keys sysfs_dt_firmware_android:file r_file_perms;
diff --git a/sepolicy/common/vendor_init.te b/sepolicy/common/vendor_init.te
index c4ecff9..6e3b5ea 100644
--- a/sepolicy/common/vendor_init.te
+++ b/sepolicy/common/vendor_init.te
@@ -1,6 +1,5 @@
set_prop(vendor_init, vendor_qemu_prop)
allow vendor_init ram_device:blk_file setattr;
-set_prop(vendor_init, vendor_bt_rootcanal_prop)
set_prop(vendor_init, vendor_build_prop);
set_prop(vendor_init, exported_system_prop);
diff --git a/tasks/emu_img_zip.mk b/tasks/emu_img_zip.mk
index 9291fac..4e3a346 100644
--- a/tasks/emu_img_zip.mk
+++ b/tasks/emu_img_zip.mk
@@ -112,5 +112,18 @@
.PHONY: emu_img_zip
emu_img_zip: $(INTERNAL_EMULATOR_PACKAGE_TARGET)
+INTERNAL_EMULATOR_KERNEL_TARGET := $(PRODUCT_OUT)/emu-gki-$(TARGET_KERNEL_USE)-$(FILE_NAME_TAG).zip
+INTERNAL_GKI_SOURCE := $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/GKI-$(TARGET_KERNEL_USE)
+$(INTERNAL_EMULATOR_KERNEL_TARGET): $(INSTALLED_QEMU_RAMDISKIMAGE) $(EMULATOR_KERNEL_FILE)
+ @echo "Package: $@"
+ $(hide) mkdir -p $(INTERNAL_GKI_SOURCE)
+ $(hide) ($(ACP) $(EMULATOR_KERNEL_FILE) $(INTERNAL_GKI_SOURCE)/${EMULATOR_KERNEL_DIST_NAME})
+ $(hide) ($(ACP) $(INSTALLED_QEMU_RAMDISKIMAGE) $(INTERNAL_GKI_SOURCE)/ramdisk.img)
+ $(hide) $(SOONG_ZIP) -o $@ -C $(INTERNAL_GKI_SOURCE) -D $(INTERNAL_GKI_SOURCE)
+
+.PHONY: emu_kernel_zip
+emu_kernel_zip: $(INTERNAL_EMULATOR_KERNEL_TARGET)
+
+$(call dist-for-goals, emu_kernel_zip, $(INTERNAL_EMULATOR_KERNEL_TARGET))
endif
endif
diff --git a/ueventd.ranchu.rc b/ueventd.ranchu.rc
index 1f4f0fb..a7ee542 100644
--- a/ueventd.ranchu.rc
+++ b/ueventd.ranchu.rc
@@ -12,3 +12,7 @@
# logcat virtconsole
/dev/hvc1 0660 system logd
+
+# bluetooth
+/dev/vhci 0660 system bluetooth
+
diff --git a/vendor.mk b/vendor.mk
index b30a114..9c917a7 100644
--- a/vendor.mk
+++ b/vendor.mk
@@ -84,11 +84,15 @@
libGLESv1_CM_angle \
libGLESv2_angle
endif
-
+#
+# Enable bluetooth
PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.1-service.sim \
- android.hardware.bluetooth.audio@2.0-impl
-PRODUCT_PROPERTY_OVERRIDES += vendor.bt.rootcanal_test_console=off
+ bt_vhci_forwarder \
+ android.hardware.bluetooth@1.1-service.btlinux \
+ android.hardware.bluetooth.audio@2.1-impl
+ #
+# Bluetooth se policies
+BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
PRODUCT_PACKAGES += \
android.hardware.health@2.1-service \