Allow qemu_device read-write access to various processes

Basically, allow access of qemu_device where gpu_device is allowed, for the
case when the emulator runs with OpenGL/ES emulation.  Most noticably,
surfaceflinger crashes without qemu_device access.

Bug: 15052949
Change-Id: Ib891365a6d503309bced64e2512c4d8f29d9a07e
This commit is contained in:
Ji-Hwan Lee 2014-05-19 20:43:23 +09:00
parent c89e1826ba
commit 93e450767f
10 changed files with 14 additions and 1 deletions

View file

@ -78,6 +78,7 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy
BOARD_SEPOLICY_UNION += \
adbd.te \
app.te \
bootanim.te \
device.te \
domain.te \
@ -88,4 +89,5 @@ BOARD_SEPOLICY_UNION += \
rild.te \
shell.te \
surfaceflinger.te \
system_server.te
system_server.te \
zygote.te

View file

@ -0,0 +1 @@
allow appdomain qemu_device:chr_file rw_file_perms;

View file

@ -1,2 +1,3 @@
allow bootanim self:process execmem;
allow bootanim ashmem_device:chr_file execute;
allow bootanim qemu_device:chr_file rw_file_perms;

View file

@ -1,2 +1,3 @@
allow surfaceflinger self:process execmem;
allow surfaceflinger ashmem_device:chr_file execute;
allow surfaceflinger qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1 @@
allow zygote qemu_device:chr_file rw_file_perms;

View file

@ -44,7 +44,9 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
BOARD_SEPOLICY_DIRS += build/target/board/generic_x86/sepolicy
BOARD_SEPOLICY_UNION += \
app.te \
adbd.te \
bootanim.te \
device.te \
domain.te \
file.te \
@ -55,5 +57,6 @@ BOARD_SEPOLICY_UNION += \
qemud.te \
rild.te \
shell.te \
surfaceflinger.te \
system_server.te \
zygote.te

View file

@ -0,0 +1 @@
allow appdomain qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1 @@
allow bootanim qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1 @@
allow surfaceflinger qemu_device:chr_file rw_file_perms;

View file

@ -1,2 +1,3 @@
allow zygote self:process execmem;
allow zygote self:capability sys_nice;
allow zygote qemu_device:chr_file rw_file_perms;