OSDN Git Service

Allow goldfish-setup to put the emulator in WiFi-only mode
authorYu Ning <yu.ning@intel.com>
Mon, 18 May 2015 09:11:37 +0000 (17:11 +0800)
committerNick Kralevich <nnk@google.com>
Tue, 19 May 2015 02:46:18 +0000 (19:46 -0700)
commit0f54ada1cd4605e29cc86ee37fe7843b1d98db9b
tree35166744b3a9e67ed6d78b16c4da85af501377ee
parentc434f71bd887fe4ea3d0f987d26410b7a61c83a2
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>
target/board/generic/sepolicy/goldfish_setup.te
target/board/generic/sepolicy/property.te
target/board/generic/sepolicy/property_contexts