summaryrefslogtreecommitdiff
path: root/rootdir/init.sony.usb.rc
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2017-10-10 20:38:00 +0200
committerArian <arian.kulmer@web.de>2019-10-07 11:07:17 +0200
commit80ca589be905b2c0a8836db272026b0c49c17188 (patch)
treeb60175478ec0e2c41d16f6ef3d1219b5eabc439b /rootdir/init.sony.usb.rc
parent998044b58800d72f72ca91a2197de6221529d76e (diff)
shianno-common: usb: rootdir: Enable FunctionFS
Change-Id: I12ff6e794e6993940284e6dfb48b718c40fdd3b1
Diffstat (limited to 'rootdir/init.sony.usb.rc')
-rw-r--r--rootdir/init.sony.usb.rc14
1 files changed, 11 insertions, 3 deletions
diff --git a/rootdir/init.sony.usb.rc b/rootdir/init.sony.usb.rc
index d83cf69..727c268 100644
--- a/rootdir/init.sony.usb.rc
+++ b/rootdir/init.sony.usb.rc
@@ -23,6 +23,14 @@ on boot
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
+on fs
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+ mkdir /dev/bus 0755 root root
+ mkdir /dev/bus/usb 0755 root root
+
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0FCE
@@ -32,7 +40,7 @@ on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
- stop adb
+ stop adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,adb
@@ -56,7 +64,7 @@ on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/bDeviceProtocol 1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
- stop adb
+ stop adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb
@@ -80,7 +88,7 @@ on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
- stop adb
+ stop adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ptp,adb