summaryrefslogtreecommitdiffstats
path: root/rootdir/init.target.rc
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir/init.target.rc')
-rw-r--r--rootdir/init.target.rc32
1 files changed, 30 insertions, 2 deletions
diff --git a/rootdir/init.target.rc b/rootdir/init.target.rc
index 45b4501..7713c71 100644
--- a/rootdir/init.target.rc
+++ b/rootdir/init.target.rc
@@ -2,6 +2,26 @@ on init
# ko files for FM Radio
insmod /system/lib/modules/Si4709_driver.ko
+ # Create ConfigFS mount point for USB gadgets
+ # Add standard gadget entries
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1
+ write /config/usb_gadget/g1/idVendor 0x18D1
+ write /config/usb_gadget/g1/idProduct 0x4E26
+ mkdir /config/usb_gadget/g1/strings/0x409
+ write /config/usb_gadget/g1/strings/0x409/serialnumber 0123459876
+ write /config/usb_gadget/g1/strings/0x409/manufacturer Samsung
+ write /config/usb_gadget/g1/strings/0x409/product I9300
+ mkdir /config/usb_gadget/g1/configs/c.1
+ mkdir /config/usb_gadget/g1/configs/c.1/strings/0x409
+ write /config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "Conf 1"
+ write /config/usb_gadget/g1/configs/c.1/MaxPower 120
+
+ # Create adb+ffs gadget function
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ 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
on post-fs-data
# icd
@@ -14,7 +34,7 @@ on post-fs-data
chown system system /dev/tzic
# make param block device link for SysScope
- symlink /dev/block/mmcblk0p4 /dev/block/param
+ symlink /dev/block/mmcblk1p4 /dev/block/param
# Restorecon
restorecon_recursive /efs
@@ -42,7 +62,7 @@ on fs
# zram
swapon_all /fstab.smdk4x12
-#on boot
+on boot
# Start GPS daemon
#service gps-daemon /system/bin/sh /system/bin/gps_daemon.sh
# class main
@@ -51,6 +71,14 @@ on fs
# group system inet sdcard_rw gps
# seclabel u:r:glgps:s0
+ # always start adb
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/c.1/ffs.adb
+ start adbd
+ #Add this 2 second wait/delay to calm things down after adbd restart and before we enable UDC.
+ wait /dev/socket/waiting
+ write /config/usb_gadget/g1/UDC "12480000.hsotg"
+
+
on property:dev.bootcomplete=1
# boot on default pegasusq settings (for better performance)
# switch to more conservative settings after bootup is complete