diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf')
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup b/external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup index f7d99737..26cf30ed 100644 --- a/external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup +++ b/external/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup @@ -1,11 +1,23 @@ #!/bin/sh +[ ! -e /dev/pts ] && mkdir -p /dev/pts +[ ! -e /dev/pts/0 ] && mount devpts /dev/pts -t devpts + # TODO enable the lines below once we have support for getprop # retrieve the product info from Android # manufacturer=$(getprop ro.product.manufacturer Android) # model=$(getprop ro.product.model Android) # serial=$(getprop ro.serialno 0123456789ABCDEF) +#below are now needed in order to use FunctionFS for ADB, tested to work with 3.4+ kernels +if grep -q functionfs /proc/filesystems; then + mkdir -p /dev/usb-ffs/adb + mount -t functionfs adb /dev/usb-ffs/adb + #android-gadget-setup doesn't provide below 2 and without them it won't work, so we provide them here. + echo adb > /sys/class/android_usb/android0/f_ffs/aliases + echo ffs > /sys/class/android_usb/android0/functions +fi + manufacturer="$(cat /system/build.prop | grep -o 'ro.product.manufacturer=.*' | cut -d'=' -f 2)" model="$(cat /system/build.prop | grep -o 'ro.product.model=.*' | cut -d'=' -f 2)" # get the device serial number from /proc/cmdline directly(since we have no getprop on @@ -17,7 +29,7 @@ echo $manufacturer > /sys/class/android_usb/android0/iManufacturer echo $model > /sys/class/android_usb/android0/iProduct echo "0" > /sys/class/android_usb/android0/enable -echo "18d1" > /sys/class/android_usbid_usb/android0/idVendor +echo "18d1" > /sys/class/android_usb/android0/idVendor echo "D002" > /sys/class/android_usb/android0/idProduct echo "adb" > /sys/class/android_usb/android0/functions echo "1" > /sys/class/android_usb/android0/enable |