Updated images for Android KitKat on BeagleBone Black

I have updated the internal eMMC flash and sdcard images for BeagleBone Black. Most changes are to make U-Boot work better with fastboot, especially to make it possible to enter fastboot without having to type "fastboot" at a U-Boot prompt and so avoid the need to have a serial cable. Also, I have increased the sizes of the system and userdata partitions so that you can install more apps. I am still using Android KitKat 4.4.4 and TI Linux 3.2 kernel with SGX accelerated graphics libraries.

Improvements to eMMc

  • Added sparse image format to U-Boot, see http://2net.co.uk/tutorial/android-sparse-image-format for a detailed description
  • Made U-Boot default to fastboot if autoboot fails
  • Turn on user LED 0 when in fastboot mode
  • Added code to Linux to make "adb reboot bootloader" work
  • Increased system partition from 256 MiB to 512 MiB
  • Increased userdata partition from 256 MiB to 1047 MiB

Improvements for SD card

  • Increased system partition from 256 MiB to 512 MiB
  • Increased userdata partition from 256 MiB to 2560 MiB

Installing Android on internal eMMC flash

You will need

  • A BeagelBone Black rev A/B/C
  • A micro SD card of any capacity since you are only going to use the first 70 MiB to write a small flasher image
  • The mini USB to USB A cable supplied with the BeagleBone
  • A 5V power supply because the current used when writing to the eMMC chip may exceed that supplied by a typical USB port. See this page for examples: http://elinux.org/Beagleboard:BeagleBone_Black_Accessories.
1. Get http://2net.co.uk/downloads/bbb-android/BBB-aosp-4.4.4_r1-emmc-2014-09-12.zip and unzip it
(If you want to build from scratch, follow the instructions in README.md at https://github.com/csimmonds/bbb-android-device-files/tree/kk4.4-fastboot)
2. Plug the microSD card into your card reader: it will show up as something like /dev/mmcblk0 or /dev/sdc. Make absolutely sure that you know which it is before continuing because hard drives also show up as /dev/sd* and writing this image to your hard drive will make your computer unbootable!. Unmount all partitions that have been automounted on the card. Next, assuming that the card reader is mmcblk0, write the image using a command like this:
$ sudo sh -c "unzip -p u-boot-bbb-fb-2014-09-12.img.zip | dd of=/dev/mmcblk0 bs=1M"

3. With no power on the BeagleBone, insert the microSD card
4. BeagleBone Black in fastboot modePress and hold the 'Boot button' on the BeagleBone, power up the board using the external 5V power connector and release the button after the fastboot LED lights up
5. Plug in the USB cable between the mini USB port on the BeagleBone and the PC. Then, using the fastboot command from the Android SDK or an AOSP build, check that the BeagleBone has been detected by typing (on the PC)
$ fastboot devices
90:59:af:5e:94:81	fastboot

6. If instead you see
$ fastboot devices
no permissions	fastboot

Add this line to /etc/udev/rules.d/51-android.rules

SUBSYSTEM =="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="d022" , MODE="0666"

Then unplug the mini USB cable and plug it back in again. Check that the permissions problem has gone away.

7. Use fastboot to format the eMMC chip and then flash the images
$ fastboot oem format
$ fastboot flash spl MLO
$ fastboot flash bootloader u-boot.img
$ fastboot flash boot boot.img
$ fastboot flash system system.img
$ fastboot flash userdata userdata.img
$ fastboot flash cache cache.img

8. Power off the board and remove the SD card
9. Power on again. Your BeagleBone will boot into Android!

Installing Android on sdcard

You will need

  • A BeagelBone Black rev A/B/C
  • A micro SD card of at least 4 GiB
  • The mini USB to USB A cable supplied with the BeagleBone
1. Get the pre-built image from http://2net.co.uk/downloads/bbb-android/BBB-aosp-4.4.4_r1-sd-img-2014-09-12.zip
(If you want to build from scratch, follow the instructions in README.md at https://github.com/csimmonds/bbb-android-device-files/tree/kk4.4-sdcard)
2. Plug the SD card into your card reader: it will show up as something like /dev/mmcblk0 or /dev/sdc. Make absolutely sure that you know which it is before continuing because hard drives also show up as /dev/sd* and writing this image to your hard drive will make your computer unbootable!. Assuming that the card reader is mmcblk0, write the image using a command like this:
$ sudo sh -c "unzip -p BBB-aosp-4.4.4_r1-sd-img-2014-09-12.zip | dd of=/dev/mmcblk0 bs=4M"

3. With no power on the BeagleBone, insert the microSD card
4. Press and hold the 'Boot button' while powering up by plugging in the mini USB cable. After a minute or so it should boot into Android

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

how to Access the i/o from an Android program

Once the android os is running on the bbb, how can the i/o lines be read/write from an android app?

can't flash system.img to eMMC

Hi,

I tried to flash this image to my BBB's eMMC.
I followed all the stages in the eMMC part.
But when I try:
fastboot flash system system.img I get:
FAILED (remote: data too large)
on the serial terminal I see only the following line:
Starting download of 267346824 bytes

Do you have any idea how can I fix it?

Thanks,
Dvir

new error while booting android from eMMC

Ok,

I managed to solve this error.
It seems like I used an old image of u-boot which didn't support sparse images.

However, now that I managed to flash all the images to the eMMC when I boot the BBB I get the following message in the serial terminal during boot:
"binder: 57:57 transaction failed 29189, size 0-0"
This message first appears after about 7 seconds from boot, and then the terminal keeps printing it over and over again, and android won't boot.

I also tried to boot from the SD card using the sd image, and it worked perfectly.

Any idea how to fix it?

Thanks,
Dvir

Changes to /

Hi

I need to insert some files into /data and /system, and modify the init.rc file. I've done this using adb push/pull however on reboot I believe the changes are being overwritten? How can I go about achieving this?

Jake

mk silly problem

Hi,
i;m tring to add a property to default.prop.
For doing so I'm adding this lines to main.mk:

rild.libpath=/system/lib/libreference-ril.so
rild.libargs=-d /dev/ttyACM0

but when i make the entire compilation in my default.prop file i find:

rild.libpath=/system/lib/libreference-ril.so
rild.libargs=-d
/dev/ttyACM0

It seems that -d or space after -d act as a newline...

I know it is a stupid question, but i'm going crazy with it.. what can be the solution? With the default.prop in this way the RIL remain not correctly configured.

Another question. In you KK4.4.4 the telephony part is included or do i have to do something else?

Thank you so much.
Gianmaria

Setting system property for rild

You don't need a space after "-d". This works:
rild.libargs=-d/dev/ttyO0

USB camera support

How can we add USB camera support to this OS? If it's already pre built, then please instruct me as to how I can enable and use it?

Re: USB camera support

It is possible: you would need to compile the kernel with the drivers for your camera and add the appropriate camera HAL to Android. I may get round to doing these things one day, but they are not high on my list of priorities. However, all the source code is out there, so anyone can do it.

Smaller HDMI display

Hello, I am trying to use a 800x480 LCD screen from adafruit which connects to the board via HDMI, could you help me modify the default size of the BeagleBone's output? I read that the way to do this on Android is by modifying the uEnv.txt on the boot folder, but it is not working for me on this version (I am using the pre-built SD image) and I have not been able to any other solution.

Thank you in advance.

Re: Smaller HDMI display

Usually, the HDMI framer works out the screen resolution and configures itself accordingly. But, according to this page: http://elinux.org/Beagleboard:BeagleBoneBlack_HDMI, the BBB does not support 800x480

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Youtube and Vimeo video links are automatically converted into embedded videos.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.