aosp-part-native-foundation

Summarize Android's native foundation architecture across Bionic, Binder IPC, HAL Treble, and the NDK.

122|30|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/aospbooks/aosp-internal-book --skill aosp-part-native-foundation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aosp-part-native-foundation
Source: https://github.com/aospbooks/aosp-internal-book/tree/main/agents/claude/skills/aosp-part-native-foundation
Command: npx skills add https://github.com/aospbooks/aosp-internal-book --skill aosp-part-native-foundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This part provides a cohesive map of Android's native foundation, covering libc, the dynamic linker, linker namespaces, memory safety features (GWP-ASan / MTE), memory management (jemalloc/scudo), ashmem/memfd, ION/dma-buf, lmkd and PSI, Binder IPC (transactions, parcels, one-copy semantics, AIDL/HIDL/NDK Binder, servicemanager, threadpool, death recipients), the HAL/Treble ecosystem, VINTF, vendor/system partition split, and the NDK (libandroid, JNI bindings, ABI compatibility). Chapters 7–11.

Core Features & Use Cases

  • Comprehensive architecture overview: maps core natives like Bionic, dynamic linker, and memory infrastructure.
  • IPC and HAL integration: explains Binder IPC, NDK Binder, and Treble boundaries for vendor/framework separation.
  • NDK & ABI guidance: outlines sysroot layout, NDK headers, and AOSP references for app/native development.

Quick Start

Read this guide to quickly understand how Bionic, linker namespaces, memory management, Binder IPC, HAL Treble, and the NDK interact in Android's native stack.

Frequently Asked Questions about aosp-part-native-foundation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Android Binder IPC work with the HAL Treble ecosystem?

Android Binder IPC enables cross-process communication using one-copy semantics and parcels, while HAL Treble separates vendor and system partitions using VINTF to ensure framework compatibility across updates.

What is the role of Bionic and linker namespaces in the Android NDK?

Bionic provides the Android C library, and linker namespaces isolate native libraries so the NDK sysroot can maintain ABI compatibility between app and system layers without symbol conflicts.

How do I correctly use the NDK sysroot layout for AOSP native development?

The NDK sysroot organizes headers and libraries by ABI, ensuring native code links against stable APIs. Correct VNDK usage isolates vendor modules from framework changes to maintain Treble boundaries.

Does Android's native memory management support jemalloc and scudo allocators?

Android's native memory management utilizes jemalloc and scudo allocators alongside ashmem, memfd, and ION/dma-buf for buffer sharing, plus lmkd and PSI for low-memory pressure handling.

What are the requirements for VNDK usage and vendor partition boundaries in Treble?

Treble requires vendor modules to link only against VNDK-approved libraries, enforcing strict partition boundaries so system updates do not break vendor HAL implementations.

Why does the Android dynamic linker use namespaces for native libraries?

The dynamic linker uses namespaces to isolate system, vendor, and app native libraries, preventing dependency conflicts and ensuring correct VNDK and NDK ABI boundaries across Treble partitions.