Remixing Android

Marko Gargenta @Marakana

About Marko Gargenta

Marko Gargenta

1.1. Entrepreneur, Author, Speaker

Why Remix Android??

2.1. Vanilla is just not for everyone.

re·mix/rēˈmiks/:

Verb:
      Mix (something) again.
Noun:
      A different version of an open operating system produced in such a way.

Remix What?!?

3.1. Cosmetics aside, we’re focusing on major surgery to Android OS.

Android Stack: The High Level Overview

Android Stack Architecture

Android Stack: From Source to Device

Android Stack Source to Device

Android Stack: Layer Interaction

Android Stack Interaction

Interaction Between Apps

Android Stack Vertical Stacks

Marakana Alpha

Marakana Alpha Device Custom Components

Getting the AOSP Source

  1. Initialize the build environment

  2. Download the source

  3. Build the source

  4. Run on device

Setting up the Directory Structure

Marakana Alpha Directory Structure

Self-contained directory structure:

Registering Marakana Alpha

11.1. To future-proof your changes, don’t sprinkle other people’s code - keep it separate.

Makefile Plumbing

12.1. The make system is complex - copy from samples to get started.

Generating Platform Signing Keys

13.1. To pass CTS, we must generate our own platform signing keys

Building Alpha Device

14.1. Let’s build Alpha - so far a vanilla Android.

Marakana Alpha Custom Kernel

Marakana Alpha Device Custom Components - Kernel

Android Stack - Kernel

Android Stack - Kernel

Marakana Alpha Custom Kernel Steps

17.1. Not everyone is going to need a custom kernel - but we can have it.

Marakana Alpha Custom Lib

Marakana Alpha Device Custom Components - Native Library

Android Stack - Native Libraries

Android Stack - Native Libraries

Marakana Alpha Custom Lib Steps

20.1. From drivers to open source libraries, you likely need custom libraries.

Marakana Alpha Native Daemon

Marakana Alpha Device Custom Components - Daemon

Android Stack - Native Daemons

Android Stack - Native Daemons

Marakana Alpha Native Daemon Steps

23.1. It’s nice to have a native daemon look over your shoulder.

Wrapping Native Lib with JNI

Marakana Alpha Device Custom Components - JNI Wrapper

Wrapping Native Lib with JNI Steps

25.1. The glue for Java to talk to C and back.

Marakana Alpha Service Interface

Marakana Alpha Device Custom Components - Service Interface

Android Stack - Framework

Android Stack - Framework

Marakana Alpha Service Interface Steps

28.1. Because other apps are going to want to use our service as well.

Marakana Alpha Service App

Marakana Alpha Device Custom Components - Service App

Android Stack - Services

Android Stack - Services

Marakana Alpha Service App Steps

31.1. Register the service with the Service Manager so others can use it.

Marakana Alpha Client App

Marakana Alpha Device Custom Components - Client App

Android Stack - Apps

Android Stack - Apps

Marakana Alpha Client App Steps

34.1. A demo client app - to make sure it all works.

Marakana Alpha SDK Add-On

35.1. Other developers may want to develop for our cool Alpha device as well.

Remixing Android Summary

Thank you!

Marko Gargenta & Marakana Team

@MarkoGargenta

Special thanks to Aleksandar (Sasa) Gargenta for providing most of the research on how to put together Marakana Alpha, properly.

Slides & video of this presentation is available at Marakana.com

(c) Marakana.com

/

#