Tweaking Google TV emulator
Upcoming SlideShare
Loading in...5
×
 

Tweaking Google TV emulator

on

  • 2,791 views

 

Statistics

Views

Total Views
2,791
Views on SlideShare
2,106
Embed Views
685

Actions

Likes
1
Downloads
35
Comments
0

7 Embeds 685

http://blog.kmckk.com 677
http://twitter.com 3
http://us-w1.rockmelt.com 1
http://www.slideshare.net 1
http://translate.googleusercontent.com 1
http://webcache.googleusercontent.com 1
http://wiki.onakasuita.org 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Tweaking Google TV emulator Tweaking Google TV emulator Presentation Transcript

  • 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
  • Todays topic Google TV add-on What is KVM? Tweaking Google TV emulator  Why NDK doesnt 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 timeUbuntu 10.04 KVM Off 52Ubuntu 10.04 KVM On 32Ubuntu 11.04 KVM Off 52Ubuntu 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 doesnt 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 doesnt work in Google TV. Why? Google TV runtime is different from Android. Dynamic linker and libc is not bionics, it seems to be glibcs. NDK r6 assumes bionic runtime. 13
  • Zygote maps in Android …afa00000-afa03000 r-xp 00000000 1f:00 380 /system/lib/liblog.soafa03000-afa04000 rwxp 00003000 1f:00 380 /system/lib/liblog.soafb00000-afb20000 r-xp 00000000 1f:00 348 /system/lib/libm.soafb20000-afb21000 rwxp 00020000 1f:00 348 /system/lib/libm.soafc00000-afc01000 r-xp 00000000 1f:00 326 /system/lib/libstdc++.soafc01000-afc02000 rwxp 00001000 1f:00 326 /system/lib/libstdc++.soafd00000-afd40000 r-xp 00000000 1f:00 351 /system/lib/libc.soafd40000-afd43000 rwxp 00040000 1f:00 351 /system/lib/libc.soafd43000-afd4e000 rwxp afd43000 00:00 0b0001000-b0009000 r-xp 00001000 1f:00 606 /system/bin/linkerb0009000-b000a000 rwxp 00009000 1f:00 606 /system/bin/linkerb000a000-b0013000 rwxp b000a000 00:00 0bedaa000-bedbf000 rw-p befeb000 00:00 0 [stack] 14
  • Zygote maps in Google TVb7544000-b7699000 r-xp 00000000 00:01 44 /lib/libc-2.12.2.sob7699000-b769b000 r--p 00155000 00:01 44 /lib/libc-2.12.2.sob769b000-b769c000 rw-p 00157000 00:01 44 /lib/libc-2.12.2.sob769c000-b769f000 rw-p 00000000 00:00 0b769f000-b76c2000 r-xp 00000000 00:01 51 /lib/libm-2.12.2.sob76c2000-b76c3000 r--p 00023000 00:01 51 /lib/libm-2.12.2.sob76c3000-b76c4000 rw-p 00024000 00:01 51 /lib/libm-2.12.2.so ...b7879000-b787d000 r-xp 00000000 1f:00 469 /system/lib/liblog.sob787d000-b787e000 rw-p 00003000 1f:00 469 /system/lib/liblog.sob787e000-b7896000 r-xp 00000000 00:01 61 /lib/libpthread-2.12.2.sob7896000-b7897000 ---p 00018000 00:01 61 /lib/libpthread-2.12.2.sob7897000-b7898000 r--p 00018000 00:01 61 /lib/libpthread-2.12.2.sob7898000-b7899000 rw-p 00019000 00:01 61 /lib/libpthread-2.12.2.sob7899000-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.sob78c9000-b78ca000 r--p 0001b000 00:01 42 /lib/ld-2.12.2.sob78ca000-b78cb000 rw-p 0001c000 00:01 42 /lib/ld-2.12.2.sobfdda000-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
  • Lets 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