Tuesday, May 26, 2009

Android Full Screen on Ubuntu

Hacking pays off. I can now run the Android stack on Ubuntu with applications and the launcher running full-screen. Check it out:


Hacking Android on Ubuntu

I have been interested in Android for some time now. Having been a Java developer in my past life, I find it to be a powerful runtime for Mobile devices.

I thought it would be interesting to see if I could run Android applications natively on Ubuntu UNR (Ubuntu Netbook Remix).

It seems like the perfect mesh of technologies. Netbook OS / Mobile Application runtime environment.

My first go at it:
I know that others have built Android for x86. After digging deeper I realized that this is not enough to make it "run" under Ubuntu. It turns out that Android uses it own version of libc and all binaries get linked against that.
This causes a problem when a libc already exists on your system.
To get around this -- I started with the not documented method of building Android against the libc of the host system.


Finally -- it compiles:
Great now I can run Android, right? Not yet. I came to find out that there are many things in the Android code that rely on specific hardware features. For example, is the device powered on? Of course it is on -- we are a computer :)


Running Dalvik VM:
The one thing that I could do was run a simple Hello World Java application
under the Dalvik VM. With the below script I was able to run Java apps compiled down to .dex files. But -- without and use of Android services.

#!/bin/sh
base=`pwd`
# configure root dir
root=$base/out/host/linux-x86/product/sim/system

export ANDROID_ROOT=$root

export ANDROID_PRODUCT_OUT=$ANDROID_ROOT

# configure bootclasspath

bootpath=$root/framework
export BOOTCLASSPATH=$bootpath/core.jar:$bootpath/ext.jar:$bootpath/framework.ja
r:$bootpath/android.policy.jar:$bootpath/services.jar:$bootpath/android.awt.jar: $bootpath/am.jar
# this is where we create the dalvik-cache directory

export ANDROID_DATA=/tmp/dalvik_$USER
mkdir -p $ANDROID_DATA/dalvik-cache
exec $root/bin/am $@




Now on to getting the runtime actually running...

Monday, May 25, 2009

Hello All, and Welcome

Welcome all. I hope this place will be where I can share my experiences with making Ubuntu work on any device I can get my hands on.
I love embedded Linux and anything mobile.