forked from Andromadus/android_device_htc_msm7x30-common
-
Notifications
You must be signed in to change notification settings - Fork 12
/
init.htc7x30.usb.rc
52 lines (43 loc) · 1.81 KB
/
init.htc7x30.usb.rc
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
# Used to disable USB when switching states
on property:sys.usb.config=none
exec /system/bin/netcfg usb0 down
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/bDeviceClass 0
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=adb
start adbd
write /sys/devices/platform/android_usb/usb_function_switch 2
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage,adb
start adbd
write /sys/devices/platform/android_usb/usb_function_switch 3
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage
write /sys/devices/platform/android_usb/usb_function_switch 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis
exec /system/bin/netcfg usb0 up
write /sys/devices/platform/android_usb/usb_function_switch 4
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb
exec /system/bin/netcfg usb0 up
start adbd
write /sys/devices/platform/android_usb/usb_function_switch 6
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp
write /sys/devices/platform/android_usb/usb_function_switch 128
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,adb
start adbd
write /sys/devices/platform/android_usb/usb_function_switch 130
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/f_ptp/on 1
write /sys/devices/platform/android_usb/usb_function_switch 128
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ptp,adb
start adbd
write /sys/class/android_usb/android0/f_ptp/on 1
write /sys/devices/platform/android_usb/usb_function_switch 130
setprop sys.usb.state ${sys.usb.config}