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)