Sunteți pe pagina 1din 16

Introduction to Android Custom

ROM Development
By Rohan Mathur

About Me
Lead developer of a custom ROM known as
AOKP for the past 4 years
Over 11 million unique installations in its history

Been involved in the Android scene since


Freshman year High School
Led me to have experience with everything
from Java to Linux kernel development

Higher vs Lower Level


Two parts to custom ROM development
Higher Level
Manipulating and editing the Android frameworks,
adding features that are hardware independent,
normal Android development (i.e. Java, XML, etc)

Lower Level
Working with Linux drivers, proprietary files, getting
them to play nice with newer Android releases

AOSP
Source is made up of multiple git projects
ex. platform_frameworks_base holds most of the
main Android framework code

Google releases the Android platform code for


most releases, along with device support
files (device trees)
Other OEMs devices though...

Other Sources
Other non-Nexus devices are required by
GPL to have released kernel source code
(important for hardware compatibility)
Not always the case with smaller (and even bigger
*cough* HTC *cough* OEMS)

Proprietary binaries are needed for harder


things like Camera HALs

Source Organization
Main source tree
Consists of core system frameworks, core system
apps, and external libraries used by frameworks,
build, bionic, etc

Device tree
Kernel tree
Vendor tree

Enough information I want to build my own


Android OS for my device! :D

Our Build Information


We will be building for the Oppo Find 7
Can do the same for any other device (Samsung
Galaxy S5, etc)

Building on a buildbot to shorten build time


Building CyanogenMod - process is similar for
any other custom ROM or AOSP as well

Prepare Build Environment


Initializing a Build Environment
documentation should help
https://source.android.com/source/initializing.html

Build environment is same regardless of what


ROM you are building (CM vs AOKP vs Pure
AOSP etc)

Downloading Source
Uses Google-made tool called repo to grab
correct projects/branches
Repository named the manifest tells where to
get all these different repos from and stores
it in an XML, and repo goes down the list
and downloads them

Enough talk!
repo init -u git://github.com /CyanogenM od/android.git -b cm -12.0
repo sync

Now wait anywhere from an hour to 24 hours


for around 20gb of source to be downloaded
Thank god for Siebel ethernet

Source Downloaded
Demonstrate source structure

Define Objective
Lets add a feature to CyanogenMod, eh?
Well even be nice and submit it to their code
review after so they can merge it!

Live coding time!

Thank you, I hope you all enjoyed my brief


introduction of Android Custom ROMs!
Ive only barely touched the surface - there
is soooooooo much more that can be done!
Twitter Email -

@rohan32
rmathur2@illinois.edu

S-ar putea să vă placă și