Droidcon India 2014

Droidcon India’s fourth edition

Hacking through the Android OS code

Submitted by Arnav Gupta (@championswimmer) on Oct 11, 2014

Section: Workshops Technical level: Advanced Status: Confirmed & Scheduled


This workshop would be to give hands-on demonstration on how to get and build the Android OS Source Code, and build it (for a device like Nexus).
Then we will look at various parts of the source that can be modified to change the way the Android Operating System looks and works.
People who wish to change the core Android OS itself, or people looking forward to release their own Android-based hardware products should definitely attend this session. If you are interested in aftermarket Android customisation like CyanogenMod or AOKP, or fascinated how skins like Touchwiz or Sense are overlaid on Android, then this is the answer.


By “Android Development” we refer to making Apps on the android stack using APIs defined to us by Google. But we overlook that the Android Operating System itself is open source and can be changed to our liking and needs.
Especially with Android penetrating the embedded market like Smart TVs, Wearables, Home appliances and Cars, we face the need to modify the core Android stack to suit various environments and hardware.

We will explore how the UI and looks can be changed. How the UX can be improved (including various usability tweaks to lockscreen, navbar, notification drawer, etc frequently used parts of the GUI shell).
Finally we will also explore how some deeper changes like application permission control, battery life and performance enhancements can be done.

I will give a complete walkthrough right from downloading the Android source code, to compiling it, to a tour through the build setup, and each kind of modification mentioned above shall be explained with simple examples using real code, and live demonstration of the modification.


Pre-requisite knowledge
* Rough idea of Java, C and C++
* Familarity with Android Development (only very basic knowledge)
* Slight familarity with Makefiles
Things to bring
* Laptops running Linux/Max (64bit)
* (recommended) The android source code (9GB+ in size) already downloaded on your laptop

Speaker bio

Currently pursuing a Bachelor’s degree in Electrical and Electronics Engineering at Delhi Technological University, while also working at Cube26 as an Android Framework Engineer.
I have been a Developer and Device Maintainer at CyanogenMod and AOKP, making the latest Android source work on Sony Xperia devices, while adding awesome usability features that make users fall in love. A couple of features I have written have also made their way into Google’s Android Open Source Project, and can be found in Kitkat and Android L.
I have been a Open Source community partner with Sony Mobile for the last two years, which basically means I get the latest Xperias to hack around with as soon as they are launched.
At Cube26, I have been part of the team that made many contextually smart UI/UX enhacements for the Micromax Canvas A290, A310, A315 series of phones.
I am also an open source enthusiast with contributions to Linux, GNOME, Arduino, Android and other open source projects.
I was invited as a speaker at Mobile Developer Summit 2014 hosted by Saltmarch Media.



  • Waykup (@waykup) 5 years ago

    You shall win !

  • Umang Jaipuria (@umangjaipuria) 5 years ago

    Love the topic!
    Android isn’t just about building consumer apps. There are a ton of single-purpose devices running Android, and these don’t even get counted in the “Android market share”.

  • Kashif Razzaqui (@kashif) 5 years ago

    Seems off-topic, which track does this fit? Hardware?

    • Arnav Gupta (@championswimmer) Proposer 5 years ago

      Yes, it belongs to the Hardware track.

      This will involve how to modify Android OS to suit the needs of custom hardware (like wearables, TVs, car/bik dashboard, kitchen appliances, home automation products)

      We have mostly been familiar with Android as a Mobile OS, but now it is expanding it’s horizons, and more and more embedded hardware products are running on Android. Tomorrow many devices that do not have conventional input methods like touchscreen or concentional output methods like a LCD panel will run Android, and for all such use cases we need to know how to adapt Android to such environments.

  • Shree Kumar (@shreekumar) 5 years ago

    Good topic.

    A first compile of Android can take some serious time in the workshop, though (upwards of 30 mins easily?). How would you work around this ? I can think of putting up some build instructions on a known codebase

    Would there be additional pre-requisites too ? One thing I can think of right now is the need for a a specific device like a Nexus. It would be great if they could use an emulator image, though…

    • Arnav Gupta (@championswimmer) Proposer 5 years ago

      I would not try to do a real-time full Android build.
      Concentrate on building individual components rather.

      make some changes in Lockscreen, and “make Keyguard”

      Some changes in kernel, followed with “make bootimage”

      That way we can cover some very specific examples, and also get 2-3min build times per module.

      To try out individual modules, a rooted emulator image will be good. Plus I think a lot of people will have Nexus phones (Droidcon attendees generally have Nexii ; ))

      I will have a Nexus, and a bunch of Xperias running AOSP-based firmware, which I can mirror via the projector as well.

  • Arnav Gupta (@championswimmer) Proposer 5 years ago (edited 5 years ago)

    Proposal Review Summary

    Problem Statement

    Android isn’t just about making Apps. This is an open source operating system, waiting to be taken, and modified and used according to your needs. Whether you are desigining another new phone or tablet (where you may want to change the look and feel to stand out among competition), or want to come up with your own embedded solution based on android (in which case you are looking forward to adding new hardware functionality, having other input-output methods than touchscreens), knowing about the guts of the Android OS is essential.

    Layout/Flow of Talk

    • Starting with the Android OS source - requirements, downloading, compiling
    • overview of the codebase. which source is for which component
    • Modifying the framework layer for changing the UI/UX of the OS
    • Modifying the framework layer for creating new APIs
    • Modifying hardware layer to add/remove support for hardware components
    • Contributing your changes back to the Android ecosystem

    Target Audience

    1. People intending to come up with their own Android based phones/tablets
    2. People looking forward to create Android based devices like TVs, Car entertainment systems, Watches, Kitchen Appliances, Home Automation systems

    Take away

Login to leave a comment