Grokking AOSP (Android Open Source Project)
Grokking my custom Lineage build from start to finish.
Vendor: google
Device: Pixel XL
codename: Marlin
base ROM: Lineage 17.1
SDK version: 29 (Android 10)
Understanding the Hardware
The SoC
- Qualcomm Snapdragon 821 (MSM8996)
A/B Partition Schema
-
overview and introduction: https://www.xda-developers.com/how-a-b-partitions-and-seamless-updates-affect-custom-development-on-xda/
-
logistics of a/b slots: https://www.droidwin.com/flash-roms-magisk-twrp-kernels-a-b-partition-devices/
Boot ROM
Understanding The Boot Process
Overview
Fastboot OEM
- A vuln perpective - used at comma
- Comma flash process reference
The Bootloader
Init Process
The Android Runtime (ART) / Dalvik
System Server
-
Activity Manager
Gettings Started: Developing on AOSP
Platform Development
Build Tooling
Syncing:
- repo command: like a "meta" git command
too slow? use
repo sync -c --no-clone-bundle
(see here)
Building:
-
android build lingo: breakfast, brunch, bacon?
-
breakfast: configure build environment (select device target)
-
lunch: breakfast but include non-standard targets (like emulator or debug version)
-
mka:
-
brunch:
-
read the code xda blog_ Advice for building efficiently: Udi Cohen blog
Hybrid Build System (Make (legacy) -> Soong (new))
Why are AOSP platform apps not building in Android Studio? Link (Hint: AOSP Doesn't use Gradle)
Pain Points of developing of AOSP
Application Development
-
Gradle Wrapper can be used to build apks from command line
(useful if you want to embed apks into a distro without the need to integrate them into the Soong/Make build pipeline)
Its good for other reasons as well.
Android Studio IDE for everything else.