forked from LineageOS/android_device_google_marlin
-
Notifications
You must be signed in to change notification settings - Fork 8
/
init.common.diag.rc.userdebug
135 lines (116 loc) · 5.45 KB
/
init.common.diag.rc.userdebug
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# This file gets copied as /init.common.diag.rc
on post-fs-data
# Modem logging collection
mkdir /data/vendor/radio 0775 radio radio
mkdir /data/vendor/radio/diag_logs 0777 system system
# WLAN logging collection
mkdir /data/vendor/wifi 0777 system system
mkdir /data/vendor/wifi/cnss_diag 0777 system system
# SM DUMP logging collection
mkdir /data/smlog_dump 0777 system system
# Copy OEM adb_keys if /data/misc/adb/adb_keys does not exist
copy /data/misc/adb/adb_keys /data/misc/adb/adb_keys_temp
copy /vendor/etc/adb_keys /data/misc/adb/adb_keys
copy /data/misc/adb/adb_keys_temp /data/misc/adb/adb_keys
chown system shell /data/misc/adb/adb_keys
chmod 640 /data/misc/adb/adb_keys
rm /data/misc/adb/adb_keys_temp
on boot
chmod 666 /dev/diag
on property:sys.usb.config=rndis,diag
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 902C
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state rndis
on property:sys.usb.config=rndis,diag,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 902D
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state rndis,adb
on property:sys.usb.config=diag
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 900E
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 903D
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 9025
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 9025
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:persist.sys.cnss.diag_qxdm=true
start cnss_diag
on property:persist.sys.cnss.diag_qxdm=false
stop cnss_diag
on property:persist.sys.cnss.diag_txt=true
start cnss_diag_txt
on property:persist.sys.cnss.diag_txt=false
stop cnss_diag_txt
service cnss_diag /vendor/bin/cnss_diag -q -u
class late_start
user system
group system
oneshot
service cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag/cnss_diag.conf
class late_start
user system
group system
disabled
oneshot
on property:persist.sys.crash_rcu=true
write /proc/sys/kernel/panic_on_rcu_stall 1
on property:persist.sys.crash_rcu=false
write /proc/sys/kernel/panic_on_rcu_stall 0
on property:sys.logger.bluetooth=true
setprop persist.service.bdroid.snooplog true
setprop persist.service.bdroid.fwsnoop true
on property:sys.logger.bluetooth=false
setprop persist.service.bdroid.snooplog false
setprop persist.service.bdroid.fwsnoop false