Cross Compiling AOSP/adb for armv7-gnueabihf host?

1,113 views
Skip to first unread message

John Jackson

unread,
Jul 24, 2016, 6:04:41 PM7/24/16
to android-platform
Hi Everyone,

I am working on a project where I need to run ADB on a host arm platform.  I have found various resources on the net where someone has managed to write a script which cross compiles adb(https://github.com/bonnyfone/adb-arm) and I understand the make files changes needed to support later android releases. But I am worried that there may be features not fully working.  I am looking for a way to cross compile the ADB from within the AOSP build system. Is there a way to do this?



Thank You
Regards,
John Jackson

Colin Cross

unread,
Jul 24, 2016, 10:01:28 PM7/24/16
to android-...@googlegroups.com
The platform build system does not support building for arm hosts.
However, adb used to support being built for the device. If you add a
device version of adb based on the host build rules, then add
"LOCAL_FORCE_STATIC_EXECUTABLE := true" and build for aosp_arm-eng it
should produce a static binary that is likely to work on your host.
> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-platfo...@googlegroups.com.
> To post to this group, send email to android-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-platform.
> For more options, visit https://groups.google.com/d/optout.

John Jackson

unread,
Sep 28, 2016, 6:15:13 PM9/28/16
to android-platform
Hi Colin Cross, thank you for getting back to me.   
I am bit inexperienced with working inside the aosp build environment. Can you go into some more detail as to how I can accomplish adding a "LOCAL_FORCE_STATIC_EXECUTABLE := true"? 


Regards,
John Jackson

Glenn Kasten

unread,
Sep 28, 2016, 6:26:19 PM9/28/16
to android-platform
In system/core, commit c318833b359164f25d7a93f6395c0cad787bacd7
added build adb for device, and commit 4626b7105763f0f5d25343dc81523ff2e9bda180
removed it. I have no idea if it still works if you add it back.

Surge Raval

unread,
Feb 10, 2017, 10:08:29 AM2/10/17
to android-platform

I build adb 1.0.36 for arm and arm64 hosts using this Android.mk I edited https://github.com/Surge1223/android_system_core/blob/android-7.1/adb/Android.mk

I'm able to use all functions fine from arm and arm64 devices.  Hope this helps. 

张震

unread,
May 12, 2019, 1:59:18 PM5/12/19
to android-platform
HI:
    Hello ,I also to fix this problem ,my platform is qcom ,and it only offer the host adb for linux-x86 and windows-x86.
    Can you offer your finally Andriod.mk Which you edited to me ?By the email or github?
    Thanks for your help.

在 2017年2月10日星期五 UTC+8下午11:08:29,Surge Raval写道:
Reply all
Reply to author
Forward
0 new messages