SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
Android on Ubuntu
  For developer

         2010.9.28


   Tetsuyuki Kobayashi

                         1
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
Today's topic

   Quick summary of previous
    Japan Technical Jamboree
   Running Android on Ubuntu
   Demo!



                                3
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
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
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
Running Android on your Linux



                               Android
                                Android



     Your existing Linux user land




        Android-patched Linux kernel
         Android-patched Linux kernel


                                          7
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
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
ARM Ubuntu versions

   10.04 (Lucid) requires armv7
   9.10 (Karmic) requires armv6
   9.04 (Jaunty) requires armv5TE
   (Debian lenny requires only armv4T)
   KZM-CA9-01 board has Cortex-A9
    (armv7)
                                          10
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
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
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
Result of ps command
user@arm-lucid:~$ ps ax
  PID TTY      STAT   TIME   COMMAND
    1 ?        SLs    0:01   /sbin/init                      2417 tty4     SLs+   0:00   /sbin/getty -8 38400 tty4
    2 ?        S<     0:00   [kthreadd]                      2418 tty5     SLs+   0:00   /sbin/getty -8 38400 tty5
    3 ?        S<     0:00   [migration/0]                   2421 tty2     SLs+   0:00   /sbin/getty -8 38400 tty2
    4 ?        S<     0:00   [ksoftirqd/0]                   2422 tty3     SLs+   0:00   /sbin/getty -8 38400 tty3
    5 ?        S<     0:00   [watchdog/0]                    2424 tty6     SLs+   0:00   /sbin/getty -8 38400 tty6
    6 ?        S<     0:00   [migration/1]                   2428 ?        SLs    0:00   cron
    7 ?        S<     0:00   [ksoftirqd/1]                   2454 tty1     SLs+   0:00   /sbin/getty -8 38400 tty1
    8 ?        S<     0:00   [watchdog/1]                    2470 ?        SLs    0:00   sshd: user [priv]
    9 ?        S<     0:00   [migration/2]                   2483 ?        SL     0:00   sshd: user@pts/0
   10 ?        S<     0:00   [ksoftirqd/2]                   2484 pts/0    SLs    0:00   -bash
   11 ?        S<     0:00   [watchdog/2]                    2497 ?        SLs    0:00   sshd: user [priv]
   12 ?        S<     0:00   [migration/3]                   2511 ?        SL     0:00   sshd: user@pts/1
   13 ?        S<     0:00   [ksoftirqd/3]                   2512 pts/1    SLs    0:00   -bash
   14 ?        S<     0:00   [watchdog/3]                    2520 pts/0    SL+    0:00   /init
   15 ?        S<     0:00   [events/0]                      2551 ?        S<L    0:00   udevd --daemon
   16 ?        S<     0:00   [events/1]                      2552 ?        S<L    0:00   udevd --daemon
   17 ?        S<     0:00   [events/2]                      2596 ?        SLs    0:00   /system/bin/sh
   18 ?        S<     0:00   [events/3]                      2597 pts/0    SL     0:00   /system/bin/servicemanager
   19 ?        S<     0:00   [work_on_cpu/0]                 2598 pts/0    SL     0:00   /system/bin/debuggerd
   20 ?        S<     0:00   [work_on_cpu/1]                 2599 pts/0    SLl    0:00   /system/bin/rild
   21 ?        S<     0:00   [work_on_cpu/2]                 2600 pts/0    SL     0:05   zygote /bin/app_process -Xzygote /system/bin
   22 ?        S<     0:00   [work_on_cpu/3]                 --zygote --start-s
   23 ?        S<     0:00   [khelper]                       2601 pts/0    SLl    0:00   /system/bin/mediaserver
   24 ?        S<     0:00   [suspend]                       2602 pts/0    SL     0:00   /system/bin/dbus-daemon --system --nofork
   25 ?        S<     0:00   [kblockd/0]                     2603 pts/0    SL     0:00   /system/bin/installd
   26 ?        S<     0:00   [kblockd/1]                     2604 pts/0    SL     0:00   /system/bin/keystore /data/misc/keystore
   27 ?        S<     0:00   [kblockd/2]                     2605 pts/0    SLl    0:00   /sbin/adbd
   28 ?        S<     0:00   [kblockd/3]                     2613 pts/0    SLl    0:08   system_server
   29 ?        S<     0:00   [ksuspend_usbd]                 2668 pts/0    SLl    0:00   com.android.inputmethod.latin
   30 ?        S<     0:00   [khubd]                         2671 pts/0    SLl    0:00   com.android.phone
   31 ?        S<     0:00   [kmmcd]                         2672 pts/0    SLl    0:01   com.android.launcher
   32 ?        S      0:00   [pdflush]                       2673 pts/0    SLl    0:00   com.android.settings
   33 ?
   34 ?
               S
               S<
                      0:00
                      0:00
                             [pdflush]
                             [kswapd0]   Processes           2701 pts/0
                                                             2728 pts/0
                                                                           SLl
                                                                           SLl
                                                                                  0:00
                                                                                  0:00
                                                                                         android.process.acore
                                                                                         com.android.bluetooth
                                                             2735 pts/0    SLl    0:00   com.android.mms
   35 ?
   36 ?
               S<
               S<
                      0:00
                      0:00
                             [aio/0]
                             [aio/1]     of Android          2744 pts/0    SLl    0:00   android.process.media
   37 ?        S<     0:00   [aio/2]                         2764 pts/0    SLl    0:00   com.android.providers.calendar
   38 ?        S<     0:00   [aio/3]                         2776 pts/0    SLl    0:00   com.android.deskclock
   39 ?        S<     0:00   [nfsiod]                        2786 pts/0    SLl    0:00   com.android.email
   40 ?        S<     0:01   [rpciod/0]                      2796 pts/0    SLl    0:00   com.android.quicksearchbox
   41 ?        S<     0:00   [rpciod/1]                      2807 pts/0    SLl    0:00   com.android.protips
   42 ?        S<     0:00   [rpciod/2]                      2814 pts/0    SLl    0:00   com.android.music
   43 ?        S<     0:00   [rpciod/3]                      2821 pts/0    SLl    0:00   com.cooliris.media
 2297 ?        SL     0:00   upstart-udev-bridge --daemon    2831 pts/1    RL+    0:00   ps ax
 2300 ?        SLl    0:00   rsyslogd -c4                   user@arm-lucid:~$
 2301 ?        S<Ls   0:00   udevd --daemon                                                                                    14
 2378 ?        SLs    0:00   /usr/sbin/sshd
Result of pstree command

           Processes of Android




                                  15
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
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
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)
Demo!
  KZM-CA9-01(Quad core Cortex-A9)




http://www.kmckk.co.jp/eng/kzmca9/index.html   19
Q&A




Thank you for listening!
Any comments to blogs are welcome.

                                     20

Weitere Àhnliche Inhalte

Was ist angesagt?

Kdump-FUDcon-2015-Session
Kdump-FUDcon-2015-SessionKdump-FUDcon-2015-Session
Kdump-FUDcon-2015-Session
Buland Singh
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
Buland Singh
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regression
Susant Sahani
 
Distro Recipes 2013 : Upstream management and consequences on the distributi...
Distro Recipes 2013 : Upstream management and consequences on the  distributi...Distro Recipes 2013 : Upstream management and consequences on the  distributi...
Distro Recipes 2013 : Upstream management and consequences on the distributi...
Anne Nicolas
 

Was ist angesagt? (20)

Vbox virtual box朹oracle linux 5 - shoug æąæŽȘ操
Vbox virtual box朹oracle linux 5 - shoug æąæŽȘ操Vbox virtual box朹oracle linux 5 - shoug æąæŽȘ操
Vbox virtual box朹oracle linux 5 - shoug æąæŽȘ操
 
Systemd cheatsheet
Systemd cheatsheetSystemd cheatsheet
Systemd cheatsheet
 
Kdump-FUDcon-2015-Session
Kdump-FUDcon-2015-SessionKdump-FUDcon-2015-Session
Kdump-FUDcon-2015-Session
 
Kernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your deviceKernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your device
 
CoreOSă«ă‚ˆă‚‹Dockeră‚łăƒłăƒ†ăƒŠăźă‚Żăƒ©ă‚čタăƒȘング
CoreOSă«ă‚ˆă‚‹Dockeră‚łăƒłăƒ†ăƒŠăźă‚Żăƒ©ă‚čタăƒȘングCoreOSă«ă‚ˆă‚‹Dockeră‚łăƒłăƒ†ăƒŠăźă‚Żăƒ©ă‚čタăƒȘング
CoreOSă«ă‚ˆă‚‹Dockeră‚łăƒłăƒ†ăƒŠăźă‚Żăƒ©ă‚čタăƒȘング
 
Systemd mlug-20140614
Systemd mlug-20140614Systemd mlug-20140614
Systemd mlug-20140614
 
DCSF 19 Deploying Rootless buildkit on Kubernetes
DCSF 19 Deploying Rootless buildkit on KubernetesDCSF 19 Deploying Rootless buildkit on Kubernetes
DCSF 19 Deploying Rootless buildkit on Kubernetes
 
Docker 활용ëȕ: dumpdocker
Docker 활용ëȕ: dumpdockerDocker 활용ëȕ: dumpdocker
Docker 활용ëȕ: dumpdocker
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
Small, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the MicroscopeSmall, Simple, and Secure: Alpine Linux under the Microscope
Small, Simple, and Secure: Alpine Linux under the Microscope
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
 
Docker practice
Docker practiceDocker practice
Docker practice
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
 
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regression
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Distro Recipes 2013 : Upstream management and consequences on the distributi...
Distro Recipes 2013 : Upstream management and consequences on the  distributi...Distro Recipes 2013 : Upstream management and consequences on the  distributi...
Distro Recipes 2013 : Upstream management and consequences on the distributi...
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and Analysis
 

Ähnlich wie Android On Ubuntu for developer

BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
Brendan Gregg
 
CCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLI
CCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLICCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLI
CCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLI
HoĂ ng HáșŁi Nguyễn
 
Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance
Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance
Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance
Ceph Community
 

Ähnlich wie Android On Ubuntu for developer (20)

vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29
 
Analysis of Compromised Linux Server
Analysis of Compromised Linux ServerAnalysis of Compromised Linux Server
Analysis of Compromised Linux Server
 
Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environments
 
Azure Kubernetes Service - benefits and challenges
Azure Kubernetes Service - benefits and challengesAzure Kubernetes Service - benefits and challenges
Azure Kubernetes Service - benefits and challenges
 
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
 
Run Run Trema Test
Run Run Trema TestRun Run Trema Test
Run Run Trema Test
 
How to Run Solr on Docker and Why
How to Run Solr on Docker and WhyHow to Run Solr on Docker and Why
How to Run Solr on Docker and Why
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - Mediafly
 
PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...
PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...
PuppetConf 2016: Building Nano Server Images with Puppet and DSC – Michael Sm...
 
PuppetConf 2016: Nano Server, Puppet, and DSC
PuppetConf 2016: Nano Server, Puppet, and DSCPuppetConf 2016: Nano Server, Puppet, and DSC
PuppetConf 2016: Nano Server, Puppet, and DSC
 
Openstack: An Open Source Cloud Framework
Openstack: An Open Source Cloud FrameworkOpenstack: An Open Source Cloud Framework
Openstack: An Open Source Cloud Framework
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Olive Introduction for TOI
Olive Introduction for TOIOlive Introduction for TOI
Olive Introduction for TOI
 
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenOSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
 
Keeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runitKeeping DNS server up-and-running with “runit
Keeping DNS server up-and-running with “runit
 
CCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLI
CCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLICCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLI
CCNA Security Lab 9 - Enabling SSH and HTTPS access to Cisco IOS Routers - CLI
 
Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance
Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance
Ceph Day Beijing: CeTune: A Framework of Profile and Tune Ceph Performance
 
Multipath
MultipathMultipath
Multipath
 
Linux çł»ç”±çźĄç†èˆ‡ćź‰ć…šïŒšé€Č階系由知理系由é˜Čé§­èˆ‡èł‡èšŠćź‰ć…š
Linux çł»ç”±çźĄç†èˆ‡ćź‰ć…šïŒšé€Č階系由知理系由é˜Čé§­èˆ‡èł‡èšŠćź‰ć…šLinux çł»ç”±çźĄç†èˆ‡ćź‰ć…šïŒšé€Č階系由知理系由é˜Čé§­èˆ‡èł‡èšŠćź‰ć…š
Linux çł»ç”±çźĄç†èˆ‡ćź‰ć…šïŒšé€Č階系由知理系由é˜Čé§­èˆ‡èł‡èšŠćź‰ć…š
 

Mehr von Tetsuyuki Kobayashi

LinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žă
LinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žăLinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žă
LinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žă
Tetsuyuki Kobayashi
 
Simple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAPSimple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAP
Tetsuyuki Kobayashi
 
ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?
Tetsuyuki Kobayashi
 
Tweaking Google TV emulator
Tweaking Google TV emulatorTweaking Google TV emulator
Tweaking Google TV emulator
Tetsuyuki Kobayashi
 

Mehr von Tetsuyuki Kobayashi (20)

some topic of ffmpeg
some topic of ffmpeg some topic of ffmpeg
some topic of ffmpeg
 
New VIdeo CODEC AV1
New VIdeo CODEC AV1 New VIdeo CODEC AV1
New VIdeo CODEC AV1
 
Try new transport protocol SRT (ver. 2)
Try new transport protocol SRT  (ver. 2)Try new transport protocol SRT  (ver. 2)
Try new transport protocol SRT (ver. 2)
 
Try new transport protocol SRT
Try new transport protocol SRTTry new transport protocol SRT
Try new transport protocol SRT
 
Raspberry Pi Zero ăšă‚«ăƒĄăƒ©ăƒąă‚žăƒ„ăƒŒăƒ«ă§äœœă‚‹ăƒ©ă‚€ăƒ–é…äżĄćźŸéš“æ©Ÿ
Raspberry Pi Zero ăšă‚«ăƒĄăƒ©ăƒąă‚žăƒ„ăƒŒăƒ«ă§äœœă‚‹ăƒ©ă‚€ăƒ–é…äżĄćźŸéš“æ©ŸRaspberry Pi Zero ăšă‚«ăƒĄăƒ©ăƒąă‚žăƒ„ăƒŒăƒ«ă§äœœă‚‹ăƒ©ă‚€ăƒ–é…äżĄćźŸéš“æ©Ÿ
Raspberry Pi Zero ăšă‚«ăƒĄăƒ©ăƒąă‚žăƒ„ăƒŒăƒ«ă§äœœă‚‹ăƒ©ă‚€ăƒ–é…äżĄćźŸéš“æ©Ÿ
 
WebOS Open Source Edition ă‚’è©Šă—ăŠăżăŸ
WebOS Open Source Edition ă‚’è©Šă—ăŠăżăŸWebOS Open Source Edition ă‚’è©Šă—ăŠăżăŸ
WebOS Open Source Edition ă‚’è©Šă—ăŠăżăŸ
 
LinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žă
LinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žăLinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žă
LinuxăźăƒŠăƒŒă‚¶ăƒŒăƒ©ăƒłăƒ‰ă‚’inită‹ă‚‰ć…šăŠăŸă‚‹ă”ăšgolangă§æ›žă
 
ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ(Go con版)
ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ(Go con版)ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ(Go con版)
ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ(Go con版)
 
ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ
ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čăƒĄç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ
ç”„ăżèŸŒăżLinuxでたGolangたă‚čă‚čュ
 
Tricky implementation of Go ARM soft float
Tricky implementation of Go ARM soft floatTricky implementation of Go ARM soft float
Tricky implementation of Go ARM soft float
 
ARM 64bit has come!
ARM 64bit has come!ARM 64bit has come!
ARM 64bit has come!
 
Virtual memory 20070222-en
Virtual memory 20070222-enVirtual memory 20070222-en
Virtual memory 20070222-en
 
Simple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAPSimple and efficient way to get the last log using MMAP
Simple and efficient way to get the last log using MMAP
 
Tips of Malloc & Free
Tips of Malloc & FreeTips of Malloc & Free
Tips of Malloc & Free
 
Basic of virtual memory of Linux
Basic of virtual memory of LinuxBasic of virtual memory of Linux
Basic of virtual memory of Linux
 
Patch101
Patch101Patch101
Patch101
 
ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?
 
Tweaking Google TV emulator
Tweaking Google TV emulatorTweaking Google TV emulator
Tweaking Google TV emulator
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of Android
 
Android is NOT just 'Java on Linux'
Android is NOT just 'Java on Linux'Android is NOT just 'Java on Linux'
Android is NOT just 'Java on Linux'
 

KĂŒrzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

KĂŒrzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Android On Ubuntu for developer

  • 1. Android on Ubuntu For developer 2010.9.28 Tetsuyuki Kobayashi 1
  • 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
  • 10. ARM Ubuntu versions  10.04 (Lucid) requires armv7  9.10 (Karmic) requires armv6  9.04 (Jaunty) requires armv5TE  (Debian lenny requires only armv4T)  KZM-CA9-01 board has Cortex-A9 (armv7) 10
  • 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
  • 14. Result of ps command user@arm-lucid:~$ ps ax PID TTY STAT TIME COMMAND 1 ? SLs 0:01 /sbin/init 2417 tty4 SLs+ 0:00 /sbin/getty -8 38400 tty4 2 ? S< 0:00 [kthreadd] 2418 tty5 SLs+ 0:00 /sbin/getty -8 38400 tty5 3 ? S< 0:00 [migration/0] 2421 tty2 SLs+ 0:00 /sbin/getty -8 38400 tty2 4 ? S< 0:00 [ksoftirqd/0] 2422 tty3 SLs+ 0:00 /sbin/getty -8 38400 tty3 5 ? S< 0:00 [watchdog/0] 2424 tty6 SLs+ 0:00 /sbin/getty -8 38400 tty6 6 ? S< 0:00 [migration/1] 2428 ? SLs 0:00 cron 7 ? S< 0:00 [ksoftirqd/1] 2454 tty1 SLs+ 0:00 /sbin/getty -8 38400 tty1 8 ? S< 0:00 [watchdog/1] 2470 ? SLs 0:00 sshd: user [priv] 9 ? S< 0:00 [migration/2] 2483 ? SL 0:00 sshd: user@pts/0 10 ? S< 0:00 [ksoftirqd/2] 2484 pts/0 SLs 0:00 -bash 11 ? S< 0:00 [watchdog/2] 2497 ? SLs 0:00 sshd: user [priv] 12 ? S< 0:00 [migration/3] 2511 ? SL 0:00 sshd: user@pts/1 13 ? S< 0:00 [ksoftirqd/3] 2512 pts/1 SLs 0:00 -bash 14 ? S< 0:00 [watchdog/3] 2520 pts/0 SL+ 0:00 /init 15 ? S< 0:00 [events/0] 2551 ? S<L 0:00 udevd --daemon 16 ? S< 0:00 [events/1] 2552 ? S<L 0:00 udevd --daemon 17 ? S< 0:00 [events/2] 2596 ? SLs 0:00 /system/bin/sh 18 ? S< 0:00 [events/3] 2597 pts/0 SL 0:00 /system/bin/servicemanager 19 ? S< 0:00 [work_on_cpu/0] 2598 pts/0 SL 0:00 /system/bin/debuggerd 20 ? S< 0:00 [work_on_cpu/1] 2599 pts/0 SLl 0:00 /system/bin/rild 21 ? S< 0:00 [work_on_cpu/2] 2600 pts/0 SL 0:05 zygote /bin/app_process -Xzygote /system/bin 22 ? S< 0:00 [work_on_cpu/3] --zygote --start-s 23 ? S< 0:00 [khelper] 2601 pts/0 SLl 0:00 /system/bin/mediaserver 24 ? S< 0:00 [suspend] 2602 pts/0 SL 0:00 /system/bin/dbus-daemon --system --nofork 25 ? S< 0:00 [kblockd/0] 2603 pts/0 SL 0:00 /system/bin/installd 26 ? S< 0:00 [kblockd/1] 2604 pts/0 SL 0:00 /system/bin/keystore /data/misc/keystore 27 ? S< 0:00 [kblockd/2] 2605 pts/0 SLl 0:00 /sbin/adbd 28 ? S< 0:00 [kblockd/3] 2613 pts/0 SLl 0:08 system_server 29 ? S< 0:00 [ksuspend_usbd] 2668 pts/0 SLl 0:00 com.android.inputmethod.latin 30 ? S< 0:00 [khubd] 2671 pts/0 SLl 0:00 com.android.phone 31 ? S< 0:00 [kmmcd] 2672 pts/0 SLl 0:01 com.android.launcher 32 ? S 0:00 [pdflush] 2673 pts/0 SLl 0:00 com.android.settings 33 ? 34 ? S S< 0:00 0:00 [pdflush] [kswapd0] Processes 2701 pts/0 2728 pts/0 SLl SLl 0:00 0:00 android.process.acore com.android.bluetooth 2735 pts/0 SLl 0:00 com.android.mms 35 ? 36 ? S< S< 0:00 0:00 [aio/0] [aio/1] of Android 2744 pts/0 SLl 0:00 android.process.media 37 ? S< 0:00 [aio/2] 2764 pts/0 SLl 0:00 com.android.providers.calendar 38 ? S< 0:00 [aio/3] 2776 pts/0 SLl 0:00 com.android.deskclock 39 ? S< 0:00 [nfsiod] 2786 pts/0 SLl 0:00 com.android.email 40 ? S< 0:01 [rpciod/0] 2796 pts/0 SLl 0:00 com.android.quicksearchbox 41 ? S< 0:00 [rpciod/1] 2807 pts/0 SLl 0:00 com.android.protips 42 ? S< 0:00 [rpciod/2] 2814 pts/0 SLl 0:00 com.android.music 43 ? S< 0:00 [rpciod/3] 2821 pts/0 SLl 0:00 com.cooliris.media 2297 ? SL 0:00 upstart-udev-bridge --daemon 2831 pts/1 RL+ 0:00 ps ax 2300 ? SLl 0:00 rsyslogd -c4 user@arm-lucid:~$ 2301 ? S<Ls 0:00 udevd --daemon 14 2378 ? SLs 0:00 /usr/sbin/sshd
  • 15. Result of pstree command Processes of Android 15
  • 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)
  • 19. Demo! KZM-CA9-01(Quad core Cortex-A9) http://www.kmckk.co.jp/eng/kzmca9/index.html 19
  • 20. Q&A Thank you for listening! Any comments to blogs are welcome. 20