SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Reusing your existing software
             on
           Android
              2010.9.3
              2011.8.5 updated

         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)
       http://kobablog.wordpress.com/(English)   new

   Twitter
       @tetsu_koba
                                                        2
Today's topic

   Introduction
   Running your software on
    Android
      No rebuild, binary as is


      Rebuild


   Running Android on your
    existing linux environment
                                  3
Audience

   Already using Linux in your project
   Have interest in Android
   Thinking how to migrate to
    Android



                                          4
Why Android?

   Clear separation between system and
    application
   Download-able application
    
        3rd party, community
       Easy upgrade, bug fix
   Web service using HTML5 browser
    core
   And more ...                          5
Why reuse?

   Don't discard all your existing
    software resource.
   But don't think all your software
    resource is reusable.
   What is your strength?
   Select wisely

                                        6
Let's try prototyping

   Anyway, port Android on your
    board.
   I show you some techniques for a
    quick hack in this session.



                                       7
Things to consider

   Execution overhead
   Memory/Storage usage
   Easiness to follow version up of
    Android





                                       8
3 topics
   Running existing binary on
    Android
   Rebuilding for Android
   Running Android on your Linux




                                    9
Running existing binary on
              Android
   Just copy
      If the same ABI (EABI on ARM)


   You have to copy all files you
    need
   'ldd' to identify dynamic library
    dependency
   Fortunately, Android does not
    have /lib, /bin, /usr/*. Don't worry
Example : bash

 user@arm-lucid:~$ ldd /bin/bash
    libncurses.so.5 => /lib/libncurses.so.5 (0x40006000)
    libdl.so.2 => /lib/libdl.so.2 (0x40039000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40045000)
    libc.so.6 => /lib/libc.so.6 (0x40057000)
    /lib/ld-linux.so.3 (0x2a000000)
 user@arm-lucid:~$




Copy these files and not change file path.
Or make symblic link as looks like.

See Also
http://blog.kmckk.com/archives/2936886.html
                                                           11
Running existing binary on
                Android
   Pros
       Easy!
                   Good for experiment
   Cons
       Duplicate libraries
                   increase memory/storage usage
       May not work for all cases
                   Not good for product.
       Not applicable for libraries to link with
        DalvikVM                                    12
Rebuilding for Android

   Making Android.mk
     Build your project as a part of

      the whole Android system
   Using configure script
     Build independently


     Use NDK for compiler, system

      library and include headers
                                        13
Making Androd.mk

   Get whole android source tree by 'repo
    sync'
   Copy simple project and use it as template
   Remove unused files and add your files
   Modify Android.mk
   Build your project as a part of Android


                                              14
Using configure script
   Set environment variables before run
    configure
      CC, CFLAGS, LDFLAGS


   Options for gcc
      -mandroid, --sysroot=$SYSROOT


   See this page for detail
       http://blog.kmckk.com/archives/2918745.html
       http://blog.kmckk.com/archives/3867590.html
                                                      15
Caveats

   System lib doesn't support C++ exceptions and
    RTTI.
       Static link GNU libstdc++.
   Multi byte char support is minimal.
   No system V IPC.
   IPv6 seems not yet supported.
   GCC TLS extension (__thread) doesn't work.


                                                 16
Rebuilding for Android

   Pros
       The best for Memory/Storage usage
       Only solution for libraries to link with DalvikVM
   Cons
       Hard to rebuild because ...
       Bionic(Android libc) Caveats
       Some header files missing
Running Android on your Linux

   Running whole Android system
    framework on your existing Linux
    environment.
   I show you a quick hack to do this.
   Of cource, there is some limitation.


                                       18
Running Android on your Linux



                               Android
                                Android



     Your existing Linux user land




        Android-patched Linux kernel
         Android-patched Linux kernel


                                          19
How to run Android on Ubuntu

1.Port Android to your board
2.Run ARM Ubuntu on your board
 with Android-patched Linux kernel
3.Put all Android files into /android
 on Ubuntu
4.Invoke 'sudo chroot /android /init'
 on Ubuntu
                                        20
Trouble shooting
   Some processes caused SEGV
     In my case, vold and netd


   Patch is in my blog
       http://blog.kmckk.com/archives/3520227.html





                                                  21
Android lunched successfully

   You can browse internet by Android browser.
   You can use Eclipse to install and debug Java
    applications.
   SMP kernel works fine on KZM-CA9-01
    board(Quad-Core Cortex-A9) and KZM-A9-Dual
    (Dual-Core Cortex-A9)




                                                    22
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 ?        S      0:00   [pdflush]                       2701 pts/0    SLl    0:00   android.process.acore
   34 ?        S<     0:00   [kswapd0]                       2728 pts/0    SLl    0:00   com.android.bluetooth
   35 ?        S<     0:00   [aio/0]                         2735 pts/0    SLl    0:00   com.android.mms
   36 ?        S<     0:00   [aio/1]                         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                                                                                    23
 2378 ?        SLs    0:00   /usr/sbin/sshd
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
                                                              2422 tty3     SLs+   0:00   /sbin/getty -8 38400 tty3
    4 ?
    5 ?
               S<
               S<
                      0:00
                      0:00
                             [ksoftirqd/0]
                             [watchdog/0]  Init of Ubuntu     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
                                                              2470 ?        SLs    0:00   sshd: user [priv]
    8 ?
    9 ?
               S<
               S<
                      0:00
                      0:00
                             [watchdog/1]
                             [migration/2] Init of Android    2483 ?
                                                              2484 pts/0
                                                                            SL
                                                                            SLs
                                                                                   0:00
                                                                                   0:00
                                                                                          sshd: user@pts/0
                                                                                          -bash
   10 ?        S<     0:00   [ksoftirqd/2]
   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                                                                                     24
 2378 ?        SLs    0:00   /usr/sbin/sshd
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!
                                      25
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?



                                                                  26
Q&A




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


                                          27

Weitere ähnliche Inhalte

Was ist angesagt?

Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Opersys inc.
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdfJetpack Compose beginner.pdf
Jetpack Compose beginner.pdfAayushmaAgrawal
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)Nanik Tolaram
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with PieOpersys inc.
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introductionWilliam Liang
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depthChris Simmonds
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To JenkinsKnoldus Inc.
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesChris Simmonds
 

Was ist angesagt? (20)

Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Android
AndroidAndroid
Android
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdfJetpack Compose beginner.pdf
Jetpack Compose beginner.pdf
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
 
Android device driver structure introduction
Android device driver structure introductionAndroid device driver structure introduction
Android device driver structure introduction
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 

Ähnlich wie Reusing your existing software on Android

Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environmentsinside-BigData.com
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyMediafly
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
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 + KubernetesMongoDB
 
Rooting Out Root: User namespaces in Docker
Rooting Out Root: User namespaces in DockerRooting Out Root: User namespaces in Docker
Rooting Out Root: User namespaces in DockerPhil Estes
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB
 
2008-06-25 Marist System z Summer Professors Series
2008-06-25 Marist System z Summer Professors Series2008-06-25 Marist System z Summer Professors Series
2008-06-25 Marist System z Summer Professors SeriesShawn Wells
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de DockerProto204
 
Headless Android at AnDevCon3
Headless Android at AnDevCon3Headless Android at AnDevCon3
Headless Android at AnDevCon3Opersys inc.
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdockerJaehwa Park
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornPROIDEA
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryImesh Gunaratne
 

Ähnlich wie Reusing your existing software on Android (20)

Android On Ubuntu for developer
Android On Ubuntu for developerAndroid On Ubuntu for developer
Android On Ubuntu for developer
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Shifter: Containers in HPC Environments
Shifter: Containers in HPC EnvironmentsShifter: Containers in HPC Environments
Shifter: Containers in HPC Environments
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - Mediafly
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
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
 
Rooting Out Root: User namespaces in Docker
Rooting Out Root: User namespaces in DockerRooting Out Root: User namespaces in Docker
Rooting Out Root: User namespaces in Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 
2008-06-25 Marist System z Summer Professors Series
2008-06-25 Marist System z Summer Professors Series2008-06-25 Marist System z Summer Professors Series
2008-06-25 Marist System z Summer Professors Series
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de Docker
 
App container rkt
App container rktApp container rkt
App container rkt
 
Headless Android at AnDevCon3
Headless Android at AnDevCon3Headless Android at AnDevCon3
Headless Android at AnDevCon3
 
Docker 활용법: dumpdocker
Docker 활용법: dumpdockerDocker 활용법: dumpdocker
Docker 활용법: dumpdocker
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
 
Docker for HPC in a Nutshell
Docker for HPC in a NutshellDocker for HPC in a Nutshell
Docker for HPC in a Nutshell
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
 
Securité des container
Securité des containerSecurité des container
Securité des container
 

Mehr von Tetsuyuki Kobayashi

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)Tetsuyuki Kobayashi
 
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機
Raspberry Pi Zero とカメラモジュールで作るライブ配信実験機Tetsuyuki Kobayashi
 
WebOS Open Source Edition を試してみた
WebOS Open Source Edition を試してみたWebOS Open Source Edition を試してみた
WebOS Open Source Edition を試してみたTetsuyuki Kobayashi
 
Linuxのユーザーランドをinitから全てまるごとgolangで書く
Linuxのユーザーランドをinitから全てまるごとgolangで書くLinuxのユーザーランドをinitから全てまるごとgolangで書く
Linuxのユーザーランドをinitから全てまるごとgolangで書くTetsuyuki Kobayashi
 
組み込みLinuxでのGolangのススメ(Go con版)
組み込みLinuxでのGolangのススメ(Go con版)組み込みLinuxでのGolangのススメ(Go con版)
組み込みLinuxでのGolangのススメ(Go con版)Tetsuyuki Kobayashi
 
組み込みLinuxでのGolangのススメ
組み込みLinuxでのGolangのススメ組み込みLinuxでのGolangのススメ
組み込みLinuxでのGolangのススメTetsuyuki Kobayashi
 
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 floatTetsuyuki 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 MMAPTetsuyuki Kobayashi
 
Basic of virtual memory of Linux
Basic of virtual memory of LinuxBasic of virtual memory of Linux
Basic of virtual memory of LinuxTetsuyuki 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
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of AndroidTetsuyuki Kobayashi
 
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'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

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 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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...Neo4j
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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 DevelopmentsTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Reusing your existing software on Android

  • 1. Reusing your existing software on Android 2010.9.3 2011.8.5 updated 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)  http://kobablog.wordpress.com/(English) new  Twitter  @tetsu_koba 2
  • 3. Today's topic  Introduction  Running your software on Android  No rebuild, binary as is  Rebuild  Running Android on your existing linux environment 3
  • 4. Audience  Already using Linux in your project  Have interest in Android  Thinking how to migrate to Android 4
  • 5. Why Android?  Clear separation between system and application  Download-able application  3rd party, community  Easy upgrade, bug fix  Web service using HTML5 browser core  And more ... 5
  • 6. Why reuse?  Don't discard all your existing software resource.  But don't think all your software resource is reusable.  What is your strength?  Select wisely 6
  • 7. Let's try prototyping  Anyway, port Android on your board.  I show you some techniques for a quick hack in this session. 7
  • 8. Things to consider  Execution overhead  Memory/Storage usage  Easiness to follow version up of Android  8
  • 9. 3 topics  Running existing binary on Android  Rebuilding for Android  Running Android on your Linux 9
  • 10. Running existing binary on Android  Just copy  If the same ABI (EABI on ARM)  You have to copy all files you need  'ldd' to identify dynamic library dependency  Fortunately, Android does not have /lib, /bin, /usr/*. Don't worry
  • 11. Example : bash user@arm-lucid:~$ ldd /bin/bash libncurses.so.5 => /lib/libncurses.so.5 (0x40006000) libdl.so.2 => /lib/libdl.so.2 (0x40039000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40045000) libc.so.6 => /lib/libc.so.6 (0x40057000) /lib/ld-linux.so.3 (0x2a000000) user@arm-lucid:~$ Copy these files and not change file path. Or make symblic link as looks like. See Also http://blog.kmckk.com/archives/2936886.html 11
  • 12. Running existing binary on Android  Pros  Easy!  Good for experiment  Cons  Duplicate libraries  increase memory/storage usage  May not work for all cases  Not good for product.  Not applicable for libraries to link with DalvikVM 12
  • 13. Rebuilding for Android  Making Android.mk  Build your project as a part of the whole Android system  Using configure script  Build independently  Use NDK for compiler, system library and include headers 13
  • 14. Making Androd.mk  Get whole android source tree by 'repo sync'  Copy simple project and use it as template  Remove unused files and add your files  Modify Android.mk  Build your project as a part of Android 14
  • 15. Using configure script  Set environment variables before run configure  CC, CFLAGS, LDFLAGS  Options for gcc  -mandroid, --sysroot=$SYSROOT  See this page for detail  http://blog.kmckk.com/archives/2918745.html  http://blog.kmckk.com/archives/3867590.html 15
  • 16. Caveats  System lib doesn't support C++ exceptions and RTTI.  Static link GNU libstdc++.  Multi byte char support is minimal.  No system V IPC.  IPv6 seems not yet supported.  GCC TLS extension (__thread) doesn't work. 16
  • 17. Rebuilding for Android  Pros  The best for Memory/Storage usage  Only solution for libraries to link with DalvikVM  Cons  Hard to rebuild because ...  Bionic(Android libc) Caveats  Some header files missing
  • 18. Running Android on your Linux  Running whole Android system framework on your existing Linux environment.  I show you a quick hack to do this.  Of cource, there is some limitation. 18
  • 19. Running Android on your Linux Android Android Your existing Linux user land Android-patched Linux kernel Android-patched Linux kernel 19
  • 20. How to run Android on Ubuntu 1.Port Android to your board 2.Run ARM Ubuntu on your board with Android-patched Linux kernel 3.Put all Android files into /android on Ubuntu 4.Invoke 'sudo chroot /android /init' on Ubuntu 20
  • 21. Trouble shooting  Some processes caused SEGV  In my case, vold and netd  Patch is in my blog  http://blog.kmckk.com/archives/3520227.html  21
  • 22. Android lunched successfully  You can browse internet by Android browser.  You can use Eclipse to install and debug Java applications.  SMP kernel works fine on KZM-CA9-01 board(Quad-Core Cortex-A9) and KZM-A9-Dual (Dual-Core Cortex-A9) 22
  • 23. 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 ? S 0:00 [pdflush] 2701 pts/0 SLl 0:00 android.process.acore 34 ? S< 0:00 [kswapd0] 2728 pts/0 SLl 0:00 com.android.bluetooth 35 ? S< 0:00 [aio/0] 2735 pts/0 SLl 0:00 com.android.mms 36 ? S< 0:00 [aio/1] 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 23 2378 ? SLs 0:00 /usr/sbin/sshd
  • 24. 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 2422 tty3 SLs+ 0:00 /sbin/getty -8 38400 tty3 4 ? 5 ? S< S< 0:00 0:00 [ksoftirqd/0] [watchdog/0] Init of Ubuntu 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 2470 ? SLs 0:00 sshd: user [priv] 8 ? 9 ? S< S< 0:00 0:00 [watchdog/1] [migration/2] Init of Android 2483 ? 2484 pts/0 SL SLs 0:00 0:00 sshd: user@pts/0 -bash 10 ? S< 0:00 [ksoftirqd/2] 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 24 2378 ? SLs 0:00 /usr/sbin/sshd
  • 25. 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! 25
  • 26. 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? 26
  • 27. Q&A Thank you for listening! Any comments to blogs are welcome. @tetsu_koba 27