SlideShare una empresa de Scribd logo
1 de 55
Descargar para leer sin conexión
1
Android Things:
Android for IoT
Embedded World Conference 2017
Karim Yaghmour
+karimyaghmour, @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 2017, 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
1. A bit of history
2. Legacy Architectures
3. The Brillo/Weave Intermezzo
4. Now back to your regular programming
5. Hardware
6. “Things” Architecture
7. Images
8. User-Space
9. Services / Daemons
10.APIs
11.Apps
12.What if I told you ... ?
5
1. A bit of history
● Embedded Linux
● Android
● Headless Android
● Brillo
● Android Things
6
1.1. 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
1.2. Android
●
... apart from its ubiquitous UX ...
● Fully-integrated IDE: Android Studio
● SDK/NDK
● ADB
● Fastboot
● Published, well-known, and very rich APIs
● A large and growing developer community
● And still we can use “embedded Linux” components:
● GNU toolchain, BusyBox, u- boot, glibc, ...
An actual standardized dev. env. across all product lines
8
9
1.3. Headless Android
+ =
Android Builders Summit, February 2012
10
A few months later ... ro.config.headless
11
1.4. Brillo / Weave
● Initial Google platform for IoT*
● Based on Android
● Announced at Google I/O 2015
● Never officially released
● Remained in “developer preview” mode
● Needed to sign up for developer preview on https://developers.google.com/brillo/
● Sources available from android.googlesource.com
● “Apps” talk straight to HALs
● Note:
Material here based on sources, NOT on developer preview or any information thereof :P
* New, hip way of talking about “Embedded Systems”, something that's been around for ~50+ years.
12
1.5. Android Things
● “Reboot” of Google's Android IoT strategy
● Announced on Dec 13th, 2016
● Reinstates full Android environment
● Developers use existing Android dev tools
● C/C++ available through NDK
● Extended APIs for IoT
● Currently at Developer Preview 2
● Sources not yet available
13
2. Legacy Architectures
● Embedded Linux
● Android
● Binder
● System services
● HAL
14
15
16
17
18
/frameworks/base/services/java/...
/frameworks/base/services/jni/
/hardware/libhardware/
/device/[MANUF.]/[DEVICE]
/sdk/emulator/
Kernel or module
/frameworks/base/core/...
AOSP-provided
ASL
Manuf.-provided
Manuf. license
Manuf.-provided
GPL-license
19
3. The Brillo/Weave Intermezzo
● Architecture
● Sources
● Images
● User-Space
● Services/Daemons
● Weave
20
3.1. Architecture
● DBus
● Brillo
● Weave
21
22
Your Code
23
24
3.2. Sources
● Getting the sources
● Brillo top level
● Removed from Android top level
● Gone from external/
● New to external
25
3.2.1. Getting the sources
● Same project repo as Android:
android.googlesource.com
● Different manifest file
● Using “repo”:
$ repo init ­u https://android.googlesource.com/brillo/manifest
$ repo sync
26
3.2.2. Brillo top level
bionic C library replacement
bootable Reference bootloader
build Build system
device Device-specific files and components
external Copy of external projects used by AOSP
frameworks Native system services and libraries
hardware Hardware support libs
libnativehelper JNI helpers
prebuilts Prebuilt binaries
product “Products” running on Brillo
system Embedded Linux core
tools Brillo Development Kit
27
3.2.3. Removed from Android top level
art
cts
dalvik
dvelopers
development
docs
frameworks/base and more
libcore
ndk
packages
pdk
sdk
system/vold and more
tools/external
28
3.2.4. Removed from external/
29
3.2.5. Added to external/
bvb Brillo Verified Boot
chromite Tools to build Chrome OS
gentoo
libdivsufsort lightweight suffix array construction algorithm library
lzop LZO compression tool
30
3.3. Images
● AOSP x86 32-bit:
● 5.1M out/target/product/generic_x86/cache.img
● 1.3M out/target/product/generic_x86/ramdisk.img
● 1.3G out/target/product/generic_x86/system.img
● 12M out/target/product/generic_x86/userdata.img
● 551M out/target/product/generic_x86/userdata-qemu.img
● Brillo x86 64-bit:
● 6.2M out/target/product/brilloemulator_x86_64/boot.img
● 36K out/target/product/brilloemulator_x86_64/partition-table.img
● 158M out/target/product/brilloemulator_x86_64/system.img
● 201M out/target/product/brilloemulator_x86_64/userdata.img
● 551M out/target/product/brilloemulator_x86_64/userdata-qemu.img
31
3.4. User Space
32
3.5. Services / Daemons
●
dbus-daemon
●
servicemanager
●
avahi-daemon
●
keystore
●
nativeperms
●
peripheralman
●
sensorservice
●
wpa_supplicant
●
brilloaudioservice
●
metrics_collector
●
metriscsd
●
perfprofd
●
tlsdated
●
tpm_managerd
●
trunksd
●
update_engine
●
weaved
●
webservd
●
shill
●
firewalld
●
dhcpd
33
3.6. Weave
34
4. Now back to your regular
programming
● Android Things does away with most of Brillo
● Revert architecture to original
● Weave seems gone from the FS, but site still on
● Go back to system services with HALs
● Extend Android API for IoT
● Use of Android Studio and co.
● Optional Display
● Use of traditional static permissions
35
5. Hardware
From developer.android.com/things
36
6. “Things” Architecture
Peripheral Manager
IoTLauncher
PIO HAL
PIO APIs
Your App
User-Space
Drivers
Peripheral
Driver
Library
37
7. Images
● Brillo x86 64-bit emulator:
● 6.2M boot.img
● 36K partition-table.img
● 158M system.img
●
201M userdata.img
● Things x86 Edison:
● 11M boot.img
● 176M gapps.img
●
4.6M oem.img
●
420M system.img
●
376K u-boot-edison.img
● 35M userdata.img
● Things Rpi3:
●
350M root + system
● 150M gapps
● AOSP x86 32-bit:
●
1.3G system.img
38
8. User-Space
● Same FS layout as Android
● Mostly same processes
● In short, unlike Brillo, it's still very much Android
39
9. Services / Daemons
● /system/bin/peripheralman
● C++ System Service
● Responds to dumpsys:
dumpsys com.google.android.things.pio.IPeripheralManager
● Also was in Brillo
● Sources (6 months old):
● https://android.googlesource.com/platform/system/peripheralmanager/
● New HAL:
● peripheral_io.h
● As with other HALs:
● /system/lib/hw/peripheral_io.<board_name>.so
40
10. APIs
41
42
11. Apps
● New Launcher: IoTLauncher.apk
● Still responds to same intent as LauncherN.apk
– Try: aapt l -a IoTLauncher.apk
● Likely party firing android.intent.category.IOT_LAUNCHER
– Try: strings IoTLauncher.odex | grep IOT
● Gone:
● Home launcher (replaced by IoTLauncher)
● Status bar
● Settings (at least the content provider ... “ps” says the app is still running ;) )
● Interesting:
● Google services (some of them at least)
● Try:
● dumpsys gfxinfo
43
12. What if I told you ... ?
● What's this IoT thing ... ?
● Consumer
● Industrial/Commercial
● 256MB+ RAM for an embedded device, really?
...
● A long time ago in a galaxy far far away ...
44
RIP Project Ara
45
12.1. Hardware Architecture
46
47
12.2. Software Architecture
48
● Vibrator
● Battery
● Audio
● Baseband modem
● Bluetooth
● Camera
● Consumer IR
12.3. Greybus Device Classes
● Display
● GPS
● Keymaster
● Lights
● NFC
● Sensors
● Wifi
49
12.4. Bridged PHY Connection
Protocols
● USB
● GPIO
● SPI
● UART
● PWM
● I2C
● SDIO
50
51
52
12.5. Greybus for IOT
Alexandre Baillon
Baylibre
53From Alexandre's ELCE 2016 slides
54
12.6. Can I haz an Android for
real-world IOT ?
55
Thank you ...
karim.yaghmour@opersys.com

Más contenido relacionado

La actualidad más candente

Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowOpersys inc.
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIOpersys inc.
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things InternalsOpersys inc.
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with PieOpersys inc.
 
Developing Android Platform Tools
Developing Android Platform ToolsDeveloping Android Platform Tools
Developing Android Platform ToolsOpersys inc.
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Opersys inc.
 
Brillo/Weave Internals
Brillo/Weave InternalsBrillo/Weave Internals
Brillo/Weave InternalsOpersys inc.
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Opersys inc.
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security InternalsOpersys inc.
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
Embedded Android Workshop with Oreo
Embedded Android Workshop with OreoEmbedded Android Workshop with Oreo
Embedded Android Workshop with OreoOpersys inc.
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowKarim Yaghmour
 

La actualidad más candente (20)

Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
 
Developing Android Platform Tools
Developing Android Platform ToolsDeveloping Android Platform Tools
Developing Android Platform Tools
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
Brillo/Weave Internals
Brillo/Weave InternalsBrillo/Weave Internals
Brillo/Weave Internals
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security Internals
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Embedded Android Workshop with Oreo
Embedded Android Workshop with OreoEmbedded Android Workshop with Oreo
Embedded Android Workshop with Oreo
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Project Ara
Project AraProject Ara
Project Ara
 

Destacado

Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017 Stefano Sanna
 
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)Codit
 
Introduction to AWS Greengrass - DevDay Los Angeles 2017
Introduction to AWS Greengrass - DevDay Los Angeles 2017Introduction to AWS Greengrass - DevDay Los Angeles 2017
Introduction to AWS Greengrass - DevDay Los Angeles 2017Amazon Web Services
 
Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)
Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)
Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)Codit
 
Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)
Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)
Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)Codit
 
Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017Masahiro Hidaka
 

Destacado (9)

Android Things - The IoT platform for everyone.
Android Things - The IoT platform for everyone. Android Things - The IoT platform for everyone.
Android Things - The IoT platform for everyone.
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
 
Android Things
Android ThingsAndroid Things
Android Things
 
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
 
Introduction to AWS Greengrass - DevDay Los Angeles 2017
Introduction to AWS Greengrass - DevDay Los Angeles 2017Introduction to AWS Greengrass - DevDay Los Angeles 2017
Introduction to AWS Greengrass - DevDay Los Angeles 2017
 
Introducing AWS Greengrass
Introducing AWS GreengrassIntroducing AWS Greengrass
Introducing AWS Greengrass
 
Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)
Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)
Microsoft Azure IoT Hub (Sam Vanhoutte @TechdaysNL 2017)
 
Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)
Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)
Living on the (IoT) edge (Sam Vanhoutte @TechdaysNL 2017)
 
Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017Android Things Latest News / Aug 25, 2017
Android Things Latest News / Aug 25, 2017
 

Similar a Android Things: Android for IoT

Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VOpersys inc.
 
Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Opersys inc.
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVOpersys inc.
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopOpersys inc.
 
Android beyond the smartphone
Android beyond the smartphoneAndroid beyond the smartphone
Android beyond the smartphoneChris Simmonds
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowOpersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVOpersys inc.
 
Embedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon VEmbedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon VOpersys inc.
 
Customizing Android's UI
Customizing Android's UICustomizing Android's UI
Customizing Android's UIOpersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentKarim Yaghmour
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopOpersys inc.
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Opersys inc.
 
Embedded Android Workshop part I ESC SV 2012
Embedded Android Workshop part I ESC SV 2012Embedded Android Workshop part I ESC SV 2012
Embedded Android Workshop part I ESC SV 2012Opersys inc.
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesMender.io
 
Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Opersys inc.
 
Embedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IVEmbedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IVOpersys inc.
 

Similar a Android Things: Android for IoT (20)

Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
 
Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014
 
Is Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IVIs Android the New Embedded Linux? at AnDevCon IV
Is Android the New Embedded Linux? at AnDevCon IV
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with Lollipop
 
Android beyond the smartphone
Android beyond the smartphoneAndroid beyond the smartphone
Android beyond the smartphone
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IV
 
Embedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon VEmbedded Android Workshop at AnDevCon V
Embedded Android Workshop at AnDevCon V
 
Customizing Android's UI
Customizing Android's UICustomizing Android's UI
Customizing Android's UI
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with Lollipop
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Embedded Android Workshop part I ESC SV 2012
Embedded Android Workshop part I ESC SV 2012Embedded Android Workshop part I ESC SV 2012
Embedded Android Workshop part I ESC SV 2012
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSes
 
Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014Embedded Android Workshop at ABS 2014
Embedded Android Workshop at ABS 2014
 
Embedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IVEmbedded Android Workshop at AnDevCon IV
Embedded Android Workshop at AnDevCon IV
 
Android Platform Debugging & Development
Android Platform Debugging & Development Android Platform Debugging & Development
Android Platform Debugging & Development
 

Más de Opersys inc.

Android Automotive
Android AutomotiveAndroid Automotive
Android AutomotiveOpersys inc.
 
Android 10 Internals Update
Android 10 Internals UpdateAndroid 10 Internals Update
Android 10 Internals UpdateOpersys inc.
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 

Más de Opersys inc. (9)

Android Automotive
Android AutomotiveAndroid Automotive
Android Automotive
 
Android 10 Internals Update
Android 10 Internals UpdateAndroid 10 Internals Update
Android 10 Internals Update
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Project Ara
Project AraProject Ara
Project Ara
 

Último

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Último (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Android Things: Android for IoT

  • 1. 1 Android Things: Android for IoT Embedded World Conference 2017 Karim Yaghmour +karimyaghmour, @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 2017, 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 1. A bit of history 2. Legacy Architectures 3. The Brillo/Weave Intermezzo 4. Now back to your regular programming 5. Hardware 6. “Things” Architecture 7. Images 8. User-Space 9. Services / Daemons 10.APIs 11.Apps 12.What if I told you ... ?
  • 5. 5 1. A bit of history ● Embedded Linux ● Android ● Headless Android ● Brillo ● Android Things
  • 6. 6 1.1. 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 1.2. Android ● ... apart from its ubiquitous UX ... ● Fully-integrated IDE: Android Studio ● SDK/NDK ● ADB ● Fastboot ● Published, well-known, and very rich APIs ● A large and growing developer community ● And still we can use “embedded Linux” components: ● GNU toolchain, BusyBox, u- boot, glibc, ... An actual standardized dev. env. across all product lines
  • 8. 8
  • 9. 9 1.3. Headless Android + = Android Builders Summit, February 2012
  • 10. 10 A few months later ... ro.config.headless
  • 11. 11 1.4. Brillo / Weave ● Initial Google platform for IoT* ● Based on Android ● Announced at Google I/O 2015 ● Never officially released ● Remained in “developer preview” mode ● Needed to sign up for developer preview on https://developers.google.com/brillo/ ● Sources available from android.googlesource.com ● “Apps” talk straight to HALs ● Note: Material here based on sources, NOT on developer preview or any information thereof :P * New, hip way of talking about “Embedded Systems”, something that's been around for ~50+ years.
  • 12. 12 1.5. Android Things ● “Reboot” of Google's Android IoT strategy ● Announced on Dec 13th, 2016 ● Reinstates full Android environment ● Developers use existing Android dev tools ● C/C++ available through NDK ● Extended APIs for IoT ● Currently at Developer Preview 2 ● Sources not yet available
  • 13. 13 2. Legacy Architectures ● Embedded Linux ● Android ● Binder ● System services ● HAL
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. 17
  • 19. 19 3. The Brillo/Weave Intermezzo ● Architecture ● Sources ● Images ● User-Space ● Services/Daemons ● Weave
  • 21. 21
  • 23. 23
  • 24. 24 3.2. Sources ● Getting the sources ● Brillo top level ● Removed from Android top level ● Gone from external/ ● New to external
  • 25. 25 3.2.1. Getting the sources ● Same project repo as Android: android.googlesource.com ● Different manifest file ● Using “repo”: $ repo init ­u https://android.googlesource.com/brillo/manifest $ repo sync
  • 26. 26 3.2.2. Brillo top level bionic C library replacement bootable Reference bootloader build Build system device Device-specific files and components external Copy of external projects used by AOSP frameworks Native system services and libraries hardware Hardware support libs libnativehelper JNI helpers prebuilts Prebuilt binaries product “Products” running on Brillo system Embedded Linux core tools Brillo Development Kit
  • 27. 27 3.2.3. Removed from Android top level art cts dalvik dvelopers development docs frameworks/base and more libcore ndk packages pdk sdk system/vold and more tools/external
  • 29. 29 3.2.5. Added to external/ bvb Brillo Verified Boot chromite Tools to build Chrome OS gentoo libdivsufsort lightweight suffix array construction algorithm library lzop LZO compression tool
  • 30. 30 3.3. Images ● AOSP x86 32-bit: ● 5.1M out/target/product/generic_x86/cache.img ● 1.3M out/target/product/generic_x86/ramdisk.img ● 1.3G out/target/product/generic_x86/system.img ● 12M out/target/product/generic_x86/userdata.img ● 551M out/target/product/generic_x86/userdata-qemu.img ● Brillo x86 64-bit: ● 6.2M out/target/product/brilloemulator_x86_64/boot.img ● 36K out/target/product/brilloemulator_x86_64/partition-table.img ● 158M out/target/product/brilloemulator_x86_64/system.img ● 201M out/target/product/brilloemulator_x86_64/userdata.img ● 551M out/target/product/brilloemulator_x86_64/userdata-qemu.img
  • 32. 32 3.5. Services / Daemons ● dbus-daemon ● servicemanager ● avahi-daemon ● keystore ● nativeperms ● peripheralman ● sensorservice ● wpa_supplicant ● brilloaudioservice ● metrics_collector ● metriscsd ● perfprofd ● tlsdated ● tpm_managerd ● trunksd ● update_engine ● weaved ● webservd ● shill ● firewalld ● dhcpd
  • 34. 34 4. Now back to your regular programming ● Android Things does away with most of Brillo ● Revert architecture to original ● Weave seems gone from the FS, but site still on ● Go back to system services with HALs ● Extend Android API for IoT ● Use of Android Studio and co. ● Optional Display ● Use of traditional static permissions
  • 36. 36 6. “Things” Architecture Peripheral Manager IoTLauncher PIO HAL PIO APIs Your App User-Space Drivers Peripheral Driver Library
  • 37. 37 7. Images ● Brillo x86 64-bit emulator: ● 6.2M boot.img ● 36K partition-table.img ● 158M system.img ● 201M userdata.img ● Things x86 Edison: ● 11M boot.img ● 176M gapps.img ● 4.6M oem.img ● 420M system.img ● 376K u-boot-edison.img ● 35M userdata.img ● Things Rpi3: ● 350M root + system ● 150M gapps ● AOSP x86 32-bit: ● 1.3G system.img
  • 38. 38 8. User-Space ● Same FS layout as Android ● Mostly same processes ● In short, unlike Brillo, it's still very much Android
  • 39. 39 9. Services / Daemons ● /system/bin/peripheralman ● C++ System Service ● Responds to dumpsys: dumpsys com.google.android.things.pio.IPeripheralManager ● Also was in Brillo ● Sources (6 months old): ● https://android.googlesource.com/platform/system/peripheralmanager/ ● New HAL: ● peripheral_io.h ● As with other HALs: ● /system/lib/hw/peripheral_io.<board_name>.so
  • 41. 41
  • 42. 42 11. Apps ● New Launcher: IoTLauncher.apk ● Still responds to same intent as LauncherN.apk – Try: aapt l -a IoTLauncher.apk ● Likely party firing android.intent.category.IOT_LAUNCHER – Try: strings IoTLauncher.odex | grep IOT ● Gone: ● Home launcher (replaced by IoTLauncher) ● Status bar ● Settings (at least the content provider ... “ps” says the app is still running ;) ) ● Interesting: ● Google services (some of them at least) ● Try: ● dumpsys gfxinfo
  • 43. 43 12. What if I told you ... ? ● What's this IoT thing ... ? ● Consumer ● Industrial/Commercial ● 256MB+ RAM for an embedded device, really? ... ● A long time ago in a galaxy far far away ...
  • 46. 46
  • 48. 48 ● Vibrator ● Battery ● Audio ● Baseband modem ● Bluetooth ● Camera ● Consumer IR 12.3. Greybus Device Classes ● Display ● GPS ● Keymaster ● Lights ● NFC ● Sensors ● Wifi
  • 49. 49 12.4. Bridged PHY Connection Protocols ● USB ● GPIO ● SPI ● UART ● PWM ● I2C ● SDIO
  • 50. 50
  • 51. 51
  • 52. 52 12.5. Greybus for IOT Alexandre Baillon Baylibre
  • 53. 53From Alexandre's ELCE 2016 slides
  • 54. 54 12.6. Can I haz an Android for real-world IOT ?