add atfwd service and related policy.

Bug: 37168913
Test: No more atfwd errors at boot
Change-Id: I8b05bbc33c8d393a9dcaabf4fd554fdfab126989
Signed-off-by: Thierry Strudel <tstrudel@google.com>
(cherry picked from commit a75d65362c8baef5c66e97c79d2840b00ce21bfe)
This commit is contained in:
Thierry Strudel
2017-05-24 12:20:15 -07:00
committed by Martijn Coenen
parent 8b6d1c00f3
commit c09b928dd2
10 changed files with 60 additions and 0 deletions

View File

@@ -679,6 +679,18 @@ service loc_launcher /vendor/bin/loc_launcher
service pd_mapper /vendor/bin/pd-mapper
class core
service atfwd /vendor/bin/ATFWD-daemon
class late_start
user system
group system radio
disabled
on property:persist.radio.atfwd.start=true
start atfwd
on property:persist.radio.atfwd.start=false
stop atfwd
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B -z \
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport

View File

@@ -412,4 +412,13 @@
<instance>cnd</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.qti.atcmdfwd</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAtCmdFwd</name>
<instance>AtCmdFwdService</instance>
</interface>
</hal>
</manifest>

16
sepolicy/vendor/atfwd.te vendored Normal file
View File

@@ -0,0 +1,16 @@
type atfwd, domain;
type atfwd_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(atfwd)
hwbinder_use(atfwd)
get_prop(atfwd, hwservicemanager_prop)
allow atfwd vnd_atcmdfwd_hwservice:hwservice_manager find;
binder_call(atfwd, qtelephony);
allow atfwd self:socket create_socket_perms;
allowxperm atfwd self:socket ioctl msm_sock_ipc_ioctls;
r_dir_file(atfwd, sysfs_type)
set_prop(atfwd, radio_prop)

View File

@@ -152,6 +152,7 @@
/vendor/bin/ipacm-diag u:object_r:hal_tetheroffload_default_exec:s0
/vendor/bin/qmuxd u:object_r:qmuxd_exec:s0
/vendor/bin/cnd u:object_r:cnd_exec:s0
/vendor/bin/ATFWD-daemon u:object_r:atfwd_exec:s0
# Remove after b/38447389
/vendor/bin/esed u:object_r:esed_exec:s0
# Rename to android.hardware.[XXX] after b/38447431

View File

@@ -1,4 +1,5 @@
type vnd_ims_radio_hwservice, hwservice_manager_type;
type vnd_qcrilhook_hwservice, hwservice_manager_type;
type vnd_atcmdfwd_hwservice, hwservice_manager_type;
type hal_imsrtp_hwservice, hwservice_manager_type;
type hal_ipacm_hwservice, hwservice_manager_type;

View File

@@ -1,6 +1,7 @@
com.qualcomm.qti.ims.radio::IImsRadio u:object_r:vnd_ims_radio_hwservice:s0
com.qualcomm.qti.qcril.qcrilhook::IQtiOemHook u:object_r:vnd_qcrilhook_hwservice:s0
com.qualcomm.qti.uceservice::IUceService u:object_r:hal_imsrcsd_hwservice:s0
vendor.qti.atcmdfwd::IAtCmdFwd u:object_r:vnd_atcmdfwd_hwservice:s0
vendor.qti.qcril.am::IQcRilAudio u:object_r:vnd_qcrilhook_hwservice:s0
com.qualcomm.qti.imsrtpservice::IRTPService u:object_r:hal_imsrtp_hwservice:s0
android.hardware.tetheroffload.config::IOffloadConfig u:object_r:hal_tetheroffload_hwservice:s0

View File

@@ -13,3 +13,4 @@ type thermal_prop, property_type;
type modem_diag_prop, property_type;
type tel_mon_prop, property_type;
type sys_time_prop, property_type;
type atfwd_start_prop, property_type;

View File

@@ -22,3 +22,4 @@ persist.sys.modem.diag. u:object_r:modem_diag_prop:s0
sys.modem.diag. u:object_r:modem_diag_prop:s0
persist.radio.enable_tel_mon u:object_r:tel_mon_prop:s0
sys.time.set u:object_r:sys_time_prop:s0
persist.radio.atfwd.start u:object_r:atfwd_start_prop:s0

15
sepolicy/vendor/qtelephony.te vendored Normal file
View File

@@ -0,0 +1,15 @@
# Qualcomm telephony apps, such as AtFwd and FastDormancy
type qtelephony, domain;
app_domain(qtelephony)
hwbinder_use(qtelephony)
add_hwservice(qtelephony, vnd_atcmdfwd_hwservice)
allow qtelephony { app_api_service }:service_manager find;
# Read and write /data/data subdirectory.
allow qtelephony system_app_data_file:dir create_dir_perms;
allow qtelephony system_app_data_file:{ file lnk_file } create_file_perms;
set_prop(qtelephony, atfwd_start_prop)

View File

@@ -2,6 +2,9 @@ user=system seinfo=platform name=com.google.SSRestartDetector domain=ssr_detecto
user=_app seinfo=platform name=com.android.nexuslogger domain=logger_app type=app_data_file levelFrom=all
user=_app seinfo=platform name=com.android.ramdump domain=ramdump_app type=app_data_file levelFrom=all
#TODO Remove user "system" when b/63588267 is resolved
user=system seinfo=platform name=com.qualcomm.telephony domain=qtelephony type=system_app_data_file
#Add new domain for DataServices
#TODO Remove user "system" when b/38043081 is resolved
user=system seinfo=platform name=.dataservices domain=dataservice_app type=system_app_data_file