SlideShare a Scribd company logo
1 of 44
Download to read offline
Android AutomotiveAndroid Automotive
YouTube™ LivestreamYouTube™ Livestream
September 4September 4thth 20192019
CC-BY-SA 3.0 - Attribution requirements and misc., except 3rd party material,
PLEASE READ:
This slide must remain as-is in this specific location (slide #1), 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 FORBIDDEN from using the default "About" slide as-is or any of its contents.
Several diagrams taken from 3rd party material:
Attribution/citation made in every case
Refer to each original for redistribution/citation
Facts and data are not in principle copyrightable (ex: constants in header files), however if you
don't feel comfortable with our use of your material then let us know and we'll remove it:
courseware@opersys.com
Copyright (C) 2019, Opersys inc.
These slides created by: Karim Yaghmour
Originals at: http://www.opersys.com/training/
AboutAbout
Introduced Linux Trace Toolkit in 1999
Originated Adeos and relayfs (kernel/relay.c)
Training, Custom Dev, Consulting, ...
Why use Android in cars?Why use Android in cars?
Users/industry expecting/standardizing on OS with:
Touch (swipe, pinch-zoom, etc.)
App/Developer ecosystem
Connected
Intelligent/Augmented/Bleeding-edge UX:
Real-time updated data (ex.: navigation)
Audio assistant
etc.
Android does that ... very well
Android is open source
etc.
Challenges:
Integration into existing car environment
Security
Upradability
Power consumption
Rear-view camera
Storage wear-leveling
Additional challenges:
Android is "controlled" by Google
Android is geared towards "disposable" devices
About Android Automotive OverallAbout Android Automotive Overall
"Final" approach/architecture probably TBD"Final" approach/architecture probably TBD
Much work and publications not publicMuch work and publications not public
Very much in fluxVery much in flux
Key issues yet to be resolvedKey issues yet to be resolved
General-purpose app dev still "alpha"General-purpose app dev still "alpha"
TopicsTopics
1. Introduction
2. Architecture
3. Car System Service
4. Car app APIs
5. Car Apps
6. Car HIDL
7. Exterior View System
8. Vehicle Properties
9. Audio
10. Power Management
11. Wear leveling
12. Boot time optimizations
13. Additional topics
IntroductionIntroduction
"Auto" vs. "Automotive" -- old (?) naming scheme:
"Auto" == projection app on your phone
"Automotive" == full Android IVI/head-unit
New nomenclature?:
"embedded"/"native"/"powered by Android"
We're focusing on "Automotive"
AOSP extensions for Car functionality
"Modular" addition to existing Android stack
Internals documentation either out-of-date or incomplete
App developer doc "overkill" for very tiny use-case
https://www.theverge.com/2019/1/25/18196234/google-android-auto-in-car-
systems-apple-carplay-interview
No "reference" platform available to check against
Emulator target available
Best way to investigate "real" system for now
See device/generic/car/ for implementation/build
Significant changes from 8.x to 9.x
9.x first version officially supported for general app dev
$ lunch
...
8. aosp_car_arm-userdebug
9. aosp_car_arm64-userdebug
10. aosp_car_x86-userdebug
11. aosp_car_x86_64-userdebug
...
$ make -j32
$ emlator &
$ adb root
$ adb shell
ArchitectureArchitecture
Android Automotive
Car System ServiceCar System Service
packages/apps/Car/service
Primarily a multiplexing service:
Encompases all car-related services
See packages/services/Car/service/src/com/android/car/ICarImpl.java
/** @hide */
interface ICar {
/**
* IBinder is ICarServiceHelper but passed as IBinder due to aidl hidden.
* Only this method is oneway as it is called from system server.
* This should be the 1st method. Do not change the order.
*/
oneway void setCarServiceHelper(in IBinder helper) = 0;
IBinder getCarService(in String serviceName) = 1;
int getCarConnectionType() = 2;
}
SystemActivityMonitoringService
CarPowerManagementService
CarPropertyService
CarDrivingStateService
CarUXRestrictionsService
CarPackageManagerService
CarInputService
GarageModeService
AppFocusService
CarAudioService
CarNightService
InstrumentClusterService
CarProjectionService
SystemStateControllerService
CarBluetoothService
CarDiagnosticService
PerUserCarServiceHelper
CarStorageMonitoringService
CarConfigurationService
VmsSubscriberService
VmsPublisherService
Only a handful of these are publicly-available
Like other system services:
AIDL for each service
HALs/HIDLs used when needed needed
Communication w/ other system services as needed
Packaged as a presistent app
Started as a "service" when a first app attempts to connect with the Car Manager
Car app APIsCar app APIs
2 types of APIs:
General app dev for Google Play publication
"Internal" app dev with AOSP APIs
Regarding Google Play apps:
Supported app categories for "Automotive"
( ):
Media apps:
... and nothing else ...
"Google Play services for Android Automotive OS is still in alpha stage."
https://developer.android.com/training/cars
https://developer.android.com/training/cars/media
https://developer.android.com/training/cars/google-services
AOSP APIs are far more relevant and interesting
AOSP APIs have no tutorials
Official doc here:
More interestingly, APIs found in AOSP itself:
packages/services/Car/car-support-lib
packages/services/Car/car-lib
Those are the APIs used by the internal AOSP Car apps
Similar in purpose as frameworks/base/core
https://developer.android.com/reference/android/car/classes
Car AppsCar Apps
AOSP ships with default/sample Car apps
Great starting point to see how to design your own
As of 9.x:
Dialer
Hvac
LatinIME
Launcher
LensPicker
LocalMediaPlayer
Media
Messenger
Radio
Settings
SystemUpdater
They use combination of Android and Car APIs
Ultimately rely on system services to operate
Car HIDLCar HIDL
hardware/interfaces/automotive:
audiocontrol
evs
vehicle
Default implementations for each
Exterior View SystemExterior View System
For imagery capture and display very early on boot
Tailored for 2 second rear-view requirement
Should NOT depend on SurfaceFlinger
Requires low-level integration with drivers
Android Automotive
The main operations are in the app
Take frame from camera and sends it to display
Sample/reference EVS application:
packages/services/Car/evs/app
Aimed at being started as soon as camera/display "ready"
Should be tailored/rewritten as needed
Manager:
packages/services/Car/evs/manager
Facilitates shared access to camera
1 stream, multiple consumers
No difference for apps between using Manager vs. HAL implementation
HIDL:
hardware/interfaces/automotive/evs/1.0/
Recommended to augment existing kernel drivers for EVS
Again, do NOT rely on SurfaceFlinger
Android Automotive
Android Automotive
Vehicle PropertiesVehicle Properties
get/set/sub interface for all vehicle properties
List and type of each property provided in HIDL def by Google
See hardware/interfaces/automotive/vehicle/2.0
Android Automotive
Android Automotive
AudioAudio
Android responsible for infotainment sounds:
media
navigation
communication
Android NOT responsible for mission-critical chimes/warnings
It's assumed there's a hardware mixer beneath Android that mixes Android audio and mission-
critical audio.
Android Automotive
Android Automotive
Android Automotive
Android Automotive
Android Automotive
Power ManagementPower Management
Android runs on the SoC
SoC assumed to be controlled/tethered to Vehicle Master Control Unit (VMCU)
Android Automotive knows about "deep sleep" (i.e. suspend to RAM)
Android does NOT do hibernation
Parts:
CarPowerManager (the public API)
CarPowerManagerService (the actual service)
Android Automotive
Android Automotive
Android Automotive
Android Automotive
Android Automotive
Android Automotive
Wear levelingWear leveling
Average data written to phone/day: 10GB
"... we expect Android Automotive implementations to have more eMMC writes than a phone."
For an 16GB eMMC w/ 3k erase/write cycles -- lifetime versus daily writes:
16GB/day: 10 years
32GB/day: 5 years
Suggested to use "adoptable" SD card
See "dumpsys car_service" for wear logs
This is the biggest issue facing Android Automotive, IMHO
Boot time optimizationsBoot time optimizations
Minimizing Linux kernel boot times has been heavily studied
Many conference presentations on documents on how to do this
Little to no effort from Google to minimize Android boot times
A few scattered conference presentations on the topic:
Suspend to flash
Use of suspendable containers
In short, if it's time-critical, avoid Android at all cost
At some point in the future, Android will need to address suspend to flash
Additional topicsAdditional topics
AOSP build considerations
Use of containers/hypervisors
Thank You!Thank You!
karim.yaghmour@opersys.com

More Related Content

What's hot

"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)Nanik Tolaram
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Opersys inc.
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System mentoresd
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewYu-Hsin Hung
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting SequenceJayanta Ghoshal
 
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 imagesChris Simmonds
 

What's hot (20)

"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Android studio ppt
Android studio pptAndroid studio ppt
Android studio ppt
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
Simultaneously Leveraging Linux and Android in a GENIVI compliant IVI System
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
Low Level View of Android System Architecture
Low Level View of Android System ArchitectureLow Level View of Android System Architecture
Low Level View of Android System Architecture
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Android Booting Sequence
Android Booting SequenceAndroid Booting Sequence
Android Booting Sequence
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
How to Customize Android Framework&System
How to Customize Android Framework&SystemHow to Customize Android Framework&System
How to Customize Android Framework&System
 
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 IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 

Similar to Android Automotive

Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15sullis
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
Android Automotive Apps - Product Strategy
Android Automotive Apps - Product StrategyAndroid Automotive Apps - Product Strategy
Android Automotive Apps - Product StrategyKaushal Trivedi
 
Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First Sanjeev Kumar
 
Extending An Android App Using the IBM Push for Bluemix Cloud Service
Extending An Android App Using the IBM Push for Bluemix Cloud ServiceExtending An Android App Using the IBM Push for Bluemix Cloud Service
Extending An Android App Using the IBM Push for Bluemix Cloud ServiceIBM developerWorks
 
AndroidFragmentation.com – an open community project
AndroidFragmentation.com – an open community project AndroidFragmentation.com – an open community project
AndroidFragmentation.com – an open community project Joachim Ritter
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesKonstantin Rybas
 
Юрий Швалик «Apple and Google are converting car into smartphone?»
Юрий Швалик «Apple and Google are converting car into smartphone?»Юрий Швалик «Apple and Google are converting car into smartphone?»
Юрий Швалик «Apple and Google are converting car into smartphone?»Anna Shymchenko
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With AndroidQasim Khawaja
 
Android auto
Android autoAndroid auto
Android autodhiraj007
 
worklight_development_environment
worklight_development_environmentworklight_development_environment
worklight_development_environmentAravindharamanan S
 
The Programmable Car - Apps, APIs, Data and Ecosystems
The Programmable Car - Apps, APIs, Data and EcosystemsThe Programmable Car - Apps, APIs, Data and Ecosystems
The Programmable Car - Apps, APIs, Data and EcosystemsApigee | Google Cloud
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioMizanur Sarker
 
Smp agentry app_development
Smp agentry app_developmentSmp agentry app_development
Smp agentry app_developmentGanesh Kumar
 
android_development_environment
android_development_environmentandroid_development_environment
android_development_environmentAravindharamanan S
 

Similar to Android Automotive (20)

Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15
 
Mobile Apps Develpment - A Comparison
Mobile Apps Develpment - A ComparisonMobile Apps Develpment - A Comparison
Mobile Apps Develpment - A Comparison
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android Automotive Apps - Product Strategy
Android Automotive Apps - Product StrategyAndroid Automotive Apps - Product Strategy
Android Automotive Apps - Product Strategy
 
Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First Mobilefirst - Build Enterprise Class Apps for Mobile First
Mobilefirst - Build Enterprise Class Apps for Mobile First
 
Extending An Android App Using the IBM Push for Bluemix Cloud Service
Extending An Android App Using the IBM Push for Bluemix Cloud ServiceExtending An Android App Using the IBM Push for Bluemix Cloud Service
Extending An Android App Using the IBM Push for Bluemix Cloud Service
 
AndroidFragmentation.com – an open community project
AndroidFragmentation.com – an open community project AndroidFragmentation.com – an open community project
AndroidFragmentation.com – an open community project
 
Rhomobile 5.5 Release Notes
Rhomobile 5.5 Release NotesRhomobile 5.5 Release Notes
Rhomobile 5.5 Release Notes
 
Юрий Швалик «Apple and Google are converting car into smartphone?»
Юрий Швалик «Apple and Google are converting car into smartphone?»Юрий Швалик «Apple and Google are converting car into smartphone?»
Юрий Швалик «Apple and Google are converting car into smartphone?»
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With Android
 
Android auto
Android autoAndroid auto
Android auto
 
worklight_development_environment
worklight_development_environmentworklight_development_environment
worklight_development_environment
 
Appium solution artizone
Appium solution   artizoneAppium solution   artizone
Appium solution artizone
 
The Programmable Car - Apps, APIs, Data and Ecosystems
The Programmable Car - Apps, APIs, Data and EcosystemsThe Programmable Car - Apps, APIs, Data and Ecosystems
The Programmable Car - Apps, APIs, Data and Ecosystems
 
Cross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual StudioCross-Platform Development using Angulr JS in Visual Studio
Cross-Platform Development using Angulr JS in Visual Studio
 
Smp agentry app_development
Smp agentry app_developmentSmp agentry app_development
Smp agentry app_development
 
android_development_environment
android_development_environmentandroid_development_environment
android_development_environment
 
Appium solution
Appium solutionAppium solution
Appium solution
 

More from Opersys inc.

Android 10 Internals Update
Android 10 Internals UpdateAndroid 10 Internals Update
Android 10 Internals UpdateOpersys inc.
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security InternalsOpersys inc.
 
Embedded Android Workshop with Oreo
Embedded Android Workshop with OreoEmbedded Android Workshop with Oreo
Embedded Android Workshop with OreoOpersys inc.
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things InternalsOpersys inc.
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and DevelopmentOpersys inc.
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with NougatOpersys inc.
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with NougatOpersys inc.
 
Android Things: Android for IoT
Android Things: Android for IoTAndroid Things: Android for IoT
Android Things: Android for IoTOpersys inc.
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things InternalsOpersys inc.
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave InternalsOpersys 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 Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with NougatOpersys inc.
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave InternalsOpersys 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.
 
Brillo/Weave Internals
Brillo/Weave InternalsBrillo/Weave Internals
Brillo/Weave InternalsOpersys inc.
 

More from Opersys inc. (20)

Android 10 Internals Update
Android 10 Internals UpdateAndroid 10 Internals Update
Android 10 Internals Update
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security Internals
 
Embedded Android Workshop with Oreo
Embedded Android Workshop with OreoEmbedded Android Workshop with Oreo
Embedded Android Workshop with Oreo
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with Nougat
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with Nougat
 
Android Things: Android for IoT
Android Things: Android for IoTAndroid Things: Android for IoT
Android Things: Android for IoT
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave Internals
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with Nougat
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave Internals
 
Project Ara
Project AraProject Ara
Project Ara
 
Android Platform Debugging and Development
Android Platform Debugging and DevelopmentAndroid Platform Debugging and Development
Android Platform Debugging and Development
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
Brillo/Weave Internals
Brillo/Weave InternalsBrillo/Weave Internals
Brillo/Weave Internals
 

Recently uploaded

Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.Sharon Liu
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageDista
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorShane Coughlan
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxJoão Esperancinha
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Incrobinwilliams8624
 

Recently uploaded (20)

Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
Salesforce AI Associate Certification.pptx
Salesforce AI Associate Certification.pptxSalesforce AI Associate Certification.pptx
Salesforce AI Associate Certification.pptx
 
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
20240319 Car Simulator Plan.pptx . Plan for a JavaScript Car Driving Simulator.
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptx
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Inc
 

Android Automotive

  • 1. Android AutomotiveAndroid Automotive YouTube™ LivestreamYouTube™ Livestream September 4September 4thth 20192019
  • 2. CC-BY-SA 3.0 - Attribution requirements and misc., except 3rd party material, PLEASE READ: This slide must remain as-is in this specific location (slide #1), 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 FORBIDDEN from using the default "About" slide as-is or any of its contents. Several diagrams taken from 3rd party material: Attribution/citation made in every case Refer to each original for redistribution/citation Facts and data are not in principle copyrightable (ex: constants in header files), however if you don't feel comfortable with our use of your material then let us know and we'll remove it: courseware@opersys.com Copyright (C) 2019, Opersys inc. These slides created by: Karim Yaghmour Originals at: http://www.opersys.com/training/
  • 3. AboutAbout Introduced Linux Trace Toolkit in 1999 Originated Adeos and relayfs (kernel/relay.c) Training, Custom Dev, Consulting, ...
  • 4. Why use Android in cars?Why use Android in cars? Users/industry expecting/standardizing on OS with: Touch (swipe, pinch-zoom, etc.) App/Developer ecosystem Connected Intelligent/Augmented/Bleeding-edge UX: Real-time updated data (ex.: navigation) Audio assistant etc. Android does that ... very well Android is open source etc.
  • 5. Challenges: Integration into existing car environment Security Upradability Power consumption Rear-view camera Storage wear-leveling Additional challenges: Android is "controlled" by Google Android is geared towards "disposable" devices
  • 6. About Android Automotive OverallAbout Android Automotive Overall "Final" approach/architecture probably TBD"Final" approach/architecture probably TBD Much work and publications not publicMuch work and publications not public Very much in fluxVery much in flux Key issues yet to be resolvedKey issues yet to be resolved General-purpose app dev still "alpha"General-purpose app dev still "alpha"
  • 7. TopicsTopics 1. Introduction 2. Architecture 3. Car System Service 4. Car app APIs 5. Car Apps 6. Car HIDL 7. Exterior View System 8. Vehicle Properties 9. Audio 10. Power Management 11. Wear leveling 12. Boot time optimizations 13. Additional topics
  • 8. IntroductionIntroduction "Auto" vs. "Automotive" -- old (?) naming scheme: "Auto" == projection app on your phone "Automotive" == full Android IVI/head-unit New nomenclature?: "embedded"/"native"/"powered by Android" We're focusing on "Automotive" AOSP extensions for Car functionality "Modular" addition to existing Android stack Internals documentation either out-of-date or incomplete App developer doc "overkill" for very tiny use-case https://www.theverge.com/2019/1/25/18196234/google-android-auto-in-car- systems-apple-carplay-interview
  • 9. No "reference" platform available to check against Emulator target available Best way to investigate "real" system for now See device/generic/car/ for implementation/build Significant changes from 8.x to 9.x 9.x first version officially supported for general app dev $ lunch ... 8. aosp_car_arm-userdebug 9. aosp_car_arm64-userdebug 10. aosp_car_x86-userdebug 11. aosp_car_x86_64-userdebug ... $ make -j32 $ emlator & $ adb root $ adb shell
  • 12. Car System ServiceCar System Service packages/apps/Car/service Primarily a multiplexing service: Encompases all car-related services See packages/services/Car/service/src/com/android/car/ICarImpl.java /** @hide */ interface ICar { /** * IBinder is ICarServiceHelper but passed as IBinder due to aidl hidden. * Only this method is oneway as it is called from system server. * This should be the 1st method. Do not change the order. */ oneway void setCarServiceHelper(in IBinder helper) = 0; IBinder getCarService(in String serviceName) = 1; int getCarConnectionType() = 2; }
  • 14. Only a handful of these are publicly-available Like other system services: AIDL for each service HALs/HIDLs used when needed needed Communication w/ other system services as needed Packaged as a presistent app Started as a "service" when a first app attempts to connect with the Car Manager
  • 15. Car app APIsCar app APIs 2 types of APIs: General app dev for Google Play publication "Internal" app dev with AOSP APIs Regarding Google Play apps: Supported app categories for "Automotive" ( ): Media apps: ... and nothing else ... "Google Play services for Android Automotive OS is still in alpha stage." https://developer.android.com/training/cars https://developer.android.com/training/cars/media https://developer.android.com/training/cars/google-services
  • 16. AOSP APIs are far more relevant and interesting AOSP APIs have no tutorials Official doc here: More interestingly, APIs found in AOSP itself: packages/services/Car/car-support-lib packages/services/Car/car-lib Those are the APIs used by the internal AOSP Car apps Similar in purpose as frameworks/base/core https://developer.android.com/reference/android/car/classes
  • 17. Car AppsCar Apps AOSP ships with default/sample Car apps Great starting point to see how to design your own As of 9.x: Dialer Hvac LatinIME Launcher LensPicker LocalMediaPlayer Media Messenger Radio Settings SystemUpdater They use combination of Android and Car APIs Ultimately rely on system services to operate
  • 19. Exterior View SystemExterior View System For imagery capture and display very early on boot Tailored for 2 second rear-view requirement Should NOT depend on SurfaceFlinger Requires low-level integration with drivers
  • 21. The main operations are in the app Take frame from camera and sends it to display Sample/reference EVS application: packages/services/Car/evs/app Aimed at being started as soon as camera/display "ready" Should be tailored/rewritten as needed Manager: packages/services/Car/evs/manager Facilitates shared access to camera 1 stream, multiple consumers No difference for apps between using Manager vs. HAL implementation
  • 22. HIDL: hardware/interfaces/automotive/evs/1.0/ Recommended to augment existing kernel drivers for EVS Again, do NOT rely on SurfaceFlinger
  • 25. Vehicle PropertiesVehicle Properties get/set/sub interface for all vehicle properties List and type of each property provided in HIDL def by Google See hardware/interfaces/automotive/vehicle/2.0
  • 28. AudioAudio Android responsible for infotainment sounds: media navigation communication Android NOT responsible for mission-critical chimes/warnings It's assumed there's a hardware mixer beneath Android that mixes Android audio and mission- critical audio.
  • 34. Power ManagementPower Management Android runs on the SoC SoC assumed to be controlled/tethered to Vehicle Master Control Unit (VMCU) Android Automotive knows about "deep sleep" (i.e. suspend to RAM) Android does NOT do hibernation Parts: CarPowerManager (the public API) CarPowerManagerService (the actual service)
  • 41. Wear levelingWear leveling Average data written to phone/day: 10GB "... we expect Android Automotive implementations to have more eMMC writes than a phone." For an 16GB eMMC w/ 3k erase/write cycles -- lifetime versus daily writes: 16GB/day: 10 years 32GB/day: 5 years Suggested to use "adoptable" SD card See "dumpsys car_service" for wear logs This is the biggest issue facing Android Automotive, IMHO
  • 42. Boot time optimizationsBoot time optimizations Minimizing Linux kernel boot times has been heavily studied Many conference presentations on documents on how to do this Little to no effort from Google to minimize Android boot times A few scattered conference presentations on the topic: Suspend to flash Use of suspendable containers In short, if it's time-critical, avoid Android at all cost At some point in the future, Android will need to address suspend to flash
  • 43. Additional topicsAdditional topics AOSP build considerations Use of containers/hypervisors