SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Android	
  
 Internals	
  


Marko	
  Gargenta	
  
  Marakana	
  
Agenda	
  
•    Android	
  Stack	
  
•    Opera6ng	
  System	
  Features	
  
•    Android	
  Startup	
  &	
  Run6me	
  
•    Layer	
  Interac6on	
  
•    Na6ve	
  Development	
  Kit	
  
•    Summary	
  
ANDROID	
  STACK	
  
The	
  Stack	
  
Linux	
  Kernel	
  
Android runs on Linux.                                        Applications


                                    Home      Contacts          Phone             Browser              Other

Linux provides as well as:
    Hardware abstraction layer                            Application Framework
    Memory management              Activity        Window                    Content                   View

    Process management
                                   Manager         Manager                  Providers                 System

                                   Package    Telephony         Resource           Location            Notiication
    Networking                     Manager     Manager          Manager            Manager             Manager


                                                                Libraries
Users never see Linux sub system   Surface       Media
                                                                   SQLite                  Android Runtime
                                   Manager     Framework

                                                                                                 Core Libs

The adb shell command opens        OpenGL      FreeType            WebKit

                                                                                                  Delvik
Linux shell                          SGL          SSL               libc
                                                                                                   VM




                                    Display    Camera         Linux Kernel              Flash                Binder
                                    Driver      Driver                                  Driver               Driver

                                    Keypad      WiFi                                    Audio                Power
                                     Driver     Driver                                  Driver               Mgmt
Na6ve	
  Libraries	
  
Bionic, a super fast and small                              Applications


license-friendly libc library     Home      Contacts          Phone             Browser              Other

optimized for embedded use
                                                        Application Framework
Surface Manager for composing    Activity        Window                    Content                   View

window manager with off-screen   Manager         Manager                  Providers                 System


buffering
                                 Package    Telephony         Resource           Location            Notiication
                                 Manager     Manager          Manager            Manager             Manager


                                                              Libraries
2D and 3D graphics hardware      Surface       Media
                                                                 SQLite                  Android Runtime
support or software simulation
                                 Manager     Framework

                                                                                               Core Libs
                                 OpenGL      FreeType            WebKit

                                                                                                Delvik
Media codecs offer support for     SGL          SSL               libc
                                                                                                 VM

major audio/video codecs
                                  Display    Camera         Linux Kernel              Flash                Binder
                                                                                      Driver               Driver
SQLite database
                                  Driver      Driver

                                  Keypad      WiFi                                    Audio                Power
                                   Driver     Driver                                  Driver               Mgmt


WebKit library for fast HTML
rendering
Dalvik	
  
Dalvik VM is Google’s implementation of Java

Optimized for mobile devices




Key Dalvik differences:

    Register-based versus stack-based VM
    Dalvik runs .dex files
    More efficient and compact implementation
    Different set of Java libraries than SDK
Android	
  and	
  Java	
  

Android Java =
Java SE –
AWT/Swing +
Android API
Applica6on	
  Framework	
  
Activation manager controls the life                              Applications


cycle of the app                        Home      Contacts          Phone             Browser              Other




Content providers encapsulate data                            Application Framework
that is shared (e.g. contacts)         Activity        Window                    Content                   View
                                       Manager         Manager                  Providers                 System

                                       Package    Telephony         Resource           Location            Notiication
Resource manager manages               Manager     Manager          Manager            Manager             Manager


everything that is not the code                                     Libraries
                                       Surface       Media
                                                                       SQLite                  Android Runtime
                                       Manager     Framework

Location manager figures out the                                                                     Core Libs

location of the phone (GPS, GSM,
                                       OpenGL      FreeType            WebKit

                                                                                                      Delvik

WiFi)                                    SGL          SSL               libc
                                                                                                       VM




Notification manager for events         Display
                                        Driver
                                                   Camera
                                                    Driver
                                                                  Linux Kernel              Flash
                                                                                            Driver
                                                                                                                 Binder
                                                                                                                 Driver

such as arriving messages,              Keypad      WiFi                                    Audio
                                                                                            Driver
                                                                                                                 Power
                                                                                                                 Mgmt
                                         Driver     Driver
appointments, etc
Applica6ons	
  
OPERATING	
  SYSTEM	
  FEATURES	
  	
  
File	
  System	
  
The file system has three main mount points. One
for system, one for the apps, and one for whatever.

Each app has its own sandbox easily accessible to
it. No one else can access its data. The sandbox is
in /data/data/com.marakana/

SDCard is expected to always be there. It’s a good
place for large files, such as movies and music.
Everyone can access it.
Security	
  
Each Android application            Android Application
runs inside its own Linux
process.                                     Linux Process
Additionally, each application
has its own sandbox file                                   File
system with its own set of                     Prefs
                                       DB                 System
preferences and its own
database.

Other applications cannot
access any of its data,
unless it is explicitly shared.
ANDROID	
  	
  
STARTUP	
  &	
  	
  
RUNTIME	
  
Startup	
  Walkthrough	
  
Run6me	
  Overview	
  
Layer	
  Interac6ons
                                     	
  
There are three main
scenarios for your app to talk
to native library:

-  Directly
-  Via native service
-  Via native daemon

It will depend on the type of
app and type of native library
which method works best.
App	
  –	
  Run6me	
  Service	
  -­‐	
  Lib	
  
App	
  –	
  Run6me-­‐Na6ve	
  Service-­‐Lib	
  
App–Run6me–Na6ve	
  Daemon-­‐Lib	
  
Binder	
  IPC	
  




High-performance IPC: shared memory, per-process thread pool, synchronous
Java	
  Na6ve	
  Interface	
  

JNI defines naming and coding
convention so that Java VM can find
and call native code.

JNI is built into JVM to provide
access to OS I/O and others.
Building	
  and	
  Running	
  JNI	
  Code	
  
NATIVE	
  
DEVELOPMENT	
  
KIT	
  
What’s	
  in	
  NDK?	
  
Tools to build and compile your native code for the device
architecture (such as ARM)


A way to package your library into the APK file so you can
distribute your application easily


A set of native system headers that will be supported for
the future releases of Android platform (libc, libm, libz,
liblog, JNI headers, some C++ headers, and OpenGL)



(some) documentation, sample code and examples
Why	
  NDK?	
  

NDK allows you to develop parts of your Android
application in C/C++.

You cannot develop native-only apps in NDK –
your app is still subject to security sandboxing.

Main motivation for native code is performance.
Using	
  NDK	
  
Summary	
  
     For most applications, you will just
     need Android SDK to develop apps.

     Sometimes you may need NDK to
     make parts of your app run faster.

     Ultimately, you can build your own
     Android platform from source.



     Marko Gargenta, Marakana.com
     marko@marakana.com
     +1-415-647-7000



     Licensed under Creative Commons
     License (cc-by-nc-nd). Please Share!

Weitere ähnliche Inhalte

Was ist angesagt?

Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overviewJerrin George
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC MechanismLihan Chen
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia FrameworkOpersys inc.
 
An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...William Liang
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementationChethan Pchethan
 
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 booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security InternalsOpersys inc.
 
Android Binder IPC for Linux
Android Binder IPC for LinuxAndroid Binder IPC for Linux
Android Binder IPC for LinuxYu-Hsin Hung
 
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.
 
Making a Headless Android Device
Making a Headless Android DeviceMaking a Headless Android Device
Making a Headless Android DevicePatricia Aas
 
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
 
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
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 

Was ist angesagt? (20)

Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overview
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
 
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)
 
An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...An Introduction to the Android Framework -- a core architecture view from app...
An Introduction to the Android Framework -- a core architecture view from app...
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
 
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)
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Android Security Internals
Android Security InternalsAndroid Security Internals
Android Security Internals
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Android Binder IPC for Linux
Android Binder IPC for LinuxAndroid Binder IPC for Linux
Android Binder IPC for Linux
 
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...
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Making a Headless Android Device
Making a Headless Android DeviceMaking a Headless Android Device
Making a Headless Android Device
 
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
 
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
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 

Andere mochten auch

Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaMarakana Inc.
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentMarakana Inc.
 
New concepts in human
New concepts in humanNew concepts in human
New concepts in humanbechikmn
 
Optimizing the Virtual Environment
Optimizing the Virtual EnvironmentOptimizing the Virtual Environment
Optimizing the Virtual Environmentuptime software
 
OutSys Company Presentation
OutSys Company PresentationOutSys Company Presentation
OutSys Company PresentationOutSys
 
Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算
Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算
Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算Bloombase
 
Dematic Logistics Review #4
Dematic Logistics Review #4Dematic Logistics Review #4
Dematic Logistics Review #4hagenbucksw
 
Tieto Enator
Tieto EnatorTieto Enator
Tieto Enatorsvatle
 
Guide to Investment: Republic of Tatarstan
Guide to Investment: Republic of TatarstanGuide to Investment: Republic of Tatarstan
Guide to Investment: Republic of TatarstanInvestTatarstan
 
Safend- DL
Safend- DLSafend- DL
Safend- DLdanilopv
 
Estrategias y recursos i
Estrategias y recursos iEstrategias y recursos i
Estrategias y recursos ijkrls
 
E-group's pitch
E-group's pitchE-group's pitch
E-group's pitchi7
 
History of the llano estacado
History of the llano estacadoHistory of the llano estacado
History of the llano estacadoMark McGinley
 
Desafios jurídicos de Internet
Desafios jurídicos de InternetDesafios jurídicos de Internet
Desafios jurídicos de InternetLoreto Corredoira
 

Andere mochten auch (20)

Android Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar GargentaAndroid Services Black Magic by Aleksandar Gargenta
Android Services Black Magic by Aleksandar Gargenta
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
DABiS800
DABiS800DABiS800
DABiS800
 
30 Band Marks
30 Band Marks30 Band Marks
30 Band Marks
 
Mapa Mental
Mapa MentalMapa Mental
Mapa Mental
 
New concepts in human
New concepts in humanNew concepts in human
New concepts in human
 
Optimizing the Virtual Environment
Optimizing the Virtual EnvironmentOptimizing the Virtual Environment
Optimizing the Virtual Environment
 
Tranzeo
TranzeoTranzeo
Tranzeo
 
OutSys Company Presentation
OutSys Company PresentationOutSys Company Presentation
OutSys Company Presentation
 
Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算
Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算
Bloombase 为 KVM 企业级虚拟数据中心提供全方位信息安全保护及运算
 
Dematic Logistics Review #4
Dematic Logistics Review #4Dematic Logistics Review #4
Dematic Logistics Review #4
 
Tieto Enator
Tieto EnatorTieto Enator
Tieto Enator
 
Guide to Investment: Republic of Tatarstan
Guide to Investment: Republic of TatarstanGuide to Investment: Republic of Tatarstan
Guide to Investment: Republic of Tatarstan
 
Safend- DL
Safend- DLSafend- DL
Safend- DL
 
Estrategias y recursos i
Estrategias y recursos iEstrategias y recursos i
Estrategias y recursos i
 
E-group's pitch
E-group's pitchE-group's pitch
E-group's pitch
 
Catalog Sew-Eurodrive
Catalog Sew-EurodriveCatalog Sew-Eurodrive
Catalog Sew-Eurodrive
 
History of the llano estacado
History of the llano estacadoHistory of the llano estacado
History of the llano estacado
 
Desafios jurídicos de Internet
Desafios jurídicos de InternetDesafios jurídicos de Internet
Desafios jurídicos de Internet
 
Girl, interrupted
Girl, interruptedGirl, interrupted
Girl, interrupted
 

Ähnlich wie Marakana Android Internals

Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot OverviewMarko Gargenta
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Marko Gargenta
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers SlidesMarko Gargenta
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java DevelopersMarko Gargenta
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
Google Io Introduction To Android
Google Io Introduction To AndroidGoogle Io Introduction To Android
Google Io Introduction To AndroidBhavya Siddappa
 
The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009Viswanath J
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11영호 라
 
Android application development
Android application developmentAndroid application development
Android application developmentLinh Vi Tường
 
Android unveiled (I)
Android unveiled (I)Android unveiled (I)
Android unveiled (I)denian00
 
Webinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformWebinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformService2Media
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCA API Management
 
How to Choose the Right API Management Solution
How to Choose the Right API Management SolutionHow to Choose the Right API Management Solution
How to Choose the Right API Management SolutionCA API Management
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Agora Group
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212Yoojoo Jang
 
Introduction to Android platform
Introduction to Android platformIntroduction to Android platform
Introduction to Android platformmaamir farooq
 

Ähnlich wie Marakana Android Internals (20)

Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot Overview
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers Slides
 
Open Android
Open AndroidOpen Android
Open Android
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Google Io Introduction To Android
Google Io Introduction To AndroidGoogle Io Introduction To Android
Google Io Introduction To Android
 
Android and Intel Inside
Android and Intel InsideAndroid and Intel Inside
Android and Intel Inside
 
The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009The anatomy and philosophy of Android - Google I/O 2009
The anatomy and philosophy of Android - Google I/O 2009
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11
 
Android application development
Android application developmentAndroid application development
Android application development
 
Android unveiled (I)
Android unveiled (I)Android unveiled (I)
Android unveiled (I)
 
Webinar The App Lifecycle Platform
Webinar The App Lifecycle PlatformWebinar The App Lifecycle Platform
Webinar The App Lifecycle Platform
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San Francisco
 
How to Choose the Right API Management Solution
How to Choose the Right API Management SolutionHow to Choose the Right API Management Solution
How to Choose the Right API Management Solution
 
Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012Android. behind the scenes_programatica 2012
Android. behind the scenes_programatica 2012
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
Introduction to Android platform
Introduction to Android platformIntroduction to Android platform
Introduction to Android platform
 

Mehr von Marko Gargenta

LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer AppsMarko Gargenta
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The PhoneMarko Gargenta
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 

Mehr von Marko Gargenta (11)

LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer Apps
 
Java Champion Wanted
Java Champion WantedJava Champion Wanted
Java Champion Wanted
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The Phone
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Scrum Overview
Scrum OverviewScrum Overview
Scrum Overview
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, Marakana
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 

Kürzlich hochgeladen

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Kürzlich hochgeladen (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Marakana Android Internals

  • 1. Android   Internals   Marko  Gargenta   Marakana  
  • 2. Agenda   •  Android  Stack   •  Opera6ng  System  Features   •  Android  Startup  &  Run6me   •  Layer  Interac6on   •  Na6ve  Development  Kit   •  Summary  
  • 5. Linux  Kernel   Android runs on Linux. Applications Home Contacts Phone Browser Other Linux provides as well as: Hardware abstraction layer Application Framework Memory management Activity Window Content View Process management Manager Manager Providers System Package Telephony Resource Location Notiication Networking Manager Manager Manager Manager Manager Libraries Users never see Linux sub system Surface Media SQLite Android Runtime Manager Framework Core Libs The adb shell command opens OpenGL FreeType WebKit Delvik Linux shell SGL SSL libc VM Display Camera Linux Kernel Flash Binder Driver Driver Driver Driver Keypad WiFi Audio Power Driver Driver Driver Mgmt
  • 6. Na6ve  Libraries   Bionic, a super fast and small Applications license-friendly libc library Home Contacts Phone Browser Other optimized for embedded use Application Framework Surface Manager for composing Activity Window Content View window manager with off-screen Manager Manager Providers System buffering Package Telephony Resource Location Notiication Manager Manager Manager Manager Manager Libraries 2D and 3D graphics hardware Surface Media SQLite Android Runtime support or software simulation Manager Framework Core Libs OpenGL FreeType WebKit Delvik Media codecs offer support for SGL SSL libc VM major audio/video codecs Display Camera Linux Kernel Flash Binder Driver Driver SQLite database Driver Driver Keypad WiFi Audio Power Driver Driver Driver Mgmt WebKit library for fast HTML rendering
  • 7. Dalvik   Dalvik VM is Google’s implementation of Java Optimized for mobile devices Key Dalvik differences: Register-based versus stack-based VM Dalvik runs .dex files More efficient and compact implementation Different set of Java libraries than SDK
  • 8. Android  and  Java   Android Java = Java SE – AWT/Swing + Android API
  • 9. Applica6on  Framework   Activation manager controls the life Applications cycle of the app Home Contacts Phone Browser Other Content providers encapsulate data Application Framework that is shared (e.g. contacts) Activity Window Content View Manager Manager Providers System Package Telephony Resource Location Notiication Resource manager manages Manager Manager Manager Manager Manager everything that is not the code Libraries Surface Media SQLite Android Runtime Manager Framework Location manager figures out the Core Libs location of the phone (GPS, GSM, OpenGL FreeType WebKit Delvik WiFi) SGL SSL libc VM Notification manager for events Display Driver Camera Driver Linux Kernel Flash Driver Binder Driver such as arriving messages, Keypad WiFi Audio Driver Power Mgmt Driver Driver appointments, etc
  • 12. File  System   The file system has three main mount points. One for system, one for the apps, and one for whatever. Each app has its own sandbox easily accessible to it. No one else can access its data. The sandbox is in /data/data/com.marakana/ SDCard is expected to always be there. It’s a good place for large files, such as movies and music. Everyone can access it.
  • 13. Security   Each Android application Android Application runs inside its own Linux process. Linux Process Additionally, each application has its own sandbox file File system with its own set of Prefs DB System preferences and its own database. Other applications cannot access any of its data, unless it is explicitly shared.
  • 14. ANDROID     STARTUP  &     RUNTIME  
  • 17. Layer  Interac6ons   There are three main scenarios for your app to talk to native library: -  Directly -  Via native service -  Via native daemon It will depend on the type of app and type of native library which method works best.
  • 18. App  –  Run6me  Service  -­‐  Lib  
  • 19. App  –  Run6me-­‐Na6ve  Service-­‐Lib  
  • 21. Binder  IPC   High-performance IPC: shared memory, per-process thread pool, synchronous
  • 22. Java  Na6ve  Interface   JNI defines naming and coding convention so that Java VM can find and call native code. JNI is built into JVM to provide access to OS I/O and others.
  • 23. Building  and  Running  JNI  Code  
  • 25. What’s  in  NDK?   Tools to build and compile your native code for the device architecture (such as ARM) A way to package your library into the APK file so you can distribute your application easily A set of native system headers that will be supported for the future releases of Android platform (libc, libm, libz, liblog, JNI headers, some C++ headers, and OpenGL) (some) documentation, sample code and examples
  • 26. Why  NDK?   NDK allows you to develop parts of your Android application in C/C++. You cannot develop native-only apps in NDK – your app is still subject to security sandboxing. Main motivation for native code is performance.
  • 28. Summary   For most applications, you will just need Android SDK to develop apps. Sometimes you may need NDK to make parts of your app run faster. Ultimately, you can build your own Android platform from source. Marko Gargenta, Marakana.com marko@marakana.com +1-415-647-7000 Licensed under Creative Commons License (cc-by-nc-nd). Please Share!