Give you an overview about
– device virtualization on ARM
– Benefit and real products
– Android specific virtualization consideration
– doing virtualization in several approaches
Embedded Android System Development - Part II talks about Hardware Abstraction Layer (HAL). HAL is an interfacing layer through which Android service can place a request to device. Uses functions provided by Linux system to service the request from android framework. A C/C++ layer with purely vendor specific implementation. Packaged into modules (.so) file & loaded by Android system at appropriate time
In order to understand HAL layers of Android Framework, having Linux device driver knowledge is important. Hence Day-2 of the workshop focuses on the same.
Presentation at Android Builders Summit 2012.
Based on the experience of working with ODM companies and SoC vendors, this session would discuss how to figure out the performance hotspot of certain Android devices and then improve in various areas including graphics and boot time. This session consists of the detailed components which seem to be independent from each other in traditional view. However, the situation changes a lot in Android system view since everything is coupled in a mass. Three frequently mentioned items in Android engineering are selected as the entry points: 2D/3D graphics, runtime, and boot time. Audience: Developers who work on Android system integration and platform enablement.
Give you an overview about
– device virtualization on ARM
– Benefit and real products
– Android specific virtualization consideration
– doing virtualization in several approaches
Embedded Android System Development - Part II talks about Hardware Abstraction Layer (HAL). HAL is an interfacing layer through which Android service can place a request to device. Uses functions provided by Linux system to service the request from android framework. A C/C++ layer with purely vendor specific implementation. Packaged into modules (.so) file & loaded by Android system at appropriate time
In order to understand HAL layers of Android Framework, having Linux device driver knowledge is important. Hence Day-2 of the workshop focuses on the same.
Presentation at Android Builders Summit 2012.
Based on the experience of working with ODM companies and SoC vendors, this session would discuss how to figure out the performance hotspot of certain Android devices and then improve in various areas including graphics and boot time. This session consists of the detailed components which seem to be independent from each other in traditional view. However, the situation changes a lot in Android system view since everything is coupled in a mass. Three frequently mentioned items in Android engineering are selected as the entry points: 2D/3D graphics, runtime, and boot time. Audience: Developers who work on Android system integration and platform enablement.
Embedded Android system development workshop is focused on integrating new device with Android framework. Our hands-on approach makes Emertxe as the best institute to learn android system development training. This workshop deep dives into Android porting, Android Hardware Abstraction Layer (HAL), Android Services and Linux device driver ecosystem. This workshop based training program will enable you to efficiently integrate new hardware with Android HAL / Framework.
I have tried to present maximum detail on android booting sequence in a very abstract way. I hope it would be useful. If you find any correction needed please mention it on comments. Happy Coding :)
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
There is a surge in number of sensors / devices that are getting connected under the umbrella of Internet-Of-Things (IoT). These devices need to be integrated into the Android system and accessed via applications, which is covered in the course. Our Android system development course curriculum over weekends with practicals ensures you learn all critical components to get started.
Binder is what differentiates Android from Linux, it is most important internal building block of Android, it is a subject every Android programmer should be familiar with
For new age touch-based embedded devices, Android is becoming a popular OS going beyond mobile phones. With its roots from Embedded Linux, Android framework offers benefits in terms of rich libraries, open-source and multi-device support. Emertxe’s hands-on Embedded Android Training Course is designed to customize, build and deploy custom Embedded OS on ARM target. Rich set of projects will make your learning complete.
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
Embedded Android system development workshop is focused on integrating new device with Android framework. Our hands-on approach makes Emertxe as the best institute to learn android system development training. This workshop deep dives into Android porting, Android Hardware Abstraction Layer (HAL), Android Services and Linux device driver ecosystem. This workshop based training program will enable you to efficiently integrate new hardware with Android HAL / Framework.
I have tried to present maximum detail on android booting sequence in a very abstract way. I hope it would be useful. If you find any correction needed please mention it on comments. Happy Coding :)
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
There is a surge in number of sensors / devices that are getting connected under the umbrella of Internet-Of-Things (IoT). These devices need to be integrated into the Android system and accessed via applications, which is covered in the course. Our Android system development course curriculum over weekends with practicals ensures you learn all critical components to get started.
Binder is what differentiates Android from Linux, it is most important internal building block of Android, it is a subject every Android programmer should be familiar with
For new age touch-based embedded devices, Android is becoming a popular OS going beyond mobile phones. With its roots from Embedded Linux, Android framework offers benefits in terms of rich libraries, open-source and multi-device support. Emertxe’s hands-on Embedded Android Training Course is designed to customize, build and deploy custom Embedded OS on ARM target. Rich set of projects will make your learning complete.
This presentation covers the working model about Process, Thread, system call, Memory operations, Binder IPC, and interactions with Android frameworks.
The new runtime which Google is started implementing as developers view to implement or not which has advantages over the previous Dalvik runtime and more...
"LiquidPub: Services at Service of Science". Invited talks of Fabio Casati at the European Conference on Web Services 2009 and in the Politechnico di Milano
In part one of this series, you learned about the importance of building accessible learning management systems and Blackboard's commitment and approach to accessibility. Teachers and instructional designers have an equally important part to play to ensure that their online content and learning experiences are accessible to all students. This session aims to increase awareness of the different accessibility challenges people face, and provide you with some universal design techniques that you can use when building content and teaching online with Blackboard.
Slides presented at the 2nd Snow Workshop (http://wiki.liquidpub.org/mediawiki/index.php/Second_Workshop_on_Scientific_Knowledge_Creation%2C_Dissemination%2C_and_Evaluation)
Android has been designed as a modern mobile platform that will enable applications to take full advantage of the mobile device capabilities. This session will break down the various components of the Android platform, examine how they work, and give developers a deeper understanding of the underlying technologies that drive the Android platform.
While Android programming is based on Java, there are some important philosophical differences and Android-specific constructs to consider. Android for Java Developers is an action-packed, hands-on presentation that takes you through the anatomy of an Android application. The sample application includes most major Android building blocks (Activities, Intents, Services, Broadcast Receivers, Content Providers) to illustrate the philosophy of Android application development. It assumes basic Java knowledge.
Learn about Linux on System z Update: Current & Future Linux on System z Technology, Live Virtual Class, Wednesday, July 28. 2010. For more information, visit http://ibm.co/PNo9Cb.
Similar to The anatomy and philosophy of Android - Google I/O 2009 (20)
DocBook is a general purpose XML and SGML document type particularly well suited to books and papers about computer hardware and software (though it is by no means limited to these applications).
For sample code, Please see http://github.com/viswanath7/DocBook4.5/archives/master
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Enhancing Performance with Globus and the Science DMZGlobus
ESnet has led the way in helping national facilities—and many other institutions in the research community—configure Science DMZs and troubleshoot network issues to maximize data transfer performance. In this talk we will present a summary of approaches and tips for getting the most out of your network infrastructure using Globus Connect Server.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
5. Linux Kernel
• Android is built on the Linux kernel, but Android is not
Linux
• No native windowing system
• No glibc support
• Does not include the full set of standard Linux utilities
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
6. Linux Kernel
• Standard Linux 2.6.24 Kernel
• Patch of “kernel enhancements” to support Android
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
7. Why Linux Kernel?
• Great memory and process management
• Permissions-based security model
• Proven driver model
• Support for shared libraries
• It!s already open source!
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
8. Kernel Enhancements
• Alarm
• Low Memory Killer
• Ashmem
• Kernel Debugger
• Binder
• Logger
• Power Management
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
9. Binder: Problem
• Applications and Services may run in separate processes
but must communicate and share data
• IPC can introduce significant processing overhead and
security holes
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
10. Binder: Solution
• Driver to facilitate inter-process communication (IPC)
• High performance through shared memory
• Per-process thread pool for processing requests
• Reference counting, and mapping of object references
across processes
• Synchronous calls between processes
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
16. Binder in Action
Process A Process B
App A Context Binder Driver Service B
get service
service
call foo(object)
17. Binder in Action
Process A Process B
App A Context Binder Driver Service B
get service
service
call foo(object) marshal proxy
object
18. Binder in Action
Process A Process B
App A Context Binder Driver Service B
get service
service
call foo(object) marshal proxy
object
relay to
IPC threads
19. Binder in Action
Process A Process B
App A Context Binder Driver Service B
get service
service
call foo(object) marshal proxy
object
relay to
IPC threads
call return
20. Binder
Android Interface Definition Language (AIDL)
• http://code.google.com/android/reference/aidl.html
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
21. PM Problem
• Mobile devices run on battery power
• Batteries have limited capacity
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
22. PM Solution
• Built on top of standard Linux Power Management (PM)
• More aggressive power management policy
• Components make requests to keep the power on through
“wake locks”
• Supports different types of wake locks
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
24. Android PM in Action
App A PowerManager PM Driver
new wake lock
PARTIAL
25. Android PM in Action
App A PowerManager PM Driver
new wake lock
PARTIAL create wake lock
26. Android PM in Action
App A PowerManager PM Driver
new wake lock
PARTIAL create wake lock
Turn off
LCD
27. Android PM in Action
App A PowerManager PM Driver
new wake lock
PARTIAL create wake lock
Turn off
LCD
release
release
28. Android PM in Action
App A PowerManager PM Driver
new wake lock
PARTIAL create wake lock
Turn off
LCD
release
release
Turn off
CPU
29. Android PM
android.os.PowerManager
• Use wake locks carefully!
• userActivity(long when, …);
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
30. Kernel
The Android kernel source is available today
at:
http://git.android.com
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
35. What is Bionic?
• What is bionic?
• Custom libc implementation, optimized for embedded use.
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
36. Why Bionic?
Why build a custom libc library?
• License: we want to keep GPL out of user-space
• Size: will load in each process, so it needs to be small
• Fast: limited CPU power means we need to be fast
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
37. Bionic libc
• BSD License
• Small size and fast code paths
• Very fast and small custom pthread implementation
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
38. Bionic libc
• Built-in support for important Android-specific services
• system properties
" getprop(“my.system.property”, buff, default);
• log capabilities
! LOGI(“Logging a message with priority ‘Info’”);
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
39. Bionic libc
• Doesn't support certain POSIX features
• Not compatible with Gnu Libc (glibc)
• All native code must be compiled against bionic
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
41. WebKit
• Based on open source WebKit browser: http://webkit.org
• Renders pages in full (desktop) view
• Full CSS, Javascript, DOM, AJAX support
• Support for single-column and adaptive view rendering
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
42. Media Framework
• Based on PacketVideo OpenCORE platform
• Supports standard video, audio, still-frame formats
• Support for hardware / software codec plug-ins
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
43. SQLite
• Light-weight transactional data store
• Back end for most platform data storage
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
45. Surface Flinger
Surface
App
Surface Frame
Surface Flinger Buffer
App
Surface
• Provides system-wide surface “composer”, handling all surface
rendering to frame buffer device
• Can combine 2D and 3D surfaces and surfaces from multiple
applications
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
46. Surface Flinger
• Surfaces passed as buffers via Binder IPC calls
• Can use OpenGL ES and 2D hardware accelerator for its
compositions
• Double-buffering using page-flip
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
47. Audio Flinger
Tone Earpeace
Audio
App
Media
Player Audio Flinger Speaker
App
Game Audio Bluetooth
• Manages all audio output devices
• Processes multiple audio streams into PCM audio out paths
• Handles audio routing to various outputs
Libraries
Surface Manager Media Framework SQLite WebKit Libc
OpenGL|ES Audio Manager FreeType SSL …
49. Hardware Abstraction Layer
Applications
Home Dialer SMS/MMS IM Browser Camera Alarm Calculator
Contacts Voice Dial Email Calendar Media Player Photo Album Clock …
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
Libraries Android Runtime
Surface Media Core Libraries
Manager Framework SQLite WebKit Libc
Audio
OpenGL|ES Manager FreeType SSL … Dalvik Virtual Machine
Hardware Abstraction Layer
Graphics Audio Camera Bluetooth GPS Radio (RIL) WiFi …
Linux Kernel
Shared Memory
Display Driver Camera Driver Bluetooth Driver Driver Binder (IPC) Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
50. Hardware Abstraction Libraries
• User space C/C++ library layer
• Defines the interface that Android requires hardware
“drivers” to implement
• Separates the Android platform logic from the hardware
interface
Hardware Abstraction Layer
Graphics Audio Camera Bluetooth GPS Radio (RIL) WiFi …
51. Hardware Abstraction Libraries
Why do we need a user-space HAL?
• Not all components have standardized kernel driver interfaces
• Kernel drivers are GPL which exposes any proprietary IP
• Android has specific requirements for hardware drivers
Hardware Abstraction Layer
Graphics Audio Camera Bluetooth GPS Radio (RIL) WiFi …
52. HAL Header Example
// must be provided by each Acme hardware implementation
typedef struct {
int (*foo)( void );
! char (*bar)( void );
! …
!
} AcmeFunctions;
const AcmeFunctions *Acme_Init(const struct Env *env, int argc, char
**argv);
Hardware Abstraction Layer
Graphics Audio Camera Bluetooth GPS Radio (RIL) WiFi …
53. Hardware Abstraction Libraries
• Libraries are loaded dynamically at runtime as needed
dlHandle = dlopen(“/system/lib/libacme.so”, RTLD_NOW);
...
acmeInit = (const AcmeFunctions *(*)(const struct Env *,
int, char **))dlsym(dlHandle, ”Acme_Init");
...
acmeFuncs = acmeInit(&env, argc, argv);
Hardware Abstraction Layer
Graphics Audio Camera Bluetooth GPS Radio (RIL) WiFi …
71. Hardware Services
• Telephony Service
• Location Service
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
72. Hardware Services
• Telephony Service
• Location Service
• Bluetooth Service
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
73. Hardware Services
• Telephony Service
• Location Service
• Bluetooth Service
• WiFi Service
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
74. Hardware Services
• Telephony Service
• Location Service
• Bluetooth Service
• WiFi Service
• USB Service
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
75. Hardware Services
• Telephony Service
• Location Service
• Bluetooth Service
• WiFi Service
• USB Service
• Sensor Service
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
76. Application Framework
More Information
• At Google I/O
• “Inside the Android Application Framework”
• Online
• http://code.google.com/android
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
77. Android Anatomy
Applications
Home Dialer SMS/MMS IM Browser Camera Alarm Calculator
Contacts Voice Dial Email Calendar Media Player Albums Clock …
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
Libraries Android Runtime
Surface Manager Core Libraries
Media Framework SQLite
OpenGL|ES FreeType WebKit Dalvik Virtual Machine
SGL SSL Libc
Linux Kernel
Display Driver Camera Driver Bluetooth Driver Shared Memory Binder (IPC) Driver
Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management
80. Runtime Walkthrough
It all starts with init…
Similar to most Linux-based systems at startup, the
bootloader loads the Linux kernel and starts the init process.
Init
Linux Kernel
81. Runtime Walkthrough
Init starts Linux daemons, including:
• USB Daemon (usbd) to manage USB connections
• Android Debug Bridge (adbd) to manage ADB connections
• Debugger Daemon (debuggerd) to manage debug processes
requests (dump memory, etc.)
• Radio Interface Layer Daemon (rild) to manage communication
with the radio
usbd adbd debuggerd rild
Init
82. Runtime Walkthrough
Init process starts the zygote process:
• A nascent process which initializes a Dalvik VM instance
• Loads classes and listens on socket for requests to spawn VMs
• Forks on request to create VM instances for managed processes
• Copy-on-write to maximize re-use and minimize footprint
usbd
adbd
debuggerd
daemons Zygote
Init
83. Runtime Walkthrough
Init starts runtime process:
• Initializes Service Manager – the context manager for
Binder that handles service registration and lookup
• Registers Service Manager as default context manager for
Binder services
Service
Manager
usbd
adbd
debuggerd
daemons runtime Zygote
Init
84. Runtime Walkthrough
Runtime process sends request for Zygote to start System
Service
Service
Manager
usbd
adbd
debuggerd
daemons runtime Zygote
Init
85. Runtime Walkthrough
Runtime process sends request for Zygote to start System
Server
• Zygote forks a new VM instance for the System Service process and
starts the service
Service System
Manager Server
usbd
adbd
debuggerd
daemons runtime Zygote Dalvik VM
Init
86. Runtime Walkthrough
System Service starts the native system servers, including:
• Surface Flinger
• Audio Flinger
Audio Flinger
Surface
Flinger
Service System
Manager Server
usbd
adbd
debuggerd
daemons runtime Zygote Dalvik VM
Init
87. Runtime Walkthrough
Native system servers register with Service Manager as IPC
service targets:
Audio Flinger
Surface
Flinger
Service System
Manager Server
usbd
adbd
debuggerd
daemons runtime Zygote Dalvik VM
Init
88. Runtime Walkthrough
System Service starts the Android managed services:
Content Telephony Bluetooth Connectivity Location
Manager Service Service Service Manager
Window Activity Package Power
Manager Manager Manager Manager …
Camera
Surface
Service
Flinger
Service System
Manager Server
usbd
adbd
debuggerd
daemons runtime Zygote Dalvik VM
Init
89. Runtime Walkthrough
Android managed Services register with Service Manager:
Content Telephony Bluetooth Connectivity Location
Manager Service Service Service Manager
Window Activity Package Power
Manager Manager Manager Manager …
Service
Camera
Manager
Service Camera
Surface
Service
Flinger
Service System
Manager Server
usbd
adbd
debuggerd
daemons runtime Zygote Dalvik VM
Init
90. Runtime Walkthrough
…
Power
Manager
Activity
Manager
Camera
Surface
Service
Flinger
Service System
Manager Server
usbd
adbd
debuggerd
daemons runtime Zygote Dalvik VM
Init
91. Runtime Walkthrough
After system server loads all services, the system is ready…
Init Daemon runtime Zygote System
Processes Server
Activity
Manager
Package
Manager
Window
Manager
…
Dalvik VM
Surface
Flinger
usbd
adbd
Init debuggerd
daemons runtime Zygote Audio
Flinger
92. Runtime Walkthrough
After system server loads all services, the system is ready…
Init Daemon runtime Zygote System Home
Processes Server
Home
Activity
Manager Dalvik VM
Package
Manager
Window
Manager
…
Dalvik VM
Surface
Flinger
usbd
adbd
Init debuggerd
daemons runtime Zygote Audio
Flinger
93. Runtime Walkthrough
After system server loads all services, the system is ready…
Init Daemon runtime Zygote System Home
Processes Server
Activity Home
Manager
Package Dalvik VM
Manager
Window
Manager
…
Dalvik VM
Surface
Flinger
usbd
adbd
Init debuggerd
daemons runtime Zygote Audio
Flinger
libc libc libc libc libc libc
94. Runtime Walkthrough
Each subsequent application is launched in it!s own process
Daemon runtime Zygote System Home Contacts
Processes Server
Activity Home Contacts
Manager
Package Dalvik VM Dalvik VM
Manager
Window
Manager
…
Dalvik VM
Surface
Flinger
usbd
adbd
debuggerd
daemons runtime Zygote Audio
Flinger
libc libc libc libc libc libc
96. Layer Interaction
There are 3 main flavors of Android layer cake:
• App ! Runtime Service ! lib
• App ! Runtime Service ! Native Service ! lib
• App ! Runtime Service ! Native Daemon ! lib
97. Layer Interaction
There are 3 main flavors of Android layer cake:
• App ! Runtime Service ! lib
• App ! Runtime Service ! Native Service ! lib
• App ! Runtime Service ! Native Daemon ! lib
103. Layer Interaction
There are 3 main flavors of Android layer cake:
• App ! Runtime Service ! lib
• App ! Runtime Service ! Native Service ! lib
• App ! Runtime Service ! Native Daemon ! lib
105. Android Native Services
Applications
Application
Application
Framework Runtime
Service
JNI
Libraries
Binder IPC
Native Service Native Service
Binding
Linux Kernel
106. Android Native Services
Applications
Application
Application
Framework Runtime
Service
JNI
Libraries
Binder IPC
Native Service Native Service
Binding
Dynamic load
HAL Library
Linux Kernel
107. Android Native Services
Applications
Application
Application
Framework Runtime
Service
JNI
Libraries
Binder IPC
Native Service Native Service
Binding
Dynamic load
HAL Library
Linux Kernel
Kernel Driver
111. Layer Interaction
There are 3 main flavors of Android layer cake:
• App ! Runtime Service ! lib
• App ! Runtime Service ! Native Service ! lib
• App ! Runtime Service ! Native Daemon ! lib
112. Daemon Connection
Applications
Application
Application
Framework Runtime
Service
JNI
Libraries
Native Service
Binding
Linux Kernel
Kernel Driver
113. Daemon Connection
Applications
Application
Application
Framework Runtime
Service
JNI
Libraries
sockets
Native Service Daemon
Binding
Linux Kernel
Kernel Driver
114. Daemon Connection
Applications
Application
Application
Framework Runtime
Service
JNI
Libraries
sockets
Native Service Daemon
Binding
Dynamic load
HAL Library
Linux Kernel
Kernel Driver
116. Layer Interaction
There are 3 main flavors of Android layer cake:
• App ! Runtime Service ! lib
• App ! Runtime Service ! Native Service ! lib
• App ! Runtime Service ! Native Daemon ! lib
117. Android Anatomy
Applications
Home Dialer SMS/MMS IM Browser Camera Alarm Calculator
Contacts Voice Dial Email Calendar Media Player Albums Clock …
Application Framework
Activity Manager Window View Notification
Manager Content Providers System Manager
Telephony Location
Package Manager Manager Resource Manager Manager …
Libraries Android Runtime
Surface Manager Core Libraries
Media Framework SQLite
OpenGL|ES FreeType WebKit Dalvik Virtual Machine
SGL SSL Libc
Linux Kernel
Display Driver Camera Driver Bluetooth Driver Shared Memory Binder (IPC) Driver
Driver
Audio Power
USB Driver Keypad Driver WiFi Driver Drivers Management