SlideShare une entreprise Scribd logo
1  sur  42
 
Peter McDermott 马 岩
The NthCode Team
Porting Google Android to a Nokia N810 也可以在 NthCode.com 看看
Hear-Say 150 Google Engineers 2 years US$100 Million 687,860,000 人民 币
HTC G1
 
Android Is Java applications Dalvik VM ‘ C’ libraries Linux kernel
Dalvik? Java-like virtual machine But not a Java Why? Google says performance But probably because of $$ Dalvik? Java-like virtual machine But not a Java Why? Google says performance But probably because of $$
Dalvik Write Java foo.java Compile to foo.class apkbuilder foo.class... -> foo.apk foo.apk has foo.dex + metadata Transfer to device Run Dalvik foo.apk
 
Why Did Google Create Android? An open platform Where Google can ... ... make money from advertising?
Google released all the code Open source Royalty free / 免 费 看看 source.android.com 21 October 2008
How Hard Could It Be? We Thought ...
 
Nokia N810 Hardware 400 MHz OMAP 2420 ARM9 800x480 4.1” touch screen 128M RAM 2G flash WiFi Keyboard ** Not a phone ** Runs Linux Maemo US$425 / 2900 元
How Do We Make the N810 Run Android?
Merge Linux Kernel 2.6.21 + N810 Patches Linux Kernel 2.6.25 + Android Patches
Nokia N810 Linux Kernel 2.6.21 + MultiMedia Card driver I2C serial bus driver Touch screen driver Keyboard map Audio and video DSP Direct Memory Access (DMA) Board revision patch System software is Maemo GTK-based Lots of hackers ( 牛 !)
Android Patches Linux Kernel 2.6.25 + Goldfish  YAFFS2 Bluetooth Scheduler IPC binder  Low memory killer Ashmem RAM console & logging Android Debug Bridge (ADB)  Power management Other changes
Goldfish Emulator CPU ARM926T Add 44 Files Not needed in real hardware
YAFFS2 Phones store data in flash memory YAFFS2 = Yet Another Flash File System 2 Optimized for NAND flash chips Add 35 Files Created by Charles Manning for Aleph1 GPL, but not in mainline kernel Integrated into Android by Google PCs store data on disks FAT, ext2, NTFS, xfs, afs ... All optimized for a spinning disk
Bluetooth  蓝呀 Change 10 files Fix headset bugs Add debugging Add access control
Scheduler Change 5 files Change impact not clear
IPC Binder InterProcess Communication (IPC) Add 2 files New kernel API Higher level IPC than standard UNIX
Low Memory Killer Add 3 files Scans processes, kills one New kernel API
Ashmem Anonymous SHared MEMory Add 3 files Named memory block Shared between processes Kernel can free Kernel can’t free standard SHMEM
RAM Console & Logging Add/change 3 files Puts kernel log in RAM Changes implementation Adds user space log read/write APIs New APIs
Android Debug Bridge (ADB) Add 3 files Connects Eclipse to an Android device USB Protocol
Power Management Add/change 5 files New APIs + changes
Other 36 files New APIs + changes Debugging Keypad lights TCP management ...
Which Kernel? Linux Kernel 2.6.21 Linux Kernel 2.6.25
Selected 2.6.25 ~75 files Drivers 163 files Some core OS User space quits if < 2.6.25
Port N810 to 2.6.25 MultiMedia Card driver I2C serial bus driver Touch screen driver Keyboard map Audio and video DSP Direct Memory Access (DMA) Board revision patch
Port N810 to 2.6.25 7 days Download Linux-OMAP git reset --hard v2.6.25-omap1 patch ... Compile/flash/debug/fix
Issue: WiFi No source for WiFi module Can’t recompile module  No WiFi
Apply Android Patches to 2.6.25 Based on Linux 2.6.25 Goldfish YAFFS2 Bluetooth Scheduler IPC binder  Low memory killer Ashmem RAM console & logging Android Debug Bridge (ADB)  Power management Other changes
Android 2 days Android and N810 changes independent
Bring-Up 9 days jffs2 mmap() doesn’t work Switched to ext2 -- data corruption Switched to ext3 -- OK System hang at boot.  Random reboots. Disabled watchdog Booted, but screen blank Applied a double-buffered video patch Sometimes booted, often crashed Copied libs to the N810, fixed crashes Touch screen wouldn’t work, changed power config Keypad not right, so changed keypad config
 
Next Steps Fix intermittent crashes WiFi Android Debug Bridge (ADB) Power off Battery charge
Peter McDermott [email_address] nthcode.com/pubs/porting-android-to-a-new-device.html

Contenu connexe

Tendances

Tendances (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at Facebook
 
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) WinningKernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
 
Distributed Compiler Icecc
Distributed Compiler IceccDistributed Compiler Icecc
Distributed Compiler Icecc
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
NetConf 2018 BPF Observability
NetConf 2018 BPF ObservabilityNetConf 2018 BPF Observability
NetConf 2018 BPF Observability
 
Debugging linux issues with eBPF
Debugging linux issues with eBPFDebugging linux issues with eBPF
Debugging linux issues with eBPF
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
 
Linux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovLinux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene Pirogov
 
bcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesbcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challenges
 
UM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareUM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of Software
 
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015: Speed up your kernel development cycle with QEMUKernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
Long-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux DistributionLong-term Maintenance Model of Embedded Industrial Linux Distribution
Long-term Maintenance Model of Embedded Industrial Linux Distribution
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on Lab
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting Started
 
Libpcap
LibpcapLibpcap
Libpcap
 
Kernel development
Kernel developmentKernel development
Kernel development
 

Similaire à NthCode - Porting Google Android To A Nokia N810

7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit
webuploader
 

Similaire à NthCode - Porting Google Android To A Nokia N810 (20)

Porting Android
Porting AndroidPorting Android
Porting Android
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
Porting Android ABS 2011
Porting Android ABS 2011Porting Android ABS 2011
Porting Android ABS 2011
 
Android 2.3 Introduction
Android 2.3 IntroductionAndroid 2.3 Introduction
Android 2.3 Introduction
 
Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?
 
Linaro and Android Kernel
Linaro and Android KernelLinaro and Android Kernel
Linaro and Android Kernel
 
Windows 10 IoT Core on Raspberry Pi 2 Usine IO
Windows 10 IoT Core on Raspberry Pi 2 Usine IOWindows 10 IoT Core on Raspberry Pi 2 Usine IO
Windows 10 IoT Core on Raspberry Pi 2 Usine IO
 
Cookies for kernel developers
Cookies for kernel developersCookies for kernel developers
Cookies for kernel developers
 
Android developer tools
Android developer toolsAndroid developer tools
Android developer tools
 
Venta
VentaVenta
Venta
 
Venta
VentaVenta
Venta
 
Introduction To The Beagleboard
Introduction To The BeagleboardIntroduction To The Beagleboard
Introduction To The Beagleboard
 
TUGAS MEMBUAT PRESENTASI TENTANG SPEC KOMPUTER DAN SMARTPHONE
TUGAS MEMBUAT PRESENTASI TENTANG SPEC KOMPUTER DAN SMARTPHONETUGAS MEMBUAT PRESENTASI TENTANG SPEC KOMPUTER DAN SMARTPHONE
TUGAS MEMBUAT PRESENTASI TENTANG SPEC KOMPUTER DAN SMARTPHONE
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
Windows Mobile 6.5 메모리관리
Windows Mobile 6.5 메모리관리Windows Mobile 6.5 메모리관리
Windows Mobile 6.5 메모리관리
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit
 
The abcs of gpu
The abcs of gpuThe abcs of gpu
The abcs of gpu
 
Webinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mão
Webinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mãoWebinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mão
Webinar: NVIDIA JETSON – A Inteligência Artificial na palma de sua mão
 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore Simputer
 

Dernier

“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Dernier (20)

ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 

NthCode - Porting Google Android To A Nokia N810

  • 1.  
  • 4. Porting Google Android to a Nokia N810 也可以在 NthCode.com 看看
  • 5. Hear-Say 150 Google Engineers 2 years US$100 Million 687,860,000 人民 币
  • 7.  
  • 8. Android Is Java applications Dalvik VM ‘ C’ libraries Linux kernel
  • 9. Dalvik? Java-like virtual machine But not a Java Why? Google says performance But probably because of $$ Dalvik? Java-like virtual machine But not a Java Why? Google says performance But probably because of $$
  • 10. Dalvik Write Java foo.java Compile to foo.class apkbuilder foo.class... -> foo.apk foo.apk has foo.dex + metadata Transfer to device Run Dalvik foo.apk
  • 11.  
  • 12. Why Did Google Create Android? An open platform Where Google can ... ... make money from advertising?
  • 13. Google released all the code Open source Royalty free / 免 费 看看 source.android.com 21 October 2008
  • 14. How Hard Could It Be? We Thought ...
  • 15.  
  • 16. Nokia N810 Hardware 400 MHz OMAP 2420 ARM9 800x480 4.1” touch screen 128M RAM 2G flash WiFi Keyboard ** Not a phone ** Runs Linux Maemo US$425 / 2900 元
  • 17. How Do We Make the N810 Run Android?
  • 18. Merge Linux Kernel 2.6.21 + N810 Patches Linux Kernel 2.6.25 + Android Patches
  • 19. Nokia N810 Linux Kernel 2.6.21 + MultiMedia Card driver I2C serial bus driver Touch screen driver Keyboard map Audio and video DSP Direct Memory Access (DMA) Board revision patch System software is Maemo GTK-based Lots of hackers ( 牛 !)
  • 20. Android Patches Linux Kernel 2.6.25 + Goldfish YAFFS2 Bluetooth Scheduler IPC binder Low memory killer Ashmem RAM console & logging Android Debug Bridge (ADB) Power management Other changes
  • 21. Goldfish Emulator CPU ARM926T Add 44 Files Not needed in real hardware
  • 22. YAFFS2 Phones store data in flash memory YAFFS2 = Yet Another Flash File System 2 Optimized for NAND flash chips Add 35 Files Created by Charles Manning for Aleph1 GPL, but not in mainline kernel Integrated into Android by Google PCs store data on disks FAT, ext2, NTFS, xfs, afs ... All optimized for a spinning disk
  • 23. Bluetooth 蓝呀 Change 10 files Fix headset bugs Add debugging Add access control
  • 24. Scheduler Change 5 files Change impact not clear
  • 25. IPC Binder InterProcess Communication (IPC) Add 2 files New kernel API Higher level IPC than standard UNIX
  • 26. Low Memory Killer Add 3 files Scans processes, kills one New kernel API
  • 27. Ashmem Anonymous SHared MEMory Add 3 files Named memory block Shared between processes Kernel can free Kernel can’t free standard SHMEM
  • 28. RAM Console & Logging Add/change 3 files Puts kernel log in RAM Changes implementation Adds user space log read/write APIs New APIs
  • 29. Android Debug Bridge (ADB) Add 3 files Connects Eclipse to an Android device USB Protocol
  • 30. Power Management Add/change 5 files New APIs + changes
  • 31. Other 36 files New APIs + changes Debugging Keypad lights TCP management ...
  • 32. Which Kernel? Linux Kernel 2.6.21 Linux Kernel 2.6.25
  • 33. Selected 2.6.25 ~75 files Drivers 163 files Some core OS User space quits if < 2.6.25
  • 34. Port N810 to 2.6.25 MultiMedia Card driver I2C serial bus driver Touch screen driver Keyboard map Audio and video DSP Direct Memory Access (DMA) Board revision patch
  • 35. Port N810 to 2.6.25 7 days Download Linux-OMAP git reset --hard v2.6.25-omap1 patch ... Compile/flash/debug/fix
  • 36. Issue: WiFi No source for WiFi module Can’t recompile module No WiFi
  • 37. Apply Android Patches to 2.6.25 Based on Linux 2.6.25 Goldfish YAFFS2 Bluetooth Scheduler IPC binder Low memory killer Ashmem RAM console & logging Android Debug Bridge (ADB) Power management Other changes
  • 38. Android 2 days Android and N810 changes independent
  • 39. Bring-Up 9 days jffs2 mmap() doesn’t work Switched to ext2 -- data corruption Switched to ext3 -- OK System hang at boot. Random reboots. Disabled watchdog Booted, but screen blank Applied a double-buffered video patch Sometimes booted, often crashed Copied libs to the N810, fixed crashes Touch screen wouldn’t work, changed power config Keypad not right, so changed keypad config
  • 40.  
  • 41. Next Steps Fix intermittent crashes WiFi Android Debug Bridge (ADB) Power off Battery charge
  • 42. Peter McDermott [email_address] nthcode.com/pubs/porting-android-to-a-new-device.html