"Building Android" doesn't mean compiling one app — it means producing a full system image: kernel, native daemons, system server, framework classes, and the pre-installed apps, all packaged into partitions a device can boot from.
The pieces that get assembled
- Kernel — built separately (often by the SoC vendor), producing the boot image's kernel + ramdisk
- HAL + native daemons — vendor-specific code implementing Android's hardware interfaces, packaged into the vendor partition so it can update on its own cadence from the OS itself
- AOSP platform source — the Soong/Make-based build (migrating to Bazel) compiles the framework, system server, and core services into the system partition
- ART pre-compilation — as much of the framework and system apps as possible is ahead-of-time compiled to native code at build time, so the device doesn't have to interpret bytecode for its own OS on every boot
- Signing — every partition image is signed; a device with Verified Boot refuses to boot an image whose signature doesn't chain back to a trusted key
Where a normal Android app build fits into this
An app built in Android Studio never touches any of the above — Gradle compiles Kotlin/Java to DEX bytecode, packages it with resources into an APK (or an AAB for the Play Store, which the Store then splits into per-device APKs), and signs it with the developer's own key, not a platform key. The app then runs inside the system image described above, but as a guest — sandboxed the same way as every other app, with no more platform trust than that.
In this note
References & resources