SlideShare a Scribd company logo
1 of 21
Download to read offline
Tweaking Google TV emulator


             2011.8.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)
       http://kobablog.wordpress.com/(English)
   Twitter
       @tetsu_koba
                                                     2
Today's topic

   Google TV add-on
   What is KVM?
   Tweaking Google TV emulator
     Why NDK doesn't work?


     How to run it on Windows 7




                                   3
Google TV add-on

   Add-on for Android SDK to
    develop Google TV apps.
   http://code.google.com/tv/android/docs/gtv_addon.html

   Existing Java apps can run on it,
    but need modification for TV UI.
   Display Guidelines, UI Control
    Guidelines
                                                            4
From FAQ, Google TV version 2 is ...
    Android 3.1.
    NDK is not currently supported
    Chrome 11 (OTA upgradeable)
    Flash 10.1
    Native client app support is not
     currently available.
    continue to support the h.264 video
     codec for the HTML5 <video> tag.      5
Google TV emulator

   Target CPU is x86 (ATOM)
   KVM required
     It means only Linux


     Windows and Mac is currently

      not supported
   Open GL rendering by software
     Not accelerated by GPU
                                     6
What is KVM?

   Kernel Based Virtual Machine
   Host OS: x86 Linux, with Intel VT
    or AMD-V
   Guest CPU must be the same as
    host CPU
   used with QEMU
   http://www.linux-kvm.org/page/Main_Page
                                              7
How it works
   Usual QEMU
     emulates all instructions.


     MMU is emulated by software,

      too.
   QEMU + KVM
     mostly executed by real CPU.


     hooks only I/O instructions.


                                     8
Setup KVM

   On Ubuntu
       $ sudo apt-get install kvm
   On Ubuntu 10.04
       $ sudo chmod a+rw /dev/kvm
    (On Ubuntu 11.04 it worked
     without this)
   See also
                                                                   9
       http://code.google.com/tv/android/docs/gtv_emulator.html
Comparison by boot up time

Ubuntu 10.04 KVM Off
                                                                    52



Ubuntu 10.04 KVM On                            32



Ubuntu 11.04 KVM Off
                                                                    52



Ubuntu 11.04 KVM On
                                     17

                       0   10   20        30        40        50          60


                                                         (Smaller is better)
KVM is tuning up. Newer version is faster!                                     10
Tweaking Google TV emulator

   Why NDK doesn't work?
   How to run it on Windows 7




                                  11
NDK for x86

   NDKr6 supports x86
   You can build x86 emulator and
    Android image from AOSP source
    code
   NDK for x86 works fine in this
    environment

                                     12
But it doesn't work in Google TV.
               Why?
   Google TV runtime is different
    from Android.
   Dynamic linker and libc is not
    bionic's, it seems to be glibc's.
   NDK r6 assumes bionic runtime.


                                        13
Zygote maps in Android

  …

afa00000-afa03000   r-xp   00000000   1f:00   380   /system/lib/liblog.so
afa03000-afa04000   rwxp   00003000   1f:00   380   /system/lib/liblog.so
afb00000-afb20000   r-xp   00000000   1f:00   348   /system/lib/libm.so
afb20000-afb21000   rwxp   00020000   1f:00   348   /system/lib/libm.so
afc00000-afc01000   r-xp   00000000   1f:00   326   /system/lib/libstdc++.so
afc01000-afc02000   rwxp   00001000   1f:00   326   /system/lib/libstdc++.so
afd00000-afd40000   r-xp   00000000   1f:00   351   /system/lib/libc.so
afd40000-afd43000   rwxp   00040000   1f:00   351   /system/lib/libc.so
afd43000-afd4e000   rwxp   afd43000   00:00   0
b0001000-b0009000   r-xp   00001000   1f:00   606   /system/bin/linker
b0009000-b000a000   rwxp   00009000   1f:00   606   /system/bin/linker
b000a000-b0013000   rwxp   b000a000   00:00   0
bedaa000-bedbf000   rw-p   befeb000   00:00   0     [stack]




                                                                               14
Zygote maps in Google TV

b7544000-b7699000   r-xp   00000000   00:01   44    /lib/libc-2.12.2.so
b7699000-b769b000   r--p   00155000   00:01   44    /lib/libc-2.12.2.so
b769b000-b769c000   rw-p   00157000   00:01   44    /lib/libc-2.12.2.so
b769c000-b769f000   rw-p   00000000   00:00   0
b769f000-b76c2000   r-xp   00000000   00:01   51    /lib/libm-2.12.2.so
b76c2000-b76c3000   r--p   00023000   00:01   51    /lib/libm-2.12.2.so
b76c3000-b76c4000   rw-p   00024000   00:01   51    /lib/libm-2.12.2.so
     ...
b7879000-b787d000   r-xp   00000000   1f:00   469   /system/lib/liblog.so
b787d000-b787e000   rw-p   00003000   1f:00   469   /system/lib/liblog.so
b787e000-b7896000   r-xp   00000000   00:01   61    /lib/libpthread-2.12.2.so
b7896000-b7897000   ---p   00018000   00:01   61    /lib/libpthread-2.12.2.so
b7897000-b7898000   r--p   00018000   00:01   61    /lib/libpthread-2.12.2.so
b7898000-b7899000   rw-p   00019000   00:01   61    /lib/libpthread-2.12.2.so
b7899000-b789b000   rw-p   00000000   00:00   0
     ...
b78ac000-b78ad000   r-xp   00000000   00:00   0     [vdso]
b78ad000-b78c9000   r-xp   00000000   00:01   42    /lib/ld-2.12.2.so
b78c9000-b78ca000   r--p   0001b000   00:01   42    /lib/ld-2.12.2.so
b78ca000-b78cb000   rw-p   0001c000   00:01   42    /lib/ld-2.12.2.so
bfdda000-bfdfb000   rw-p   00000000   00:00   0     [stack]

                                                                                15
How to run Google TV emulator
            on Windows7
   Yes, KVM is tightly coupled with
    Linux.
   But without KVM, does it work on
    Windows or Mac?



                                       16
Elements of Google TV emulator

   (1) Emulator executable (using
    QEMU + KVM)
   (2) Image of target Linux kernel
   (3) Images of target file system
   (4) Skin image files
   AVD files configure (1)-(4).
   Only (1) depends on host OS.       17
Let's try
   Android SDK for windows already
    have emulator-x86.exe
   Copy the reset files from Linux
       $SDK/add-ons/addon_google_tv_google_inc_12
       $HOMEPATH/.android/avd/<avd>.ini
       $HOMEPATH/.android/avd/<avd>.avd
   Correct file path in each *.ini files

                                                     18
Start Google TV emulator on
                 Windows
   Start the emulator with the copied
    avd from command prompt
       emulator -avd <avd>
   It worked!
      But too slow to use!


   I understand how emulator works!
                                         19
Resources

   Previous Google TV session by @kisima
       http://d.hatena.ne.jp/machaut/20110213/1297613974
   KVM session at 1st KernelVM 探検隊
       http://www.slideshare.net/ozax86/linux-kvm
   How to build emulator-x86
       http://d.hatena.ne.jp/embedded/20110710/p1
   How to build linux kernel for emulator-x86
       http://blog.kmckk.com/archives/3882660.html



                                                            20
Demo / Q & A




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


                                          21

More Related Content

What's hot

Make A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst FrameworkMake A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst FrameworkYodalee
 
MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)Masami Hiramatsu
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20DefconRussia
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)Gavin Guo
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20DefconRussia
 
System Hacking Tutorial #3 - Buffer Overflow - Egg Hunting
System Hacking Tutorial #3 - Buffer Overflow - Egg HuntingSystem Hacking Tutorial #3 - Buffer Overflow - Egg Hunting
System Hacking Tutorial #3 - Buffer Overflow - Egg Huntingsanghwan ahn
 
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan BaljevicHP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan BaljevicCircling Cycle
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!Mr. Vengineer
 
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIPSystem Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIPsanghwan ahn
 
Memory Management of C# with Unity Native Collections
Memory Management of C# with Unity Native CollectionsMemory Management of C# with Unity Native Collections
Memory Management of C# with Unity Native CollectionsYoshifumi Kawai
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackKernel TLV
 
Msfpayload/Msfencoder cheatsheet
Msfpayload/Msfencoder cheatsheetMsfpayload/Msfencoder cheatsheet
Msfpayload/Msfencoder cheatsheetCe.Se.N.A. Security
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabTaeung Song
 
Asus WL500gP USB Serial
Asus WL500gP USB SerialAsus WL500gP USB Serial
Asus WL500gP USB Serialguestac21b8
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]Takuya ASADA
 

What's hot (20)

Make A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst FrameworkMake A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst Framework
 
MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
System Hacking Tutorial #3 - Buffer Overflow - Egg Hunting
System Hacking Tutorial #3 - Buffer Overflow - Egg HuntingSystem Hacking Tutorial #3 - Buffer Overflow - Egg Hunting
System Hacking Tutorial #3 - Buffer Overflow - Egg Hunting
 
Amos command
Amos commandAmos command
Amos command
 
ocelot
ocelotocelot
ocelot
 
OpenMP
OpenMPOpenMP
OpenMP
 
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan BaljevicHP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!
 
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIPSystem Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
System Hacking Tutorial #2 - Buffer Overflow - Overwrite EIP
 
Pledge in OpenBSD
Pledge in OpenBSDPledge in OpenBSD
Pledge in OpenBSD
 
M.Mozūras - git
M.Mozūras - gitM.Mozūras - git
M.Mozūras - git
 
Memory Management of C# with Unity Native Collections
Memory Management of C# with Unity Native CollectionsMemory Management of C# with Unity Native Collections
Memory Management of C# with Unity Native Collections
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
Msfpayload/Msfencoder cheatsheet
Msfpayload/Msfencoder cheatsheetMsfpayload/Msfencoder cheatsheet
Msfpayload/Msfencoder cheatsheet
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLab
 
Asus WL500gP USB Serial
Asus WL500gP USB SerialAsus WL500gP USB Serial
Asus WL500gP USB Serial
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]
 

Viewers also liked

Ikazuchi introduction for Europython 2011 LT
Ikazuchi introduction for Europython 2011 LTIkazuchi introduction for Europython 2011 LT
Ikazuchi introduction for Europython 2011 LTTetsuya Morimoto
 
エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半Tetsuya Morimoto
 
エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7Tetsuya Morimoto
 
【19-A-1】名誉職としてのCTOのあり方
【19-A-1】名誉職としてのCTOのあり方【19-A-1】名誉職としてのCTOのあり方
【19-A-1】名誉職としてのCTOのあり方Developers Summit
 

Viewers also liked (6)

Ikazuchi introduction for Europython 2011 LT
Ikazuchi introduction for Europython 2011 LTIkazuchi introduction for Europython 2011 LT
Ikazuchi introduction for Europython 2011 LT
 
エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半
 
エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7
 
Ex py intro-20100630
Ex py intro-20100630Ex py intro-20100630
Ex py intro-20100630
 
PyCon 2012 紀行
PyCon 2012 紀行PyCon 2012 紀行
PyCon 2012 紀行
 
【19-A-1】名誉職としてのCTOのあり方
【19-A-1】名誉職としてのCTOのあり方【19-A-1】名誉職としてのCTOのあり方
【19-A-1】名誉職としてのCTOのあり方
 

Similar to Tweaking Google TV emulator

Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric Ahn
 
Reusing your existing software on Android
Reusing your existing software on AndroidReusing your existing software on Android
Reusing your existing software on AndroidTetsuyuki Kobayashi
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Carlos Eduardo
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting startedMunish Mehta
 
Canonical ubuntu introduction_20170330
Canonical ubuntu introduction_20170330Canonical ubuntu introduction_20170330
Canonical ubuntu introduction_20170330Takaaki Suzuki
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command lineEric Javier Espino Man
 
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUsDCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUsDocker, Inc.
 
Añadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continuaAñadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continuaCésar Martín Ortiz Pintado
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadAndrewWright224
 
Dockerfish-Tutorial
Dockerfish-TutorialDockerfish-Tutorial
Dockerfish-TutorialBrian Hood
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmJessica Deen
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220AndrewWright224
 
Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10Lợi Dương
 
Using QEMU for cross development
Using QEMU for cross developmentUsing QEMU for cross development
Using QEMU for cross developmentTetsuyuki Kobayashi
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Next in Virtualization Era: Containerization & Docker
Next in Virtualization Era: Containerization & DockerNext in Virtualization Era: Containerization & Docker
Next in Virtualization Era: Containerization & DockerAlper Kanat
 

Similar to Tweaking Google TV emulator (20)

Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Reusing your existing software on Android
Reusing your existing software on AndroidReusing your existing software on Android
Reusing your existing software on Android
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
Canonical ubuntu introduction_20170330
Canonical ubuntu introduction_20170330Canonical ubuntu introduction_20170330
Canonical ubuntu introduction_20170330
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command line
 
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUsDCSF 19 Accelerating Docker Containers with NVIDIA GPUs
DCSF 19 Accelerating Docker Containers with NVIDIA GPUs
 
Añadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continuaAñadiendo Jenkins al entorno para Integración continua
Añadiendo Jenkins al entorno para Integración continua
 
QEMU in Cross building
QEMU in Cross buildingQEMU in Cross building
QEMU in Cross building
 
App container rkt
App container rktApp container rkt
App container rkt
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
Dockerfish-Tutorial
Dockerfish-TutorialDockerfish-Tutorial
Dockerfish-Tutorial
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and Helm
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10Install a micro k8s single node cluster of kubernetes on windows 10
Install a micro k8s single node cluster of kubernetes on windows 10
 
Using QEMU for cross development
Using QEMU for cross developmentUsing QEMU for cross development
Using QEMU for cross development
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Juju + KubernetesでGPU の活用
Juju + KubernetesでGPU の活用Juju + KubernetesでGPU の活用
Juju + KubernetesでGPU の活用
 
Next in Virtualization Era: Containerization & Docker
Next in Virtualization Era: Containerization & DockerNext in Virtualization Era: Containerization & Docker
Next in Virtualization Era: Containerization & Docker
 

More from 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
 

More from 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
 
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?
 
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'
 
Android ipm 20110409
Android ipm 20110409Android ipm 20110409
Android ipm 20110409
 
Init of Android
Init of AndroidInit of Android
Init of Android
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 

Tweaking Google TV emulator

  • 1. Tweaking Google TV emulator 2011.8.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)  http://kobablog.wordpress.com/(English)  Twitter  @tetsu_koba 2
  • 3. Today's topic  Google TV add-on  What is KVM?  Tweaking Google TV emulator  Why NDK doesn't work?  How to run it on Windows 7 3
  • 4. Google TV add-on  Add-on for Android SDK to develop Google TV apps.  http://code.google.com/tv/android/docs/gtv_addon.html  Existing Java apps can run on it, but need modification for TV UI.  Display Guidelines, UI Control Guidelines 4
  • 5. From FAQ, Google TV version 2 is ...  Android 3.1.  NDK is not currently supported  Chrome 11 (OTA upgradeable)  Flash 10.1  Native client app support is not currently available.  continue to support the h.264 video codec for the HTML5 <video> tag. 5
  • 6. Google TV emulator  Target CPU is x86 (ATOM)  KVM required  It means only Linux  Windows and Mac is currently not supported  Open GL rendering by software  Not accelerated by GPU 6
  • 7. What is KVM?  Kernel Based Virtual Machine  Host OS: x86 Linux, with Intel VT or AMD-V  Guest CPU must be the same as host CPU  used with QEMU  http://www.linux-kvm.org/page/Main_Page 7
  • 8. How it works  Usual QEMU  emulates all instructions.  MMU is emulated by software, too.  QEMU + KVM  mostly executed by real CPU.  hooks only I/O instructions. 8
  • 9. Setup KVM  On Ubuntu  $ sudo apt-get install kvm  On Ubuntu 10.04  $ sudo chmod a+rw /dev/kvm (On Ubuntu 11.04 it worked without this)  See also 9  http://code.google.com/tv/android/docs/gtv_emulator.html
  • 10. Comparison by boot up time Ubuntu 10.04 KVM Off 52 Ubuntu 10.04 KVM On 32 Ubuntu 11.04 KVM Off 52 Ubuntu 11.04 KVM On 17 0 10 20 30 40 50 60 (Smaller is better) KVM is tuning up. Newer version is faster! 10
  • 11. Tweaking Google TV emulator  Why NDK doesn't work?  How to run it on Windows 7 11
  • 12. NDK for x86  NDKr6 supports x86  You can build x86 emulator and Android image from AOSP source code  NDK for x86 works fine in this environment 12
  • 13. But it doesn't work in Google TV. Why?  Google TV runtime is different from Android.  Dynamic linker and libc is not bionic's, it seems to be glibc's.  NDK r6 assumes bionic runtime. 13
  • 14. Zygote maps in Android … afa00000-afa03000 r-xp 00000000 1f:00 380 /system/lib/liblog.so afa03000-afa04000 rwxp 00003000 1f:00 380 /system/lib/liblog.so afb00000-afb20000 r-xp 00000000 1f:00 348 /system/lib/libm.so afb20000-afb21000 rwxp 00020000 1f:00 348 /system/lib/libm.so afc00000-afc01000 r-xp 00000000 1f:00 326 /system/lib/libstdc++.so afc01000-afc02000 rwxp 00001000 1f:00 326 /system/lib/libstdc++.so afd00000-afd40000 r-xp 00000000 1f:00 351 /system/lib/libc.so afd40000-afd43000 rwxp 00040000 1f:00 351 /system/lib/libc.so afd43000-afd4e000 rwxp afd43000 00:00 0 b0001000-b0009000 r-xp 00001000 1f:00 606 /system/bin/linker b0009000-b000a000 rwxp 00009000 1f:00 606 /system/bin/linker b000a000-b0013000 rwxp b000a000 00:00 0 bedaa000-bedbf000 rw-p befeb000 00:00 0 [stack] 14
  • 15. Zygote maps in Google TV b7544000-b7699000 r-xp 00000000 00:01 44 /lib/libc-2.12.2.so b7699000-b769b000 r--p 00155000 00:01 44 /lib/libc-2.12.2.so b769b000-b769c000 rw-p 00157000 00:01 44 /lib/libc-2.12.2.so b769c000-b769f000 rw-p 00000000 00:00 0 b769f000-b76c2000 r-xp 00000000 00:01 51 /lib/libm-2.12.2.so b76c2000-b76c3000 r--p 00023000 00:01 51 /lib/libm-2.12.2.so b76c3000-b76c4000 rw-p 00024000 00:01 51 /lib/libm-2.12.2.so ... b7879000-b787d000 r-xp 00000000 1f:00 469 /system/lib/liblog.so b787d000-b787e000 rw-p 00003000 1f:00 469 /system/lib/liblog.so b787e000-b7896000 r-xp 00000000 00:01 61 /lib/libpthread-2.12.2.so b7896000-b7897000 ---p 00018000 00:01 61 /lib/libpthread-2.12.2.so b7897000-b7898000 r--p 00018000 00:01 61 /lib/libpthread-2.12.2.so b7898000-b7899000 rw-p 00019000 00:01 61 /lib/libpthread-2.12.2.so b7899000-b789b000 rw-p 00000000 00:00 0 ... b78ac000-b78ad000 r-xp 00000000 00:00 0 [vdso] b78ad000-b78c9000 r-xp 00000000 00:01 42 /lib/ld-2.12.2.so b78c9000-b78ca000 r--p 0001b000 00:01 42 /lib/ld-2.12.2.so b78ca000-b78cb000 rw-p 0001c000 00:01 42 /lib/ld-2.12.2.so bfdda000-bfdfb000 rw-p 00000000 00:00 0 [stack] 15
  • 16. How to run Google TV emulator on Windows7  Yes, KVM is tightly coupled with Linux.  But without KVM, does it work on Windows or Mac? 16
  • 17. Elements of Google TV emulator  (1) Emulator executable (using QEMU + KVM)  (2) Image of target Linux kernel  (3) Images of target file system  (4) Skin image files  AVD files configure (1)-(4).  Only (1) depends on host OS. 17
  • 18. Let's try  Android SDK for windows already have emulator-x86.exe  Copy the reset files from Linux  $SDK/add-ons/addon_google_tv_google_inc_12  $HOMEPATH/.android/avd/<avd>.ini  $HOMEPATH/.android/avd/<avd>.avd  Correct file path in each *.ini files 18
  • 19. Start Google TV emulator on Windows  Start the emulator with the copied avd from command prompt  emulator -avd <avd>  It worked!  But too slow to use!  I understand how emulator works! 19
  • 20. Resources  Previous Google TV session by @kisima  http://d.hatena.ne.jp/machaut/20110213/1297613974  KVM session at 1st KernelVM 探検隊  http://www.slideshare.net/ozax86/linux-kvm  How to build emulator-x86  http://d.hatena.ne.jp/embedded/20110710/p1  How to build linux kernel for emulator-x86  http://blog.kmckk.com/archives/3882660.html 20
  • 21. Demo / Q & A Thank you for listening! Any comments to blogs are welcome. @tetsu_koba 21