SlideShare a Scribd company logo
1 of 13
“ Learning AOSP”

Hardware Abstraction Layer

Nanik Tolaram
@nanikjava
(kernel).ozandroid.info
plus.google.com/+NanikT
Thank You !
Architecture
Questions !


What is HAL ?



Why is it such a big deal ?



Why do we care ?



What hardware is part of HAL ?



What is relationship between Android and HAL ?
Hardware Layer
What is HAL ?


Cater for non-GPL vendor code



Included in Android image as blob (.so)



Freeing developer to focus on their app (Camera3 multiple
camera support - KitKat)



Software layer that interact with kernel drivers *NOT* to hardware



/system/lib/hw and /vendor/lib/hw
Hardware
Nexus 7 (2012) [“grouper” ] : Camera, Sensors, Wi-Fi, Bluetooth,
GPS, Touch Panel, Orientation Sensor, Graphics, NFC, DRM
Nexus 7 (2013) [“razor”] : Camera, Sensors, Wi-Fi, Bluetooth, GPS,
Graphics, NFC, DRM, Audio, Sensors, Media, DSP, USB
Nexus 5 [“hammerhead”] : Camera, Sensors, Wi-Fi, Bluetooth, GPS,
Graphics, NFC, Audio, GSM, Camera, Media, DSP, USB
Framework and HAL
HAL Stubs
Android provides the interface that vendors must implement
(/hardware/libhardware/include/hardware)
 HAL process
1.
2.
3.
4.
5.

Java application call hardware framework service API
Framework service call internal API
HAL framework loads hardware library
Obtain device structure from memory
Call HAL stub function
Example - Power HAL
DisplayPowerState.java
DisplayPowerState.java

PowerManagerService.java
PowerManagerService.java

com_android_server_power_PowerManagerService.cpp
com_android_server_power_PowerManagerService.cpp

power.c
power.c

/sys/devices/system/cpu/cpufreq/interactive/timer_rate
/sys/devices/system/cpu/cpufreq/interactive/timer_rate
/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
/sys/devices/system/cpu/cpufreq/interactive/input_boost
/sys/devices/system/cpu/cpufreq/interactive/input_boost
Example – LCD Backlight
DisplayPowerState.java
DisplayPowerState.java

LightsService.java
LightsService.java

com_android_server_LightsService.cpp
com_android_server_LightsService.cpp

device/asus/grouper/liblights/lights.c
device/asus/grouper/liblights/lights.c

/sys/class/backlight/pwm-backlight/brightness
/sys/class/backlight/pwm-backlight/brightness
HAL Structure
(1)

hw_module_t
hw_module_t

hw_device_t
hw_device_t

Device specific structure
contain hw_module_t
which is queried by
Android framework from
HAL library through
hw_get_module
function

'open' generally called to obtain device
implementation structure

(2)
camera_device
camera_device

nfc_nci_device
nfc_nci_device

audio_hw_device
audio_hw_device

different structure implementation for different hardware

hw_module_methods_t
hw_module_methods_t
* * open (..)
open (..)
Thank You

More Related Content

What's hot

Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Android audio system(audioflinger)
Android audio system(audioflinger)Android audio system(audioflinger)
Android audio system(audioflinger)fefe7270
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementationChethan Pchethan
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Opersys inc.
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsLinaro
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Opersys inc.
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on AndroidGary Bisson
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia FrameworkOpersys inc.
 
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
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 

What's hot (20)

Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Android audio system(audioflinger)
Android audio system(audioflinger)Android audio system(audioflinger)
Android audio system(audioflinger)
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
Android Audio System
Android Audio SystemAndroid Audio System
Android Audio System
 
Q4.11: Porting Android to new Platforms
Q4.11: Porting Android to new PlatformsQ4.11: Porting Android to new Platforms
Q4.11: Porting Android to new Platforms
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
 
Accessing Hardware on Android
Accessing Hardware on AndroidAccessing Hardware on Android
Accessing Hardware on Android
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
 
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 Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 

Similar to "Learning AOSP" - Android Hardware Abstraction Layer (HAL)

0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlabNational Cheng Kung University
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212Yoojoo Jang
 
Android – As a tool of innovation
Android – As a tool of innovation Android – As a tool of innovation
Android – As a tool of innovation Pallab Sarkar
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android Ranjith Kumar
 
2011 01-24 dragino
2011 01-24 dragino2011 01-24 dragino
2011 01-24 draginoAndy Gelme
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21dxsaki
 
Android understanding
Android understandingAndroid understanding
Android understandingRamesh Rao
 
Everything about Internet of Things
Everything about Internet of ThingsEverything about Internet of Things
Everything about Internet of ThingsMuhammad Nasr
 
Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience National Cheng Kung University
 
OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...
OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...
OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...xlcloud
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating Systemrenoy reji
 
Getting started with Android
Getting started with AndroidGetting started with Android
Getting started with Androidhjue
 
Android Applications Development (a Walkthrough)
Android Applications Development (a Walkthrough)Android Applications Development (a Walkthrough)
Android Applications Development (a Walkthrough)Deuphil Kaufmann
 

Similar to "Learning AOSP" - Android Hardware Abstraction Layer (HAL) (20)

Android
AndroidAndroid
Android
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Android – As a tool of innovation
Android – As a tool of innovation Android – As a tool of innovation
Android – As a tool of innovation
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
Arm
ArmArm
Arm
 
Immersed in the Web
Immersed in the WebImmersed in the Web
Immersed in the Web
 
2011 01-24 dragino
2011 01-24 dragino2011 01-24 dragino
2011 01-24 dragino
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
Android understanding
Android understandingAndroid understanding
Android understanding
 
Everything about Internet of Things
Everything about Internet of ThingsEverything about Internet of Things
Everything about Internet of Things
 
Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience
 
OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...
OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...
OW2con'14 - XLcoud, 3D rendering in the cloud, Marius Preda, Institut Mines T...
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
 
Getting started with Android
Getting started with AndroidGetting started with Android
Getting started with Android
 
Android Applications Development (a Walkthrough)
Android Applications Development (a Walkthrough)Android Applications Development (a Walkthrough)
Android Applications Development (a Walkthrough)
 
Android Applications Development
Android Applications DevelopmentAndroid Applications Development
Android Applications Development
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
 
2013 Lecture 8: Mobile AR
2013 Lecture 8: Mobile AR2013 Lecture 8: Mobile AR
2013 Lecture 8: Mobile AR
 

More from Nanik Tolaram

Barcelona Meetup Presentation
Barcelona Meetup PresentationBarcelona Meetup Presentation
Barcelona Meetup PresentationNanik Tolaram
 
Diving inside Android Wifi
Diving inside Android WifiDiving inside Android Wifi
Diving inside Android WifiNanik Tolaram
 
Android Internal Services
Android Internal ServicesAndroid Internal Services
Android Internal ServicesNanik Tolaram
 
ODROID Magazine June 2015
ODROID Magazine June 2015ODROID Magazine June 2015
ODROID Magazine June 2015Nanik Tolaram
 
ODROID Magazine January 2015
ODROID Magazine January 2015ODROID Magazine January 2015
ODROID Magazine January 2015Nanik Tolaram
 
ODROID Magazine December 2014
 ODROID Magazine December 2014 ODROID Magazine December 2014
ODROID Magazine December 2014Nanik Tolaram
 
Peeking into Android Source
Peeking into Android SourcePeeking into Android Source
Peeking into Android SourceNanik Tolaram
 
ODROID Magazine September 2014
ODROID Magazine September 2014ODROID Magazine September 2014
ODROID Magazine September 2014Nanik Tolaram
 
Building Android Devices
Building Android DevicesBuilding Android Devices
Building Android DevicesNanik Tolaram
 
ODROID Magazine August 2014
ODROID Magazine August 2014ODROID Magazine August 2014
ODROID Magazine August 2014Nanik Tolaram
 
Android Wear Presentation
Android Wear PresentationAndroid Wear Presentation
Android Wear PresentationNanik Tolaram
 
ODROID Magazine June 2014
ODROID Magazine June 2014ODROID Magazine June 2014
ODROID Magazine June 2014Nanik Tolaram
 
ODROID Magazine May 2014
ODROID Magazine May 2014ODROID Magazine May 2014
ODROID Magazine May 2014Nanik Tolaram
 
Odroid Magazine March 2014
Odroid Magazine March 2014Odroid Magazine March 2014
Odroid Magazine March 2014Nanik Tolaram
 
ODROID Magazine April 2014
ODROID Magazine April 2014ODROID Magazine April 2014
ODROID Magazine April 2014Nanik Tolaram
 
Learning AOSP - Building AOSP for Nexus 7
Learning AOSP - Building AOSP for Nexus 7Learning AOSP - Building AOSP for Nexus 7
Learning AOSP - Building AOSP for Nexus 7Nanik Tolaram
 

More from Nanik Tolaram (17)

Barcelona Meetup Presentation
Barcelona Meetup PresentationBarcelona Meetup Presentation
Barcelona Meetup Presentation
 
Diving inside Android Wifi
Diving inside Android WifiDiving inside Android Wifi
Diving inside Android Wifi
 
Android Source Code
Android Source CodeAndroid Source Code
Android Source Code
 
Android Internal Services
Android Internal ServicesAndroid Internal Services
Android Internal Services
 
ODROID Magazine June 2015
ODROID Magazine June 2015ODROID Magazine June 2015
ODROID Magazine June 2015
 
ODROID Magazine January 2015
ODROID Magazine January 2015ODROID Magazine January 2015
ODROID Magazine January 2015
 
ODROID Magazine December 2014
 ODROID Magazine December 2014 ODROID Magazine December 2014
ODROID Magazine December 2014
 
Peeking into Android Source
Peeking into Android SourcePeeking into Android Source
Peeking into Android Source
 
ODROID Magazine September 2014
ODROID Magazine September 2014ODROID Magazine September 2014
ODROID Magazine September 2014
 
Building Android Devices
Building Android DevicesBuilding Android Devices
Building Android Devices
 
ODROID Magazine August 2014
ODROID Magazine August 2014ODROID Magazine August 2014
ODROID Magazine August 2014
 
Android Wear Presentation
Android Wear PresentationAndroid Wear Presentation
Android Wear Presentation
 
ODROID Magazine June 2014
ODROID Magazine June 2014ODROID Magazine June 2014
ODROID Magazine June 2014
 
ODROID Magazine May 2014
ODROID Magazine May 2014ODROID Magazine May 2014
ODROID Magazine May 2014
 
Odroid Magazine March 2014
Odroid Magazine March 2014Odroid Magazine March 2014
Odroid Magazine March 2014
 
ODROID Magazine April 2014
ODROID Magazine April 2014ODROID Magazine April 2014
ODROID Magazine April 2014
 
Learning AOSP - Building AOSP for Nexus 7
Learning AOSP - Building AOSP for Nexus 7Learning AOSP - Building AOSP for Nexus 7
Learning AOSP - Building AOSP for Nexus 7
 

Recently uploaded

Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...ritikasharma
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...noor ahmed
 
📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call GirlsNitya salvi
 
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser... Shivani Pandey
 
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Call Girls in Nagpur High Profile
 
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...rahim quresi
 
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.Nitya salvi
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...russian goa call girl and escorts service
 
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...ritikasharma
 
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...ritikasharma
 
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...ritikasharma
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...rahim quresi
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...aamir
 
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...SUHANI PANDEY
 
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...ritikasharma
 
Top Rated Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment BookingCall Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Bookingnoor ahmed
 
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...noor ahmed
 

Recently uploaded (20)

Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
 
📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls📞 Contact Number 8617697112 VIP Ganderbal Call Girls
📞 Contact Number 8617697112 VIP Ganderbal Call Girls
 
Russian ℂall gIRLS In Goa 9316020077 ℂall gIRLS Service In Goa
Russian ℂall gIRLS In Goa 9316020077  ℂall gIRLS Service  In GoaRussian ℂall gIRLS In Goa 9316020077  ℂall gIRLS Service  In Goa
Russian ℂall gIRLS In Goa 9316020077 ℂall gIRLS Service In Goa
 
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
 
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...Top Rated  Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
Top Rated Pune Call Girls Pimpri Chinchwad ⟟ 6297143586 ⟟ Call Me For Genuin...
 
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
 
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Keylong Call Girls 8617697112 💦✅.
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
 
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
 
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
 
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
VIP Model Call Girls Budhwar Peth ( Pune ) Call ON 8005736733 Starting From 5...
 
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
 
Goa Call "Girls Service 9316020077 Call "Girls in Goa
Goa Call "Girls  Service   9316020077 Call "Girls in GoaGoa Call "Girls  Service   9316020077 Call "Girls in Goa
Goa Call "Girls Service 9316020077 Call "Girls in Goa
 
Top Rated Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Dhayari ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment BookingCall Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
 
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
 

"Learning AOSP" - Android Hardware Abstraction Layer (HAL)

  • 1. “ Learning AOSP” Hardware Abstraction Layer Nanik Tolaram @nanikjava (kernel).ozandroid.info plus.google.com/+NanikT
  • 4. Questions !  What is HAL ?  Why is it such a big deal ?  Why do we care ?  What hardware is part of HAL ?  What is relationship between Android and HAL ?
  • 6. What is HAL ?  Cater for non-GPL vendor code  Included in Android image as blob (.so)  Freeing developer to focus on their app (Camera3 multiple camera support - KitKat)  Software layer that interact with kernel drivers *NOT* to hardware  /system/lib/hw and /vendor/lib/hw
  • 7. Hardware Nexus 7 (2012) [“grouper” ] : Camera, Sensors, Wi-Fi, Bluetooth, GPS, Touch Panel, Orientation Sensor, Graphics, NFC, DRM Nexus 7 (2013) [“razor”] : Camera, Sensors, Wi-Fi, Bluetooth, GPS, Graphics, NFC, DRM, Audio, Sensors, Media, DSP, USB Nexus 5 [“hammerhead”] : Camera, Sensors, Wi-Fi, Bluetooth, GPS, Graphics, NFC, Audio, GSM, Camera, Media, DSP, USB
  • 9. HAL Stubs Android provides the interface that vendors must implement (/hardware/libhardware/include/hardware)  HAL process 1. 2. 3. 4. 5. Java application call hardware framework service API Framework service call internal API HAL framework loads hardware library Obtain device structure from memory Call HAL stub function
  • 10. Example - Power HAL DisplayPowerState.java DisplayPowerState.java PowerManagerService.java PowerManagerService.java com_android_server_power_PowerManagerService.cpp com_android_server_power_PowerManagerService.cpp power.c power.c /sys/devices/system/cpu/cpufreq/interactive/timer_rate /sys/devices/system/cpu/cpufreq/interactive/timer_rate /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load /sys/devices/system/cpu/cpufreq/interactive/input_boost /sys/devices/system/cpu/cpufreq/interactive/input_boost
  • 11. Example – LCD Backlight DisplayPowerState.java DisplayPowerState.java LightsService.java LightsService.java com_android_server_LightsService.cpp com_android_server_LightsService.cpp device/asus/grouper/liblights/lights.c device/asus/grouper/liblights/lights.c /sys/class/backlight/pwm-backlight/brightness /sys/class/backlight/pwm-backlight/brightness
  • 12. HAL Structure (1) hw_module_t hw_module_t hw_device_t hw_device_t Device specific structure contain hw_module_t which is queried by Android framework from HAL library through hw_get_module function 'open' generally called to obtain device implementation structure (2) camera_device camera_device nfc_nci_device nfc_nci_device audio_hw_device audio_hw_device different structure implementation for different hardware hw_module_methods_t hw_module_methods_t * * open (..) open (..)