forked from CyanogenMod/android_device_htc_msm7x30-common
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.htc7x30.usb.rc
44 lines (38 loc) · 1.51 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
# Used to disable USB when switching states
on property:sys.usb.config=none
exec /system/bin/netcfg usb0 down
stop adbd
write /sys/class/usb_composite/adb/enable 0
write /sys/class/usb_composite/usb_mass_storage/enable 0
write /sys/class/usb_composite/rndis/enable 0
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=adb
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage
write /sys/class/usb_composite/usb_mass_storage/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage,adb
write /sys/class/usb_composite/usb_mass_storage/enable 1
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis
exec /system/bin/netcfg usb0 up
write /sys/class/usb_composite/rndis/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb
exec /system/bin/netcfg usb0 up
write /sys/class/usb_composite/rndis/enable 1
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage,rndis,adb
exec /system/bin/netcfg usb0 up
write /sys/class/usb_composite/usb_mass_storage/enable 1
write /sys/class/usb_composite/rndis/enable 1
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}