diff options
author | Yu Ning <yu.ning@intel.com> | 2015-05-18 17:11:37 +0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2015-05-18 19:46:18 -0700 |
commit | 0f54ada1cd4605e29cc86ee37fe7843b1d98db9b (patch) | |
tree | 35166744b3a9e67ed6d78b16c4da85af501377ee /target | |
parent | c434f71bd887fe4ea3d0f987d26410b7a61c83a2 (diff) | |
download | build-0f54ada1cd4605e29cc86ee37fe7843b1d98db9b.zip build-0f54ada1cd4605e29cc86ee37fe7843b1d98db9b.tar.gz build-0f54ada1cd4605e29cc86ee37fe7843b1d98db9b.tar.bz2 |
Allow goldfish-setup to put the emulator in WiFi-only mode
The goldfish-setup service (essentially /system/etc/init.goldfish.sh)
executes the following commands when certain conditions are met:
setprop ro.radio.noril yes
stop ril-daemon
so as to stop the RIL daemon and emulate a WiFi-only device. Both would
fail, though, because goldfish-setup does not have the permissions to
set relevant properties.
This CL modifies the emulator's SELinux policy to grant the necessary
permissions. It is a step towards fixing the ril-daemon-keeps-getting-
killed-and-restarted problem with the new ("ranchu") emulator, which
does not support telephony emulation yet. (The other step is to have
init start goldfish-setup, which will be done in a seperate CL.)
(cherrypicked from commit 33dca8090f8eb1be27e6c6426b7a13a73314e464)
Change-Id: Ice7e7898804b7353ac4a8c49d871b1b2571d7a5f
Signed-off-by: Yu Ning <yu.ning@intel.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/board/generic/sepolicy/goldfish_setup.te | 7 | ||||
-rw-r--r-- | target/board/generic/sepolicy/property.te | 1 | ||||
-rw-r--r-- | target/board/generic/sepolicy/property_contexts | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/target/board/generic/sepolicy/goldfish_setup.te b/target/board/generic/sepolicy/goldfish_setup.te index c4fe9d6..3fb79e7 100644 --- a/target/board/generic/sepolicy/goldfish_setup.te +++ b/target/board/generic/sepolicy/goldfish_setup.te @@ -15,3 +15,10 @@ allow goldfish_setup self:udp_socket create_socket_perms; # Set net.eth0.dns*, debug.sf.nobootanimation set_prop(goldfish_setup, system_prop) set_prop(goldfish_setup, debug_prop) + +# Set ro.radio.noril +set_prop(goldfish_setup, radio_noril_prop) + +# Stop ril-daemon service (by setting ctl.stop to ril-daemon, which +# transforms to a permission check on ctl.ril-daemon). +set_prop(goldfish_setup, ctl_rildaemon_prop) diff --git a/target/board/generic/sepolicy/property.te b/target/board/generic/sepolicy/property.te index b3d15f8..b316d08 100644 --- a/target/board/generic/sepolicy/property.te +++ b/target/board/generic/sepolicy/property.te @@ -1 +1,2 @@ type qemu_prop, property_type; +type radio_noril_prop, property_type; diff --git a/target/board/generic/sepolicy/property_contexts b/target/board/generic/sepolicy/property_contexts index 5f741f8..09b9b06 100644 --- a/target/board/generic/sepolicy/property_contexts +++ b/target/board/generic/sepolicy/property_contexts @@ -1 +1,2 @@ qemu. u:object_r:qemu_prop:s0 +radio.noril u:object_r:radio_noril_prop:s0 |