From d665b020f2d9e24acf83e2c6b11c9a979f510259 Mon Sep 17 00:00:00 2001 From: bohu Date: Mon, 3 Jul 2017 22:01:38 -0700 Subject: [PATCH] emulator: get emulator booting 1. add missing hals 2. setup missing selinux 3. install manifest.xml to vendor/ 4. install emulator setup scripts and setup selinux domain BUG: 63268696 Test: build sdk_gphone_x86-userdebug and launch emulator, boot to home Change-Id: Ibacea9c761bc06736a8baa39d891d1c2ed3d74f4 --- target/board/generic/sepolicy/file_contexts | 2 ++ target/board/generic/sepolicy/hal_gnss_default.te | 3 +++ .../sepolicy/hal_graphics_composer_default.te | 3 +++ target/product/emulator.mk | 14 ++++++++++++-- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 target/board/generic/sepolicy/hal_gnss_default.te create mode 100644 target/board/generic/sepolicy/hal_graphics_composer_default.te diff --git a/target/board/generic/sepolicy/file_contexts b/target/board/generic/sepolicy/file_contexts index e9502d948..d1a1e8cef 100644 --- a/target/board/generic/sepolicy/file_contexts +++ b/target/board/generic/sepolicy/file_contexts @@ -17,4 +17,6 @@ /system/bin/qemud u:object_r:qemud_exec:s0 /sys/qemu_trace(/.*)? u:object_r:sysfs_writable:s0 /system/etc/init.goldfish.sh u:object_r:goldfish_setup_exec:s0 +/system/vendor/bin/init.ranchu-core.sh u:object_r:goldfish_setup_exec:s0 +/system/vendor/bin/init.ranchu-net.sh u:object_r:goldfish_setup_exec:s0 /system/bin/qemu-props u:object_r:qemu_props_exec:s0 diff --git a/target/board/generic/sepolicy/hal_gnss_default.te b/target/board/generic/sepolicy/hal_gnss_default.te new file mode 100644 index 000000000..0dd3d0356 --- /dev/null +++ b/target/board/generic/sepolicy/hal_gnss_default.te @@ -0,0 +1,3 @@ +#============= hal_gnss_default ============== +allow hal_gnss_default vndbinder_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 new file mode 100644 index 000000000..034bdeff9 --- /dev/null +++ b/target/board/generic/sepolicy/hal_graphics_composer_default.te @@ -0,0 +1,3 @@ +#============= hal_graphics_composer_default ============== +allow hal_graphics_composer_default vndbinder_device:chr_file { ioctl open read write }; + diff --git a/target/product/emulator.mk b/target/product/emulator.mk index 04aae585f..5a5fb8e1b 100644 --- a/target/product/emulator.mk +++ b/target/product/emulator.mk @@ -56,8 +56,14 @@ PRODUCT_PACKAGES += \ android.hardware.biometrics.fingerprint@2.1-service \ sensors.ranchu \ android.hardware.graphics.composer@2.1-impl \ - hwcomposer.goldfish \ - hwcomposer.ranchu \ + 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 \ + vintf \ + CarrierConfig PRODUCT_PACKAGES += \ android.hardware.audio@2.0-impl \ @@ -89,10 +95,14 @@ PRODUCT_COPY_FILES += \ device/generic/goldfish/fstab.goldfish:root/fstab.goldfish \ device/generic/goldfish/init.goldfish.rc:root/init.goldfish.rc \ device/generic/goldfish/init.goldfish.sh:system/etc/init.goldfish.sh \ + 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/init.ranchu.rc:root/init.ranchu.rc \ device/generic/goldfish/ueventd.goldfish.rc:root/ueventd.goldfish.rc \ device/generic/goldfish/init.ranchu.rc:root/init.ranchu.rc \ device/generic/goldfish/fstab.ranchu:root/fstab.ranchu \ device/generic/goldfish/ueventd.ranchu.rc:root/ueventd.ranchu.rc \ + device/generic/goldfish/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml \ device/generic/goldfish/input/goldfish_rotary.idc:system/usr/idc/goldfish_rotary.idc \ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml