summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2018-03-27 02:49:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-03-27 02:49:03 +0000
commitff400ec9767686af1f0be5f17d40e792fa9c8610 (patch)
tree4130a344107e44676a361c74c230b570829c997f
parent24db414ebfd90a38d88979bf701983c3bd8c8703 (diff)
parentfd8844183f7d8082d2910dcc1e6bb0e8c0fc6915 (diff)
downloadhikey-ff400ec9767686af1f0be5f17d40e792fa9c8610.tar.gz
Merge "Mount ptp separately from mtp" into pi-dev
-rw-r--r--init.common.usb.rc15
1 files changed, 9 insertions, 6 deletions
diff --git a/init.common.usb.rc b/init.common.usb.rc
index 5d6986b3..f198a8b5 100644
--- a/init.common.usb.rc
+++ b/init.common.usb.rc
@@ -13,6 +13,7 @@ on boot
mkdir /config/usb_gadget/g1/functions/midi.gs5
mkdir /config/usb_gadget/g1/functions/ffs.adb
mkdir /config/usb_gadget/g1/functions/ffs.mtp
+ mkdir /config/usb_gadget/g1/functions/ffs.ptp
mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
@@ -22,7 +23,9 @@ on boot
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
mkdir /dev/usb-ffs/mtp 0770 mtp mtp
+ mkdir /dev/usb-ffs/ptp 0770 mtp mtp
mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+ mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
setprop sys.usb.mtp.device_type 3
setprop sys.usb.configfs 1
setprop sys.usb.ffs.aio_compat 1
@@ -31,12 +34,12 @@ on boot
on property:sys.usb.config=none && property:sys.usb.configfs=1
write /config/usb_gadget/g1/os_desc/use 0
-on property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=mtp && property:sys.usb.configfs=1
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee1
write /config/usb_gadget/g1/os_desc/use 1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
-on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee2
write /config/usb_gadget/g1/os_desc/use 1
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
@@ -47,15 +50,15 @@ on property:sys.usb.config=rndis && property:sys.usb.configfs=1
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee4
-on property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=ptp && property:sys.usb.configfs=1
+on property:sys.usb.config=ptp && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee5
write /config/usb_gadget/g1/os_desc/use 1
- symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1
-on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee6
write /config/usb_gadget/g1/os_desc/use 1
- symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1
on property:sys.usb.config=adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee7