• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2016 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17on init
18    chmod 666 /dev/diag
19
20on post-fs-data
21    # Modem logging collection
22    mkdir /data/vendor/radio 0777 radio radio
23    mkdir /data/vendor/radio/diag_logs 0777 system system
24    rm /data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl
25    # WLAN logging collection
26    mkdir /data/vendor/wifi 0777 system system
27    mkdir /data/vendor/wifi/cnss_diag 0777 system system
28
29service diag_mdlog_start /vendor/bin/diag_mdlog
30    class late_start
31    user shell
32    group system diag media_rw
33    socket diag_router stream 0666 system system
34    disabled
35    oneshot
36
37service diag_mdlog_stop /vendor/bin/diag_mdlog -k
38    class late_start
39    user shell
40    group system diag media_rw
41    disabled
42    oneshot
43
44on boot && property:persist.vendor.sys.modem.diag.mdlog=*
45    rm /data/vendor/radio/diag_logs/diag_mdlog_pid
46    setprop vendor.sys.modem.diag.mdlog ${persist.vendor.sys.modem.diag.mdlog}
47
48on property:vendor.sys.modem.diag.mdlog=true
49    start diag_mdlog_start
50
51on property:vendor.sys.modem.diag.mdlog=false
52    start diag_mdlog_stop
53
54on property:persist.vendor.sys.cnss.diag_qxdm=true
55    start vendor.cnss_diag
56
57on property:persist.vendor.sys.cnss.diag_qxdm=false
58    stop vendor.cnss_diag
59
60on property:persist.vendor.sys.cnss.diag_txt=true
61    start vendor.cnss_diag_txt
62
63on property:persist.vendor.sys.cnss.diag_txt=false
64    stop vendor.cnss_diag_txt
65
66service vendor.cnss_diag /vendor/bin/cnss_diag -q -u -w
67    class late_start
68    user system
69    group system
70    disabled
71    oneshot
72
73service vendor.cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag/cnss_diag.conf
74    class late_start
75    user system
76    group system
77    disabled
78    oneshot
79
80on property:vendor.debug.ramdump.force_crash=true
81    write /proc/sysrq-trigger "c"
82
83on property:ro.vendor.bluetooth.ftm_enabled=true
84    start ftmd
85
86service ftmd /vendor/bin/ftmdaemon
87    class late_start
88    user root
89    group bluetooth net_bt_admin misc diag net_bt
90    disabled
91    oneshot
92
93on property:vendor.sys.logger.bluetooth=true
94   setprop persist.vendor.service.bdroid.snooplog true
95   setprop persist.vendor.service.bdroid.fwsnoop true
96
97on property:vendor.sys.logger.bluetooth=false
98   setprop persist.vendor.service.bdroid.snooplog false
99   setprop persist.vendor.service.bdroid.fwsnoop false
100
101on property:persist.bluetooth.btsnoopenable=true
102   setprop persist.vendor.service.bdroid.soclog true
103
104on property:persist.bluetooth.btsnoopenable=false
105   setprop persist.vendor.service.bdroid.soclog false
106
107on property:vendor.usb.config=*
108   start usbd
109
110on property:persist.vendor.usb.usbradio.config=*
111   start usbd
112