android-tools: add target and adbd support
PATCH 1/1 android-tools: add target and adbd support
Required to switch from the Debian to the Ubuntu package as the former doesn't offer adbd support. That change allows to get rid the AndroidConfig.h as everything is defined in the Makefiles.
Regarding adbd, the target is required to have the FunctionFS USB Gadget configuration. Then the following commands enable the use of adb:
# modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 \ iSerialNumber="buildroot" # mkdir -p /dev/usb-ffs/adb # mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000 # adbd &
---
Hi all,
This patch is to be applied on top of the one from Antoine/Thomas:
http://patchwork.ozlabs.org/patch/467019/
This is a first draft and I'll obviously need to respin once a v3 of their patch will be delivered. I don't know if it would even be better to squash both patches and have one android-tools patch only.
A few things to note, originally I did a patch to add adbd using the original system_core Android repo and a few patches (a RFC can be provided if needed). But this approach doesn't allow to build fastboot as it also requires ext4_utils from system_extras repo.
Wasn't sure if anyone would be interested in having adb/fastboot running on the target but it didn't cost much to add them.
I was surprised not to see "select" in the Config.in.host for zlib or openssl but only at dependencies in the .mk file. Is that on purpose? To be in line I've basically copied the Config.in.host into the Config.in but I have the feeling we should select the other packages.
As for the testing, I've tried to run adbd on a Nitrogen6x and the following commands from my machine:
$ adb devices List of devices attached buildroot device $ adb shell $ adb push $ adb pull
Regards,
Gary
--- package/Config.in | 1 + .../0001-Fix-makefiles-for-out-of-tree-build.patch | 165 +++++++++ .../android-tools/0001-android-config-header.patch | 404 --------------------- .../0002-Fix-adbd-for-non-Ubuntu-systems.patch | 267 ++++++++++++++ package/android-tools/Config.in | 32 ++ package/android-tools/android-tools.hash | 6 +- package/android-tools/android-tools.mk | 49 ++- 7 files changed, 508 insertions(+), 416 deletions(-) create mode 100644 package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch delete mode 100644 package/android-tools/0001-android-config-header.patch create mode 100644 package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch create mode 100644 package/android-tools/Config.in
package/Config.in +1 -0
@@ -1454,6 +1454,7 @@ endmenu menu "System tools" source "package/acl/Config.in" + source "package/android-tools/Config.in" source "package/attr/Config.in" source "package/audit/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch new file +165 -0
165 lines not on this page · raw message
package/android-tools/0001-android-config-header.patch deleted +0 -404
404 lines not on this page · raw message
package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch new file +267 -0
267 lines not on this page · raw message
package/android-tools/Config.in new file +32 -0
@@ -0,0 +1,32 @@ +config BR2_PACKAGE_ANDROID_TOOLS + bool "android-tools" + help + This package contains the fastboot and adb utilities, that + can be used to interact with target devices using of these + protocols. + +if BR2_PACKAGE_ANDROID_TOOLS + +config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT + bool "fastboot" + help + This option will build and install the fastboot utility for + the target, which can be used to reflash other target devices + implementing the fastboot protocol. + +config BR2_PACKAGE_ANDROID_TOOLS_ADB + bool "adb" + help + This option will build and install the adb utility for the + target, which can be used to interact with other target devices + implementing the ADB protocol. + +config BR2_PACKAGE_ANDROID_TOOLS_ADBD + bool "adbd" + help + This option will build and install the adbd utility for the + target, which can be used to interact with a host machine + implementing the ADB protocol. + +endif +
package/android-tools/android-tools.hash +3 -3
@@ -1,3 +1,3 @@ -# From http://snapshot.debian.org/archive/debian/20141125T040054Z/pool/main/a/android-tools/ -sha512 aadf75d29e2aa223870c942fdd44bbeb9466542e17b81bb93069d4415dd6644b5266465d4e466b1d5ed2a84f86d89450a3aa077f4f81268ac1a3d1e4df74d9ad android-tools_4.2.2+git20130529.orig.tar.xz -sha512 c879d0fed0d53030319813cfadc29d939dec7600210d11c8e398e61c69447971f82e1e5228aeba730a2d95899c1c5d5d2a3b06e9a19a91866b33b5bc068079c6 android-tools_4.2.2+git20130529-5.1.debian.tar.xz +# locally computed +sha512 c5bfd3c8e514809db257ba5559c865742768b7520b38aa2f53185aff5c328e5cf7fb328a6ff6450eeddd5056985f232d492eba63a87978440e2147e26d62f458 android-tools_4.2.2+git20130218.orig.tar.xz +sha512 aa3fee593cecf5d9a5fbc60b18d67dadc5b832fdea75a098ec7371b8f774673af3a3b6052d7eecaf315943beaa984a1f5a3c114a698620275af1682bd05d4d23 android-tools_4.2.2+git20130218-3ubuntu41.debian.tar.gz
package/android-tools/android-tools.mk +40 -9
83 lines not on this page · raw message
Signature · 1 line
2.5.1
PATCH 1/1 android-tools: add target and adbd support
Gary,
Quoted 6 lines · Gary Bisson
Required to switch from the Debian to the Ubuntu package as the former doesn't offer adbd support. That change allows to get rid the
AndroidConfig.has everything is defined in the Makefiles.Regarding adbd, the target is required to have the FunctionFS USB Gadget configuration. Then the following commands enable the use of adb:
Quoted 7 lines
# modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 \ iSerialNumber="buildroot" # mkdir -p /dev/usb-ffs/adb # mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000 # adbd &Signed-off-by Gary Bisson <[email protected]>
Thanks for working on this!
Quoted 3 lines
This is a first draft and I'll obviously need to respin once a v3 of their patch will be delivered. I don't know if it would even be better to squash both patches and have one android-tools patch only.
I think you can squash both patches, and send a single patch implementing the entire package. Feel free to re-use my patch and put your authorship instead of mine, I don't care.
Quoted 3 lines
I was surprised not to see "select" in the Config.in.host for zlib or openssl but only at dependencies in the .mk file. Is that on purpose?
Host packages don't have Config.in options, except for a few exceptions.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 android-tools: add target and adbd support
Hi Thomas,
Quoted 19 lines · Thomas Petazzoni
Gary,
Quoted 6 lines · Gary Bisson
Required to switch from the Debian to the Ubuntu package as the former doesn't offer adbd support. That change allows to get rid the
AndroidConfig.has everything is defined in the Makefiles.Regarding adbd, the target is required to have the FunctionFS USB Gadget configuration. Then the following commands enable the use of adb:
Quoted 7 lines
# modprobe g_ffs idVendor=0x18d1 idProduct=0x4e42 \ iSerialNumber="buildroot" # mkdir -p /dev/usb-ffs/adb # mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000 # adbd &Signed-off-by Gary Bisson <[email protected]>Thanks for working on this!
Quoted 7 lines
Quoted 3 lines
This is a first draft and I'll obviously need to respin once a v3 of their patch will be delivered. I don't know if it would even be better to squash both patches and have one android-tools patch only.
I think you can squash both patches, and send a single patch implementing the entire package. Feel free to re-use my patch and put your authorship instead of mine, I don't care.
Ok I'll offer a squashed version soon. Authorship doesn't bother me either, the simplest is to keep yours, I'll just add my SOB (and Antoine's as requested in v2 comments).
Quoted 5 lines
Quoted 3 lines
I was surprised not to see "select" in the Config.in.host for zlib or openssl but only at dependencies in the .mk file. Is that on purpose?
Host packages don't have Config.in options, except for a few exceptions.
Ok I'll fix my Config.in to have the select.
Thanks,
Gary