From 8c3364bd59465d91289fc815687cf11b95a88e05 Mon Sep 17 00:00:00 2001 From: bohu Date: Wed, 15 Mar 2017 22:19:24 -0700 Subject: [PATCH] Emulator: Enable logcat -Q to run in emulator Create qemu_cmdline property and make sure logcat can read it. Change-Id: I83261a1ba29ecf9fd9b51a815425742177018c87 --- target/board/generic/sepolicy/logpersist.te | 1 + target/board/generic/sepolicy/property.te | 1 + target/board/generic/sepolicy/property_contexts | 1 + target/board/generic/sepolicy/qemu_props.te | 1 + 4 files changed, 4 insertions(+) diff --git a/target/board/generic/sepolicy/logpersist.te b/target/board/generic/sepolicy/logpersist.te index 0c529868e..3fc025019 100644 --- a/target/board/generic/sepolicy/logpersist.te +++ b/target/board/generic/sepolicy/logpersist.te @@ -10,3 +10,4 @@ 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/property.te b/target/board/generic/sepolicy/property.te index 22d580a56..a486702ca 100644 --- a/target/board/generic/sepolicy/property.te +++ b/target/board/generic/sepolicy/property.te @@ -1,3 +1,4 @@ type qemu_prop, property_type; +type qemu_cmdline, property_type; type radio_noril_prop, property_type; type opengles_prop, property_type; diff --git a/target/board/generic/sepolicy/property_contexts b/target/board/generic/sepolicy/property_contexts index 142b062de..c66a85f35 100644 --- a/target/board/generic/sepolicy/property_contexts +++ b/target/board/generic/sepolicy/property_contexts @@ -1,4 +1,5 @@ qemu. u:object_r:qemu_prop:s0 +qemu.cmdline u:object_r:qemu_cmdline: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 diff --git a/target/board/generic/sepolicy/qemu_props.te b/target/board/generic/sepolicy/qemu_props.te index 6768ce7cd..95174d682 100644 --- a/target/board/generic/sepolicy/qemu_props.te +++ b/target/board/generic/sepolicy/qemu_props.te @@ -9,3 +9,4 @@ set_prop(qemu_props, qemu_prop) set_prop(qemu_props, dalvik_prop) set_prop(qemu_props, config_prop) set_prop(qemu_props, opengles_prop) +set_prop(qemu_props, qemu_cmdline)