After trolling all these "adb on RPi" threads on this and other forums, I thought I'd share what I found works for me (first post btw! ).
It's really simple in fact: You can obtain a subset of the Android source tree and build only adb (and necessary libs), the subset is about 25 MB and builds in minutes on a RPi rev B.
Before anyone ask why: trust me, I needed to have the latest stock (no changes) adb running on RPi. The other versions just didn't fit the bill.
cd system/core/adb make adb
@jogco Nice one dude!
AFAIK @AdamOutler does actively maintain an armv6 adb host in his Casual project.
Regardless building from source whether necessary or not is something you should ever have to defend, especially not on XDA ain't the RPI Forums where I'm sure some folks would question you breathe if I wasn't endorsed by the Foundation. I do hope the whole thing wasn't to much of a Pain in the ass to figure out however because I'm gonna be that guy which shows you a much simpler way to do what you've just done. Personally I hate it when it happens to me, so sorry dude!
So "no-oping" static_library.mk shared_library.mk and executable.mk in the build/core directory disables $(TARGET_BUILD_EXECUTABLE), TARGET_BUILD_SHARED_LIBRARY and TARGET_BUILD_SHARED_LIBRARY found in the various Android.mk fragments. which negates the need to create your own makefile as we just use the host side of the build system. It's also what I effectively did a few years back ( earlier in the thread ) .. but I was young, naive and eager to please... It was a bit hacky to say the least
Anyway here's my 2014 version! - Well it's not adb specific although I did use it as an example ( #2 ) It "should" build any host binary as long as you give it all the dependencies
#!/bin/bash # # Namee : build-aosp-host-binaries # Description : A Convient script to build android aosp host binaries # without syncing the full platform sources # # Copyright (C) 2014 Trevor Drake # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Assumes you know what dependencies a specific modules has. # If you are missing some dependencies the build will fail # You can generally figure it out from the error out # http://androidxref.com is also an handy resource :) # # # usage : build-aosp-host-binaries <module> <branch> <source repositories> # # examples # #1 Sqlite - sqlite3 has a dependency on liblog so need both the # external/sqlite source repo as well as system/core for liblog # # ./build-aosp-host-binaries sqlite3 master external/sqlite system/core # # #2 adb - adb is located in the system/core repository and depends on # libunz libcrytpo_static, which can be found in external/zlib # and external/openssl repectively # # ./build-aosp-host-binaries adb master external/openssl external/zlib system/core # # #3 mkbootfs - mkbootfs doesn't have any external dependencies. # so we only need the source repository which is system/core # # # /build-aosp-host-binaries mkbootfs master system/core # use the first argument as the module name # e.g adb mkbootfs or whatever LOCAL_MODULE=$1 # Select a branch LOCAL_BRANCH=$2 # discard the first argument shift 2 # Glob the rest of the arguments as local Dependencies # Also add build external/stlport and external/libcxx # as they seem to be required by most projects LOCAL_DEPENDS="$* build external/stlport external/libcxx" # Make a temporary build directory TMPDIR=`mktemp -dt quick.XXXXXXXXXX` echo $TMPDIR # Shallow clone the repos into the temp directory # --depth 1 automatically set --single-branch on for gr in $LOCAL_DEPENDS; do git clone --depth 1 --branch $LOCAL_BRANCH https://android.googlesource.com/platform/$gr $TMPDIR/$gr; done # A Cheap trick to disable any target builds which may exist for the modules Android.mk cat /dev/null > $TMPDIR/build/core/static_library.mk > $TMPDIR/build/core/shared_library.mk > $TMPDIR/build/core/executable.mk # Usual android build system envsetup nonsense # We don't need to do lunch as we are not building for a target . $TMPDIR/build/envsetup.sh # use the build systems m command as we don't have a top level Makefile time m -C$TMPDIR -j16 $LOCAL_MODULE
Welcome to XDA BTW! - If only more folks Post #1 were like this.