Monday, August 17, 2009

Android -- Free but not Open



This is what my basketball coach used to say to me when I made a bad pass. "Michael, nice try the guy was free but not open." This is exactly how I feel about Android. Nice try but not completely open. As some of you know, work has been ongoing to get the full Android stack running on Ubuntu. There are some major roadblocks in doing so. If one looks at the source code for Android there are some major pieces missing in the git tree. 1. No Google Maps application 2. No Marketplace 3. No Google login service code. Number three is a big one. Without this code, you can not use most of the Google applications that require Google for its back end. So -- when trying to launch Google Calendar, you get the following stack trace.


W/dalvikvm( 9037): threadid=49: thread exiting with uncaught exception (group=0xf2708df8)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at android.os.Process.invokeStaticMain(Process.java:288)
at android.os.Process.access$000(Process.java:43)
at android.os.Process$1.run(Process.java:243)
at java.lang.Thread.run(Thread.java:1058)
Caused by: java.lang.reflect.InvocationTargetException
at android.app.ActivityThread.main(ActivityThread.java:3948)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at android.os.Process.invokeStaticMain(Process.java:276)
... 3 moreW/ActivityManager( 9037): Unable to start service Intent { action=android.accounts.IAccountsService comp={com.google.android.googleapps/com.google.android.googleapps.GoogleLoginService} }: not found



Wednesday, June 3, 2009

Video of Android on Jaunty UNR

I wanted to post a little video of Android running on Jaunty UNR. Some people saw this at UDS, Barcelona. But if you didn't -- here you go.


video

Here is a larger version on YouTube.

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.