SlideShare a Scribd company logo
Embedded Android
Android beyond the smartphone
Chris Simmonds, 2net Ltd
Hitex ARM User Conference, 2017
Embedded Android 1 Copyright © 2017, 2net Ltd
About Chris Simmonds
• Consultant and trainer
• Author of Mastering Embedded Linux Programming
• Working with embedded Linux since 1999
• Android since 2009
• Speaker at many conferences and workshops
"Looking after the Inner Penguin" blog at http://2net.co.uk/
https://uk.linkedin.com/in/chrisdsimmonds/
https://google.com/+chrissimmonds
Embedded Android 2 Copyright © 2017, 2net Ltd
Mainstream Android
• Android from Google comes in several flavours:
• Android, for smartphones and tablets (approx. 2 billion of them)
• Android Things, for IoT
• Android Wear, for smart watches
• Android TV
• Android Automotive
Embedded Android 3 Copyright © 2017, 2net Ltd
Why Embedded Android?
• It’s free (open source)
• Has a familiar UI
• There are many developers who can write
Android apps
• Has good development tools
• It’s still Linux underneath
• You can customise it to suit your needs
Embedded Android 4 Copyright © 2017, 2net Ltd
Example 1: marine navigation
• Furuno NavNet TZtouch2
• Navigation system for small boats
• i.MX6 platform
Embedded Android 5 Copyright © 2017, 2net Ltd
Example 2: point of sale
• Leaf, leaf.me
• Tablet-based POS terminal
• Credit card reader
Embedded Android 6 Copyright © 2017, 2net Ltd
Example 3: digital signage
• Many companies provide use Android
for signage
• The example shown is from
www.allsee-tech.com
• Player based on Rockchip RK3188
(Quadcore Cortex A9, Mali 400 GPU)
Embedded Android 7 Copyright © 2017, 2net Ltd
How open is Android?
• Need to distinguish between the open part:
• AOSP
• And the proprietary part:
• Google Mobile Services
• GMS consists of extension libraries that implement the Google APIs,
such as maps, in-app payment, Gmail and so on
• Let’s take a closer look at the architecture ...
Embedded Android 8 Copyright © 2017, 2net Ltd
Architecture of AOSP
Android Java libraries (android.*)
Android Java API
Applications
System services
"Glue" libraries
Native
servers
HAL
libraries
Other
libraries
Linux
Binder
JNI
Android
framework
Native
layer
Kernel
App
layer
Embedded Android 9 Copyright © 2017, 2net Ltd
The four layers
• Applications: stock AOSP apps and 3rd party apps
• Framework, consisting of
• The android.* libraries, which dispatch messages via binder to ...
• ... System services, which use JNI to call down to ...
• ... "Glue" libraries written in C++
• Native
• The init program, various native servers (daemons) and libraries
• Kernel
• A Linux kernel customised for the platform
Embedded Android 10 Copyright © 2017, 2net Ltd
Google Mobile Services
AOSP
Android apps
Google Mobile
Services
Google apps
Embedded Android 11 Copyright © 2017, 2net Ltd
Google Mobile Services
• Plain Android apps use only the APIs published within the AOSP
• AOSP aps include Launcher, Browser, Email, Gallery, Keyboard
• GMS is a set of services that provide Google proprietary APIs
• Most user-facing features require GMS, including popular Google apps
such as Play Store, Chrome browser, Google Now, etc.
• Requires a license from Google
• (You can grab it unofficially (and illegally) via the gapps zip file - google
for it)
Embedded Android 12 Copyright © 2017, 2net Ltd
What do you need to run Android?
• Hardware from one of the supported architectures
• ARM, x86 or MIPS, in 32 or 64 bit varieties
• Capable of running Linux
• At least 512 MiB RAM
• At least 512 MiB flash storage
• Touchscreen or external display (optional, but desirable)
• GPU with OpenGL ES libraries (optional, but desirable)
Embedded Android 13 Copyright © 2017, 2net Ltd
Beware the binary blob
• Although AOSP and Linux are open source, you will need proprietary
binary blobs to make a working system
• Firmware for the processor and peripherals
• Kernel modules for some hardware
• GPU driver and OpenGL libraries
• These are only available from the manufacturer
• Chip vendors with good support include NXP, Qualcomm, HiSilicon
Embedded Android 14 Copyright © 2017, 2net Ltd
Dev boards 1/3
DragonBoard 410c
• Qualcomm Snapdragon 410E quad-core ARM
Cortex-A53
• 1 GiB RAM
• 8 GiB eMMC flash storage
• Wi-Fi 802.11 b/g/n
• Adreno 306 GPU
• Expansion headers: 1 x UART, 2 x i2c, 12 x
GPIO
https://developer.qualcomm.com/hardware/dragonboard-410c
Embedded Android 15 Copyright © 2017, 2net Ltd
Dev boards 2/3
Wandboard
• NXP i.MX6 single, dual or quad core ARM
Cortex-A9
• 512 MiB, 1 GiB or 2 GiB RAM
• Ethernet and WiFi
• Vivante 880 GPU
• Expansion headers: 2 x UART, 3 x i2c, 8 x GPIO
http://www.wandboard.org
Embedded Android 16 Copyright © 2017, 2net Ltd
Dev boards 3/3
HiKey
• HiSilicon Kirin 620 eight-core ARM Cortex-A53
• 1 GiB RAM
• 8 GiB eMMC flash storage
• WiFi b/g/n
• Expansion headers: 1 x UART, 2 x i2c, 12 x
GPIO
www.lenovator.com/product/86.html
Embedded Android 17 Copyright © 2017, 2net Ltd
SBC and SoM support for Android
Many SBC and SoM vendors offer Android BSPs
Here is a non-exhaustive list:
• Phytec phytec.com
• DAVE dave.eu
• Digi digi.com
• Toradex toradex.com
And many more...
Embedded Android 18 Copyright © 2017, 2net Ltd
Locking down the UI
• Also known as kiosk mode
• Main app replaces the Launcher as the home screen
• Runs in full screen mode
• Calls startLockTask() to enter Lock Task mode, which
• Disables the status bar
• Disables Home, Back, Recents navigation
• Optionally, you may want to disable screen dimming and blanking
• ... and add hardware keys for easy navigation
Embedded Android 19 Copyright © 2017, 2net Ltd
Hardware interfacing
• Android has support for the hardware you would expect in a
smartphone
• UI: touchscreen, HDMI monitor, keyboard, mouse, gamepad
• Network: mobile data, WiFi, Ethernet
• Sensors: accelerometer, magnetometer, ambient light, etc.
• But, embedded applications have more diverse needs ...
• Serial, i2c, digital and analog I/O
Embedded Android 20 Copyright © 2017, 2net Ltd
Direct access
• In Linux, everything is a file
• Serial ports: /dev/tty*
• I2C host controllers: /dev/i2c-*
• GPIO pins: /sys/class/gpio
• LEDs: /sys/class/leds
• PWM: /sys/class/pwm
• Normally these files are not accessible from application code
• But, you can change the permissions files, /ueventd*.rc, and the
SELinux policy to permit access
Embedded Android 21 Copyright © 2017, 2net Ltd
Custom system service
• Better still, encapulate the
hardware interface as a system
service
• Enforces correct permissions
• Runs in its own SELinux domain
GPIO extension
library
GPIO service
GPIO hardware
control library
Android app
Java function call
Binder AIDL interface
JNI function call
Java library (jar file)
Java service, part of
Android framework
C/C++ library
(.so file)
/sys/class/gpio
Embedded Android 22 Copyright © 2017, 2net Ltd
What next?
• Get a dev board
• Start to play
• Learn how to build Android from scratch
• Begin tinkering with hardware
• Keep on learning
Embedded Android 23 Copyright © 2017, 2net Ltd
Android4Beagle
• My pet project to run Android on the
BeagleBone Black
• Makes a good platform for learning
about AOSP
• I use it as the example device in my
training courses
github.com/csimmonds/android4beagle
Embedded Android 24 Copyright © 2017, 2net Ltd
Courses in Android and Linux
• 2net offers a number of 4-day instructor-led classes, including
• Embedded Android
• Android Porting
• Mastering Yocto Project
• Embedded Linux device drivers
• Open access or on-site
• Details at 2net.co.uk/training.html
• Contact: email training@2net.co.uk or chris@2net.co.uk
Embedded Android 25 Copyright © 2017, 2net Ltd

More Related Content

What's hot

Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017
Chris Simmonds
 
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Chris Simmonds
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015Chris Simmonds
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIO
Chris Simmonds
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
Chris Simmonds
 
Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019
Chris Simmonds
 
Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDB
Chris Simmonds
 
Linux power management: are you doing it right?
Linux power management: are you doing it right?Linux power management: are you doing it right?
Linux power management: are you doing it right?
Chris Simmonds
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
Chris Simmonds
 
A timeline for embedded Linux
A timeline for embedded LinuxA timeline for embedded Linux
A timeline for embedded Linux
Chris Simmonds
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Chris Simmonds
 
Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014
Stefano Babic
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
Ashish Agrawal
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
Chris Simmonds
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting Sequence
Jayanta Ghoshal
 
Quickboot on i.MX6
Quickboot on i.MX6Quickboot on i.MX6
Quickboot on i.MX6
Gary Bisson
 
Memory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamMemory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform Team
Ryo Jin
 
Introduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux FrameworkIntroduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux FrameworkBenjamin Zores
 
Droidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsDroidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded Systems
Benjamin Zores
 

What's hot (20)

Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017
 
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIO
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
 
Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019
 
Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDB
 
Linux power management: are you doing it right?
Linux power management: are you doing it right?Linux power management: are you doing it right?
Linux power management: are you doing it right?
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
 
A timeline for embedded Linux
A timeline for embedded LinuxA timeline for embedded Linux
A timeline for embedded Linux
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
 
Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting Sequence
 
Quickboot on i.MX6
Quickboot on i.MX6Quickboot on i.MX6
Quickboot on i.MX6
 
Memory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamMemory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform Team
 
Introduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux FrameworkIntroduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux Framework
 
Droidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsDroidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded Systems
 

Similar to Embedded Android: Android beyond the smartphone

Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
Arnav Gupta
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
Arnav Gupta
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
BeMyApp
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
Bilal Mirza
 
Android
AndroidAndroid
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Codemotion Tel Aviv
 
Android Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and VersionsAndroid Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and Versions
indiangarg
 
Android presantation
Android presantationAndroid presantation
Android presantation
UdayJethva
 
Android development
Android developmentAndroid development
Android development
Raynax668
 
Android technology
Android technology Android technology
Android technology
vikas malviya
 
Android
AndroidAndroid
Android
Vibhu Mishra
 
Knowledge about android operating system
Knowledge about android operating systemKnowledge about android operating system
Knowledge about android operating system
Rachna Beegun
 
Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)cbeyls
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - Seminar
Akshay Sharma
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - Seminar
Akshay Sharma
 
Android Seminar Presentation [March 2019]
Android Seminar Presentation [March 2019]Android Seminar Presentation [March 2019]
Android Seminar Presentation [March 2019]
Jowin John Chemban
 
A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)
Siji Sunny
 

Similar to Embedded Android: Android beyond the smartphone (20)

Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
[Ultracode Munich Meetup #7] Building Apps for Nexus Player & Android TV
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
 
Android
AndroidAndroid
Android
 
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
 
android
androidandroid
android
 
Android Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and VersionsAndroid Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and Versions
 
Android presantation
Android presantationAndroid presantation
Android presantation
 
Android development
Android developmentAndroid development
Android development
 
Android technology
Android technology Android technology
Android technology
 
Android
AndroidAndroid
Android
 
Android
AndroidAndroid
Android
 
Knowledge about android operating system
Knowledge about android operating systemKnowledge about android operating system
Knowledge about android operating system
 
Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - Seminar
 
Introduction to Android - Seminar
Introduction to Android - SeminarIntroduction to Android - Seminar
Introduction to Android - Seminar
 
Android Seminar Presentation [March 2019]
Android Seminar Presentation [March 2019]Android Seminar Presentation [March 2019]
Android Seminar Presentation [March 2019]
 
A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)A deep dive into Android OpenSource Project(AOSP)
A deep dive into Android OpenSource Project(AOSP)
 
My androidpresentation
My androidpresentationMy androidpresentation
My androidpresentation
 

Recently uploaded

GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 

Recently uploaded (20)

GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 

Embedded Android: Android beyond the smartphone

  • 1. Embedded Android Android beyond the smartphone Chris Simmonds, 2net Ltd Hitex ARM User Conference, 2017 Embedded Android 1 Copyright © 2017, 2net Ltd
  • 2. About Chris Simmonds • Consultant and trainer • Author of Mastering Embedded Linux Programming • Working with embedded Linux since 1999 • Android since 2009 • Speaker at many conferences and workshops "Looking after the Inner Penguin" blog at http://2net.co.uk/ https://uk.linkedin.com/in/chrisdsimmonds/ https://google.com/+chrissimmonds Embedded Android 2 Copyright © 2017, 2net Ltd
  • 3. Mainstream Android • Android from Google comes in several flavours: • Android, for smartphones and tablets (approx. 2 billion of them) • Android Things, for IoT • Android Wear, for smart watches • Android TV • Android Automotive Embedded Android 3 Copyright © 2017, 2net Ltd
  • 4. Why Embedded Android? • It’s free (open source) • Has a familiar UI • There are many developers who can write Android apps • Has good development tools • It’s still Linux underneath • You can customise it to suit your needs Embedded Android 4 Copyright © 2017, 2net Ltd
  • 5. Example 1: marine navigation • Furuno NavNet TZtouch2 • Navigation system for small boats • i.MX6 platform Embedded Android 5 Copyright © 2017, 2net Ltd
  • 6. Example 2: point of sale • Leaf, leaf.me • Tablet-based POS terminal • Credit card reader Embedded Android 6 Copyright © 2017, 2net Ltd
  • 7. Example 3: digital signage • Many companies provide use Android for signage • The example shown is from www.allsee-tech.com • Player based on Rockchip RK3188 (Quadcore Cortex A9, Mali 400 GPU) Embedded Android 7 Copyright © 2017, 2net Ltd
  • 8. How open is Android? • Need to distinguish between the open part: • AOSP • And the proprietary part: • Google Mobile Services • GMS consists of extension libraries that implement the Google APIs, such as maps, in-app payment, Gmail and so on • Let’s take a closer look at the architecture ... Embedded Android 8 Copyright © 2017, 2net Ltd
  • 9. Architecture of AOSP Android Java libraries (android.*) Android Java API Applications System services "Glue" libraries Native servers HAL libraries Other libraries Linux Binder JNI Android framework Native layer Kernel App layer Embedded Android 9 Copyright © 2017, 2net Ltd
  • 10. The four layers • Applications: stock AOSP apps and 3rd party apps • Framework, consisting of • The android.* libraries, which dispatch messages via binder to ... • ... System services, which use JNI to call down to ... • ... "Glue" libraries written in C++ • Native • The init program, various native servers (daemons) and libraries • Kernel • A Linux kernel customised for the platform Embedded Android 10 Copyright © 2017, 2net Ltd
  • 11. Google Mobile Services AOSP Android apps Google Mobile Services Google apps Embedded Android 11 Copyright © 2017, 2net Ltd
  • 12. Google Mobile Services • Plain Android apps use only the APIs published within the AOSP • AOSP aps include Launcher, Browser, Email, Gallery, Keyboard • GMS is a set of services that provide Google proprietary APIs • Most user-facing features require GMS, including popular Google apps such as Play Store, Chrome browser, Google Now, etc. • Requires a license from Google • (You can grab it unofficially (and illegally) via the gapps zip file - google for it) Embedded Android 12 Copyright © 2017, 2net Ltd
  • 13. What do you need to run Android? • Hardware from one of the supported architectures • ARM, x86 or MIPS, in 32 or 64 bit varieties • Capable of running Linux • At least 512 MiB RAM • At least 512 MiB flash storage • Touchscreen or external display (optional, but desirable) • GPU with OpenGL ES libraries (optional, but desirable) Embedded Android 13 Copyright © 2017, 2net Ltd
  • 14. Beware the binary blob • Although AOSP and Linux are open source, you will need proprietary binary blobs to make a working system • Firmware for the processor and peripherals • Kernel modules for some hardware • GPU driver and OpenGL libraries • These are only available from the manufacturer • Chip vendors with good support include NXP, Qualcomm, HiSilicon Embedded Android 14 Copyright © 2017, 2net Ltd
  • 15. Dev boards 1/3 DragonBoard 410c • Qualcomm Snapdragon 410E quad-core ARM Cortex-A53 • 1 GiB RAM • 8 GiB eMMC flash storage • Wi-Fi 802.11 b/g/n • Adreno 306 GPU • Expansion headers: 1 x UART, 2 x i2c, 12 x GPIO https://developer.qualcomm.com/hardware/dragonboard-410c Embedded Android 15 Copyright © 2017, 2net Ltd
  • 16. Dev boards 2/3 Wandboard • NXP i.MX6 single, dual or quad core ARM Cortex-A9 • 512 MiB, 1 GiB or 2 GiB RAM • Ethernet and WiFi • Vivante 880 GPU • Expansion headers: 2 x UART, 3 x i2c, 8 x GPIO http://www.wandboard.org Embedded Android 16 Copyright © 2017, 2net Ltd
  • 17. Dev boards 3/3 HiKey • HiSilicon Kirin 620 eight-core ARM Cortex-A53 • 1 GiB RAM • 8 GiB eMMC flash storage • WiFi b/g/n • Expansion headers: 1 x UART, 2 x i2c, 12 x GPIO www.lenovator.com/product/86.html Embedded Android 17 Copyright © 2017, 2net Ltd
  • 18. SBC and SoM support for Android Many SBC and SoM vendors offer Android BSPs Here is a non-exhaustive list: • Phytec phytec.com • DAVE dave.eu • Digi digi.com • Toradex toradex.com And many more... Embedded Android 18 Copyright © 2017, 2net Ltd
  • 19. Locking down the UI • Also known as kiosk mode • Main app replaces the Launcher as the home screen • Runs in full screen mode • Calls startLockTask() to enter Lock Task mode, which • Disables the status bar • Disables Home, Back, Recents navigation • Optionally, you may want to disable screen dimming and blanking • ... and add hardware keys for easy navigation Embedded Android 19 Copyright © 2017, 2net Ltd
  • 20. Hardware interfacing • Android has support for the hardware you would expect in a smartphone • UI: touchscreen, HDMI monitor, keyboard, mouse, gamepad • Network: mobile data, WiFi, Ethernet • Sensors: accelerometer, magnetometer, ambient light, etc. • But, embedded applications have more diverse needs ... • Serial, i2c, digital and analog I/O Embedded Android 20 Copyright © 2017, 2net Ltd
  • 21. Direct access • In Linux, everything is a file • Serial ports: /dev/tty* • I2C host controllers: /dev/i2c-* • GPIO pins: /sys/class/gpio • LEDs: /sys/class/leds • PWM: /sys/class/pwm • Normally these files are not accessible from application code • But, you can change the permissions files, /ueventd*.rc, and the SELinux policy to permit access Embedded Android 21 Copyright © 2017, 2net Ltd
  • 22. Custom system service • Better still, encapulate the hardware interface as a system service • Enforces correct permissions • Runs in its own SELinux domain GPIO extension library GPIO service GPIO hardware control library Android app Java function call Binder AIDL interface JNI function call Java library (jar file) Java service, part of Android framework C/C++ library (.so file) /sys/class/gpio Embedded Android 22 Copyright © 2017, 2net Ltd
  • 23. What next? • Get a dev board • Start to play • Learn how to build Android from scratch • Begin tinkering with hardware • Keep on learning Embedded Android 23 Copyright © 2017, 2net Ltd
  • 24. Android4Beagle • My pet project to run Android on the BeagleBone Black • Makes a good platform for learning about AOSP • I use it as the example device in my training courses github.com/csimmonds/android4beagle Embedded Android 24 Copyright © 2017, 2net Ltd
  • 25. Courses in Android and Linux • 2net offers a number of 4-day instructor-led classes, including • Embedded Android • Android Porting • Mastering Yocto Project • Embedded Linux device drivers • Open access or on-site • Details at 2net.co.uk/training.html • Contact: email training@2net.co.uk or chris@2net.co.uk Embedded Android 25 Copyright © 2017, 2net Ltd