diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2013-06-20 15:36:33 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2013-06-24 08:39:36 +0300 |
commit | 29f971bec6ad8bbbf3f6bbcf1ab67f1f4e0b59ff (patch) | |
tree | fa3d68640bc264e52a8c5265bc730a2d37d68866 /recipes/adbd/files/adb-init | |
parent | fdb102b8b6bf1e0f2807502eaa83cb7818009b6e (diff) | |
download | meta-boot2qt-29f971bec6ad8bbbf3f6bbcf1ab67f1f4e0b59ff.tar.gz |
Include Android Debug Bridge Daemon (adbd) to images
Change-Id: I00108d36be95e42b8aa9674d1a86ea7e3a5bcf55
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Diffstat (limited to 'recipes/adbd/files/adb-init')
-rwxr-xr-x | recipes/adbd/files/adb-init | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/recipes/adbd/files/adb-init b/recipes/adbd/files/adb-init new file mode 100755 index 0000000..6f2910e --- /dev/null +++ b/recipes/adbd/files/adb-init | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | case "$1" in | ||
3 | start) | ||
4 | insmod $(busybox find /lib/modules/$(uname -r) -name "g_ffs.ko") idVendor=0x18d1 idProduct=0x4e26 iSerialNumber=$(hostname) | ||
5 | mkdir -p /dev/usb-ffs | ||
6 | chmod 770 /dev/usb-ffs | ||
7 | mkdir -p /dev/usb-ffs/adb | ||
8 | chmod 770 /dev/usb-ffs/adb | ||
9 | mount -t functionfs adb /dev/usb-ffs/adb -o uid=0,gid=0 | ||
10 | |||
11 | /usr/bin/adbd & | ||
12 | ;; | ||
13 | stop) | ||
14 | killall adbd | ||
15 | umount /dev/usb-ffs/adb | ||
16 | rmmod g_ffs | ||
17 | ;; | ||
18 | *) | ||
19 | echo "Usage: $0 {start|stop}" | ||
20 | exit 1 | ||
21 | esac | ||
22 | exit 0 | ||