skills/L3-qualcomm-kernel-expert/SKILL.md
--- 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
npx skillsauth add jonaschen/Android-Software qualcomm-kernel-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 |
|------|---------------|
| 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-kernel/ | Audio DSP interface modules (ADSP RPC, codec, platform) |
| vendor/qcom/opensource/wlan/ | WLAN driver — qcacld-3.0 (CLD/WCN chips) |
| vendor/qcom/opensource/dataipa/ | Data IPA (Inline Packet Accelerator) kernel driver |
| vendor/qcom/opensource/video-driver/ | Video codec (Venus) kernel module |
| vendor/qcom/opensource/mmrm-driver/ | Multimedia Resource Manager kernel driver |
| device/qcom/<target>/ | Device-specific BoardConfig, defconfigs, DT overlays |
| device/qcom/<target>/kernel-headers/ | SoC-specific kernel headers for vendor modules |
| kernel/msm-<version>/ | Qualcomm MSM kernel fork (non-GKI legacy) |
| kernel/msm-<version>/techpack/ | SoC-specific driver pack within the MSM kernel |
| kernel/msm-<version>/techpack/camera/ | Camera techpack drivers (within MSM kernel only) |
| kernel/msm-<version>/techpack/audio/ | Audio techpack (Q6ASM, AFE, ADM) in MSM kernel |
| vendor/qcom/proprietary/ | Binary-only blobs — read-only, never modify |
This L3 skill extends kernel-gki-expert. The parent skill handles standard AOSP/GKI paths.
Qualcomm deviations from the standard AOSP kernel model are documented here.
| Parent L2 Path | L3 Override / Extension |
|----------------|------------------------|
| kernel/ | QC also uses kernel/msm-<version>/ for non-GKI targets and vendor/qcom/opensource/*/ for GKI out-of-tree modules |
| drivers/ | QC out-of-tree drivers live in vendor/qcom/opensource/ — not inside kernel/drivers/ |
| common/ | Snapdragon devices on GKI 6.12 use the android14-6.1 or android15-6.6 branch; confirm via msm_show_epoch |
| device/<OEM>/ | QC target names follow <SoC-codename> convention (e.g., lahaina, taro, kalama, sun) |
Load this skill (after kernel-gki-expert) when the task involves:
vendor/qcom/opensource/techpack/ driver errors within kernel/msm-*//vendor/firmware/adsp*.mbn)device/qcom/<target>/*.dtsi) merge conflictsBoardConfig.mk kernel config fragments for Snapdragon targetsmodinfo showing wrong vermagic for a QC vendor moduleqcom/, msm, lahaina, taro, kalama, sun, crow, pineapplekernel-gki-expert should escalate to this skill when:
vendor/qcom/ or device/qcom/ paths explicitlyqcom_, msm_, lpass_, cam_ife_, qcacld module namesL3-qualcomm-boot-expert for deeper boot analysis)Qualcomm ships kernel drivers as out-of-tree modules in separate Git repositories, not inside the kernel/ tree. This is a fundamental deviation from the AOSP reference model.
GKI Kernel (vmlinux — Google signed)
│
├── vendor/qcom/opensource/camera-kernel/ ← Camera IFE/IPE/CCI modules
│ drivers/cam_core/ — Core camera framework
│ drivers/cam_isp/ — Image Signal Processor (IFE, ICP)
│ drivers/cam_sensor_module/ — Sensor, actuator, OIS, flash
│ drivers/cam_iommu/ — IOMMU/SMMU mapping for camera
│
├── vendor/qcom/opensource/audio-kernel/ ← Audio DSP modules
│ asoc/ — ALSA SoC platform drivers
│ dsp/ — Q6ASM/AFE/ADM ADSP interface
│ soc/ — SoC audio codec drivers
│
├── vendor/qcom/opensource/wlan/ ← WLAN (qcacld-3.0)
│ qcacld-3.0/ — WCN685x/WCN7850 unified driver
│
├── vendor/qcom/opensource/dataipa/ ← IPA packet accelerator
│ drivers/platform/msm/ipa/ — IPA core driver
│
└── vendor/qcom/opensource/video-driver/ ← Venus video codec
drivers/media/platform/msm/vidc/ — V4L2 video codec driver
| Aspect | MSM Kernel (kernel/msm-<ver>/) | GKI Kernel (common/) |
|--------|----------------------------------|------------------------|
| Scope | Qualcomm-internal, SoC-specific | AOSP standard, Google-managed |
| Drivers | techpack/camera, techpack/audio in-tree | Out-of-tree in vendor/qcom/opensource/ |
| ABI | No KMI guarantee | KMI enforced (GKI ABI stability) |
| Android target | A10–A13 legacy devices | A13+ GKI-compliant devices |
| Signing | OEM-signed vmlinux | Google-signed vmlinux |
| Defconfig | vendor/lahaina_GKI.config | gki_defconfig + SoC fragments |
Rule of thumb: If the device ships with Android 13+ and Snapdragon 8 Gen 1 or newer, it uses GKI. Older Snapdragon 855/865/888 devices may still use the MSM kernel.
| SoC | Codename | GKI Branch | Android Target | |-----|----------|-----------|---------------| | Snapdragon 8 Gen 1 | Lahaina (SM8450) | android13-5.10 | A13 | | Snapdragon 8 Gen 2 | Taro (SM8550) | android14-5.15 | A14 | | Snapdragon 8 Gen 3 | Kalama (SM8650) | android14-6.1 | A15 | | Snapdragon 8 Elite | Sun (SM8750) | android15-6.6 | A16 | | Snapdragon 8s Gen 4 | Crow (SM7675) | android15-6.6 | A16 | | Snapdragon X Elite | Hamoa (SC8380XP) | android15-6.6 | A16 (PC) |
Qualcomm DSPs use a firmware loading model absent in standard AOSP:
Boot → PIL (Peripheral Image Loader) → /vendor/firmware/adsp.mbn
/vendor/firmware/cdsp.mbn
/vendor/firmware/slpi.mbn
→ remoteproc framework loads firmware into DSP IOVA
→ FastRPC creates /dev/fastrpc-adsp, /dev/fastrpc-cdsp
→ HAL layer (libadsprpc.so) communicates via FastRPC
When ADSP crashes: check /sys/bus/platform/drivers/qcom-pil/*/status and dmesg | grep -i "adsp\|pil\|remoteproc".
Camera module failures often involve IOMMU faults (cam_smmu). The standard AOSP iommu driver does not apply here.
Camera HAL (AIDL v3)
│
▼ ioctl() → /dev/video*
cam_req_mgr (camera kernel framework)
│
├── cam_isp (IFE — Image Front End)
├── cam_icp (IPE — Image Processing Engine)
└── cam_smmu (cam_iommu — custom SMMU wrapper)
│
▼
ARM SMMU-500 hardware
Error pattern: cam_smmu: ERROR: iommu page fault addr <addr> — usually a buffer not mapped before DMA.
Qualcomm vendor modules must use only symbols on the GKI ABI allowlist (android/abi_gki_aarch64.xml). Common QC-specific violations:
| Symbol | Module | Issue |
|--------|--------|-------|
| qcom_smem_get | qca-wifi | Must use SMEM API via allowlisted wrapper |
| msm_bus_* | audio-kernel | Legacy bus API — replaced by ICC framework |
| subsystem_get | camera-kernel | Replaced by remoteproc API in GKI |
Use scripts/check_qcom_kmi_symbols.sh <module.ko> to audit a module's symbol dependencies.
Inherited from
kernel-gki-expert: Do not modifyandroid/abi_gki_aarch64.xmlwithout ABI review, do not link modules against non-KMI symbols, do not bypassmodpostchecks.
In addition, for Qualcomm-specific work:
vendor/qcom/proprietary/ — these are pre-built binaries signed by Qualcomm. Modification voids signing, causes boot failures.techpack/ paths in GKI kernels — techpack/camera and techpack/audio exist only inside kernel/msm-<version>/. GKI targets use vendor/qcom/opensource/ instead.gki_defconfig plus SoC-specific config fragments (e.g., vendor/kalama_GKI.config). Do not use msm8996_defconfig on a GKI device.msm_bus_*, subsystem_get, or any non-allowlisted QC internal APIs..mbn, .elf, .fv files in vendor/qcom/firmware/) — they are signed and verified by PIL. Tampering breaks secure boot.vendor/qcom/opensource/camera-kernel/, NOT in kernel/msm-<ver>/techpack/camera/.WCN_CHIP_VERSION in qcacld-3.0/Kconfig against the target GKI branch; there are chip-specific compatibility gates.L2-bootloader-lk-expert (and optionally L3-qualcomm-boot-expert when created).bash skills/L3-qualcomm-kernel-expert/scripts/check_qcom_kmi_symbols.sh <path/to/module.ko>
What it does: Extracts undefined symbols from the module, cross-references against android/abi_gki_aarch64.xml, and reports any symbols not on the allowlist. Non-allowlisted symbols will cause module load failure on GKI.
Input: Path to a compiled .ko file.
Output: List of allowed symbols, non-allowed symbols, and a PASS/FAIL verdict.
# From a running device
adb shell getprop ro.board.platform # e.g., "kalama"
adb shell getprop ro.product.board # e.g., "kalama"
adb shell cat /sys/devices/soc0/soc_id # Numeric SoC ID
# From source
grep "TARGET_BOARD_PLATFORM" device/qcom/<target>/BoardConfig.mk
adb shell cat /sys/bus/platform/drivers/qcom-pil/*/status
adb shell dmesg | grep -E "adsp|cdsp|pil|remoteproc|subsys"
adb logcat -s ADSPRPC,aDSPd,fastrpc
adb shell dmesg | grep -E "cam_smmu|iommu|smmu|page fault" | tail -40
| Condition | Route To |
|-----------|---------|
| Issue is in generic GKI paths (kernel/, common/, drivers/) without QC specifics | Hand back to L2-kernel-gki-expert |
| Issue involves Qualcomm ABL (Android Bootloader) or XBL (eXtensible Bootloader) | Hand to L2-bootloader-lk-expert |
| Issue involves Qualcomm TrustZone / QSEECOM | Hand to L2-trusted-firmware-atf-expert |
| Issue involves vendor/qcom/opensource/audio-kernel/ and ALSA/HAL layer above it | Hand to L2-multimedia-audio-expert |
| Issue involves vendor/qcom/ HAL AIDL implementations (non-kernel) | Hand to L2-hal-vendor-interface-expert |
| Issue involves Qualcomm SELinux denials for qcom_ services | Hand to L2-security-selinux-expert |
| Issue involves A15→A16 kernel API migration for QC modules | Hand to L2-version-migration-expert (after confirming QC-specific scope with this skill) |
skills/L2-kernel-gki-expert/SKILL.md — Parent skill; read first for generic GKI guidanceskills/L3-qualcomm-kernel-expert/references/qualcomm_kernel_architecture.md — Deep dive: SoC codenames, module organization, ADSP/PIL internalsskills/L3-qualcomm-kernel-expert/scripts/check_qcom_kmi_symbols.sh — KMI symbol audit toolreferences/16kb_page_migration_guide.md — 16KB page size migration (applies to all QC A16 targets)memory/hindsight_notes/HS-033_gki_6_12_eevdf_vma_proxy_exec.md — GKI 6.12 changes including EEVDF scheduler and vm_flags proxy exec removalcodeaurora.org (mirror: git.codelinaro.org)kernel/common/android/abi_gki_aarch64.xmldevelopment
--- 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
development
--- name: version-migration-expert layer: L2 path_scope: cross-cutting (diff analysis across all paths) version: 1.1.0 android_version_tested: Android 16 parent_skill: aosp-root-router --- ## Path Scope This skill does not own a single physical path. It performs **cross-cutting analysis** across any AOSP path affected by an OS version transition. Key areas of focus: | Area | Relevant Paths | |------|---------------| | API compatibility | `frameworks/base/api/`, `cts/` | | Boot image / partiti