SlideShare une entreprise Scribd logo
1  sur  100
Télécharger pour lire hors ligne
Android Embedded
Smart Hubs als
Schaltzentrale des IoT
Dominik Helleberg
Speaker
Dominik Helleberg
Mobile Development
Android / Embedded
Tools
http://dominik-helleberg.de/+
Android as we know + love it
Android as we know + love it
Android everywhere?
Android everywhere?
Google Glass http://www.google.com/glass/start/
Samsung Gear Live https://play.google.com/store/devices/details?id=samsung_gear_live_black
Android everywhere?
But there‘s even more...
https://twitter.com/Arubin/status/27808662429
Android Embedded
Amazon http://www.amazon.de/Kindle-Fire-Zoll-HDX-Display-WLAN/dp/B00D695H6O
Samsung http://www.samsung.com/de/promotions/galaxycamera/
Boing 787 http://www.boeing.com/boeing/commercial/787family/
LG Kühlschrank http://www.lg.com/us/refrigerators/lg-LFX31995ST-french-3-door-refrigerator
Motorola MC3200 http://goo.gl/5dOVL7
Honda http://www.golem.de/news/honda-connect-nvidias-tegra-faehrt-mit-android-in-japan-1410-109590.html
NCR http://response.ncr.com/NCR-Kalpana
Android Embedded
How does it relate to IoT?
Android Embedded
Android Embedded
Smart
Hub
Smart Hubs
Smart
Hub
Manage local „Things“
• Z-Wave
• ZigBee
• Thread
• WiFi
• Bluetooth (LE)
• ANT(+)
• BidCos
• KNX
• CAN Bus
• AUTOSAR
• BoardR-Reach
Smart Hubs
Smart
Hub
Secure local „Things“
• Encryption
• Secure Connection
• Distribute Updates
• Firewall / Gateway
Smart Hubs
Smart
Hub
Control local „Things“
• Centralized Logic
• Data Aggregation
• Status Reports
• Local HMI
Smart Hubs
Smart
Hub
Smart Hubs are embedded Systems
• Robust
• Secure
• Easy to update
• Embedded friendly
• Rich Graphics
• Easy to build upon
Smart Hubs with Android
We do have
• Windows Embedded
• QNX
• Embedded Linux(s)
....
Is there anything new?
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
Smart Hubs with Android
HMI Evolution
Canvas API
Views
Application
OpenGL ES
libHWUI SKIA
SurfaceFlinger
Hardware Acceleration “builtin”
Smart Hubs with Android
Smart Hubs with Android
Smart Hubs with Android
Google „Power“
http://www.google.com/design/spec/material-design/introduction.html#
https://www.youtube.com/watch?v=EBlTzQsUoOw
http://www.anandtech.com/show/8231/a-closer-look-at-android-runtime-art-in-android-l
http://arstechnica.com/gadgets/2014/07/examining-project-volta-we-put-android-l-through-our-battery-test/
Smart Hubs with Android
Google „Power“
https://plus.google.com/u/0/104162817526798820937/posts/UVXbWmxWvBh
https://www.openhub.net/p/platform_art
Current „State of the art“
Current „State of the art“
Current „State of the art“
Current „State of the art“
Current „State of the art“
Current „State of the art“
Android Graphics Performance
Android Graphics Performance
Media Framework
https://source.android.com/devices/media.html
Android Graphics Performance
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
Smart Hubs with Android
SystemServic
e
Application Application logic
Java API / SDK / Documentation
Access to service over RPC
Manager
Interface Binder Interface for the service (AIDL)
Manager
Service
libhardware
Logic, Security Checks, Native JNI calls
Native “Interface” (header file)
driver.so
/dev/foo
Device Dependent Driver
Kernel / Module
Smart Hubs with Android
SystemServic
e
Application
/dev/foo
driver.so
libhardware
Manager
Service
Manager
Interface
Java libs Android libs
Android
Tools
Java
Tools
Smart Hubs with Android
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
Smart Hubs with Android
Smart Hubs with Android
shell@shamu:/ $ mount
rootfs / rootfs ro,seclabel,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1505044k,nr_inodes=171672,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1505044k,nr_inodes=171672,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1505044k,nr_inodes=171672,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=1505044k,nr_inodes=171672,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware ext4
ro,context=u:object_r:firmware_file:s0,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4
rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/mdm1m9kefs3 /fsg ext4
ro,context=u:object_r:fsg_file:s0,nosuid,nodev,relatime 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/dm-0 /data ext4
rw,seclabel,nosuid,nodev,noatime,nodiratime,nobarrier,noauto_da_alloc,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse
rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
Smart Hubs with Android
shell@shamu:/ $ mount
rootfs / rootfs ro,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1505044k
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4
ro,seclabel,relatime,data=ordered 0 0
Smart Hubs with Android
• Read-Only System paritition
• SE-Linux ready
• Application Sandbox
• Encryption
• Verified Boot
• High Performance IPC (Binder)
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
Smart Hubs with Android
Hardware
LVDS
HDMI
USB
45
Smart Hubs with Android
Hardware
Komponenten
• SBC oder MBC
• Base Board
• (optional) CPU Board
• TFT / LCD Screen
• Touch Sensor
• Screen / Touch Controller
Converter
Base
Board
CPU
Board
Screen + Touch
Sensor
converter
ODroid http://www.hardkernel.com/main/main.php 46
Smart Hubs with Android
Hardware
Baseboard - Evaluation
• SOC (CPU / GPU)
• RAM
• Storage
• Interfaces
Base
Board
CPU
Board
47
Smart Hubs with Android
Hardware
Baseboard
• SOC (CPU / GPU)
• RAM
• Storage
• Interfaces
Base
Board
CPU
Board
SBC MBC
48
Smart Hubs with Android
Hardware
Screen + Touch
• LCD / TFT Screen
• Touch Sensor
• Converter to „connect“ to
BaseBoard
Screen + Touch
Sensor
converter
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
http://gadgetsin.com/uploads/2012/04/android_robot_lego_brick_building_kit_1.jpg
http://gadgetsin.com/uploads/2012/04/android_robot_lego_brick_building_kit_3.jpg
Build the Droid
terminology
Product and Board
configuration
Modules
Build Target
Build the Droid
product and variant management
● Boardconfiguration: contain hardware specific configurations
● Architecture (ARM/x86/mips,…)
● Peripherals: GPS, Bluetooth,...
● Boot Parameter,…
● Inheritance
myBoardConfig.mk
fsl-BoardConfigCommon.mk
fsl-omx.mk fsl-codec.mkfsl-gpu.mk
Build the Droid
product and variant management
● Product configurations: describes software
● Device Name, Vendor Name, etc...
● Pre-Installed Apps, Themes, Sounds
● Localisation
● Inheritance
my_product.mk
ereader.mk imx5x.mk
language_small.mkgeneric_no_telephony.mk
core.mk
http://gadgetsin.com/uploads/2012/04/android_robot_lego_brick_building_kit_1.jpg
http://gadgetsin.com/uploads/2012/04/android_robot_lego_brick_building_kit_3.jpg
Build the Droid
terminology
Product and Board
configuration
Modules
Build Target
three steps to your custom image 2/3
Build the Droid
build modules
Everything is a Module
● Apps, ADB, Framework, SDK, Libraries, Fonts, etc. (3713 Modules in 5.0)
● Defined in own Makefile: Android.mk
● lot of stubs, extensive use of Makefile macros
packages/apps/Calculator/Android.mk:
LOCAL_PATH := $(call my-dir)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := libarity android-support-v4 guava
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SDK_VERSION := current
LOCAL_PACKAGE_NAME := Calculator
three steps to your custom image 2/3
Build the Droid
the result & releasetools
Results:
● make droid: complete images for the target device, host tools
(boot.img, system.img, recovery.img…)
● make dist: device_target_files
(a zip archive, containing all information to create every build system output)
Releasetools:
a set of tools to create images, sign and verify images and updates
● ./sign_target_files_apks
sign a build with test or debug certificates. All builds are signed!
● ./img_from_target_files
create flashable images (called from ‘make droid’)
● ./ota_from_target_files
create full or incremental over-the-air updates
For a Nexus 7 (2013)
1. configure the build: loads Product and Boardconfiguration in environment
$> source build/envsetup.sh && lunch aosp_flo-userdebug
2. compile: builds “core” and each module that is included in this
configuration
$> make droid -j8
....zzzZZZzzzZZZzzz...
3. Flash / distribute the result: runs releasetools, packs, signs & flashes the
build
$> make dist || fastboot flashall
Build the Droid
three steps to your custom image
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware Integration
Smart Hubs with Android
OTA Updates
three steps to your custom image 2/3
Results:
● make droid: complete images for the target device, host tools
(boot.img, system.img, recovery.img…)
● make dist: device_target_files
(a zip archive, containing all information to create every build system output)
Releasetools:
a set of tools to create images, sign and verify images and updates
● ./sign_target_files_apks
sign a build with test or debug certificates. All builds are signed!
● ./img_from_target_files
create flashable images (called from ‘make droid’)
● ./ota_from_target_files
create full or incremental over-the-air updates
Smart Hubs with Android
OTA Updates
OTA Update
RecoverySystem.
VerifyUpdate()
RecoverySystem.
InstallUpdate()
OK
verify signature
unpack archive
OK
read args
from file
execute updater
binary
execute edify
update script
fail
cleanup
Android Recovery
✖
✔
✔
save log &
reboot
✖
Smart Hubs with Android
OTA Updates
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware Integration
Smart Hubs with Android
Hardware Integration
Smart Hubs with Android
Hardware Integration
SystemServic
e
Application Application logic
Java API / SDK / Documentation
Access to service over RPC
Manager
Interface Binder Interface for the service (AIDL)
Manager
Service
libhardware
Logic, Security Checks, Native JNI calls
Native “Interface” (header file)
driver.so
/dev/foo
Device Dependent Driver
Kernel / Module
Smart Hubs with Android
Hardware Integration
driver.so
/dev/foo
● Grove 16x2 display with I2C extension
○ LCD-Module
○ RGB-Module
● MarS Board with Android 4.0.4 (BSP)
● The LCD is connected through I2C
○ LCD 0x3e
○ RGB 0x62
Smart Hubs with Android
Hardware Integration
driver.so
/dev/foo
● The Android Kernel is based on a Linux Kernel with some
android specific adaptations
● The Linux Kernel provides an I2C-Core-Driver
○ It is responsible for the communication between the devices
connected to the bus
● For the LCD-Module and the RGB-Module an I2C-Client-
Driver is needed
Smart Hubs with Android
Hardware Integration
driver.so
/dev/foo
Smart Hubs with Android
Hardware Integration
SystemServic
e
Application
Manager
Interface
Manager
Service
libhardware
driver.so
/dev/foo
Smart Hubs with Android
Hardware Integration
● Access to drivers through a HAL library (user space)
● HAL library uses the system call interface to get access to the
device files (/dev/lcd1313M1 u. /dev/rgb1313M1)
● A proprietary license can be used (Driver has to use GPL)
libhardware
Smart Hubs with Android
Hardware Integration
● The HAL library consists of two components:
○ Implementation under:
■ /device/fsl/marsboard_6q/lcd1313M1
○ Header file under:
■ /hardware/libhardware/include/hardware
● The header file represents the interface of the HAL library
libhardware
Smart Hubs with Android
Hardware Integration
libhardware
● Some functions of the HAL library
○ displayInit()
○ setText(...)
○ setRGB(...)
○ backlightOn()/backlightOff()
○ ...
Smart Hubs with Android
Hardware Integration
SystemServic
e
Application
Manager
Interface
Manager
Service
libhardware
driver.so
/dev/foo
Smart Hubs with Android
Hardware Integration
● The Manager Service consists of two components:
○ the native methods in
com_android_server_LCDService.cpp
○ LCDService.java
● com_android_server_LCDService.cpp includes the
header file of the HAL library and loads the library
● LCDService.java calls the native methods over the JNI
Manager
Service
Smart Hubs with Android
Hardware Integration
Manager
Service
Smart Hubs with Android
Hardware Integration
SystemServic
e
Application
Manager
Interface
Manager
Service
libhardware
driver.so
/dev/foo
Smart Hubs with Android
Hardware Integration
● A ILCDService.aidl file for the LCDService is needed
● This file contains the declaration of the functions callable
from Binder
● The .aidl file is used to generate a Binder-Interface for the
Java service (ILCDService.java)
Manager
Interface
Smart Hubs with Android
Hardware Integration
SystemServic
e
Application
Manager
Interface
Manager
Service
libhardware
driver.so
/dev/foo
Smart Hubs with Android
Hardware Integration
public class LCDManager
{
public static LCDManager getLCDManager()
{
IBinder b = ServiceManager.getService("lcd1313M1");
ILCDService service = ILCDService.Stub.asInterface(b);
return new LCDManager(service);
}
public int setText(String mString) {
try {
return mService.setText(mString);
} catch (RemoteException e) {
return -1;
}
}
SystemServic
e
Smart Hubs with Android
Hardware Integration
SystemServic
e
Application
Manager
Interface
Manager
Service
libhardware
driver.so
/dev/foo
Smart Hubs with Android
Application Development
Smart Hubs with Android
Application Development – SDK AddOns
● How to get an App-Developer started?
● “Well, thats easy! Just ..."
○ Set up a linux box / VM
○ Install build chain
○ repo init && repo sync
○ lunch full-eng
○ make ...
SDK Addon
SDK Manager Integration
SDK Addon
device/inovex/
SDK Addon
Contents
System Image
Java Libraries /
Stubs
Java Docs
lcd_sdk_addon-linux-x86.zip:
Kernel
Hardware
Definitions
(skins)
Metadata
SDK Addon
Contents
lcd_sdk_addon-linux-x86.zip:
SDK Addon
SDK Manager Integration I
SDK Addon
SDK Manager Integration II
SDK Addon
Gradle integration
SDK Addon
Android Studio
SDK Addon
Android Studio
SDK Addon
Emulator
SDK Addon
Emulator Log
D/LCDService( 203): LCD changed:
D/LCDService( 203): /------------------
D/LCDService( 203): | inovex GmbH |
D/LCDService( 203): | www.inovex.de/em |
D/LCDService( 203): ------------------/
D/LCDService( 203): Background: #FF5500
Smart Hubs with Android
Is there anything new?
We do have
• Windows Embedded
• QNX
• Embedded Linux(s)
....
Smart Hubs with Android
• Performance + HMI
• „App“ like Build-cycle
• Stable + Proven Architecture
• Pluggable Build System
• Robust + Secure OTA Update
• Protocols + Hardware integration
Smart Hubs with Android
So tell me about the dark side...
• No Play Services (unless you go the CTS Route)
• (Almost) no documentation
• No Roadmap
• Obvious (?) things missing
• Realtime ?
Smart Hubs with Android
Smart Hubs with Android
Smart Hubs with Android
So tell me about the dark side...
• No Play Services (unless you go the CTS Route)
• (Almost) no documentation
• No Roadmap
• Obvious (?) things missing
• Realtime ?
https://entwickler.de/IoT-Mag
Embedded Android + IoT
+
Devel Board
http://www.oreilly.de/catalog/9781449308292/index.html
http://www.pearsonhighered.com/educator/product/Modern-Operating-Systems/9780133591620.page
Getting Started
Embedded Android
Kontakt
Dominik Helleberg
http://dominik-helleberg.de/+
Mail: dominik.helleberg@inovex.de
Vielen Dank für Ihre Aufmerksamkeit!

Contenu connexe

En vedette

Dissecting State-of-the-Art Android Malware Using Static and Dynamic Analysis
Dissecting State-of-the-Art Android Malware Using Static and Dynamic AnalysisDissecting State-of-the-Art Android Malware Using Static and Dynamic Analysis
Dissecting State-of-the-Art Android Malware Using Static and Dynamic Analysis
CHOOSE
 

En vedette (19)

IoT
IoTIoT
IoT
 
Engage and retain users in the mobile world
Engage and retain users in the mobile worldEngage and retain users in the mobile world
Engage and retain users in the mobile world
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android
 
Do Algorithms Dream of Android Sheep?
Do Algorithms Dream of Android Sheep?Do Algorithms Dream of Android Sheep?
Do Algorithms Dream of Android Sheep?
 
Ali Proff: Android Dreams
Ali Proff: Android DreamsAli Proff: Android Dreams
Ali Proff: Android Dreams
 
Embedded Android Market Development
Embedded Android Market DevelopmentEmbedded Android Market Development
Embedded Android Market Development
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platform
 
Sidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion UsersSidiq Permana - Building For The Next Billion Users
Sidiq Permana - Building For The Next Billion Users
 
Xamarin Platform
Xamarin PlatformXamarin Platform
Xamarin Platform
 
GDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android NGDG Devfest 2016 session on Android N
GDG Devfest 2016 session on Android N
 
Trends In The Android Ecosystem
Trends In The Android EcosystemTrends In The Android Ecosystem
Trends In The Android Ecosystem
 
Developing Hybrid Applications with IONIC
Developing Hybrid Applications with IONICDeveloping Hybrid Applications with IONIC
Developing Hybrid Applications with IONIC
 
Dissecting State-of-the-Art Android Malware Using Static and Dynamic Analysis
Dissecting State-of-the-Art Android Malware Using Static and Dynamic AnalysisDissecting State-of-the-Art Android Malware Using Static and Dynamic Analysis
Dissecting State-of-the-Art Android Malware Using Static and Dynamic Analysis
 
BlackBerry PRIV Brochure
BlackBerry PRIV BrochureBlackBerry PRIV Brochure
BlackBerry PRIV Brochure
 
Trends In The Android Ecosystem (GOAB - Aug 2016)
Trends In The Android Ecosystem (GOAB - Aug 2016)Trends In The Android Ecosystem (GOAB - Aug 2016)
Trends In The Android Ecosystem (GOAB - Aug 2016)
 
Hybrid apps - Your own mini Cordova
Hybrid apps - Your own mini CordovaHybrid apps - Your own mini Cordova
Hybrid apps - Your own mini Cordova
 
User Experience for Android
User Experience for AndroidUser Experience for Android
User Experience for Android
 
Performance optimization for Android
Performance optimization for AndroidPerformance optimization for Android
Performance optimization for Android
 
Reark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJavaReark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJava
 

Similaire à Android Embedded - Smart Hubs als Schaltzentrale des IoT

Android Scripting
Android ScriptingAndroid Scripting
Android Scripting
Juan Gomez
 
HTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the FutureHTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the Future
Motorola Mobility - MOTODEV
 
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
Paris Open Source Summit
 

Similaire à Android Embedded - Smart Hubs als Schaltzentrale des IoT (20)

Android Scripting
Android ScriptingAndroid Scripting
Android Scripting
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvm
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop
 
ABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting Walkthrough
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Core Android
Core AndroidCore Android
Core Android
 
PhoneGap talk from Singapore
PhoneGap talk from SingaporePhoneGap talk from Singapore
PhoneGap talk from Singapore
 
Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Pentesting Android Applications
Pentesting Android ApplicationsPentesting Android Applications
Pentesting Android Applications
 
Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone
 
The Magic of flutter Comex oman 2019
The Magic of flutter Comex oman 2019The Magic of flutter Comex oman 2019
The Magic of flutter Comex oman 2019
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Betabeers Android as a Digital Signage platform
Betabeers   Android as a Digital Signage platformBetabeers   Android as a Digital Signage platform
Betabeers Android as a Digital Signage platform
 
HTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the FutureHTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the Future
 
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
 
Android Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start GuideAndroid Applications Development: A Quick Start Guide
Android Applications Development: A Quick Start Guide
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Bbs214 Cloud IDEs
Bbs214 Cloud IDEsBbs214 Cloud IDEs
Bbs214 Cloud IDEs
 

Plus de inovex GmbH

Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
inovex GmbH
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
inovex GmbH
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
inovex GmbH
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
inovex GmbH
 

Plus de inovex GmbH (20)

lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
Are you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AIAre you sure about that?! Uncertainty Quantification in AI
Are you sure about that?! Uncertainty Quantification in AI
 
Why natural language is next step in the AI evolution
Why natural language is next step in the AI evolutionWhy natural language is next step in the AI evolution
Why natural language is next step in the AI evolution
 
WWDC 2019 Recap
WWDC 2019 RecapWWDC 2019 Recap
WWDC 2019 Recap
 
Network Policies
Network PoliciesNetwork Policies
Network Policies
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Jenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen UmgebungenJenkins X – CI/CD in wolkigen Umgebungen
Jenkins X – CI/CD in wolkigen Umgebungen
 
AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeten
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetes
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Azure IoT Edge
Azure IoT EdgeAzure IoT Edge
Azure IoT Edge
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenten
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?
 
Dev + Ops = Go
Dev + Ops = GoDev + Ops = Go
Dev + Ops = Go
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Project
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
 

Dernier

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
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
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

Android Embedded - Smart Hubs als Schaltzentrale des IoT

  • 1. Android Embedded Smart Hubs als Schaltzentrale des IoT Dominik Helleberg
  • 2. Speaker Dominik Helleberg Mobile Development Android / Embedded Tools http://dominik-helleberg.de/+
  • 3. Android as we know + love it
  • 4. Android as we know + love it
  • 6. Android everywhere? Google Glass http://www.google.com/glass/start/ Samsung Gear Live https://play.google.com/store/devices/details?id=samsung_gear_live_black
  • 8. But there‘s even more... https://twitter.com/Arubin/status/27808662429
  • 9. Android Embedded Amazon http://www.amazon.de/Kindle-Fire-Zoll-HDX-Display-WLAN/dp/B00D695H6O Samsung http://www.samsung.com/de/promotions/galaxycamera/ Boing 787 http://www.boeing.com/boeing/commercial/787family/ LG Kühlschrank http://www.lg.com/us/refrigerators/lg-LFX31995ST-french-3-door-refrigerator Motorola MC3200 http://goo.gl/5dOVL7 Honda http://www.golem.de/news/honda-connect-nvidias-tegra-faehrt-mit-android-in-japan-1410-109590.html NCR http://response.ncr.com/NCR-Kalpana
  • 10. Android Embedded How does it relate to IoT?
  • 13. Smart Hubs Smart Hub Manage local „Things“ • Z-Wave • ZigBee • Thread • WiFi • Bluetooth (LE) • ANT(+) • BidCos • KNX • CAN Bus • AUTOSAR • BoardR-Reach
  • 14. Smart Hubs Smart Hub Secure local „Things“ • Encryption • Secure Connection • Distribute Updates • Firewall / Gateway
  • 15. Smart Hubs Smart Hub Control local „Things“ • Centralized Logic • Data Aggregation • Status Reports • Local HMI
  • 16. Smart Hubs Smart Hub Smart Hubs are embedded Systems • Robust • Secure • Easy to update • Embedded friendly • Rich Graphics • Easy to build upon
  • 17. Smart Hubs with Android We do have • Windows Embedded • QNX • Embedded Linux(s) .... Is there anything new?
  • 18. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 19. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 20. Smart Hubs with Android HMI Evolution
  • 21. Canvas API Views Application OpenGL ES libHWUI SKIA SurfaceFlinger Hardware Acceleration “builtin” Smart Hubs with Android
  • 22. Smart Hubs with Android
  • 23. Smart Hubs with Android Google „Power“ http://www.google.com/design/spec/material-design/introduction.html# https://www.youtube.com/watch?v=EBlTzQsUoOw http://www.anandtech.com/show/8231/a-closer-look-at-android-runtime-art-in-android-l http://arstechnica.com/gadgets/2014/07/examining-project-volta-we-put-android-l-through-our-battery-test/
  • 24. Smart Hubs with Android Google „Power“ https://plus.google.com/u/0/104162817526798820937/posts/UVXbWmxWvBh https://www.openhub.net/p/platform_art
  • 25. Current „State of the art“
  • 26. Current „State of the art“
  • 27. Current „State of the art“
  • 28. Current „State of the art“
  • 29. Current „State of the art“
  • 30. Current „State of the art“
  • 32. Android Graphics Performance Media Framework https://source.android.com/devices/media.html
  • 34. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 35. Smart Hubs with Android SystemServic e Application Application logic Java API / SDK / Documentation Access to service over RPC Manager Interface Binder Interface for the service (AIDL) Manager Service libhardware Logic, Security Checks, Native JNI calls Native “Interface” (header file) driver.so /dev/foo Device Dependent Driver Kernel / Module
  • 36. Smart Hubs with Android SystemServic e Application /dev/foo driver.so libhardware Manager Service Manager Interface Java libs Android libs Android Tools Java Tools
  • 37. Smart Hubs with Android
  • 38. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 39. Smart Hubs with Android
  • 40. Smart Hubs with Android shell@shamu:/ $ mount rootfs / rootfs ro,seclabel,relatime 0 0 tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1505044k,nr_inodes=171672,mode=755 0 0 devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,seclabel,relatime 0 0 selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,relatime 0 0 none /acct cgroup rw,relatime,cpuacct 0 0 none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1505044k,nr_inodes=171672,mode=750,gid=1000 0 0 tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1505044k,nr_inodes=171672,mode=755,gid=1000 0 0 tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=1505044k,nr_inodes=171672,mode=755,gid=1000 0 0 none /dev/cpuctl cgroup rw,relatime,cpu 0 0 pstore /sys/fs/pstore pstore rw,relatime 0 0 /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/modem /firmware ext4 ro,context=u:object_r:firmware_file:s0,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/mdm1m9kefs3 /fsg ext4 ro,context=u:object_r:fsg_file:s0,nosuid,nodev,relatime 0 0 adb /dev/usb-ffs/adb functionfs rw,relatime 0 0 /dev/block/dm-0 /data ext4 rw,seclabel,nosuid,nodev,noatime,nodiratime,nobarrier,noauto_da_alloc,data=ordered 0 0 /dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
  • 41. Smart Hubs with Android shell@shamu:/ $ mount rootfs / rootfs ro,seclabel,relatime 0 0 selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1505044k /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
  • 42. Smart Hubs with Android • Read-Only System paritition • SE-Linux ready • Application Sandbox • Encryption • Verified Boot • High Performance IPC (Binder)
  • 43. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 44. Smart Hubs with Android Hardware
  • 45. LVDS HDMI USB 45 Smart Hubs with Android Hardware Komponenten • SBC oder MBC • Base Board • (optional) CPU Board • TFT / LCD Screen • Touch Sensor • Screen / Touch Controller Converter Base Board CPU Board Screen + Touch Sensor converter
  • 46. ODroid http://www.hardkernel.com/main/main.php 46 Smart Hubs with Android Hardware Baseboard - Evaluation • SOC (CPU / GPU) • RAM • Storage • Interfaces Base Board CPU Board
  • 47. 47 Smart Hubs with Android Hardware Baseboard • SOC (CPU / GPU) • RAM • Storage • Interfaces Base Board CPU Board SBC MBC
  • 48. 48 Smart Hubs with Android Hardware Screen + Touch • LCD / TFT Screen • Touch Sensor • Converter to „connect“ to BaseBoard Screen + Touch Sensor converter
  • 49. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 51. Build the Droid product and variant management ● Boardconfiguration: contain hardware specific configurations ● Architecture (ARM/x86/mips,…) ● Peripherals: GPS, Bluetooth,... ● Boot Parameter,… ● Inheritance myBoardConfig.mk fsl-BoardConfigCommon.mk fsl-omx.mk fsl-codec.mkfsl-gpu.mk
  • 52. Build the Droid product and variant management ● Product configurations: describes software ● Device Name, Vendor Name, etc... ● Pre-Installed Apps, Themes, Sounds ● Localisation ● Inheritance my_product.mk ereader.mk imx5x.mk language_small.mkgeneric_no_telephony.mk core.mk
  • 54. three steps to your custom image 2/3 Build the Droid build modules Everything is a Module ● Apps, ADB, Framework, SDK, Libraries, Fonts, etc. (3713 Modules in 5.0) ● Defined in own Makefile: Android.mk ● lot of stubs, extensive use of Makefile macros packages/apps/Calculator/Android.mk: LOCAL_PATH := $(call my-dir) LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := libarity android-support-v4 guava LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_SDK_VERSION := current LOCAL_PACKAGE_NAME := Calculator
  • 55. three steps to your custom image 2/3 Build the Droid the result & releasetools Results: ● make droid: complete images for the target device, host tools (boot.img, system.img, recovery.img…) ● make dist: device_target_files (a zip archive, containing all information to create every build system output) Releasetools: a set of tools to create images, sign and verify images and updates ● ./sign_target_files_apks sign a build with test or debug certificates. All builds are signed! ● ./img_from_target_files create flashable images (called from ‘make droid’) ● ./ota_from_target_files create full or incremental over-the-air updates
  • 56. For a Nexus 7 (2013) 1. configure the build: loads Product and Boardconfiguration in environment $> source build/envsetup.sh && lunch aosp_flo-userdebug 2. compile: builds “core” and each module that is included in this configuration $> make droid -j8 ....zzzZZZzzzZZZzzz... 3. Flash / distribute the result: runs releasetools, packs, signs & flashes the build $> make dist || fastboot flashall Build the Droid three steps to your custom image
  • 57. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware Integration
  • 58. Smart Hubs with Android OTA Updates
  • 59. three steps to your custom image 2/3 Results: ● make droid: complete images for the target device, host tools (boot.img, system.img, recovery.img…) ● make dist: device_target_files (a zip archive, containing all information to create every build system output) Releasetools: a set of tools to create images, sign and verify images and updates ● ./sign_target_files_apks sign a build with test or debug certificates. All builds are signed! ● ./img_from_target_files create flashable images (called from ‘make droid’) ● ./ota_from_target_files create full or incremental over-the-air updates Smart Hubs with Android OTA Updates
  • 60. OTA Update RecoverySystem. VerifyUpdate() RecoverySystem. InstallUpdate() OK verify signature unpack archive OK read args from file execute updater binary execute edify update script fail cleanup Android Recovery ✖ ✔ ✔ save log & reboot ✖ Smart Hubs with Android OTA Updates
  • 61. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware Integration
  • 62. Smart Hubs with Android Hardware Integration
  • 63. Smart Hubs with Android Hardware Integration SystemServic e Application Application logic Java API / SDK / Documentation Access to service over RPC Manager Interface Binder Interface for the service (AIDL) Manager Service libhardware Logic, Security Checks, Native JNI calls Native “Interface” (header file) driver.so /dev/foo Device Dependent Driver Kernel / Module
  • 64. Smart Hubs with Android Hardware Integration driver.so /dev/foo ● Grove 16x2 display with I2C extension ○ LCD-Module ○ RGB-Module ● MarS Board with Android 4.0.4 (BSP) ● The LCD is connected through I2C ○ LCD 0x3e ○ RGB 0x62
  • 65. Smart Hubs with Android Hardware Integration driver.so /dev/foo ● The Android Kernel is based on a Linux Kernel with some android specific adaptations ● The Linux Kernel provides an I2C-Core-Driver ○ It is responsible for the communication between the devices connected to the bus ● For the LCD-Module and the RGB-Module an I2C-Client- Driver is needed
  • 66. Smart Hubs with Android Hardware Integration driver.so /dev/foo
  • 67. Smart Hubs with Android Hardware Integration SystemServic e Application Manager Interface Manager Service libhardware driver.so /dev/foo
  • 68. Smart Hubs with Android Hardware Integration ● Access to drivers through a HAL library (user space) ● HAL library uses the system call interface to get access to the device files (/dev/lcd1313M1 u. /dev/rgb1313M1) ● A proprietary license can be used (Driver has to use GPL) libhardware
  • 69. Smart Hubs with Android Hardware Integration ● The HAL library consists of two components: ○ Implementation under: ■ /device/fsl/marsboard_6q/lcd1313M1 ○ Header file under: ■ /hardware/libhardware/include/hardware ● The header file represents the interface of the HAL library libhardware
  • 70. Smart Hubs with Android Hardware Integration libhardware ● Some functions of the HAL library ○ displayInit() ○ setText(...) ○ setRGB(...) ○ backlightOn()/backlightOff() ○ ...
  • 71. Smart Hubs with Android Hardware Integration SystemServic e Application Manager Interface Manager Service libhardware driver.so /dev/foo
  • 72. Smart Hubs with Android Hardware Integration ● The Manager Service consists of two components: ○ the native methods in com_android_server_LCDService.cpp ○ LCDService.java ● com_android_server_LCDService.cpp includes the header file of the HAL library and loads the library ● LCDService.java calls the native methods over the JNI Manager Service
  • 73. Smart Hubs with Android Hardware Integration Manager Service
  • 74. Smart Hubs with Android Hardware Integration SystemServic e Application Manager Interface Manager Service libhardware driver.so /dev/foo
  • 75. Smart Hubs with Android Hardware Integration ● A ILCDService.aidl file for the LCDService is needed ● This file contains the declaration of the functions callable from Binder ● The .aidl file is used to generate a Binder-Interface for the Java service (ILCDService.java) Manager Interface
  • 76. Smart Hubs with Android Hardware Integration SystemServic e Application Manager Interface Manager Service libhardware driver.so /dev/foo
  • 77. Smart Hubs with Android Hardware Integration public class LCDManager { public static LCDManager getLCDManager() { IBinder b = ServiceManager.getService("lcd1313M1"); ILCDService service = ILCDService.Stub.asInterface(b); return new LCDManager(service); } public int setText(String mString) { try { return mService.setText(mString); } catch (RemoteException e) { return -1; } } SystemServic e
  • 78. Smart Hubs with Android Hardware Integration SystemServic e Application Manager Interface Manager Service libhardware driver.so /dev/foo
  • 79. Smart Hubs with Android Application Development
  • 80. Smart Hubs with Android Application Development – SDK AddOns ● How to get an App-Developer started? ● “Well, thats easy! Just ..." ○ Set up a linux box / VM ○ Install build chain ○ repo init && repo sync ○ lunch full-eng ○ make ...
  • 81. SDK Addon SDK Manager Integration
  • 83. SDK Addon Contents System Image Java Libraries / Stubs Java Docs lcd_sdk_addon-linux-x86.zip: Kernel Hardware Definitions (skins) Metadata
  • 85. SDK Addon SDK Manager Integration I
  • 86. SDK Addon SDK Manager Integration II
  • 91. SDK Addon Emulator Log D/LCDService( 203): LCD changed: D/LCDService( 203): /------------------ D/LCDService( 203): | inovex GmbH | D/LCDService( 203): | www.inovex.de/em | D/LCDService( 203): ------------------/ D/LCDService( 203): Background: #FF5500
  • 92. Smart Hubs with Android Is there anything new? We do have • Windows Embedded • QNX • Embedded Linux(s) ....
  • 93. Smart Hubs with Android • Performance + HMI • „App“ like Build-cycle • Stable + Proven Architecture • Pluggable Build System • Robust + Secure OTA Update • Protocols + Hardware integration
  • 94. Smart Hubs with Android So tell me about the dark side... • No Play Services (unless you go the CTS Route) • (Almost) no documentation • No Roadmap • Obvious (?) things missing • Realtime ?
  • 95. Smart Hubs with Android
  • 96. Smart Hubs with Android
  • 97. Smart Hubs with Android So tell me about the dark side... • No Play Services (unless you go the CTS Route) • (Almost) no documentation • No Roadmap • Obvious (?) things missing • Realtime ?