SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
Deep Dive into the AOSP
Android Open Source Project
Dr. Ketan Parmar
Sr. Tech Lead – InfoStretch Solutions Pvt. Ltd.
@kpbird
+ketanparmar
www.kpbird.com
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Android open source project
• Android is an open-source software stack for a wide range of mobile
devices and a corresponding open-source project led by Google
• It’s commonly referred as AOSP
• AOSP has 450+ projects
• www.source.android.com
• www.b.android.com
• https://android-review.googlesource.com/
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Requirement
• Operating System: Linux (Ubuntu) or Mac
• Environment : 64 bit
• Disk Space for Source : 40 GB
• Disk Space for Build : 100 GB
• Software Requirements :
• Python 2.6 -- 2.7
• GNU Make 3.81 -- 3.82
• JDK 7
• Git 1.7 or newer
Repo, Gerrit, Manifest
• Repo is a repository management tool that google has built on top of
Git. Repo unifies the many Git repositories when necessary, does the
uploads to our revision control system.
• Gerrit is a web-based code review system for projects that use git.
Gerrit encourages more centralized use of Git by allowing all
authorized users to submit changes, which are automatically merged
if they pass code review
• Manifest – A manifest file is an XML file, describing a list of
repositories to sync our working directory with.
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Initializing a Build Environment
• Install JDK-7
$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk
• Required package for Ubuntu 14.x
$ sudo apt-get install bison g++-multilib git
gperf libxml2-utils
Install Repo
• Make sure you have a bin/ directory in your home directory and that
it is included in your path:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
• Download the Repo tool and ensure that it is executable:
$ curl https://storage.googleapis.com/git-repo-
downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Initialization Repo Client
• Create an empty directory to hold your working files. If you're using
MacOS, this has to be on a case-sensitive filesystem. Give it any name
you like:
$ mkdir AOSP
$ cd AOSP
• Run repo “init” to bring down the latest version of Repo with all its
most recent bug fixes.
$ repo init -u
https://android.googlesource.com/platform/manife
st
Download Source Tree
• Download Source Tree
$ repo sync –j(--jobs)
• It will download almost 40 GB.
Deep Dive into the Source Tree
Deep Dive into the Source Tree
• Bionic - the C-runtime for Android. Note that Android is not using
glibc like most Linux distributions.
• Bootable - boot and startup related code.
• Build - the build system implementation including all the core make
file templates.
• Cts - the compatability tests. The test suite to ensure that a build
complies with the Android specification.
• Dalvik - the source code for the implementation of the Dalvik Virtual
Machine
Deep Dive into the Source Tree
• Development - projects related to development such as the source
code for the sdk and ndk tools
• Device - product specific code for different devices.
• External - contains source code for all external open source projects
such as SQLite, Freetype and webkit.
• Frameworks - this folder is essential to Android since it contains the
sources for the framework. Here you will find the implementation of
key services such as the System Server with the Package- and Activity
managers.
Deep Dive into the Source Tree
• Hardware - hardware related source code such as the Android
hardware abstraction layer specification and implementation.
• Out - the build output will be placed here after you run make.
• Packages - contains the source code for the default applications such
as contacts, calendar, browser.
• Prebuilt - contains files that are distributed in binary form for
convenience.
• System - source code files for the core Android system. That is the
minimal Linux system that is started before the Dalvik VM and any
java based services are enabled.
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Build for Device
Download Drivers for the Device
https://developers.google.com/android/nexus/drivers
Extract Drivers for the Device
Extract Drivers for the Device
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Build AOSP
• Initialize Build Environment
$ source build/envsetup.sh
or
$ . build/envsetup.sh
• Choose Target
$ lunch
Build AOSP
Build AOSP
• Choose Target
$ lunch
• Press 8 and enter
• Start build with make command
$ make -j4
Wait…….
Output
Understand AOSP
Requirement
Initializing a Build Environment
Download Source Tree
Download Device Drivers
Build AOSP
Install AOSP
Install AOSP Build in Nexus 5
fastboot oem unlock
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot flash system system.img
fastboot reboot
Enjoy… You own build…
Repo Commands
sync
init
upload
diff
download
start
status
$repo help COMMAND
Helper functions
• croot: change directory to the top of the tree
• m: execute 'make' from the top of the tree
• mm - builds all of the modules in the current directory
• mmm <dir1>: build all of the modules in the supplied directories
• cgrep <pattern>: grep on all local C/C++ files
• jgrep <pattern>: grep on all local Java files
• resgrep <pattern>: grep on all local res/*.xml files
• godir <filename>: go to the directory containing a file
Dr. Ketan Parmar
Sr. Tech Lead – InfoStretch Solutions Pvt. Ltd.
@kpbird
+ketanparmar
www.kpbird.com
Thank You

Contenu connexe

Tendances

Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with PieOpersys inc.
 
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.
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)Nanik Tolaram
 
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...ijafrc
 
Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overviewJerrin George
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Android Automotive
Android AutomotiveAndroid Automotive
Android AutomotiveOpersys inc.
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALOpersys inc.
 
CI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift DeploymentCI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift DeploymentBintang Thunder
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updatesGary Bisson
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyJollen Chen
 

Tendances (20)

Embedded Android Workshop with Pie
Embedded Android Workshop with PieEmbedded Android Workshop with Pie
Embedded Android Workshop with Pie
 
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...
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
Customizing AOSP For Different Embedded Devices And Integration at Applicatio...
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Android media framework overview
Android media framework overviewAndroid media framework overview
Android media framework overview
 
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)
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Android Automotive
Android AutomotiveAndroid Automotive
Android Automotive
 
Android's HIDL: Treble in the HAL
Android's HIDL: Treble in the HALAndroid's HIDL: Treble in the HAL
Android's HIDL: Treble in the HAL
 
CI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift DeploymentCI CD Jenkins for Swift Deployment
CI CD Jenkins for Swift Deployment
 
Android Audio System
Android Audio SystemAndroid Audio System
Android Audio System
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
 
Android OTA updates
Android OTA updatesAndroid OTA updates
Android OTA updates
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
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
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacy
 

En vedette

From Android NDK To AOSP
From Android NDK To AOSPFrom Android NDK To AOSP
From Android NDK To AOSPMin-Yih Hsu
 
How to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happyHow to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happyIordanis (Jordan) Giannakakis
 
Battery Optimization for Android Apps - Devoxx14
Battery Optimization for Android Apps - Devoxx14Battery Optimization for Android Apps - Devoxx14
Battery Optimization for Android Apps - Devoxx14Murat Aydın
 
A Deep Dive into Open Source Android Development
A Deep Dive into Open Source Android DevelopmentA Deep Dive into Open Source Android Development
A Deep Dive into Open Source Android DevelopmentDavid Wu
 
Android content providers
Android content providersAndroid content providers
Android content providersKurt Mbanje
 
Android Embedded - Einführung in Android als Embedded-Plattform
Android Embedded - Einführung in Android als Embedded-PlattformAndroid Embedded - Einführung in Android als Embedded-Plattform
Android Embedded - Einführung in Android als Embedded-Plattforminovex GmbH
 
Android porting-on-embedded-platform v2-0633850602027036930
Android porting-on-embedded-platform v2-0633850602027036930Android porting-on-embedded-platform v2-0633850602027036930
Android porting-on-embedded-platform v2-0633850602027036930weitulislide
 
Content providers in Android
Content providers in AndroidContent providers in Android
Content providers in AndroidAlexey Ustenko
 
Embedded Android Market Development
Embedded Android Market DevelopmentEmbedded Android Market Development
Embedded Android Market DevelopmentVIA Embedded
 
Embedded Android Real-Time Streaming Optimization
Embedded Android Real-Time Streaming OptimizationEmbedded Android Real-Time Streaming Optimization
Embedded Android Real-Time Streaming OptimizationVIA Embedded
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Opersys inc.
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave InternalsOpersys inc.
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowOpersys inc.
 
The Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVThe Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVOPNFV
 
Remote Management of Embedded Android Devices
Remote Management of Embedded Android DevicesRemote Management of Embedded Android Devices
Remote Management of Embedded Android DevicesVIA Embedded
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in AndroidOpersys inc.
 
LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)Linaro
 
Content provider in_android
Content provider in_androidContent provider in_android
Content provider in_androidPRITI TELMORE
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with NougatOpersys inc.
 

En vedette (20)

From Android NDK To AOSP
From Android NDK To AOSPFrom Android NDK To AOSP
From Android NDK To AOSP
 
How to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happyHow to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happy
 
Battery Optimization for Android Apps - Devoxx14
Battery Optimization for Android Apps - Devoxx14Battery Optimization for Android Apps - Devoxx14
Battery Optimization for Android Apps - Devoxx14
 
A Deep Dive into Open Source Android Development
A Deep Dive into Open Source Android DevelopmentA Deep Dive into Open Source Android Development
A Deep Dive into Open Source Android Development
 
Android content providers
Android content providersAndroid content providers
Android content providers
 
Android Embedded - Einführung in Android als Embedded-Plattform
Android Embedded - Einführung in Android als Embedded-PlattformAndroid Embedded - Einführung in Android als Embedded-Plattform
Android Embedded - Einführung in Android als Embedded-Plattform
 
Android porting-on-embedded-platform v2-0633850602027036930
Android porting-on-embedded-platform v2-0633850602027036930Android porting-on-embedded-platform v2-0633850602027036930
Android porting-on-embedded-platform v2-0633850602027036930
 
Content providers in Android
Content providers in AndroidContent providers in Android
Content providers in Android
 
Embedded Android Market Development
Embedded Android Market DevelopmentEmbedded Android Market Development
Embedded Android Market Development
 
Embedded android development (e book)
Embedded android development (e book)Embedded android development (e book)
Embedded android development (e book)
 
Embedded Android Real-Time Streaming Optimization
Embedded Android Real-Time Streaming OptimizationEmbedded Android Real-Time Streaming Optimization
Embedded Android Real-Time Streaming Optimization
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Brillo / Weave Internals
Brillo / Weave InternalsBrillo / Weave Internals
Brillo / Weave Internals
 
Embedded Android Workshop with Marshmallow
Embedded Android Workshop with MarshmallowEmbedded Android Workshop with Marshmallow
Embedded Android Workshop with Marshmallow
 
The Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVThe Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFV
 
Remote Management of Embedded Android Devices
Remote Management of Embedded Android DevicesRemote Management of Embedded Android Devices
Remote Management of Embedded Android Devices
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)
 
Content provider in_android
Content provider in_androidContent provider in_android
Content provider in_android
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with Nougat
 

Similaire à Deep Dive into the AOSP

Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerJürgen Gutsch
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeWO Community
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Manuel Garcia
 
The development environment
The development environmentThe development environment
The development environmentLee Pelser
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with DockerAnton Egorov
 
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java AppsWebinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java AppsCodefresh
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011pundiramit
 
Windows container security
Windows container securityWindows container security
Windows container securityDocker, Inc.
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy wayJohn Azariah
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuis Rodríguez Castromil
 
24HOP Introduction to Linux for SQL Server DBAs
24HOP Introduction to Linux for SQL Server DBAs24HOP Introduction to Linux for SQL Server DBAs
24HOP Introduction to Linux for SQL Server DBAsKellyn Pot'Vin-Gorman
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notesSteve Arnold
 
Rhodes mobile Framework
Rhodes mobile FrameworkRhodes mobile Framework
Rhodes mobile FrameworkYoshi Sakai
 
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...Cheng-Yi Yu
 
Dockerizing Oracle Database
Dockerizing Oracle Database Dockerizing Oracle Database
Dockerizing Oracle Database gvenzl
 
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow
 

Similaire à Deep Dive into the AOSP (20)

Docker module 1
Docker module 1Docker module 1
Docker module 1
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
 
The development environment
The development environmentThe development environment
The development environment
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with Docker
 
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java AppsWebinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Windows container security
Windows container securityWindows container security
Windows container security
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
 
Core os dna_oscon
Core os dna_osconCore os dna_oscon
Core os dna_oscon
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
 
24HOP Introduction to Linux for SQL Server DBAs
24HOP Introduction to Linux for SQL Server DBAs24HOP Introduction to Linux for SQL Server DBAs
24HOP Introduction to Linux for SQL Server DBAs
 
Building an iOS Build Server
Building an iOS Build ServerBuilding an iOS Build Server
Building an iOS Build Server
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
 
Rhodes mobile Framework
Rhodes mobile FrameworkRhodes mobile Framework
Rhodes mobile Framework
 
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
 
Dockerizing Oracle Database
Dockerizing Oracle Database Dockerizing Oracle Database
Dockerizing Oracle Database
 
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
 

Dernier

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Dernier (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Deep Dive into the AOSP

  • 1. Deep Dive into the AOSP Android Open Source Project
  • 2. Dr. Ketan Parmar Sr. Tech Lead – InfoStretch Solutions Pvt. Ltd. @kpbird +ketanparmar www.kpbird.com
  • 3. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 4. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 5. Android open source project • Android is an open-source software stack for a wide range of mobile devices and a corresponding open-source project led by Google • It’s commonly referred as AOSP • AOSP has 450+ projects • www.source.android.com • www.b.android.com • https://android-review.googlesource.com/
  • 6.
  • 7.
  • 8.
  • 9. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 10. Requirement • Operating System: Linux (Ubuntu) or Mac • Environment : 64 bit • Disk Space for Source : 40 GB • Disk Space for Build : 100 GB • Software Requirements : • Python 2.6 -- 2.7 • GNU Make 3.81 -- 3.82 • JDK 7 • Git 1.7 or newer
  • 11. Repo, Gerrit, Manifest • Repo is a repository management tool that google has built on top of Git. Repo unifies the many Git repositories when necessary, does the uploads to our revision control system. • Gerrit is a web-based code review system for projects that use git. Gerrit encourages more centralized use of Git by allowing all authorized users to submit changes, which are automatically merged if they pass code review • Manifest – A manifest file is an XML file, describing a list of repositories to sync our working directory with.
  • 12. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 13. Initializing a Build Environment • Install JDK-7 $ sudo apt-get update $ sudo apt-get install openjdk-7-jdk • Required package for Ubuntu 14.x $ sudo apt-get install bison g++-multilib git gperf libxml2-utils
  • 14. Install Repo • Make sure you have a bin/ directory in your home directory and that it is included in your path: $ mkdir ~/bin $ PATH=~/bin:$PATH • Download the Repo tool and ensure that it is executable: $ curl https://storage.googleapis.com/git-repo- downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo
  • 15. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 16. Initialization Repo Client • Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like: $ mkdir AOSP $ cd AOSP • Run repo “init” to bring down the latest version of Repo with all its most recent bug fixes. $ repo init -u https://android.googlesource.com/platform/manife st
  • 17. Download Source Tree • Download Source Tree $ repo sync –j(--jobs) • It will download almost 40 GB.
  • 18. Deep Dive into the Source Tree
  • 19. Deep Dive into the Source Tree • Bionic - the C-runtime for Android. Note that Android is not using glibc like most Linux distributions. • Bootable - boot and startup related code. • Build - the build system implementation including all the core make file templates. • Cts - the compatability tests. The test suite to ensure that a build complies with the Android specification. • Dalvik - the source code for the implementation of the Dalvik Virtual Machine
  • 20. Deep Dive into the Source Tree • Development - projects related to development such as the source code for the sdk and ndk tools • Device - product specific code for different devices. • External - contains source code for all external open source projects such as SQLite, Freetype and webkit. • Frameworks - this folder is essential to Android since it contains the sources for the framework. Here you will find the implementation of key services such as the System Server with the Package- and Activity managers.
  • 21. Deep Dive into the Source Tree • Hardware - hardware related source code such as the Android hardware abstraction layer specification and implementation. • Out - the build output will be placed here after you run make. • Packages - contains the source code for the default applications such as contacts, calendar, browser. • Prebuilt - contains files that are distributed in binary form for convenience. • System - source code files for the core Android system. That is the minimal Linux system that is started before the Dalvik VM and any java based services are enabled.
  • 22. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 24. Download Drivers for the Device https://developers.google.com/android/nexus/drivers
  • 25. Extract Drivers for the Device
  • 26. Extract Drivers for the Device
  • 27. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 28. Build AOSP • Initialize Build Environment $ source build/envsetup.sh or $ . build/envsetup.sh • Choose Target $ lunch
  • 30. Build AOSP • Choose Target $ lunch • Press 8 and enter • Start build with make command $ make -j4
  • 33. Understand AOSP Requirement Initializing a Build Environment Download Source Tree Download Device Drivers Build AOSP Install AOSP
  • 34. Install AOSP Build in Nexus 5 fastboot oem unlock fastboot flash recovery recovery.img fastboot flash boot boot.img fastboot flash cache cache.img fastboot flash userdata userdata.img fastboot flash system system.img fastboot reboot
  • 35. Enjoy… You own build…
  • 37. Helper functions • croot: change directory to the top of the tree • m: execute 'make' from the top of the tree • mm - builds all of the modules in the current directory • mmm <dir1>: build all of the modules in the supplied directories • cgrep <pattern>: grep on all local C/C++ files • jgrep <pattern>: grep on all local Java files • resgrep <pattern>: grep on all local res/*.xml files • godir <filename>: go to the directory containing a file
  • 38. Dr. Ketan Parmar Sr. Tech Lead – InfoStretch Solutions Pvt. Ltd. @kpbird +ketanparmar www.kpbird.com Thank You