forked from RevNumbers/android_device_motorola_droid2we
-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.mapphone_cdma.usb.rc
53 lines (46 loc) · 1.79 KB
/
init.mapphone_cdma.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
53
# From Usb.apk code
# public static final int USB_MODE_NGP = 0;
# public static final int USB_MODE_MTP = 1;
# public static final int USB_MODE_MSC = 2;
# public static final int USB_MODE_RNDIS = 3;
# public static final int USB_MODE_MODEM = 4;
# public static final int USB_MODE_NONE = 5;
on property:sys.usb.config=adb
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 5
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mass_storage,adb
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 2
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mass_storage
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 2
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 3
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis,adb
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 3
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mtp
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 1
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mtp,adb
exec /system/bin/am broadcast \
-a com.motorola.intent.action.USB_MODE_SWITCH_FROM_UI \
--ei USB_MODE_INDEX 1
start adbd
setprop sys.usb.state $sys.usb.config