Slide 1

Slide 1 text

DroidKaigi 2026 Mastering AOSP Development with Android Studio for Platform (ASfP) Aman Tonk Lead Android Engineer @ PayPay

Slide 2

Slide 2 text

DroidKaigi 2026 About Me! The Paradox: ● ● Current Role: Application Developer. Current Topic: AOSP Engineering. Flashback ● ● ● ● ● Started as a Custom Rom Developer CyanogenMod, OmniROM, AOKP Xda Developer forums Plain Text Editors And So on…

Slide 3

Slide 3 text

DroidKaigi 2026 A Tale of Two Ecosystems ● The App Dev Luxury: ○ ● Spoiled by a polished toolchain. Android Studio handles the heavy lifting with Gradle builds and instant run features. The Platform Reality: ○ A stark contrast of manual labor. Setting up the environment requires commands like source build/envsetup.sh.

Slide 4

Slide 4 text

DroidKaigi 2026 The Scale Explosion Why the existing tools cannot work for AOSP Development? ● ● ● Massive Scale of AOSP repos Countless build scripts Fragmented Symbols

Slide 5

Slide 5 text

DroidKaigi 2026 But How Massive? How Massive AOSP is?

Slide 6

Slide 6 text

DroidKaigi 2026 But How Massive? If app is an apartment

Slide 7

Slide 7 text

DroidKaigi 2026 But How Massive?

Slide 8

Slide 8 text

DroidKaigi 2026 Then Enter ASfP! ASfP Core Pillars ● ● ● ● ● The Zero-Gradle Engine Native Soong Engine Parser Multi-Language AST Zero-Gradle Architecture Selective Scopes

Slide 9

Slide 9 text

DroidKaigi 2026 One small requirement! ● ● ● ● 64-bit Linux environment x86_64 CPU Supported AOSP build environment ASfP runs alongside the AOSP toolchain

Slide 10

Slide 10 text

DroidKaigi 2026 Scope Control: Taming the Beast ● ● ● ● ● Low Ram Usage Instant symbol resolution Index what you need Exclude heavy drivers Selective language support

Slide 11

Slide 11 text

DroidKaigi 2026 What is Soong? ● ● ● ● Build system for the AOSP platform. Designed specifically for building Android itself rather than typical Android applications. Parses Android.bp files Understand modules, dependencies, sources, compiler flags, generated files, and so on.

Slide 12

Slide 12 text

Why not Gradle?

Slide 13

Slide 13 text

DroidKaigi 2026 Under the Hood: The Soong-to-IDE Pipeline ● ● ● ● Reads Android.bp definitions Builds the IDE project model Resolves module dependencies No full Ninja build for project sync

Slide 14

Slide 14 text

DroidKaigi 2026 Code Mapping: Android.bp to IDE Classpath ● ● ● ● Reads java_library definitions like services.core Maps source files from srcs into the IDE Resolves dependencies from the libs array Understands platform APIs like @hide and @SystemApi and more.

Slide 15

Slide 15 text

DroidKaigi 2026 The Journey of a Feature From Hardware to UI

Slide 16

Slide 16 text

DroidKaigi 2026 1: HAL & AIDL Interface Navigation ● ● ● ● Navigate from AIDL directly to backend implementations Jump to C++ or Rust Binder code from the interface Avoid searching generated files inside out/ View Binder details directly in the editor.

Slide 17

Slide 17 text

DroidKaigi 2026 2: Breaking the JNI Barrier Cross-Language Mastery ● Single-click symbol navigation. ● Eliminates manual cgrep or symbol name mangling lookups. ● Maintains syntax highlighting across both panes simultaneously.

Slide 18

Slide 18 text

DroidKaigi 2026 3: Low-Level System Development in Rust

Slide 19

Slide 19 text

DroidKaigi 2026 4: Kotlin in the Core Cross-Language Mastery ● Coroutines & StateFlow ● Async call navigation ● Cross-layer data flow ● Java ↔ Kotlin ↔ Native

Slide 20

Slide 20 text

DroidKaigi 2026 5: Write UI in Compose The AOSP Compose Shift ● Modernizing System UI ● Live Layout Previews ● Fast UI feedback ● Platform UI in ASfP

Slide 21

Slide 21 text

DroidKaigi 2026 Platform-Aware Static Analysis ● ● ● ● Platform-aware linting directly in the IDE Understands AOSP rules for APIs, flags, and permissions Catches errors early before a full build Faster feedback and less wasted build time

Slide 22

Slide 22 text

DroidKaigi 2026 Native Integration of atest The Testing Workflow ● ● ● ● Direct atest Integration Launch single test or suite See results into the panel Failed report with ease

Slide 23

Slide 23 text

Run and test on Android Cuttlefish! ● Virtual Reference Board ○ ● ASfP Integration ○ ● Emulates everything from framework to kernel without the need for physical devices. ADB connects seamlessly to Cuttlefish device Run local or scale to cloud ○ Run launch_cvd locally or scale testing to cloud instances via WebRTC.

Slide 24

Slide 24 text

DroidKaigi 2026 Hybrid Dual-Process Debugging 1. Select Target Process Open Attach Debugger to Android Process and select system_server. 2. Choose Debug Type Explicitly select Dual (Java + Native) mode. 3. Set Breakpoints 4. Trigger IPC Place breakpoints in both Java framework files and JNI C++ files. Perform action on device. ASfP pauses execution across both runtimes.

Slide 25

Slide 25 text

DroidKaigi 2026 Managing Multi-Repo Syncs ● ● ● Handles large repo sync changes Selective re-indexing Avoid unnecessary full re-index on sync

Slide 26

Slide 26 text

DroidKaigi 2026 Performance Optimization & Memory Tuning ● ● ● Control the index scope ○ Choose what you need to work Allocate enough JVM memory ○ Avoid OOM on the AOSP graph Retain project caches ○ Prevents ASfP re-indexing

Slide 27

Slide 27 text

DroidKaigi 2026 Recommended AOSP Developer Workflow The complete ASfP platform workflow summarized.

Slide 28

Slide 28 text

Wrap Up! AOSP Development evolution ● ● ● From terminal workflows to modern IDE productivity ASfP bridges AOSP code with Soong build intelligence A faster, smarter future for platform development

Slide 29

Slide 29 text

One last thing!

Slide 30

Slide 30 text

ASfP Meets AI ● ● ● ● ● AI assistance inside the IDE Understand the AOSP code Generate and update code Ask questions about the project Agent Mode for platform development

Slide 31

Slide 31 text

DroidKaigi 2026 Thank you 󰚍 Questions? Come say hello. Aman Tonk Lead Android Engineer @ PayPay