FORUMS
Remove All Ads from XDA

Adb for Raspberry pi

5,225 posts
Thanks Meter: 9,875
 
Post Reply Email Thread
26th October 2012, 12:54 AM |#51  
Kuya Marc's Avatar
Junior Member
Flag Pasig City
Thanks Meter: 0
 
Donate to Me
More
Good Morning from The Philippines!

Hello everyone in this forum. Though I'm just a NOOB in this forum, I typically patronize only my blog. This specific XDA Developers Forum, however, strikes one of my projected interests. I received my Raspberry Pi (Model B, 512MB) on Wednesday, and one of my upcoming projects is to have it be the Controller of my Android Fleet.

Android Debug Bridge (ADB) is what I will be needing, but no schedule until November. The actual project is... Running DDMS for 3-10 Android Devices at the same time (average 3 Androids at once), all using ADBwireless. The secondary project is, downloading Google Play updates on one Android and the Raspberry Pi to disburse updates to my Android Fleet.

Though I'm a veteran C/C++ programmer, I'm still too lazy in learning JAVA for Android development, as I've been involved with Linux for 15+ years. (If I had my wish, all of my Android devices would be converted to embedded Linux devices, but I'm still new to the ARM platform.)

As for ADB on Raspberry Pi... What difficulties, if any, should I expect? I've downloaded the compiled ADB files from this forum thread, but not sure when I'm going to 'test' out.

For those that don't know me, I rarely ask for technical support. Traditionally, if I ask for technical support, then something terrible has gone wrong (like a 5-alarm fire, etc.).

Have a nice day, everybody!
 
 
30th January 2013, 02:15 PM |#52  
Junior Member
Thanks Meter: 7
 
More
Prompt Use Raspberry Pi to build Android Project (AOSP)
Hi all !

My current project is to use my Raspberry Pi as a Build Machine to build all Android sources (AOSP). In fact, I'll not build AOSP but the CyanogenMod (wich is mainly a fork from AOSP).

I know this may sound crazy, dumb or useless (according to Google, a 64-bit environment is required, and a lot (>> 4GB) of RAM if you're in a hurry), especially to use an ARM processor to build while all the Makefiles has been written to be used on x86...

But what I'm thinking about is a really cheap, silent, but working build machine, to sync the repo and build nightlies everyday. The first build will take some days but then, only the changes will be build so I think that only some hours per day will be required.

If I success, I'll create a big tutorial to explain what changes was required.

First of all, I had to add the Linux-armv61 arch as Host OS/ARCH :

Code:
pi@raspberrypi ~/buildspace/android/system/build $ git diff
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 862b7f0..34eb31a 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -77,6 +77,10 @@ ifneq (,$(findstring Power,$(UNAME)))
        HOST_ARCH := ppc
 endif

+ifneq (,$(findstring arm,$(UNAME)))
+        HOST_ARCH := armv61
+endif
+
 BUILD_ARCH := $(HOST_ARCH)

 ifeq ($(HOST_ARCH),)
then, I did this (because the raspbian ld doesn't support --icf) :
Quote:
Originally Posted by AdamOutler

so I did a

Code:
pi@raspberrypi ~/adb $ grep -r 'icf=safe' ./*
./build/core/combo/TARGET_linux-arm.mk:			-Wl,--icf=safe \
and I removed that icf parameter.

-->
Code:
pi@raspberrypi ~/buildspace/android/system/build $ git diff
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index b36111f..24e0d99 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -146,7 +146,6 @@ TARGET_GLOBAL_LDFLAGS += \
                        -Wl,-z,relro \
                        -Wl,-z,now \
                        -Wl,--warn-shared-textrel \
-                       -Wl,--icf=safe \
                        $(arch_variant_ldflags)

 # We only need thumb interworking in cases where thumb support
but now I am stuck with this error :
Code:
make -C kernel/samsung/smdk4210 O=/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" headers_install
make[1]: Entering directory `/media/totoext4part/cyanogenmod/system/kernel/samsung/smdk4210'
/media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: 1: /media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Syntax error: "(" unexpected
  CHK     include/linux/version.h
make[1]: Leaving directory `/media/totoext4part/cyanogenmod/system/kernel/samsung/smdk4210'
/bin/bash: r: command not found
make: [/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/lib/crtbegin_static.o] Error 127 (ignored)
target SharedLib: libdl (/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
/usr/bin/ld: error: /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so uses VFP register arguments, /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o does not
/usr/bin/ld: failed to merge target specific data of file /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o
/usr/bin/ld: warning: creating a DT_TEXTREL in a shared object.
collect2: ld returned 1 exit status
make: *** [/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so] Error 1
I don't really know what I have to do and if it is because the HOST is an arm arch...

It have been a long time since I didn't put my hands in this kind of things and I need help to solve this problems... Thanks in advance !
The Following User Says Thank You to cmoatoto For This Useful Post: [ View ] Gift cmoatoto Ad-Free
30th January 2013, 04:32 PM |#53  
cdesai's Avatar
Recognized Developer
Flag IN YOUR HEAD
Thanks Meter: 4,122
 
Donate to Me
More
Re: Adb for Raspberry pi
Building the full Android source code on a raspberry pi isn't a good idea.

Anyways, remove the slash from the end of the line above the line you modified in TARGET_linux-arm.mk
30th January 2013, 04:39 PM |#54  
Junior Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by cdesai

Building the full Android source code on a raspberry pi isn't a good idea.

Anyways, remove the slash from the end of the line above the line you modified in TARGET_linux-arm.mk

I know it's not the best idea but it's quite a challenge...

Why removing the "\" ? If I do so, TARGET_GLOBAL_LDFLAGS will not add $(arch_variant_ldflags) and there is no reason for that.

Can you explain? Thanks for your help !

BTW, the dedicated thread is now http://forum.xda-developers.com/show....php?t=2125278
17th February 2013, 03:49 PM |#55  
Junior Member
Thanks Meter: 0
 
More
HI all,

I have been using the binary provided by AdamOutler on my pi for a while now with out a problem, though today I updated my nexus 4 to 4.2.2 and now I am not able to adb into my device.

I think that this is not working due to the USB Debug Whitelist now implemented in 4.2.2. Does anyone know away to get this to work as I am not receiving a pop up on my device asking me if i wish to add the pi to a white list ?

Thanks
17th February 2013, 05:32 PM |#56  
io53's Avatar
Senior Member
Thanks Meter: 258
 
More
Adb for Raspberry pi
Quote:
Originally Posted by 5959823882589924

HI all,

I have been using the binary provided by AdamOutler on my pi for a while now with out a problem, though today I updated my nexus 4 to 4.2.2 and now I am not able to adb into my device.

I think that this is not working due to the USB Debug Whitelist now implemented in 4.2.2. Does anyone know away to get this to work as I am not receiving a pop up on my device asking me if i wish to add the pi to a white list ?

Thanks

You need a newer version of adb.


Sent from my iPad using Tapatalk HD
18th February 2013, 09:01 AM |#57  
Quote:
Originally Posted by 5959823882589924

HI all,

I have been using the binary provided by AdamOutler on my pi for a while now with out a problem, though today I updated my nexus 4 to 4.2.2 and now I am not able to adb into my device.

I think that this is not working due to the USB Debug Whitelist now implemented in 4.2.2. Does anyone know away to get this to work as I am not receiving a pop up on my device asking me if i wish to add the pi to a white list ?

Thanks

You want this one for the PI [ http://forum.xda-developers.com/show....php?t=2047891 ] version 1.0.31 , it "should" work with 4.2.2 as the USB whitelisting was added to adb months ago. If it doesn't work let me know and I'll build a fresh one

Thanks
The Following 2 Users Say Thank You to trevd For This Useful Post: [ View ]
18th February 2013, 12:26 PM |#58  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by trevd

You want this one for the PI [ http://forum.xda-developers.com/show....php?t=2047891 ] version 1.0.31 , it "should" work with 4.2.2 as the USB whitelisting was added to adb months ago. If it doesn't work let me know and I'll build a fresh one

Thanks

Thank you, that one worked perfectly
30th January 2014, 06:15 AM |#59  
Member
Flag Downey
Thanks Meter: 16
 
More
I know this thread is really old and there is probably a tutorial out there. But, I feel like I am close to completing this on my own. I have ZERO linux experience. I am running the latest Raspbian version. I am stuck at "make install". I think I have properly downloaded the zip and extracted. Since a Makefile was supplied I skipped the "$ ./configure" step and went straight to "$ make". It popped up a few errors, missing bison and libncurses5-dev. Installed those and ran "$ make" again and got "Install: /out/host/linux-armv6l/bin" Then I tried "$ make install" again and received an output of "make: *** No rule to make target 'install'. Stop."

What am I missing? I tried changing directories to /home/pi/mypart/out/host/linux-armv6l/bin. I tried running the "make install" as root. Looking for a little direction. Thanks in advance.
5th March 2014, 06:31 PM |#60  
Junior Member
Flag Nijmegen
Thanks Meter: 0
 
More
Nice.
9th March 2014, 04:59 PM |#61  
5ft24's Avatar
Senior Member
Flag Bellingham
Thanks Meter: 122
 
More
Quote:
Originally Posted by 08BajaBoy

I know this thread is really old and there is probably a tutorial out there. But, I feel like I am close to completing this on my own. I have ZERO linux experience. I am running the latest Raspbian version. I am stuck at "make install". I think I have properly downloaded the zip and extracted. Since a Makefile was supplied I skipped the "$ ./configure" step and went straight to "$ make". It popped up a few errors, missing bison and libncurses5-dev. Installed those and ran "$ make" again and got "Install: /out/host/linux-armv6l/bin" Then I tried "$ make install" again and received an output of "make: *** No rule to make target 'install'. Stop."

What am I missing? I tried changing directories to /home/pi/mypart/out/host/linux-armv6l/bin. I tried running the "make install" as root. Looking for a little direction. Thanks in advance.

You have to run the configure... it sets up the makefiles with the proper compiler flags and finds all the libraries not included in the source that are part of the Linux distribution itself. It will also let you know if any of the distro software is missing needed libraries, or if they are the wrong version.

Sent from my SCH-I535 using xda app-developers app
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes