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