SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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]
 

Destaque

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
 

Destaque (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のあり方
 

Semelhante a 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.
 
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
 
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ..."Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...Edge AI and Vision Alliance
 

Semelhante a 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
 
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
 
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ..."Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
"Building Complete Embedded Vision Systems on Linux—From Camera to Display," ...
 

Mais de 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
 

Mais de 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
 

Último

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

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