aboutsummaryrefslogtreecommitdiff
path: root/rootdir/init.modem.rc
blob: 413e01116dbb1b014825e72b8a61296f8f6ae91f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#

on post-fs-data

    write /proc/bootprof "post-fs-data: on modem start"

    # Modem related nodes
    mkdir /data/nvram/md 0770 root system
    chown radio radio /sys/kernel/ccci/boot
    chown radio radio /dev/ccci_fs
    chown radio radio /dev/ccci_ioctl0
    chown radio radio /dev/ccci_ioctl1
    chown radio radio /dev/ccci_ipc_1220_0
    chown radio radio /dev/ccci_monitor
    chown media audio /dev/ccci_aud

    # Selinux
    mkdir /data/ccci_cfg 0770 system radio
    restorecon /data/ccci_cfg
    restorecon_recursive /protect_f
    restorecon_recursive /protect_s

    # Ignore permission check
    write /data/ccci_cfg/md_new_ver.1 "flag"
    chmod 0660 /data/ccci_cfg/md_new_ver.1

    setprop vold.post_fs_data_done 1

    # Clear the sim switch flag
    setprop persist.radio.simswitch ""

service gsm0710muxd /vendor/bin/gsm0710muxd -s /dev/ttyC0 -f 512 -n 8 -m basic
    class core
    user root
    group radio cache inet misc
    disabled
    oneshot

service muxreport-daemon /vendor/bin/muxreport
    class core
    user radio
    group radio cache inet misc
    disabled
    oneshot

# disable rild
service ril-daemon /vendor/bin/mtkrild
    disabled

service ril-daemon-mtk /vendor/bin/mtkrild
    class core
    socket rild stream 660 root radio
    socket rild2 stream 660 root radio
    socket rild3 stream 660 root radio
    socket rild4 stream 660 root radio
    socket rild-ims stream 660 root radio
    socket rild-debug stream 660 radio system
    socket rild-oem stream 660 radio system
    socket rild-mtk-ut stream 660 radio net_bt
    socket rild-mtk-ut-2 stream 660 radio net_bt
    socket rild-mtk-modem stream 660 radio system
    socket rild-atci stream 660 root radio
#    socket rild-mal stream 660 radio system
#    socket rild-mal-at stream 660 radio system
#    socket rild-vsim stream 660 root radio
    socket sap_uim_socket1 stream 660 bluetooth bluetooth
    socket sap_uim_socket2 stream 660 bluetooth bluetooth
    socket sap_uim_socket3 stream 660 bluetooth bluetooth
    socket sap_uim_socket4 stream 660 bluetooth bluetooth
    user root
    group radio cache inet misc audio sdcard_r sdcard_rw log system
    disabled
    oneshot

service ccci_fsd /vendor/bin/ccci_fsd 0
    user radio
    group radio system
    class core
    oneshot

service ccci_mdinit /vendor/bin/ccci_mdinit 0
    user system
    group radio system
    class core
    oneshot

service terservice /vendor/bin/terservice
    class core
    user radio
    group radio cache inet misc
    oneshot

on property:ril.muxreport=1
    start muxreport-daemon