SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Android internals
     Egor Elizarov
     SPbSU 2012
Legal info
   Android internals by Egor Elizarov is licensed under a
    Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License

   You are free to
      – copy, distribute, display, and perform the work
      – make derivative works
   Under the following conditions
       – Attribution. You must give the original author credit
       – Share Alike. If you alter, transform, or build upon this work, you may
         distribute the resulting work only under a license identical to this one
   All pictures and trademarks are the property of their respective owners. Use of
    these trademarks and pictures is subject to owners permissions.
   Corrections, suggestions, contributions and translations are welcome!



                                          2                                 Egor Elizarov SPbSU 2012
Lecture 2



                     High level Android architecture.
                     Android control version system.



                                                 yegor.yelizarov(at)gmail.com
Rev: 1.1
Last update: 05/30/2012                         http://vk.com/android_internals


                                    3                             Egor Elizarov SPbSU 2012
Previous time



    OS functions

    Mobile OS features

    Perepherial devices
                                          Source: beagleboard.org



    SoC, BSP, Single Board Computer, Eval. Board



                          4                     Egor Elizarov SPbSU 2012
Android history

    2004 - Android Inc. by Andy Rubin

    2005 - Android Inc. acquisition

    2007 - Open Handset Alliance

    September 2008 - Android 1.0 on HTC G1

    February 2011 - Android 3.0 for tablets                   Source:
                                              http://en.wikipedia.org/wiki/Andy_Rubin



    October 2011 - Android 4.0 (merge phone and tablet
    versions)

                              5                                 Egor Elizarov SPbSU 2012
Some acronyms



    Android Open Source Project (AOSP)

    Android Software Development Kit (SDK)

    Native Development Kit (NDK)

    API Level (current 15)



                             6               Egor Elizarov SPbSU 2012
Android versions



    Cupcake (1.5)                         
                                              Gingerbread (2.3)

    Donut (1.6)                         
                                              Honeycomb (3.0-3.2)
                       Android Open Source Project (AOSP)
                     Android Software Development Kit (SDK)
                         Native Development Kit (NDK)





    Eclair (2.0 - 2.1)                    
                                              Ice cream sandwich (4.0)

    FroYo (2.2)                           
                                              Jelly Bean (5.0) ?



                                      7                            Egor Elizarov SPbSU 2012
High level architecture



         Android Open Source Project (AOSP)
       Android Software Development Kit (SDK)
           Native Development Kit (NDK)




                        8                       Egor Elizarov SPbSU 2012
High level architecture (2)



          Android Open Source Project (AOSP)
        Android Software Development Kit (SDK)
            Native Development Kit (NDK)




            Source: developer.android.com


                         9                       Egor Elizarov SPbSU 2012
Android OS development




          10         Egor Elizarov SPbSU 2012
Android OS bring up




         11           Egor Elizarov SPbSU 2012
Code licenses



    GNU GPLv2 (kernel)

    LGPL & GPL (external libraries)

    BSD (bionic, toolbox)

    Apache 2.0 license (framework)



                            12        Egor Elizarov SPbSU 2012
Android compatibility



    Google apps only on branded devices

    Google logo only on branded devices

    Compatibility Test Suite

    Compatibility Definition Document



                          13              Egor Elizarov SPbSU 2012
Android version control
              system


    Based on repo & git

    ~ 220 git trees

    Repo provides functionality to work with
    multiple git trees

    Gerrit code review system


                          14                   Egor Elizarov SPbSU 2012
Git workflow




     15        Egor Elizarov SPbSU 2012
Git workflow (2)

    git clone

    git branch -a

    git checkout -b local_branch remote_branch

    Make changes

    git add list_of_files

    git commit

    git push
                            16                   Egor Elizarov SPbSU 2012
Manifest file
                                           
                                               Project - single project

    Remote - server description                description


    Fetch - server URL                     
                                               Path — directory to unpack
                           Android Open Source Project (AOSP)

    Revisoin - git branch                   
                                               Name — project name to
                         Android Software Development Kit (SDK)
                             Native Development Kit (NDK)

                                               obtain sources




                                          17                              Egor Elizarov SPbSU 2012
Repo workflow


    repo init -u URL -m Manifest.xml -b Branch

    repo sync

    repo start --all local_branch

    Make changes -> git add -> git commit

    repo upload


                           18                    Egor Elizarov SPbSU 2012
Patch life


    Create patch

    Send for review (repo upload)

    Recieve review & approve in Gerrit

    Patch will be automatically uploaded by Gerrit
    after approve


                          19                   Egor Elizarov SPbSU 2012
Repo tricks




    repo forall -c 'env'

    repo manifest -r -o descriptive-name.xml




                           20                  Egor Elizarov SPbSU 2012
Android code lines




   Source: http://source.android.com/source/code-lines.html


                           21                                 Egor Elizarov SPbSU 2012
Getting ICS AOSP code

    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo >
    ~/bin/repo


    chmod a+x ~/bin/repo


    mkdir AOSP


    cd AOSP


    repo init -u https://android.googlesource.com/platform/manifest -b
    android-4.0.3_r1


    repo sync


                                    22                               Egor Elizarov SPbSU 2012
Code layout

    Frameworks — framework's
    code

    Build — build system files

    External — external projects
    and libraries

    Device — device specific
    build/runtime configuration

    System — ”Embedded linux”
    platform part

                                  23   Egor Elizarov SPbSU 2012
Next time




    Android build system

    Android Emulator




                           24   Egor Elizarov SPbSU 2012
Useful links

    http://vk.com/android_internals


    http://www.openhandsetalliance.com


    http://source.android.com/compatibility/cts-intro.html


    http://source.android.com/source/overview.html


    http://source.android.com/source/using-repo.html


    K. Yaghmour. Embedded Android. Early Release, O'Reilly, October 2011


    http://source.android.com/source/downloading.html


    http://source.android.com/source/code-lines.html


    http://code.google.com/p/gerrit/


                                               25                          Egor Elizarov SPbSU 2012
Thanks to



    Sergey Matyukevich for review and advices
    (www.linkedin.com/pub/sergey-
    matyukevich/31/889/769)

    Nikolay F. Fominykh for review and advices



                         26                     Egor Elizarov SPbSU 2012

Mais conteúdo relacionado

Mais procurados

Android internals 00 - Introduction (rev_1.1)
Android internals 00 - Introduction (rev_1.1)Android internals 00 - Introduction (rev_1.1)
Android internals 00 - Introduction (rev_1.1)Egor Elizarov
 
Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Egor Elizarov
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverNanik Tolaram
 
Rooting an Android phone
Rooting an Android phoneRooting an Android phone
Rooting an Android phoneArnav Gupta
 
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
 

Mais procurados (7)

Android internals 00 - Introduction (rev_1.1)
Android internals 00 - Introduction (rev_1.1)Android internals 00 - Introduction (rev_1.1)
Android internals 00 - Introduction (rev_1.1)
 
Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)Android internals 07 - Android graphics (rev_1.1)
Android internals 07 - Android graphics (rev_1.1)
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Exoplayer 2
Exoplayer  2Exoplayer  2
Exoplayer 2
 
Rooting an Android phone
Rooting an Android phoneRooting an Android phone
Rooting an Android phone
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
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
 

Destaque

Smart Phone CPU
Smart Phone CPUSmart Phone CPU
Smart Phone CPU오석 한
 
Samsung processors: Exynos family
Samsung processors: Exynos familySamsung processors: Exynos family
Samsung processors: Exynos familySagar Patel
 
Performance Comparison Between x86 and ARM Assembly
Performance Comparison Between x86 and ARM AssemblyPerformance Comparison Between x86 and ARM Assembly
Performance Comparison Between x86 and ARM AssemblyManasa K
 
Motion recognition with Android devices
Motion recognition with Android devicesMotion recognition with Android devices
Motion recognition with Android devicesGabor Paller
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors APIeleksdev
 
Arm corrected ppt
Arm corrected pptArm corrected ppt
Arm corrected pptanish jagan
 
CPU Architectures for Mobile Phone Devices
CPU Architectures for Mobile Phone DevicesCPU Architectures for Mobile Phone Devices
CPU Architectures for Mobile Phone Devicessagar chansaulia
 
Risc and cisc eugene clewlow
Risc and cisc   eugene clewlowRisc and cisc   eugene clewlow
Risc and cisc eugene clewlowManish Prajapati
 
Intel & ARM: Strategic Comparison
Intel & ARM: Strategic ComparisonIntel & ARM: Strategic Comparison
Intel & ARM: Strategic ComparisonToby Allen
 

Destaque (17)

Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Game controlling via android
Game controlling via androidGame controlling via android
Game controlling via android
 
Smart Phone CPU
Smart Phone CPUSmart Phone CPU
Smart Phone CPU
 
Real time simulation with HLA and DDS
Real time simulation with HLA and DDSReal time simulation with HLA and DDS
Real time simulation with HLA and DDS
 
Samsung processors: Exynos family
Samsung processors: Exynos familySamsung processors: Exynos family
Samsung processors: Exynos family
 
Android Sensors
Android SensorsAndroid Sensors
Android Sensors
 
Review Multicore processing based on ARM architecture
Review Multicore processing based on ARM architectureReview Multicore processing based on ARM architecture
Review Multicore processing based on ARM architecture
 
Introduction to Android Window System
Introduction to Android Window SystemIntroduction to Android Window System
Introduction to Android Window System
 
Performance Comparison Between x86 and ARM Assembly
Performance Comparison Between x86 and ARM AssemblyPerformance Comparison Between x86 and ARM Assembly
Performance Comparison Between x86 and ARM Assembly
 
Motion recognition with Android devices
Motion recognition with Android devicesMotion recognition with Android devices
Motion recognition with Android devices
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors API
 
Arm corrected ppt
Arm corrected pptArm corrected ppt
Arm corrected ppt
 
CPU Architectures for Mobile Phone Devices
CPU Architectures for Mobile Phone DevicesCPU Architectures for Mobile Phone Devices
CPU Architectures for Mobile Phone Devices
 
Risc and cisc eugene clewlow
Risc and cisc   eugene clewlowRisc and cisc   eugene clewlow
Risc and cisc eugene clewlow
 
Intel & ARM: Strategic Comparison
Intel & ARM: Strategic ComparisonIntel & ARM: Strategic Comparison
Intel & ARM: Strategic Comparison
 
Risc processors
Risc processorsRisc processors
Risc processors
 

Semelhante a Android internals 02 - High-level architecture, version control system (rev_1.1)

Build Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityBuild Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityNational Cheng Kung University
 
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...Paris Open Source Summit
 
Software training report
Software training reportSoftware training report
Software training reportNatasha Bains
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Opersys inc.
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, GreenrobotDroidcon Berlin
 
実践Android Developer Testing
実践Android Developer Testing実践Android Developer Testing
実践Android Developer Testingussy
 
Challenges of Developing BLE Application on Android
Challenges of Developing BLE Application on AndroidChallenges of Developing BLE Application on Android
Challenges of Developing BLE Application on AndroidGabor Guta
 
Setting up a vscode development environment for mbed 5 application using the ...
Setting up a vscode development environment for mbed 5 application using the ...Setting up a vscode development environment for mbed 5 application using the ...
Setting up a vscode development environment for mbed 5 application using the ...Steve Mylroie
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01letuan9999
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentAndri Yadi
 
Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)Patricia Aas
 
Android Development
Android DevelopmentAndroid Development
Android Developmentvishalkrv
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.pptBijayKc16
 

Semelhante a Android internals 02 - High-level architecture, version control system (rev_1.1) (20)

Build Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityBuild Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the Quality
 
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
 
Code crunch
Code crunchCode crunch
Code crunch
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
Software training report
Software training reportSoftware training report
Software training report
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
 
Practice of Android Reverse Engineering
Practice of Android Reverse EngineeringPractice of Android Reverse Engineering
Practice of Android Reverse Engineering
 
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger,  GreenrobotDroidcon 2011: Gingerbread and honeycomb, Markus Junginger,  Greenrobot
Droidcon 2011: Gingerbread and honeycomb, Markus Junginger, Greenrobot
 
実践Android Developer Testing
実践Android Developer Testing実践Android Developer Testing
実践Android Developer Testing
 
Challenges of Developing BLE Application on Android
Challenges of Developing BLE Application on AndroidChallenges of Developing BLE Application on Android
Challenges of Developing BLE Application on Android
 
Setting up a vscode development environment for mbed 5 application using the ...
Setting up a vscode development environment for mbed 5 application using the ...Setting up a vscode development environment for mbed 5 application using the ...
Setting up a vscode development environment for mbed 5 application using the ...
 
Core Android
Core AndroidCore Android
Core Android
 
Getting Started With Android
Getting Started With AndroidGetting Started With Android
Getting Started With Android
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)Making a Headless Android Device (Oslo Embedded Meetup 2018)
Making a Headless Android Device (Oslo Embedded Meetup 2018)
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
androidPramming.ppt
androidPramming.pptandroidPramming.ppt
androidPramming.ppt
 

Último

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Último (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Android internals 02 - High-level architecture, version control system (rev_1.1)

  • 1. Android internals Egor Elizarov SPbSU 2012
  • 2. Legal info  Android internals by Egor Elizarov is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License  You are free to – copy, distribute, display, and perform the work – make derivative works  Under the following conditions – Attribution. You must give the original author credit – Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one  All pictures and trademarks are the property of their respective owners. Use of these trademarks and pictures is subject to owners permissions.  Corrections, suggestions, contributions and translations are welcome! 2 Egor Elizarov SPbSU 2012
  • 3. Lecture 2 High level Android architecture. Android control version system. yegor.yelizarov(at)gmail.com Rev: 1.1 Last update: 05/30/2012 http://vk.com/android_internals 3 Egor Elizarov SPbSU 2012
  • 4. Previous time  OS functions  Mobile OS features  Perepherial devices Source: beagleboard.org  SoC, BSP, Single Board Computer, Eval. Board 4 Egor Elizarov SPbSU 2012
  • 5. Android history  2004 - Android Inc. by Andy Rubin  2005 - Android Inc. acquisition  2007 - Open Handset Alliance  September 2008 - Android 1.0 on HTC G1  February 2011 - Android 3.0 for tablets Source: http://en.wikipedia.org/wiki/Andy_Rubin  October 2011 - Android 4.0 (merge phone and tablet versions) 5 Egor Elizarov SPbSU 2012
  • 6. Some acronyms  Android Open Source Project (AOSP)  Android Software Development Kit (SDK)  Native Development Kit (NDK)  API Level (current 15) 6 Egor Elizarov SPbSU 2012
  • 7. Android versions  Cupcake (1.5)  Gingerbread (2.3)  Donut (1.6)  Honeycomb (3.0-3.2) Android Open Source Project (AOSP) Android Software Development Kit (SDK) Native Development Kit (NDK)  Eclair (2.0 - 2.1)  Ice cream sandwich (4.0)  FroYo (2.2)  Jelly Bean (5.0) ? 7 Egor Elizarov SPbSU 2012
  • 8. High level architecture Android Open Source Project (AOSP) Android Software Development Kit (SDK) Native Development Kit (NDK) 8 Egor Elizarov SPbSU 2012
  • 9. High level architecture (2) Android Open Source Project (AOSP) Android Software Development Kit (SDK) Native Development Kit (NDK) Source: developer.android.com 9 Egor Elizarov SPbSU 2012
  • 10. Android OS development 10 Egor Elizarov SPbSU 2012
  • 11. Android OS bring up 11 Egor Elizarov SPbSU 2012
  • 12. Code licenses  GNU GPLv2 (kernel)  LGPL & GPL (external libraries)  BSD (bionic, toolbox)  Apache 2.0 license (framework) 12 Egor Elizarov SPbSU 2012
  • 13. Android compatibility  Google apps only on branded devices  Google logo only on branded devices  Compatibility Test Suite  Compatibility Definition Document 13 Egor Elizarov SPbSU 2012
  • 14. Android version control system  Based on repo & git  ~ 220 git trees  Repo provides functionality to work with multiple git trees  Gerrit code review system 14 Egor Elizarov SPbSU 2012
  • 15. Git workflow 15 Egor Elizarov SPbSU 2012
  • 16. Git workflow (2)  git clone  git branch -a  git checkout -b local_branch remote_branch  Make changes  git add list_of_files  git commit  git push 16 Egor Elizarov SPbSU 2012
  • 17. Manifest file  Project - single project  Remote - server description description  Fetch - server URL  Path — directory to unpack Android Open Source Project (AOSP)  Revisoin - git branch  Name — project name to Android Software Development Kit (SDK) Native Development Kit (NDK) obtain sources 17 Egor Elizarov SPbSU 2012
  • 18. Repo workflow  repo init -u URL -m Manifest.xml -b Branch  repo sync  repo start --all local_branch  Make changes -> git add -> git commit  repo upload 18 Egor Elizarov SPbSU 2012
  • 19. Patch life  Create patch  Send for review (repo upload)  Recieve review & approve in Gerrit  Patch will be automatically uploaded by Gerrit after approve 19 Egor Elizarov SPbSU 2012
  • 20. Repo tricks  repo forall -c 'env'  repo manifest -r -o descriptive-name.xml 20 Egor Elizarov SPbSU 2012
  • 21. Android code lines Source: http://source.android.com/source/code-lines.html 21 Egor Elizarov SPbSU 2012
  • 22. Getting ICS AOSP code  curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo  chmod a+x ~/bin/repo  mkdir AOSP  cd AOSP  repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1  repo sync 22 Egor Elizarov SPbSU 2012
  • 23. Code layout  Frameworks — framework's code  Build — build system files  External — external projects and libraries  Device — device specific build/runtime configuration  System — ”Embedded linux” platform part 23 Egor Elizarov SPbSU 2012
  • 24. Next time  Android build system  Android Emulator 24 Egor Elizarov SPbSU 2012
  • 25. Useful links  http://vk.com/android_internals  http://www.openhandsetalliance.com  http://source.android.com/compatibility/cts-intro.html  http://source.android.com/source/overview.html  http://source.android.com/source/using-repo.html  K. Yaghmour. Embedded Android. Early Release, O'Reilly, October 2011  http://source.android.com/source/downloading.html  http://source.android.com/source/code-lines.html  http://code.google.com/p/gerrit/ 25 Egor Elizarov SPbSU 2012
  • 26. Thanks to  Sergey Matyukevich for review and advices (www.linkedin.com/pub/sergey- matyukevich/31/889/769)  Nikolay F. Fominykh for review and advices 26 Egor Elizarov SPbSU 2012