Android running on BBB with Linux 3.8

I’m trying to get caught up on all of the mails coming in asking questions, so I’ve been a bit behind.

Thanks for the update Andrew

I was used HDMI port with adapter to VGA and supply power external 5V for cable VGA.It worked
and now. i need to programing uart 0,get and send data.how to turn off mod debug on uart 0.
I test with this app https://code.google.com/p/android-serialport-api/ , then receive message “You do not have read/write permission to the serial port.”
Someone say:" need too root device or set permision 777".

tomorow ,i will set up ADB and debug with eclipse,then i will report .
did anyone use to get and send date with serial 0?
thanks
phuong le

Andrew, thanks for this image, got it working after fiddling with the
video resolution. More precisely, I could see that it was working
when I found the right res. Here’s what I found:

  1. Android doesn’t ask to be Google-activated. When I got my Android
    phone, I couldn’t use it until I signed in with my Google account. No
    big deal, I don’t really intend to lug it around. However…

  2. I did manage to side-load the Google Play app, along with the GMail
    app. They won’t run however, probably because I hadn’t activated the
    device. (I’m supposed to supply a one-time device-specific password
    but couldn’t find anything in the Settings. I tried the Accounts item
    under Settings, got email and one other that I don’t remember at the
    moment. I entered my Google credentials, and Android told me that I
    needed a device-specific password (or something like that).

  3. The browser hangs now and then and asks me whether I want to wait
    or force-close.

There is no SGX graphics acceleration available so you are seeing the FCs. I plan to check if the present SGX libraries in rowboat can be made to work with 3.8 kernel.

  1. The entire environment is slow, my mouse laggy. Wondering if my
    monitor has anything to do with it. I’ve posted a photo of the back of
    my monitor in another thread, but for your reference: dick smith LCT
    TV with DVD Player, MODEL: GE6607. Other markings: DSE11080793, N19
    GE6607, for whatever they may be worth. I don’t remember at the moment
    what res I entered in uEnv.txt

Again due to lack of SGX acceleration.

  1. Again, I don’t know if it’s my monitor and/or its resolution, but I
    don’t get sound off the HDMI cable. For whatever it may be worth, I
    don’t get sound either from my ThinkPad running FreeBSD 9.x. Never did
    have the chance to test it with Windows (Vista Home Basic).

I’m not sure if the audio HAL can handle HDMI audio.

  1. Just for reference, I tried it with a lower res (480x???) and parts
    of the output didn’t make it to the screen. E.g., I don’t see the
    Back+Home+Task button at the bottom of the screen. Changing it to a
    higher res fixed that some. And now it occurs to me that maybe I can
    see the hidden parts of the output by scrolling?

At lower resolutions (e.g. 800x480 on the LCD7) you may see a black strip on the right side. This is supposed to be the Nav bar but the buttons actually don’t show.

-Vishveshwar

adb over usb and Android Composite Gadget probably needs some additional kernel patches to be picked from the google android kernel tree.

-Vishveshwar

Thanks. Adding the gadget driver seems to enable it, but getting a bunch of USB
errors on the host:

usb 1-4.1: new high-speed USB device number 44 using ehci_hcd
usb 1-4.1: no configurations
usb 1-4.1: can’t read configurations, error -22

Hello all. I wanted to let you all know that I’ve gotten the LCD3, LCD4, and LCD7 capes all working with Android on the BBB. Both video and touchscreen input work well.

LCD3: http://i.imgur.com/MKqCrgw.jpg
LCD4: http://i.imgur.com/OCw6IUE.jpg
LCD7: http://i.imgur.com/RH6wOWI.jpg

For anyone interested in using these capes, I’ve included instructions at the bottom of the Android building page: http://icculus.org/~hendersa/android

Andrew

Great work Andrew! In other good news, I was able to boot your latest image w/ LCD3 by flashing it with Win8 and a 8gb microSD card after trying several times. For some reason it automatically boots without needing to press the boot button while applying power as mentioned in the instructions. This is where I was tripping up on before.

Next I am planning to get your image working with the following 7inch LCD cape from chipsee: http://www.chipsee.com/product/evm/beagle/bbb-exp-c.html?___store=english&___from_store=default
It looks like they include their own android image and source. Do you have any pointers on getting your image to work with this cape?

That might be a bit tricky. I suspect that they are running an Android that is based off of the Linux 3.2 kernel (and probably based off of Rowboat or the TI EVM reference SDK). If that is the case, the device tree mechanism that is present in Linux 3.8 won’t be there. The cape features will be “hard-coded”, per se, into their kernel. That makes supporting that cape for 3.8 tricky, since the hard-coded functionality needs to be changed over to device tree format. While it should be straightforward to set up the device tree structure by following the pin muxing of the hard-coded cape driver in their kernel, you still have to get the cape’s firmware built.

While there are a few interface differences between Linux 3.2 and 3.8, the big difference from the BBB’s view is that of the device tree, firmware, and capebus support. Which, unfortunately, is what “cape support” actually is.

Now, that all being said, it should be doable. It just won’t be doable from a “tweak this config file and you’re good to go”. It will take some engineering effort. If I’m wrong about the kernel that they are using and it is actually a 3.8 kernel their Android is based off on, then it should be more of a “tweak the config file” solution to get it working.

Andrew

This is proving to be trickier than I though. Any pointers to getting a shell on the
serial interface in the mean time? It shows a root prompt, but does not accept
commands. I can see kernel output though.

I got a serial debug cable (which was very helpful) and a different BBB. The serial console with the board I’ve been having problems with indicated that the SD card wasn’t being found. Taking the same uSD (Kingston 8GB) to a different BBB worked (other than not having to press the boot button). Trying a second card (SanDisk 32MB) also worked so I’m convinced my problem was a board problem.

I ended up using Ubuntu running under VMWare w/ a USB uSD card reader to create the images. I haven’t gone back to try to do the same with the Win32 imager.

Thanks for all the support.
Roy

I saw the post on the LCD3 and removed just the video=720x480-16@60 part of that line in uenv.txt. That left the qemu=1 and the vt.global_cursor_default=0 portion of the line. Is that correct?

The reason I ask is that with an LCD on my (now sucessfully booting Android new BBB) I can see the clock in the right corner and it looks like it’s scaled correctly for the display, but I don’t see the rest of the desktop and the panel seems unresponsive to touch.

Thanks
Roy

It sounds like you have everything set up correctly. The “qemu=1” disables hardware graphics acceleration (SGX) because it is not yet supported in the 3.8 kernel. “vt.global_cursor_default=0” gets rid of the annoying blinking cursor on the framebuffer. The touchscreen should work, though it isn’t all that responsive around the edges. Try testing it out with a USB mouse and making sure that it looks and acts like what you would expect. If you move the mouse and don’t see the cursor, then let us know. Also, do you see any thrown exceptions from apps via the FTDI interface? If you accidentally inserted a line break into the bootargs line and moved the “qemu=1” off the bootargs line, then apps will be crashing left and right, leading to the missing desktop.

Is the Android loading animation (the “Android” text with the reflection moving across it) pretty fast? If it really, really slow, then the resolution setting isn’t quite right and touchscreen won’t work. This shouldn’t be a problem if you completely remove the “video=” option from the kernel bootargs, though. The only time that I’ve seen touchscreen not work is when I’ve explicitly specified a resolution with “video=” in the bootargs.

Andrew

Thanks Andrew…you were right on. I did insert a line break (more ignorance than accident when I edited the file. Fixed that and now my screen looks like yours.

Roy

No luck with the merged Android gadget driver, but it mostly works using the
Function Filesystem driver as described below. The only problem I have is

that the serial number shows as ‘???’ which Eclipse doesn’t like.

https://plus.google.com/111524780435806926688/posts/AaEccFjKNHE

Also add something like this to init.usb.rc, etc.:

on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000

Adding ‘g_ffs.iSerialNumber=’ to uEnv.txt fixes that.

Great stuff. Just tried the latest image with my LCD4 and it’s all working nicely.

One thing I can’t seem to do is get back to the home screen with just the screen. With a mouse plugged in I can click on the furthest right pixel and then it goes to the home screen. But I can’t touch this far line on the touch screen it appears. Could the buttons on the board be reconfigured somehow?

I apologize in advance for being a complete newbie to Linux, but I read the instructions provided, and does this mean that if we just use the pre-built image at the link below, we don’t have to follow the rest of the instructions on the page for building Android yourself? Thanks : )

That is correct. The pre-built image is there to help you get started using Android right away. You do not need to follow all of my build instructions unless you are interested in building your own Android image for the BBB. Rather than looking at the build instructions and getting confused, try following the instructions on the CircuitCo wiki:

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

Then, if you decide later that you’d like to try making a complete Android image yourself from scratch, you can follow my build instructions.

Andrew

Hi Nelson ,
Thanks for all your efforts in adding support for BBB.
I ported your Android Image On My BBB which i used for Device driver Testing.But with this build my mini usb is not detected with lsusb command thus i not able to use adb on usb.
Can you please help me out finding way to enable Mini Usb on BBB.

Thanks
Amit