1 # This file gets copied as /init.common.diag.rc 2 3 on post-fs-data 4 # Modem logging collection 5 mkdir /data/vendor/radio 0775 radio radio 6 mkdir /data/vendor/radio/diag_logs 0777 system system 7 chmod 777 /data/vendor/radio/diag_logs/cfg 8 chmod 777 /data/vendor/radio/diag_logs/custom_cfg 9 # WLAN logging collection 10 mkdir /data/vendor/wifi 0777 system system 11 mkdir /data/vendor/wifi/cnss_diag 0777 system system 12 # SM DUMP logging collection 13 mkdir /data/smlog_dump 0777 system system 14 15 # Copy OEM adb_keys if /data/misc/adb/adb_keys does not exist 16 copy /data/misc/adb/adb_keys /data/misc/adb/adb_keys_temp 17 copy /vendor/etc/adb_keys /data/misc/adb/adb_keys 18 copy /data/misc/adb/adb_keys_temp /data/misc/adb/adb_keys 19 chown system shell /data/misc/adb/adb_keys 20 chmod 640 /data/misc/adb/adb_keys 21 rm /data/misc/adb/adb_keys_temp 22 23 on boot 24 chmod 666 /dev/diag 25 26 on property:sys.usb.config=rndis,diag 27 write /sys/class/android_usb/android0/enable 0 28 write /sys/class/android_usb/android0/idVendor 05C6 29 write /sys/class/android_usb/android0/idProduct 902C 30 write /sys/class/android_usb/android0/f_diag/clients diag 31 write /sys/class/android_usb/android0/functions ${sys.usb.config} 32 write /sys/class/android_usb/android0/enable 1 33 setprop sys.usb.state rndis 34 35 on property:sys.usb.config=rndis,diag,adb 36 write /sys/class/android_usb/android0/enable 0 37 write /sys/class/android_usb/android0/idVendor 05C6 38 write /sys/class/android_usb/android0/idProduct 902D 39 write /sys/class/android_usb/android0/f_diag/clients diag 40 write /sys/class/android_usb/android0/functions ${sys.usb.config} 41 write /sys/class/android_usb/android0/enable 1 42 start adbd 43 setprop sys.usb.state rndis,adb 44 45 on property:sys.usb.config=diag 46 stop adbd 47 write /sys/class/android_usb/android0/enable 0 48 write /sys/class/android_usb/android0/idVendor 05C6 49 write /sys/class/android_usb/android0/idProduct 900E 50 write /sys/class/android_usb/android0/bDeviceClass 0 51 write /sys/class/android_usb/android0/bDeviceSubClass 0 52 write /sys/class/android_usb/android0/bDeviceProtocol 0 53 write /sys/class/android_usb/android0/f_diag/clients diag 54 write /sys/class/android_usb/android0/functions ${sys.usb.config} 55 write /sys/class/android_usb/android0/enable 1 56 setprop sys.usb.state ${sys.usb.config} 57 58 on property:sys.usb.config=diag,adb 59 write /sys/class/android_usb/android0/enable 0 60 write /sys/class/android_usb/android0/idVendor 05C6 61 write /sys/class/android_usb/android0/idProduct 903D 62 write /sys/class/android_usb/android0/bDeviceClass 0 63 write /sys/class/android_usb/android0/bDeviceSubClass 0 64 write /sys/class/android_usb/android0/bDeviceProtocol 0 65 write /sys/class/android_usb/android0/f_diag/clients diag 66 write /sys/class/android_usb/android0/functions ${sys.usb.config} 67 write /sys/class/android_usb/android0/enable 1 68 start adbd 69 setprop sys.usb.state ${sys.usb.config} 70 71 on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage 72 write /sys/class/android_usb/android0/enable 0 73 write /sys/class/android_usb/android0/idVendor 05C6 74 write /sys/class/android_usb/android0/idProduct 9025 75 write /sys/class/android_usb/android0/bDeviceClass 0 76 write /sys/class/android_usb/android0/bDeviceSubClass 0 77 write /sys/class/android_usb/android0/bDeviceProtocol 0 78 write /sys/class/android_usb/android0/f_diag/clients diag 79 write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty 80 write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa 81 write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage 82 write /sys/class/android_usb/android0/enable 1 83 setprop sys.usb.state ${sys.usb.config} 84 85 on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb 86 write /sys/class/android_usb/android0/enable 0 87 write /sys/class/android_usb/android0/idVendor 05C6 88 write /sys/class/android_usb/android0/idProduct 9025 89 write /sys/class/android_usb/android0/bDeviceClass 0 90 write /sys/class/android_usb/android0/bDeviceSubClass 0 91 write /sys/class/android_usb/android0/bDeviceProtocol 0 92 write /sys/class/android_usb/android0/f_diag/clients diag 93 write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty 94 write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa 95 write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage 96 write /sys/class/android_usb/android0/enable 1 97 start adbd 98 setprop sys.usb.state ${sys.usb.config} 99 100 on property:persist.sys.cnss.diag_qxdm=true 101 start vendor.cnss_diag 102 103 on property:persist.sys.cnss.diag_qxdm=false 104 stop vendor.cnss_diag 105 106 on property:persist.sys.cnss.diag_txt=true 107 start vendor.cnss_diag_txt 108 109 on property:persist.sys.cnss.diag_txt=false 110 stop vendor.cnss_diag_txt 111 112 service vendor.cnss_diag /vendor/bin/cnss_diag -q -u 113 class late_start 114 user system 115 group system 116 oneshot 117 118 service vendor.cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag/cnss_diag.conf 119 class late_start 120 user system 121 group system 122 disabled 123 oneshot 124 125 on property:persist.vendor.sys.crash_rcu=true 126 write /proc/sys/kernel/panic_on_rcu_stall 1 127 128 on property:persist.vendor.sys.crash_rcu=false 129 write /proc/sys/kernel/panic_on_rcu_stall 0 130 131 132 on property:sys.logger.bluetooth=true 133 setprop persist.vendor.service.bdroid.snooplog true 134 setprop persist.vendor.service.bdroid.fwsnoop true 135 136 on property:sys.logger.bluetooth=false 137 setprop persist.vendor.service.bdroid.snooplog false 138 setprop persist.vendor.service.bdroid.fwsnoop false 139 140 on property:persist.bluetooth.btsnoopenable=true 141 setprop persist.vendor.service.bdroid.soclog true 142 143 on property:persist.bluetooth.btsnoopenable=false 144 setprop persist.vendor.service.bdroid.soclog false 145