android-hal

Implement and debug Android HAL services with AIDL, ServiceManager, and init.rc.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/Binh230199/ai --skill android-hal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-hal
Source: https://github.com/Binh230199/ai/tree/main/.github/skills/android-hal
Command: npx skills add https://github.com/Binh230199/ai --skill android-hal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement, register, and debug Android Hardware Abstraction Layer services without piecing together scattered platform guidance.

Core Features & Use Cases

  • AIDL HAL Implementation: Define the interface, generate the native backend, and implement the C++ service stub for Android 11 and later.
  • Service Registration and Boot Integration: Add ServiceManager registration, init.rc service declarations, and VINTF manifest fragments so the HAL starts and is discoverable correctly.
  • Debugging and Migration Support: Diagnose service-not-found issues, version mismatches, SELinux registration errors, and legacy HIDL-to-AIDL migration paths.
  • Use Case: If you are bringing up a new vendor sensor or vehicle service, this Skill guides the full path from AIDL definition to a working registered HAL.

Quick Start

Ask for help implementing, registering, or debugging a specific Android HAL and include the HAL name plus the target action.

Frequently Asked Questions about android-hal

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

FAQPage Schema
How do I implement and register an Android HAL service using AIDL?

To implement an Android HAL service, you define the AIDL interface, generate the native backend, implement the C++ service stub, and register it with ServiceManager. You also need init.rc declarations and VINTF manifest fragments for proper boot integration and service discovery on Android 11+.

Why is my Android HAL service not found during service discovery?

Android HAL service discovery failures often stem from missing VINTF manifest fragments, incorrect init.rc service declarations, or SELinux registration errors. Validating your ServiceManager registration and ensuring your VINTF manifest matches the declared interface versions resolves these startup issues.

What is the process for migrating a legacy HIDL HAL to AIDL?

Migrating a legacy HIDL HAL to AIDL involves redefining the interface in AIDL, generating the native C++ backend, updating ServiceManager registration, and adjusting init.rc and VINTF manifest fragments to support Android 11+ deployment requirements and binder NDK usage.

Does this Android HAL implementation guide support Android Automotive OS?

Yes, this Android HAL implementation process applies to Android Automotive OS and AOSP vendor services. It supports AIDL interface definitions, C++ stub implementations, and VINTF manifest fragments specifically required for vehicle and sensor service deployment.

How do I set up the binder thread pool for an Android HAL service?

Setting up the binder thread pool for an Android HAL service requires using the binder NDK to configure thread concurrency. This ensures your C++ service stub can handle incoming binder requests and manage service discovery validation correctly.

What do I need to deploy a new vendor sensor HAL on AOSP?

To deploy a new vendor sensor HAL on AOSP, you need the AIDL interface definition, a C++ stub implementation, ServiceManager registration, init.rc service declarations, and VINTF manifest fragments to satisfy Android 11+ HAL deployment requirements.