diff options
| author | Fathi Boudra <fathi.boudra@linaro.org> | 2016-09-07 12:58:47 +0300 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-09-15 10:22:46 +0200 |
| commit | a231c431a522ae1821fc484bb1a1f9997ecabf20 (patch) | |
| tree | 0513730154c45ce23dc35393bcf1ec609590a23b /meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup | |
| parent | 4fad615950a92db633d2d46fddd3fc491a853e55 (diff) | |
| download | meta-openembedded-a231c431a522ae1821fc484bb1a1f9997ecabf20.tar.gz | |
android-tools: add recipe from AOSP tag android-5.1.1_r37
Android tools offer filsystem tools for creating sparse images,
so package them in package of its own.
This recipe is re-worked and not a straight import from meta-shr.
It's built from AOSP source. I've dropped the ubuntu-ism which will
never be upstreamed.
The intent is to be closer to the upstream AOSP source code and be able
to update the recipe regularly.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup')
| -rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup new file mode 100644 index 0000000000..f7d9973722 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # TODO enable the lines below once we have support for getprop | ||
| 4 | # retrieve the product info from Android | ||
| 5 | # manufacturer=$(getprop ro.product.manufacturer Android) | ||
| 6 | # model=$(getprop ro.product.model Android) | ||
| 7 | # serial=$(getprop ro.serialno 0123456789ABCDEF) | ||
| 8 | |||
| 9 | manufacturer="$(cat /system/build.prop | grep -o 'ro.product.manufacturer=.*' | cut -d'=' -f 2)" | ||
| 10 | model="$(cat /system/build.prop | grep -o 'ro.product.model=.*' | cut -d'=' -f 2)" | ||
| 11 | # get the device serial number from /proc/cmdline directly(since we have no getprop on | ||
| 12 | # GNU/Linux) | ||
| 13 | serial="$(cat /proc/cmdline | sed 's/.*androidboot.serialno=//' | sed 's/ .*//')" | ||
| 14 | |||
| 15 | echo $serial > /sys/class/android_usb/android0/iSerial | ||
| 16 | echo $manufacturer > /sys/class/android_usb/android0/iManufacturer | ||
| 17 | echo $model > /sys/class/android_usb/android0/iProduct | ||
| 18 | |||
| 19 | echo "0" > /sys/class/android_usb/android0/enable | ||
| 20 | echo "18d1" > /sys/class/android_usbid_usb/android0/idVendor | ||
| 21 | echo "D002" > /sys/class/android_usb/android0/idProduct | ||
| 22 | echo "adb" > /sys/class/android_usb/android0/functions | ||
| 23 | echo "1" > /sys/class/android_usb/android0/enable | ||
| 24 | |||
| 25 | sleep 4 | ||
