Android running on BBB with Linux 3.8

I don’t like to leave threads unresolved (in case someone is searching the archives when experiencing a similar problem), so here is what we found out. The problem was that the Android image was dd’d to the microSD card while it was still bzip2 compressed. Once it was bunzip2’d and dd’d to the card, everything was fine. The compressed image has a .img.bz2 extension and is around 700 megs in size, and the decompressed image has a .img extension and is closer to 4 GB in size. Under Linux, you can use bunzip2 to decompress the image. Under Windows, you can use a utility like 7zip (http://www.7-zip.org/download.html).

Andrew

Sorry I didn’t get a chance to try this last night, family things took over yesterday. I will try over the weekend though.

Pete

For those who are wondering about how to install it on Windows, here's
the link to the wiki:

http://circuitco.com/support/index.php?title=Android

Used Keka inplace of 7zip on mac and dd’d to sd card…for Mac folk. Worked like a charm. Watch out for the prompt to use “.img.bz2 inplace of .bz2 for proper extension.” You will end up with a .img.img.bz2 file. I bit at that…but just once…and in a weak moment. So just .bz2 and Bob’s your frickin uncle.

I wanted to let everyone know that I uploaded a new copy of the Android image. I took some measurements during the build process so that I could document the total time required to build Android from source (about 6 hours) and the hard drive space needed (about 35 GB). The download link for the image is still the same: http://icculus.org/~hendersa/BBB_JB_Android_3_8_13.img.bz2

In this image, I built Robert Nelson’s kernel without disabling anything, which should allow people with supported cape boards and USB/Bluetooth peripherals to use them with Android. I got rid of that blinking framebuffer cursor with the proper setting in uEnv.txt. I also copied all of the built kernel modules and firmware into the Android filesystem. My previous build had no modules or firmware in it, so any capes that were dependent upon firmware definitely wouldn’t work.

This image is a “first run” image, meaning that it will be like turning your Android system on for the first time. It will take about 2.5 minutes to start up and get to the “welcome to your device” screen. On subsequent runs, it will only take about a minute or so to get started.

I used this build as a test of my build instructions from scratch, and I did find a few trivial details that I neglected to mention. These items have been addressed and added into my instructions at: http://icculus.org/~hendersa/android

Andrew

btw: for 'some' of the capes to work fully, you need the patched
device-tree-compiler 'dtc', since I didn't see this mentioned in your
directions, i figured i'd better point it out, just in case..

Here's a quick script to build the patched dtc, till the '@' option
hits mainline dtc:
https://github.com/RobertCNelson/tools/blob/master/pkgs/dtc.sh

wget -c https://raw.github.com/RobertCNelson/tools/master/pkgs/dtc.sh
chmod +x dtc.sh
./dtc.sh

Regards,

I have two other questions:

One: How can I get Wifi on the Black when it is running Android? I am using this Wifi dongle: http://www.adafruit.com/products/814, and a tutorial to set it up with a BeagleBone White: http://learn.adafruit.com/beaglebone/wifi.

Two: How can I get the BeagleBone Black to recognize the rest of the space on the microSD card? I want to use the rest of the space on the microSD card for storage for apps and games for Android to run.

You know, I actually followed these steps when I built my Android image, and in my directions I told people to follow the steps in the “Linux Kernel” section of your wiki. Since the instructions for installing the modified dtc were in that section, I figured that people would just do EVERYTHING listed in that section and install the dtc also. But, I suppose that isn’t very clear, and some folks might jump the gun and head straight to grabbing the kernel source. I didn’t want to copy all of the steps verbatim from your wiki, in case you decided to make a minor change here or there, but I might as well just include every step in my instructions to keep people from getting confused.

Andrew

Hey, so i got the img running on my BBB just fine. It seems all the system functionality is working fine but i am having a problem getting apps onto the SD card. Whenever i try downloading anything from the web browser, it either crashes before the download or just completely ignores the download. I tried putting an APK on a thumbdrive and plugged it into the BBB and under storage/usb1 the folder is there for it but the folder is completely empty.

any suggestions on getting an apk on the device maybe a different method or maybe i’m doing something wrong?

Thanks in advance

I have tried in vain to get the Android image to boot from uSD card on BBB I followed your directions exactly, tried two different SD cards, tried two different image writers, tried two different downloads, but the results are the same. when I hold down the boot button and power up the board either the LEDs don’t come on at all or the board boots to Angstrom which makes me think the card isn’t being recognized. It was even stranger last night - after multiple attempts Android did boot from the SD card but it was not when I held down the button. I have not been able to repeat that even though I’ve tried all the above.

The SD card is formatted as FAT 32, it looks like all the files are on the card…except I do not have Linux so can’t tell what all the partitions are. Is there a way to boot to Angstrom and mount the SD card? Could it be that I have a faulty board (Rev A5B)? Any suggestions would be much appreciated. I am out of ideas.

Thanks
Roy

If the board boots the original image form the eMMC, then the boards is fine. Check that first. Then work with the uSD image for the Android.

Gerald

The board boots to Angstrom from the eMMC with no problems.

But, still no luck w/ booting from the uSD card. I tried using a Kingston 8GB SDHC card; downloaded the image again, used 7Zip to decompress it wrote the .img file to the SD card using WIn32 Disk imager, all just like the instructions said. Mounted the card under Ubuntu and it recognized 3 partitions, boot, rootfs and usrdata. boot and rootfs had what I expected. usr data was empty except for lost+found.

Same thing, though, when I installed the card and tried to boot to Android. Held button down, applied power, continued to hold button down for about 10 seconds. Nothing - no LEDs lit, no Android boot. don’t hold the button and apply power and Angstrom starts up. Is there any way to tell what’s happening during booting? I can’t figure out how to get the console working - until the system partially boots COM3: (the com port assigned to the BBB) is not recognized.

I read somewhere that if the MLO file on the eMMC card is deleted than the board will be forced to boot from the SD Card. Is that something to try? If so, rather than deleting the file can I just rename it to something different will that accomplish the same thing? At least then I’d know whether the SD Card was being recognized.

I am out of ideas. Today I tried a right-out-of-the-package 4GB SDHC card but the image is too big to load (Win32 imager said not enough room on the card). What else can I try? I’m starting to re-think that there is something wrong with the board or with the pushbutton.

Thanks
Roy

June 23, 2013 6:57:10 AM UTC-7, Gerald wrote:

Hey Roy, I am having the exact same problems as you. I followed the same steps and I am getting the same result. If it helps at all, I tried with the HDMI out, and the LCD3 shield. I also played with the resolutions to no avail.

Sounds to me like the boot button works, otherwise pressing or not pressing the button would get you the same result. Have you looked at the sd socket to make sure all the pins are making contact? Have you tried booting anything else from sd? Have tried to see if you can mount the sd from uboot or at least see if it is visible? Have you formatted sd like the BBB wiki states?

I know that these are a lot of questions but they should help to isolate the problem.

-Wil

The board boots to Angstrom from the eMMC with no problems.

But, still no luck w/ booting from the uSD card. I tried using a
Kingston 8GB SDHC card; downloaded the image again, used 7Zip to
decompress it wrote the .img file to the SD card using WIn32 Disk
imager, all just like the instructions said. Mounted the card
under Ubuntu and it recognized 3 partitions, boot, rootfs and
usrdata. boot and rootfs had what I expected. usr data was empty
except for lost+found.

Same thing, though, when I installed the card and tried to boot to
Android. Held button down, applied power, continued to hold button
down for about 10 seconds. Nothing - no LEDs lit, no Android boot.
don't hold the button and apply power and Angstrom starts up.

This sounds like the 'Bone isn't recognizing your SD card for some
reason. If you have an SD card inserted and boot without pressing the
boot button, uboot is read off the eMMC but the _very_ first thing it
does is look to see if there is an sd card inserted. If there is, the
eMMC uboot will switch to the sd installed uboot (regardless of
whether or not the sd card contains a boot loader or is even formatted).

So...if you're getting Angstrom to boot out of the eMMC memory *WITH*
an SD card installed, there is something very wrong. If you have any
recognized SD card installed, you should either get the boot image off
the SD card, or the 'Bone will be "hung" at the uboot prompt on the
serial console.

If you hold down the pushbutton, you force the 'Bone to boot directly
off the SD card (bypassing the uboot on the eMMC).

That you're getting Angstrom to boot when you have an SD card
installed, and no boot when you hold down the pushbutton all indicates
your SD card is not being recognized by the system. I'd check for any
bent pins, make sure the SD card is fully inserted, etc.

Is there any way to tell what's happening during booting? I can't
figure out how to get the console working - until the system
partially boots COM3: (the com port assigned to the BBB) is not
recognized.

Use a USB serial cable. IMHO this is required equipment for anyone
working with the BBB.

I read somewhere that if the MLO file on the eMMC card is deleted
than the board will be forced to boot from the SD Card. Is that
something to try? If so, rather than deleting the file can I just
rename it to something different will that accomplish the same
thing? At least then I'd know whether the SD Card was being
recognized.

Your SD card is *NOT* being recognized. You don't have to mess with
the eMMC to know that (see above).

I am out of ideas. Today I tried a right-out-of-the-package 4GB
SDHC card but the image is too big to load (Win32 imager said not
enough room on the card). What else can I try? I'm starting to
re-think that there is something wrong with the board or with the
pushbutton.

It sure sounds like there could be a physical problem with the SD card
socket.

- --
Charles Steinkuehler
charles@steinkuehler.net

Elsewhere in this group is a similar thread (maybe this one ), and a solution was to power the 'bone through the mains, not through the USB port.

I’ve been having the same problems, tried an AC/DC adapter and still didn’t get anywhere. Had the adapter tested, and it was defective. Still haven’t had the time to get a new one, but I’m hoping that a new adapter will get me booting from the uSD

Trying to get caught up with all the posts…thanks everybody:

o On did I check the SD socket. I checked for bent pins, poor solder joints, etc. Nothing showed up under a lighted magnifier. In fact I could see scratch marks on the SD card where the pins on the socket made contact. All of the scratches were about in the middle of the fingers on the SD card so I don’t think there is anything wrong there. Solder joints looked good.

o On booting something else from the SD card. Well, the first time I tried the board I followed the Getting Started guide and updated to the latest Angstrom. That worked as far as I can tell. Curiously, I also got Android to boot once or twice without the button pressed which Charles explained. That was the first night. I have tried multiple cards, multiple images etc. with the same result.,.hold the button apply power, nothing happens,.no LEDs lit.

o Have I tried mounting the card from UBoot? No…I don’t have a USB-Serial cable…yet to check and I don’t get far enough to bring up the virtual serial port.

o Have I formatted the SD card according to the BBB Wiki. I think so. I also tried writing the image from Linux and Windows w/ the same result. Partition-wise there are three partitions…boot, usrdata and rootfs. SD card mounts in both Windows and Ubuntu so I think it’s formatted right.

o On powering through the mains and not the USB. Tried both. Mains power w/ a 5V@1A wall wart that has worked on similar systems in the past.

So, I’ve concluded that this seems like a hardware problem with this board. As somebody pointed out the button is hard to press and hold down so I wonder whether I flexed the board and an internal trace or solder joint is damaged. Requested an RMA from Mouser…after a few exchanges they said OK. Now I’ll need to get a new board and use the same SD card…I’ll post again when I have results.

Roy

RMA requests are not to go to the distributor but to BeagleBoard.org. http://beagleboard.org/support/RMA

http://circuitco.com/support/index.php?title=BeagleBoneBlack#RMA_Support

Gerald

Hey Roy,

Can you create a backup .img of you sd and provide a download link. I would love to test that image on my BBB with several sd cards to see if it works.

-Wil

Okay, I’ve had a second go at it. I’ve tried every combinations of the following:

  1. 2 microSD cards: SanDisk 4GB HC Speed 2, and Kingston 8GB HC Speed 4
  2. 2 power supplies: 5V @ 2amps
  3. 2 BeagloneBone Blacks rev A5B
    I flashed the image on the microSD cards using Win8 64bit w/ DiskImager per the instruction of the wiki: http://circuitco.com/support/index.php?title=Android

I tried unplugging all other connections (USB, Ethernet, LCD Capes etc.) and many different combinations. I did notice that the ethernet port LEDS blink rapidly. Though the 4 user LEDS did not become solid and nothing happened.

Unfortunately, after all this I was not able to boot the Android image by Andrew. I believe the issue lies in the Android image itself.