skills/L2-hal-vendor-interface-expert/SKILL.md
--- name: hal-vendor-interface-expert layer: L2 path_scope: hardware/interfaces/, vendor/, system/vndk/, frameworks/native/libs/binder/, pdk/ version: 1.1.0 android_version_tested: Android 16 parent_skill: aosp-root-router --- ## Path Scope | Path | Responsibility | |------|---------------| | `hardware/interfaces/` | Canonical AIDL and HIDL interface definitions | | `hardware/interfaces/<subsystem>/<version>/` | Versioned HAL contracts | | `vendor/<OEM>/interfaces/` | OEM-specific AIDL/HIDL ex
npx skillsauth add jonaschen/Android-Software hal-vendor-interface-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Path | Responsibility |
|------|---------------|
| hardware/interfaces/ | Canonical AIDL and HIDL interface definitions |
| hardware/interfaces/<subsystem>/<version>/ | Versioned HAL contracts |
| vendor/<OEM>/interfaces/ | OEM-specific AIDL/HIDL extensions |
| vendor/<OEM>/ | Proprietary vendor code, BSP, vendor blobs |
| system/vndk/ | VNDK library list, VNDK snapshots |
| frameworks/native/libs/binder/ | libbinder — core Binder IPC library |
| frameworks/hardware/interfaces/ | Framework-side HAL client stubs |
| pdk/ | Platform Development Kit — HAL compliance testing |
Load this skill when the task involves:
hwservicemanager or servicemanager registrationstability: vintf or @VintfStability annotation questionsvendor.img content┌─────────────────────────────────────┐
│ /system partition │
│ Android Framework (AOSP-owned) │
│ Calls HAL via AIDL/HIDL client │
│ │
│ ┌─────────────────────────────┐ │
│ │ AIDL/HIDL Interface Def │ │
│ │ hardware/interfaces/ │ │ ← Stable ABI boundary
│ └─────────────────────────────┘ │
└──────────────────┬──────────────────┘
│ Binder IPC (VNDK boundary)
┌──────────────────▼──────────────────┐
│ /vendor partition │
│ HAL Implementation (OEM-owned) │
│ vendor/<OEM>/hardware/ │
└─────────────────────────────────────┘
| Aspect | HIDL (legacy) | AIDL (current) |
|--------|--------------|----------------|
| File extension | .hal | .aidl |
| Tool | hidl-gen | aidl |
| Stability annotation | @1.0::IFoo versioning | @VintfStability |
| Backend | C++, Java | C++, Java, Rust, NDK |
| Status | Frozen (no new HALs) | All new HALs use AIDL |
| Registration | hwservicemanager | servicemanager |
hardware/interfaces/<subsystem>/aidl/
└── Android.bp ← aidl_interface module
└── <package>/
└── I<Name>.aidl ← Interface definition
Android.bp key fields:
name: "android.hardware.foo"
srcs: ["android/hardware/foo/*.aidl"]
stability: "vintf" ← Required for HAL interfaces
versions_with_info: [
{ version: "1", imports: [] },
{ version: "2", imports: [] }, ← Current frozen version
]
frozen: true ← Locks current version
Bumping procedure:
1. Unfreeze: set frozen: false (or remove)
2. Make changes to .aidl files
3. Run: m <module>-update-api
4. Review generated API diff
5. Freeze again: frozen: true, add new version entry
libc, libm, libdl, liblog).To check if a library is VNDK:
cat build/make/target/product/vndk/current.txt | grep <libname>
To add a library to VNDK:
Edit: build/make/target/product/vndk/<version>.txt
(Requires careful ABI stability review)
Client (system partition) Server (vendor partition)
IBinder proxy ←→ BBinder implementation
│ │
└─────── Binder ───────────┘
driver
/dev/binder ← system ↔ system
/dev/vndbinder ← vendor ↔ vendor
/dev/hwbinder ← HIDL (legacy)
RULE: System code uses /dev/binder.
Vendor code uses /dev/vndbinder.
Cross-boundary calls go through the HAL interface only.
| Manager | Serves | Registration |
|---------|--------|-------------|
| servicemanager | AIDL services | android.os.IServiceManager |
| hwservicemanager | HIDL services (legacy) | [email protected] |
New HALs use AIDL → register with servicemanager.
| Change | Impact |
|--------|--------|
| VNDK deprecated | Former VNDK libraries treated as regular vendor/product libs; system/vndk/ path scope reduced |
| AIDL mandatory for all new HALs | No new HIDL interfaces accepted; HIDL frozen |
| Health HAL 3.0 | Updated health interface version |
| Thermal HAL 2.0 | Updated thermal interface version |
| Domain Selection Service | New system API for IMS vs circuit-switched domain selection |
| Camera feature combination query | New platform API for querying supported camera feature combos |
.hal interfaces — all new HAL interfaces must use AIDL. HIDL is frozen.system/ APIs from vendor code — must go through a declared AIDL/HIDL interface.m <module>-update-api — frozen version files are immutable ABI contracts.vendor: true module against a non-VNDK system library — this is a Treble violation caught by build system checks..aidl files outside hardware/interfaces/ or vendor/*/interfaces/ — framework .aidl files in frameworks/ are not HAL contracts./dev/binder in vendor code or /dev/vndbinder in system code — the binder domain split is a hard kernel-level boundary.manifest.xml) is the runtime declaration of HAL support.# Check current AIDL interface version
cat hardware/interfaces/<subsystem>/aidl/Android.bp | grep -A5 "versions_with_info"
# List all registered HAL services on device (via adb)
adb shell dumpsys -l | grep android.hardware
# Check VNDK membership
grep <libname> build/make/target/product/vndk/current.txt
# Find VINTF manifest for a device
find device/ -name "manifest.xml" | xargs grep -l "<hal>"
# Generate API for an AIDL interface after changes
m android.hardware.<subsystem>-update-api
# Run VTS HAL test
atest VtsHal<Subsystem>V<Version>TargetTest
| Condition | Hand off to |
|-----------|------------|
| SELinux hwservice_contexts or service_contexts needed | L2-security-selinux-expert |
| VNDK build error in Android.bp | L2-build-system-expert |
| HAL server process init .rc file | L2-init-boot-sequence-expert |
| Framework-side HAL client in frameworks/base/ | L2-framework-services-expert |
Emit [L2 HAL → HANDOFF] before transferring.
references/aidl_hidl_treble_guide.md — deep-dive on AIDL versioning, Treble ABI, and VNDK.hardware/interfaces/README.md — HAL interface directory conventions.system/vndk/ — VNDK snapshot and library lists.ANDROID_SW_OWNER_DEV_PLAN.md §5 — L2 skill design spec.development
--- name: qualcomm-kernel-expert layer: L3 path_scope: vendor/qcom/opensource/, device/qcom/, kernel/msm-*/ version: 1.0.0 android_version_tested: Android 16 (GKI 6.12) parent_skill: kernel-gki-expert --- ## Path Scope | Path | Responsibility | |------|---------------| | `vendor/qcom/opensource/` | Qualcomm open-source kernel modules (camera, audio, wlan, data, video) | | `vendor/qcom/opensource/camera-kernel/` | Camera kernel drivers (IFE, IPE, IOMMU, CCI) | | `vendor/qcom/opensource/audio-ke
development
--- name: mediatek-kernel-expert layer: L3 path_scope: vendor/mediatek/kernel_modules/, vendor/mediatek/proprietary/, device/mediatek/, kernel/mediatek/ version: 1.0.0 android_version_tested: Android 16 (GKI 6.12) parent_skill: kernel-gki-expert --- ## Path Scope | Path | Responsibility | |------|---------------| | `vendor/mediatek/kernel_modules/` | MediaTek out-of-tree kernel modules (connectivity, GPU, display, camera, audio) | | `vendor/mediatek/kernel_modules/connectivity/` | CONNSYS / WM
development
--- name: <oem-or-soc>-<subsystem>-expert layer: L3 path_scope: vendor/<oem>/, device/<oem>/ version: 1.0.0 android_version_tested: Android 16 parent_skill: <L2-parent-skill-name> --- ## Path Scope | Path | Responsibility | |------|---------------| | `vendor/<oem>/` | OEM-proprietary code, BSP blobs, vendor HALs | | `device/<oem>/<device>/` | Device-specific configuration, BoardConfig, overlays | | <!-- Add OEM-specific paths below --> | | ### Inherited Paths (from parent L2 skill) This L3 s
development
--- name: L2-virtualization-pkvm-expert layer: L2 path_scope: packages/modules/Virtualization/, external/crosvm/, frameworks/libs/vmbase/ version: 1.1.0 android_version_tested: Android 16 parent_skill: aosp-root-router --- # L2 Expert: pKVM / Android Virtualization Framework ## Path Scope | Path | Description | |------|-------------| | `packages/modules/Virtualization/` | AVF mainline module — VirtualizationService, Microdroid, VmPayloadService, vmbase | | `packages/modules/Virtualization/mic