SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
1
Embedded Android
Linaro Connect Europe 2012
Karim Yaghmour
@karimyaghmour
karim.yaghmour@opersys.com
2
These slides are made available to you under a Creative Commons Share-
Alike 3.0 license. The full terms of this license are here:
https://creativecommons.org/licenses/by-sa/3.0/
Attribution requirements and misc., PLEASE READ:
● This slide must remain as-is in this specific location (slide #2), everything
else you are free to change; including the logo :-)
● Use of figures in other documents must feature the below “Originals at”
URL immediately under that figure and the below copyright notice where
appropriate.
● You are free to fill in the “Delivered and/or customized by” space on the
right as you see fit.
● You are FORBIDEN from using the default “About” slide as-is or any of its
contents.
● You are FORBIDEN from using any content provided by 3rd
parties without
the EXPLICIT consent from those parties.
(C) Copyright 2012, Opersys inc.
These slides created by: Karim Yaghmour
Originals at: www.opersys.com/community/docs
Delivered and/or customized by
3
About
● Author of:
● Introduced Linux Trace Toolkit in 1999
● Originated Adeos and relayfs (kernel/relay.c)
● Training, Custom Dev, Consulting, ...
4
Agenda
● Reasons for looking at Android
● What did we have before Android?
● What does Android give us?
● Challenges
● Trends
5
1. Reasons for looking at Android
● Android-specific:
● User Interface
● Cool factor
● API
● ...
● Same as embedded Linux:
● Cost
● Licensing
● Openness / Availability
● Ability to customize
● ...
6
2. What did we have before Android?
Embedded Linux
● A set of ad-hoc methods to package the Linux kernel with a (minimal)
filesystem.
● FS content “to be determined” case-by-case
● APIs are specific to each device/build
● “Core software”:
● BusyBox
● U-Boot
● GNU Toolchain
● Your flavor of:
● glibc or uClibc or eglibc
● yocto or buildroot or eldk or ltib or ptxdist or ...
● No serious UX framework
7
8
3. What does Android give us?
● ... apart from its increasingly well known UX ...
● Fully-integrated Eclipse IDE
● SDK/NDK
● ADB
● Fastboot
● Published, well-known, and very rich APIs
● A large and growing developer community
● And still we can use the usual suspects:
● GNU toolchain, BusyBox, u- boot, glibc, ...
An actual standardized dev. env. across all product lines
9
10
4. Challenges
● Documentation / Information
● Stack Limitations
● Stack Customization
● Boot time
● Legacy Integration
● Development Hardware
● Build Times
● Headless Use
11
4.1. Documentation / Information
● Official doc for app dev is great
● Official doc for platform dev is practically non-existent
● A few official forums:
● android-building
● android-platform
● android-porting
● Conference talks / presentations
● Scattered documentation all over the web
● Upcoming book (disclaimer applies):
12
4.2. Stack Limitations
● Key functionality not supported by default:
● Ethernet
● AM/FM radio
● Real-time
● Supported functionality doesn't expose everything:
● BlueZ
● USB
● wpa_supplicant
● Bionic isn't a full glibc replacement:
● No SystemV IPC
● No locales
● etc.
13
4.3. Stack Customization
● Lots of default packages
● Modularity wasn't really part of the design
● No “make menuconfig”
● Can't easily select/change:
● Which packages to include
● Which system services are running
● Packages' features
● Ex:
● Can relatively easily replace default home screen
● Modifying status bar requires digging in code
14
4.4. Boot time
● Very lengthy boot process
● Bootloader
● Kernel
● Init
● Zygote
● System services
● DEX optimization
● Key apps
● Unlikely to be able to speed this through trimming ...
● Try:
● Suspend to flash
● Checkpointing
15
4.5. Legacy Integration
● What if I ... ?:
● have been using my custom rootfs forever
● really need glibc
● have a huge stack based on “legacy Linux”
● don't want to deal with AOSP's build system
● want BusyBox
● want to unify with a std Linux desktop
● need things the AOSP doesn't provide
● have a ton of Linux drivers and want those to be used by Android
● ...
● Know this: filesystem integration is trivial:
● Change build system to copy your custom rootfs
● Change init scripts to start you own daemons
● Use sockets to communicate
● Know this too: std Linux desktop integration is NOT
16
17
18
4.6. Development Hardware
● Can I use a standard phone?
● Not really
● Even if you could – some things can only be done in the platform
● Which board is best to evaluate Android?
● BeagleBone / BeagleBoard
● PandaBoard
● OrigenBoard
● iMX
● DragonBoard
● AM335x Start Kit
● Still:
● Nothing that has a phone/tablet form-factor + is entirely open
19
4.7. Build Times
● Horrible
● On quad-core i7 w/ 8GB RAM:
● GB = 20min
● ICS = 55min
● JB = 75min
● Even Google's own guys are at around 30min
for JB.
● This is a big, unresolved pain
20
4.8. Headless Use
+ =
“And then GNU came back for revenge ...” -- Tarantino's sequel
21
4.8.1. Why?
● Took me a long time to wrap my head around
● “Why don't you just use embedded Linux?”
● What's “Embedded Linux” anyway?
● NEW: Nexus Q
22
4.8.2. Possibilities
● No Java:
● TinyAndroid:
$ BUILD_TINY_ANDROID=true make ­j4
● AOSP w/ custom products .mk file
● The full-blown stack without:
● SurfaceFlinger
● WindowManager
● WallpaperService
● InputMethodManager
23
4.8.3. Tiny Android
● 3MB filesystem
● Minimal root fs
● init
● toolbox + shell
● adb
● bionic + utility libs
● No “system/framework/”
● No “system/app”
24
4.8.4. AOSP w/ custom product .mk
● Have a look at:
● build/target/product/*.mk
● Create your own device under “/device” and
have fun
● Disable zygote at startup
● Remove all apks
● ...
25
4.8.5. Full stack
● Disable:
● SurfaceFlinger
● WindowManager
● WallpaperService
● InputMethodManager
● SystemUI
● Don't let SurfaceFlinger Client try to open binder to SurfaceFlinger
● Feed bogus values back from SurfaceFlinger Client
● Disable qemud (emulator artefact)
● Tweak internals by disabling key calls:
● In ActivityStack.java:
– startHomeActivityLocked()
– setAppStartingWindow()
● wm.detectSafeMode()
● wm.systemReady()
● wm.reclaimSuraceMemoryLocked()
26
5. Trends
● On the embedded side
● On the consumer side
27
5.1. Embedded trends
● Rise of cheap 32-bit CPUs
● Rise of inexpensive storage
● Rise of inexpensive eval boards
● BeagleBoards
● BeagleBone
● RaspberryPi
● For all practical purposes, this hardware is disposable
● Arduino / Maker / DIY trend
● ...
28
5.2. Consumer trends
● Rise of touch-based devices
● Race with Apple on features / price
● Mobile devices outselling PCs since 2010
● Increasingly inexpensive low-end touch-based
devices
29
Source:
“From Altair to iPad: 35 years of personal computer market share”, Jeremy Reimer,
Ars Technica, August 2012
http://arstechnica.com/business/2012/08/from-altair-to-ipad-35-years-of-personal-computer-market-share/
This material is (C) 2012, Ars Technica and is NOT CC-BY-SA.
30
Source:
“From Altair to iPad: 35 years of personal computer market share”, Jeremy Reimer,
Ars Technica, August 2012
http://arstechnica.com/business/2012/08/from-altair-to-ipad-35-years-of-personal-computer-market-share/
This material is (C) 2012, Ars Technica and is NOT CC-BY-SA.
31
Source:
“From Altair to iPad: 35 years of personal computer market share”, Jeremy Reimer,
Ars Technica, August 2012
http://arstechnica.com/business/2012/08/from-altair-to-ipad-35-years-of-personal-computer-market-share/
This material is (C) 2012, Ars Technica and is NOT CC-BY-SA.
32
Thank you ...
karim.yaghmour@opersys.com

Mais conteúdo relacionado

Mais de Linaro

OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...Linaro
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramLinaro
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNLinaro
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...Linaro
 

Mais de Linaro (20)

OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NN
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

LCE12: Android Mini-Summit (Embedded Android)

  • 1. 1 Embedded Android Linaro Connect Europe 2012 Karim Yaghmour @karimyaghmour karim.yaghmour@opersys.com
  • 2. 2 These slides are made available to you under a Creative Commons Share- Alike 3.0 license. The full terms of this license are here: https://creativecommons.org/licenses/by-sa/3.0/ Attribution requirements and misc., PLEASE READ: ● This slide must remain as-is in this specific location (slide #2), everything else you are free to change; including the logo :-) ● Use of figures in other documents must feature the below “Originals at” URL immediately under that figure and the below copyright notice where appropriate. ● You are free to fill in the “Delivered and/or customized by” space on the right as you see fit. ● You are FORBIDEN from using the default “About” slide as-is or any of its contents. ● You are FORBIDEN from using any content provided by 3rd parties without the EXPLICIT consent from those parties. (C) Copyright 2012, Opersys inc. These slides created by: Karim Yaghmour Originals at: www.opersys.com/community/docs Delivered and/or customized by
  • 3. 3 About ● Author of: ● Introduced Linux Trace Toolkit in 1999 ● Originated Adeos and relayfs (kernel/relay.c) ● Training, Custom Dev, Consulting, ...
  • 4. 4 Agenda ● Reasons for looking at Android ● What did we have before Android? ● What does Android give us? ● Challenges ● Trends
  • 5. 5 1. Reasons for looking at Android ● Android-specific: ● User Interface ● Cool factor ● API ● ... ● Same as embedded Linux: ● Cost ● Licensing ● Openness / Availability ● Ability to customize ● ...
  • 6. 6 2. What did we have before Android? Embedded Linux ● A set of ad-hoc methods to package the Linux kernel with a (minimal) filesystem. ● FS content “to be determined” case-by-case ● APIs are specific to each device/build ● “Core software”: ● BusyBox ● U-Boot ● GNU Toolchain ● Your flavor of: ● glibc or uClibc or eglibc ● yocto or buildroot or eldk or ltib or ptxdist or ... ● No serious UX framework
  • 7. 7
  • 8. 8 3. What does Android give us? ● ... apart from its increasingly well known UX ... ● Fully-integrated Eclipse IDE ● SDK/NDK ● ADB ● Fastboot ● Published, well-known, and very rich APIs ● A large and growing developer community ● And still we can use the usual suspects: ● GNU toolchain, BusyBox, u- boot, glibc, ... An actual standardized dev. env. across all product lines
  • 9. 9
  • 10. 10 4. Challenges ● Documentation / Information ● Stack Limitations ● Stack Customization ● Boot time ● Legacy Integration ● Development Hardware ● Build Times ● Headless Use
  • 11. 11 4.1. Documentation / Information ● Official doc for app dev is great ● Official doc for platform dev is practically non-existent ● A few official forums: ● android-building ● android-platform ● android-porting ● Conference talks / presentations ● Scattered documentation all over the web ● Upcoming book (disclaimer applies):
  • 12. 12 4.2. Stack Limitations ● Key functionality not supported by default: ● Ethernet ● AM/FM radio ● Real-time ● Supported functionality doesn't expose everything: ● BlueZ ● USB ● wpa_supplicant ● Bionic isn't a full glibc replacement: ● No SystemV IPC ● No locales ● etc.
  • 13. 13 4.3. Stack Customization ● Lots of default packages ● Modularity wasn't really part of the design ● No “make menuconfig” ● Can't easily select/change: ● Which packages to include ● Which system services are running ● Packages' features ● Ex: ● Can relatively easily replace default home screen ● Modifying status bar requires digging in code
  • 14. 14 4.4. Boot time ● Very lengthy boot process ● Bootloader ● Kernel ● Init ● Zygote ● System services ● DEX optimization ● Key apps ● Unlikely to be able to speed this through trimming ... ● Try: ● Suspend to flash ● Checkpointing
  • 15. 15 4.5. Legacy Integration ● What if I ... ?: ● have been using my custom rootfs forever ● really need glibc ● have a huge stack based on “legacy Linux” ● don't want to deal with AOSP's build system ● want BusyBox ● want to unify with a std Linux desktop ● need things the AOSP doesn't provide ● have a ton of Linux drivers and want those to be used by Android ● ... ● Know this: filesystem integration is trivial: ● Change build system to copy your custom rootfs ● Change init scripts to start you own daemons ● Use sockets to communicate ● Know this too: std Linux desktop integration is NOT
  • 16. 16
  • 17. 17
  • 18. 18 4.6. Development Hardware ● Can I use a standard phone? ● Not really ● Even if you could – some things can only be done in the platform ● Which board is best to evaluate Android? ● BeagleBone / BeagleBoard ● PandaBoard ● OrigenBoard ● iMX ● DragonBoard ● AM335x Start Kit ● Still: ● Nothing that has a phone/tablet form-factor + is entirely open
  • 19. 19 4.7. Build Times ● Horrible ● On quad-core i7 w/ 8GB RAM: ● GB = 20min ● ICS = 55min ● JB = 75min ● Even Google's own guys are at around 30min for JB. ● This is a big, unresolved pain
  • 20. 20 4.8. Headless Use + = “And then GNU came back for revenge ...” -- Tarantino's sequel
  • 21. 21 4.8.1. Why? ● Took me a long time to wrap my head around ● “Why don't you just use embedded Linux?” ● What's “Embedded Linux” anyway? ● NEW: Nexus Q
  • 22. 22 4.8.2. Possibilities ● No Java: ● TinyAndroid: $ BUILD_TINY_ANDROID=true make ­j4 ● AOSP w/ custom products .mk file ● The full-blown stack without: ● SurfaceFlinger ● WindowManager ● WallpaperService ● InputMethodManager
  • 23. 23 4.8.3. Tiny Android ● 3MB filesystem ● Minimal root fs ● init ● toolbox + shell ● adb ● bionic + utility libs ● No “system/framework/” ● No “system/app”
  • 24. 24 4.8.4. AOSP w/ custom product .mk ● Have a look at: ● build/target/product/*.mk ● Create your own device under “/device” and have fun ● Disable zygote at startup ● Remove all apks ● ...
  • 25. 25 4.8.5. Full stack ● Disable: ● SurfaceFlinger ● WindowManager ● WallpaperService ● InputMethodManager ● SystemUI ● Don't let SurfaceFlinger Client try to open binder to SurfaceFlinger ● Feed bogus values back from SurfaceFlinger Client ● Disable qemud (emulator artefact) ● Tweak internals by disabling key calls: ● In ActivityStack.java: – startHomeActivityLocked() – setAppStartingWindow() ● wm.detectSafeMode() ● wm.systemReady() ● wm.reclaimSuraceMemoryLocked()
  • 26. 26 5. Trends ● On the embedded side ● On the consumer side
  • 27. 27 5.1. Embedded trends ● Rise of cheap 32-bit CPUs ● Rise of inexpensive storage ● Rise of inexpensive eval boards ● BeagleBoards ● BeagleBone ● RaspberryPi ● For all practical purposes, this hardware is disposable ● Arduino / Maker / DIY trend ● ...
  • 28. 28 5.2. Consumer trends ● Rise of touch-based devices ● Race with Apple on features / price ● Mobile devices outselling PCs since 2010 ● Increasingly inexpensive low-end touch-based devices
  • 29. 29 Source: “From Altair to iPad: 35 years of personal computer market share”, Jeremy Reimer, Ars Technica, August 2012 http://arstechnica.com/business/2012/08/from-altair-to-ipad-35-years-of-personal-computer-market-share/ This material is (C) 2012, Ars Technica and is NOT CC-BY-SA.
  • 30. 30 Source: “From Altair to iPad: 35 years of personal computer market share”, Jeremy Reimer, Ars Technica, August 2012 http://arstechnica.com/business/2012/08/from-altair-to-ipad-35-years-of-personal-computer-market-share/ This material is (C) 2012, Ars Technica and is NOT CC-BY-SA.
  • 31. 31 Source: “From Altair to iPad: 35 years of personal computer market share”, Jeremy Reimer, Ars Technica, August 2012 http://arstechnica.com/business/2012/08/from-altair-to-ipad-35-years-of-personal-computer-market-share/ This material is (C) 2012, Ars Technica and is NOT CC-BY-SA.