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 17 on init 18 chmod 666 /dev/diag 19 20 on 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 mkdir /data/vendor/wifi/wlan_logs 0770 wifi wifi 29 30 service diag_mdlog_start /vendor/bin/diag_mdlog 31 class late_start 32 user shell 33 group system diag media_rw 34 socket diag_router stream 0666 system system 35 disabled 36 oneshot 37 38 service diag_mdlog_stop /vendor/bin/diag_mdlog -k 39 class late_start 40 user shell 41 group system diag media_rw 42 disabled 43 oneshot 44 45 on boot && property:persist.vendor.sys.modem.diag.mdlog=* 46 rm /data/vendor/radio/diag_logs/diag_mdlog_pid 47 setprop vendor.sys.modem.diag.mdlog ${persist.vendor.sys.modem.diag.mdlog} 48 49 on property:vendor.sys.modem.diag.mdlog=true 50 start diag_mdlog_start 51 52 on property:vendor.sys.modem.diag.mdlog=false 53 start diag_mdlog_stop 54 55 on property:persist.vendor.sys.cnss.diag_qxdm=true 56 start vendor.cnss_diag 57 58 on property:persist.vendor.sys.cnss.diag_qxdm=false 59 stop vendor.cnss_diag 60 61 on property:persist.vendor.sys.cnss.diag_txt=true 62 start vendor.cnss_diag_txt 63 64 on property:persist.vendor.sys.cnss.diag_txt=false 65 stop vendor.cnss_diag_txt 66 67 service vendor.cnss_diag /vendor/bin/cnss_diag -q -u -w 68 class late_start 69 user system 70 group system 71 disabled 72 oneshot 73 74 service vendor.cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag/cnss_diag.conf 75 class late_start 76 user system 77 group system 78 disabled 79 oneshot 80 81 on property:vendor.debug.ramdump.force_crash=true 82 write /proc/sysrq-trigger "c" 83 84 on property:ro.vendor.bluetooth.ftm_enabled=true 85 start ftmd 86 87 service ftmd /vendor/bin/ftmdaemon 88 class late_start 89 user root 90 group bluetooth net_bt_admin misc diag net_bt 91 disabled 92 oneshot 93 94 on property:vendor.sys.logger.bluetooth=true 95 setprop persist.vendor.service.bdroid.snooplog true 96 setprop persist.vendor.service.bdroid.fwsnoop true 97 98 on property:vendor.sys.logger.bluetooth=false 99 setprop persist.vendor.service.bdroid.snooplog false 100 setprop persist.vendor.service.bdroid.fwsnoop false 101 102 on property:persist.bluetooth.btsnoopenable=true 103 setprop persist.vendor.service.bdroid.soclog true 104 105 on property:persist.bluetooth.btsnoopenable=false 106 setprop persist.vendor.service.bdroid.soclog false 107 108 on property:vendor.usb.config=* 109 start usbd 110 111 on property:persist.vendor.usb.usbradio.config=* 112 start usbd 113