2. Who am I?
20+ years involved in embedded systems
10 years in real time OS, such as iTRON
10 years in embedded Java Virtual Machine
Now GCC, Linux, QEMU, Android, …
Blogs
http://d.hatena.ne.jp/embedded/ (Personal)
http://blog.kmckk.com/ (Corporate)
Twitter
@tetsu_koba
2
3. Today's topic
Quick summary of previous
Japan Technical Jamboree
Running Android on Ubuntu
Demo!
3
4. Targeted Audience
Already using Linux in your project
Have interest in Android
Thinking how to migrate to
Android
For developers, not for end-users.
4
5. Quick Summary of previous
Jamboree
“Reusing your software on
Android”
http://elinux.org/Japan_Technical_Jamboree_34
Running your software on Android
Rebuilding for Android
Just copy binary
Running Android on your Linux
Today, I focus on this. 5
6. Running Android on your Linux
Running whole Android system
framework on your existing Linux
environment.
Co-existing Android processes
and your existing Linux processes.
user space device drivers
daemon processes
I show you a quick hack to do this. 6
7. Running Android on your Linux
Android
Android
Your existing Linux user land
Android-patched Linux kernel
Android-patched Linux kernel
7
8. Let's try Android on Ubuntu
Today, I use Ubuntu as one of the
existing Linux system.
Running only a few processes on
Ubuntu
No GUI
Frame buffer is not used from Ubuntu
sshd to remote login
You can use 'apt-get' to install any
packages as you like. 8
9. How to make root file system of
ARM Ubuntu
'rootstock' is a very nice tool to make arm
root file system on x86 Ubuntu 10.04
$ sudo apt-get install rootstock
$ mkdir arm-ubuntu
$ cd arm-ubuntu/
$ sudo rootstock --fqdn arm-lucid --login
user --password user --seed openssh-server
It takes more than 10 minutes ...
$ mkdir root
$ cd root
$ sudo tar xvpf ../armel-rootfs-201005031740.tgz
9
11. How to run Android on Ubuntu
Port Android to your board
Run ARM Ubuntu on your board
with Android-patched Linux kernel
Put all Android files into /android
on Ubuntu
Invoke 'sudo chroot /android /init'
on Ubuntu
12. Trouble shooting
Vold & netd processes caused SEGV
Some how, I fiexed
The patch is on my blog
system/core/libsysutils/src/NetlinkEvent.cpp
http://blog.kmckk.com/archives/2965337.html
After patched, vold & netd seems to
work fine.
SD card is available from Android
12
13. Android lunched successfully
As of today, configuring LAN/WiFi only
from Ubuntu.
Internet connection is available on Android
You can browse internet by Android browser.
You can use Eclipse to install and debug
Java applications.
SD memory card is also available.
SMP kernel works fine on KZM-CA9-01
board(Quad-Core Cortex-A9)
13
16. Summary of this hack
Use Android patched kernel
Nothing to modify in Ubuntu
Screen(framebuffer device) and
key & touch input are used only
from Android
Very easy. Try it!
16
17. Through this trial, I found …
Not so difficult to run Android on
the existing Linux system
Ubuntu has many familiar tools
such as strace, ifconfig, iwconfig...
These are all available with
Android.
Useful when trying new device driver
17
18. Next step
How manage I/O devices?
Frame buffer
Layered frame buffer and set transparency
/dev/fb0 for Android, /dev/fb1 for Ubuntu
How communicate between Ubuntu &
Android?
At least, socket is available.
Ashmem for shared memory?
Binder?
(I succeed to start Android application from
Ubuntu shell, by some tricky way)