SlideShare une entreprise Scribd logo
1  sur  12
Android. Behind The Scenes
              R
              a
              d
              u
              M
              O
               I
              S
              A
              N
              A
Agenda

     Android Short Intro
     Use-case: QEmu
     Android Init System
     Application Launch




2
Android Short Intro
     Home                        Contacts                  Phone                           Browser                ...
Applications
                      Telephon         Resourc                               Notificatio
    Activity                                             Location
                          y               e                                       n
    Manager                                              Manager
                                                                             Manager
                      Manager          Manager

            Package          Window           Content                View
            Manager          Manager         Providers              System
                                                                                                     Android Runtime
Android Framework
                                                                                                      Core Libraries
                                           Media
     Surface Manager                                                   SQLite
                                        Framework                                                     Dalvik Virtual
                                                                                                        Machine
      Open GL | ES                      Free Type                     Webkit

             SGL                            SSL                         libc

Libraries
                                                                                                                Linux Kernel
       Display                          Camera                        Flash Memory                      Binder(IPC)
        Driver                           Driver                           Driver                           Driver

       Keypad                            WiFi                            Audio                            Power
        Driver                          Driver                          Drivers                         Management




3
Use-case: QEmu

    So what exactly is QEmu?
    QEMU is a processor emulator which has two different
    operating modes:
     full system emulation, which emulates a full system including
    the corresponding hard disk image
     user mode emulation, which allows you to run a simple
    cross-compiled executable




4
Use-case: QEmu
    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    echo ":ARM:M:18:(::/data/qemu-arm:" > /proc/sys/fs/binfmt_misc/register

    mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
    echo ":CLR:M::MZ::/usr/bin/mono:" > /proc/sys/fs/binfmt_misc/register

              Name is the name of the binary format
                                           The magic number
                                                                            program that is to be run with the
                                                                            matching file as an argument

        :name:type:offset:magic:mask:interpreter:
                                                      What part of magic number is significant

                                   Where to look for the magic number

                          E or M




5
Use-case: QEmu
           Why?
     Sandbox binary applications
     Debugging/tracing binary applications
     Run Android Apps with native arm binary on x86
    Platforms

          How?
    Two approaches:
    Intercept the Fork starting the Application Process
    Run a second emulated Zygote




6
Android Init System
     bootl
     oader




    Linux
    kernel



      init




          init.rc
    Init.<machine>.rc




7
Android Init file
    service ril-daemon /system/bin/rild
      socket rild stream 660 root radio
      socket rild-debug stream 660 radio system
      user root
      group radio cache inet misc audio sdcard_rw net_admin net_raw qcom_oncrpc diag


    service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
       socket zygote stream 660 root system
       onrestart write /sys/android_power/request_state wake
       onrestart write /sys/power/state on
       onrestart restart media
       onrestart restart netd


    service media /system/bin/mediaserver
       user media
       group system audio camera graphics inet net_bt net_bt_admin net_raw
       ioprio rt 4




8
Android Init System
                                                            Power
     bootl                                                 Manager
     oader                                                 Telephon
                                                               y         App
                                                           Registry
                                                Core        Activity
                                               Services                  App
                     Native                                Manager
                                instantiate
    Linux           Daemons    AppRuntime                  Window
    kernel                                                 Manager       App

                                                             ...
                               system_serv
      init          Zygote          er
                                                             Mount
                                                             Service
                                                           Connectivit
                     Other                                      y
                                              Additional    Service
                    processe     Select                     Location
                                               Services
                        s        Loop                       Manager
                                 Mode                         Audio
                                                             Service
          init.rc
    Init.<machine>.rc                                          ...




9
Application Launch

     Laun                                                                                 Application                  onCreate()

     cher                                                                                  Classes

                                                                                                    load
                                                                                                    into
                                                                                                    ram


                                          Activity        bindApplication()                 Activity
     launch activity by intent




                                                                                                           callActivityOnCreate()
                                                                                            Thread                                  Instrumentati
                                          Manager         thread.attach()                    Dalvik                                       on
                                          Service
                                                                                              VM




                                                                              forkAndSpecialize()
                                                              Zygote




                                                     zygote
                                 Binder              socket




10
Application Launch
     Laun
     cher




                                          Activity
     launch activity by intent




                                          Manager
                                          Service


                                                      zygote               forkAndSpecialize()
                                                                 Zygote
                                                      socket


                                                     zygote_e
                                                      zygote    Zygote_e   forkAndSpecialize()
                                                        mu       Zygote
                                                      socket      mu
                                                      socket
                                 Binder




11
12

Contenu connexe

Tendances

Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java DevelopersMarko Gargenta
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java DevelopersMike Wolfson
 
V Labs Product Presentation
V Labs  Product PresentationV Labs  Product Presentation
V Labs Product PresentationWil Huijben
 
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
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot OverviewMarko Gargenta
 
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011Shinya Takamaeda-Y
 

Tendances (11)

TOMOYO Linux on Android
TOMOYO Linux on AndroidTOMOYO Linux on Android
TOMOYO Linux on Android
 
Learn C Programming Language by Using GDB
Learn C Programming Language by Using GDBLearn C Programming Language by Using GDB
Learn C Programming Language by Using GDB
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
V Labs Product Presentation
V Labs  Product PresentationV Labs  Product Presentation
V Labs Product Presentation
 
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
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot Overview
 
SDN
SDNSDN
SDN
 
Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone
 
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
 

Similaire à Android. behind the scenes_programatica 2012

Google Io Introduction To Android
Google Io Introduction To AndroidGoogle Io Introduction To Android
Google Io Introduction To AndroidBhavya Siddappa
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To AndroidGoogleTecTalks
 
Mee go是您的新机遇
Mee go是您的新机遇Mee go是您的新机遇
Mee go是您的新机遇OpenSourceCamp
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android SecurityMarakana Inc.
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
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
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Venus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScienceVenus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScienceOW2
 
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationMeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationIntel Developer Zone Community
 
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.
 
ANODE – Continuous Deployment with Node.js over Azure, Yosef Dinerstein
ANODE – Continuous Deployment with Node.js over Azure, Yosef DinersteinANODE – Continuous Deployment with Node.js over Azure, Yosef Dinerstein
ANODE – Continuous Deployment with Node.js over Azure, Yosef DinersteinDevOpsDays Tel Aviv
 
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development Naresh Kumar
 

Similaire à Android. behind the scenes_programatica 2012 (20)

Google Io Introduction To Android
Google Io Introduction To AndroidGoogle Io Introduction To Android
Google Io Introduction To Android
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Open Android
Open AndroidOpen Android
Open Android
 
Mee go是您的新机遇
Mee go是您的新机遇Mee go是您的新机遇
Mee go是您的新机遇
 
Deep Dive Into Android Security
Deep Dive Into Android SecurityDeep Dive Into Android Security
Deep Dive Into Android Security
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Android 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 and Intel Inside
Android and Intel InsideAndroid and Intel Inside
Android and Intel Inside
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers Slides
 
Deep Dive into WinRT
Deep Dive into WinRTDeep Dive into WinRT
Deep Dive into WinRT
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Xtopia2010 wp7
Xtopia2010 wp7Xtopia2010 wp7
Xtopia2010 wp7
 
Venus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScienceVenus-c: Using open source clouds in eScience
Venus-c: Using open source clouds in eScience
 
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and ValidationMeeGo AppLab Desktop Summit 2011 - Submission and Validation
MeeGo AppLab Desktop Summit 2011 - Submission and Validation
 
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
 
ANODE – Continuous Deployment with Node.js over Azure, Yosef Dinerstein
ANODE – Continuous Deployment with Node.js over Azure, Yosef DinersteinANODE – Continuous Deployment with Node.js over Azure, Yosef Dinerstein
ANODE – Continuous Deployment with Node.js over Azure, Yosef Dinerstein
 
What’s New ?Linux on System z
What’s New ?Linux on System zWhat’s New ?Linux on System z
What’s New ?Linux on System z
 
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development
Introduction to Windows 8 Development
 
Nos Windows
Nos WindowsNos Windows
Nos Windows
 

Plus de Agora Group

How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...
How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...
How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...Agora Group
 
Microservicii reutilizabile in arhitecturi bazate pe procese
Microservicii reutilizabile in arhitecturi bazate pe proceseMicroservicii reutilizabile in arhitecturi bazate pe procese
Microservicii reutilizabile in arhitecturi bazate pe proceseAgora Group
 
The role of BPM in Paradigms Shift
The role of BPM in Paradigms ShiftThe role of BPM in Paradigms Shift
The role of BPM in Paradigms ShiftAgora Group
 
Prezentare Ensight_BPM-20171004
Prezentare Ensight_BPM-20171004Prezentare Ensight_BPM-20171004
Prezentare Ensight_BPM-20171004Agora Group
 
Curs Digital Forensics
Curs Digital ForensicsCurs Digital Forensics
Curs Digital ForensicsAgora Group
 
The next generation of Companies management: state of the art in BPM
The next generation of Companies management: state of the art in BPMThe next generation of Companies management: state of the art in BPM
The next generation of Companies management: state of the art in BPMAgora Group
 
Speed Dialing the Enterprise
Speed Dialing the EnterpriseSpeed Dialing the Enterprise
Speed Dialing the EnterpriseAgora Group
 
Arhitectura proceselor în Sistemul Informațional de Sănătate
Arhitectura proceselor în Sistemul Informațional de SănătateArhitectura proceselor în Sistemul Informațional de Sănătate
Arhitectura proceselor în Sistemul Informațional de SănătateAgora Group
 
IBM’s Smarter Process Reinvent Business
IBM’s Smarter Process Reinvent BusinessIBM’s Smarter Process Reinvent Business
IBM’s Smarter Process Reinvent BusinessAgora Group
 
eHealth 2014_Radu Dop
eHealth 2014_Radu DopeHealth 2014_Radu Dop
eHealth 2014_Radu DopAgora Group
 
Importanța registrelor pentru pacienți
Importanța registrelor pentru paciențiImportanța registrelor pentru pacienți
Importanța registrelor pentru paciențiAgora Group
 
CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...
CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...
CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...Agora Group
 
Perspective naționale și internaționale ale informaticii și standardelor medi...
Perspective naționale și internaționale ale informaticii și standardelor medi...Perspective naționale și internaționale ale informaticii și standardelor medi...
Perspective naționale și internaționale ale informaticii și standardelor medi...Agora Group
 
UTI_Dosarul electronic de sanatate
UTI_Dosarul electronic de sanatateUTI_Dosarul electronic de sanatate
UTI_Dosarul electronic de sanatateAgora Group
 
Class IT - Enemy inside the wire
Class IT - Enemy inside the wireClass IT - Enemy inside the wire
Class IT - Enemy inside the wireAgora Group
 
Infologica - auditarea aplicatiilor mobile
Infologica - auditarea aplicatiilor mobileInfologica - auditarea aplicatiilor mobile
Infologica - auditarea aplicatiilor mobileAgora Group
 
Agora Securitate yugo neumorni
Agora Securitate yugo neumorniAgora Securitate yugo neumorni
Agora Securitate yugo neumorniAgora Group
 
Security threats in the LAN
Security threats in the LANSecurity threats in the LAN
Security threats in the LANAgora Group
 

Plus de Agora Group (20)

How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...
How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...
How to Digitally Transform and Stay Competitive with a Zero-code Digital Busi...
 
Microservicii reutilizabile in arhitecturi bazate pe procese
Microservicii reutilizabile in arhitecturi bazate pe proceseMicroservicii reutilizabile in arhitecturi bazate pe procese
Microservicii reutilizabile in arhitecturi bazate pe procese
 
The role of BPM in Paradigms Shift
The role of BPM in Paradigms ShiftThe role of BPM in Paradigms Shift
The role of BPM in Paradigms Shift
 
Prezentare Ensight_BPM-20171004
Prezentare Ensight_BPM-20171004Prezentare Ensight_BPM-20171004
Prezentare Ensight_BPM-20171004
 
Curs OSINT
Curs OSINTCurs OSINT
Curs OSINT
 
Curs Digital Forensics
Curs Digital ForensicsCurs Digital Forensics
Curs Digital Forensics
 
The next generation of Companies management: state of the art in BPM
The next generation of Companies management: state of the art in BPMThe next generation of Companies management: state of the art in BPM
The next generation of Companies management: state of the art in BPM
 
Speed Dialing the Enterprise
Speed Dialing the EnterpriseSpeed Dialing the Enterprise
Speed Dialing the Enterprise
 
ABPMP Romania
ABPMP RomaniaABPMP Romania
ABPMP Romania
 
Arhitectura proceselor în Sistemul Informațional de Sănătate
Arhitectura proceselor în Sistemul Informațional de SănătateArhitectura proceselor în Sistemul Informațional de Sănătate
Arhitectura proceselor în Sistemul Informațional de Sănătate
 
IBM’s Smarter Process Reinvent Business
IBM’s Smarter Process Reinvent BusinessIBM’s Smarter Process Reinvent Business
IBM’s Smarter Process Reinvent Business
 
eHealth 2014_Radu Dop
eHealth 2014_Radu DopeHealth 2014_Radu Dop
eHealth 2014_Radu Dop
 
Importanța registrelor pentru pacienți
Importanța registrelor pentru paciențiImportanța registrelor pentru pacienți
Importanța registrelor pentru pacienți
 
CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...
CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...
CYBERCRIME AND THE HEALTHCARE INDUSTRY: Sistemul de sănătate, noua țintă a at...
 
Perspective naționale și internaționale ale informaticii și standardelor medi...
Perspective naționale și internaționale ale informaticii și standardelor medi...Perspective naționale și internaționale ale informaticii și standardelor medi...
Perspective naționale și internaționale ale informaticii și standardelor medi...
 
UTI_Dosarul electronic de sanatate
UTI_Dosarul electronic de sanatateUTI_Dosarul electronic de sanatate
UTI_Dosarul electronic de sanatate
 
Class IT - Enemy inside the wire
Class IT - Enemy inside the wireClass IT - Enemy inside the wire
Class IT - Enemy inside the wire
 
Infologica - auditarea aplicatiilor mobile
Infologica - auditarea aplicatiilor mobileInfologica - auditarea aplicatiilor mobile
Infologica - auditarea aplicatiilor mobile
 
Agora Securitate yugo neumorni
Agora Securitate yugo neumorniAgora Securitate yugo neumorni
Agora Securitate yugo neumorni
 
Security threats in the LAN
Security threats in the LANSecurity threats in the LAN
Security threats in the LAN
 

Dernier

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 

Dernier (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 

Android. behind the scenes_programatica 2012

  • 1. Android. Behind The Scenes R a d u M O I S A N A
  • 2. Agenda Android Short Intro Use-case: QEmu Android Init System Application Launch 2
  • 3. Android Short Intro Home Contacts Phone Browser ... Applications Telephon Resourc Notificatio Activity Location y e n Manager Manager Manager Manager Manager Package Window Content View Manager Manager Providers System Android Runtime Android Framework Core Libraries Media Surface Manager SQLite Framework Dalvik Virtual Machine Open GL | ES Free Type Webkit SGL SSL libc Libraries Linux Kernel Display Camera Flash Memory Binder(IPC) Driver Driver Driver Driver Keypad WiFi Audio Power Driver Driver Drivers Management 3
  • 4. Use-case: QEmu So what exactly is QEmu? QEMU is a processor emulator which has two different operating modes: full system emulation, which emulates a full system including the corresponding hard disk image user mode emulation, which allows you to run a simple cross-compiled executable 4
  • 5. Use-case: QEmu mount -t binfmt_misc none /proc/sys/fs/binfmt_misc echo ":ARM:M:18:(::/data/qemu-arm:" > /proc/sys/fs/binfmt_misc/register mount -t binfmt_misc none /proc/sys/fs/binfmt_misc echo ":CLR:M::MZ::/usr/bin/mono:" > /proc/sys/fs/binfmt_misc/register Name is the name of the binary format The magic number program that is to be run with the matching file as an argument :name:type:offset:magic:mask:interpreter: What part of magic number is significant Where to look for the magic number E or M 5
  • 6. Use-case: QEmu Why? Sandbox binary applications Debugging/tracing binary applications Run Android Apps with native arm binary on x86 Platforms How? Two approaches: Intercept the Fork starting the Application Process Run a second emulated Zygote 6
  • 7. Android Init System bootl oader Linux kernel init init.rc Init.<machine>.rc 7
  • 8. Android Init file service ril-daemon /system/bin/rild socket rild stream 660 root radio socket rild-debug stream 660 radio system user root group radio cache inet misc audio sdcard_rw net_admin net_raw qcom_oncrpc diag service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server socket zygote stream 660 root system onrestart write /sys/android_power/request_state wake onrestart write /sys/power/state on onrestart restart media onrestart restart netd service media /system/bin/mediaserver user media group system audio camera graphics inet net_bt net_bt_admin net_raw ioprio rt 4 8
  • 9. Android Init System Power bootl Manager oader Telephon y App Registry Core Activity Services App Native Manager instantiate Linux Daemons AppRuntime Window kernel Manager App ... system_serv init Zygote er Mount Service Connectivit Other y Additional Service processe Select Location Services s Loop Manager Mode Audio Service init.rc Init.<machine>.rc ... 9
  • 10. Application Launch Laun Application onCreate() cher Classes load into ram Activity bindApplication() Activity launch activity by intent callActivityOnCreate() Thread Instrumentati Manager thread.attach() Dalvik on Service VM forkAndSpecialize() Zygote zygote Binder socket 10
  • 11. Application Launch Laun cher Activity launch activity by intent Manager Service zygote forkAndSpecialize() Zygote socket zygote_e zygote Zygote_e forkAndSpecialize() mu Zygote socket mu socket Binder 11
  • 12. 12