fp-android-kernel

A guide for compiling and deploying Android's Linux kernel, including changes to its build settings, modules, and boot image. It also covers checking compatibility and device flashing.

In plain words
What is it for?
Use it for Android kernel source changes, kernel-module builds, boot-image repacking, and deployment through fastboot or emergency 9008 flashing.
Why use it?
It adds safety checks before replacing low-level device software, where an incompatible kernel or module can prevent Android from starting.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/miaoy0ushan/fp/android-kernel
Any agent
npx skills add MiaoY0uShan/FP --skill android-kernel
Clone the repo
git clone --depth 1 https://github.com/MiaoY0uShan/FP

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.00732
Opus 5 $0.00034 $0.00366
Sonnet 5 $0.00014 $0.00146
Haiku 4.5 $0.00007 $0.00073

Measured 2d ago against content hash 41a20128ff58, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fp-android-kernel scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

fp/skills/android-kernel/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FP Android-Kernel Profile

Load with fp-live-system for any task involving kernel source, boot images, or device firmware.

Android-Specific Rules

1. KMI Compatibility Is a Hard Gate

  • Never flash a boot image without comparing Module.symvers against the stock baseline.
  • changed_crc > 0 or missing > 0 → stop, do not flash.
  • Adding new exports is safe only when changed_crc=0 and missing=0 for all existing symbols.
  • On GKI 2.0 (6.x+), vendor modules in vendor_dlkm must match vermagic exactly, including page size suffix (-4k/-16k).

2. Boot Image Structure Varies

  • Verify header version with unpack_bootimg.py before repacking.
  • Never assume header v3/v4 from build config — check the actual device boot image.
  • Stock ramdisk must be preserved when adding KernelSU; only the kernel Image is replaced.

3. Deployment Path Hierarchy

  • fastboot boot (temporary) → fastboot flash (permanent) — preferred when available.
  • 9008 EDL + Firehose — fallback when fastboot is blocked; requires Firehose programmer for the specific SoC.
  • dd from live system — highest risk; only when both fastboot and 9008 are unavailable, and only after verifying partition offsets with lpdump or GPT readback.

4. eBPF on Android

  • Stock kernels may lack CONFIG_DEBUG_INFO_BTF; plan for raw bpf() syscall path, not CO-RE.
  • Android uses BoringSSL, not OpenSSL. SSL_read/SSL_write symbols may be in /apex/com.android.conscrypt/lib64/libssl.so.
  • SELinux context (u:r:ksu:s0) may deny bpf() or perf_event_open(); capture AVC denials before modifying policy.
  • Verify with exact-PID uprobe + negative control (wrong PID → zero events) before claiming functional.

5. KernelSU Module Packaging

  • /data/adb/modules/<name>/module.prop + service.sh for boot-time execution.
  • ConfigFS USB Gadget functions require CONFIG_USB_F_* built-in, not just as modules.
  • sysfs-based debug controls: expose via /sys/kernel/debug/<subsystem>/<control> with default-off behavior.

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 48 lines · 68 tokens per session scan A 41a20128ff58

Subscribe to this mod's changes

fp-android-kernel is a skill published in the GitHub repository MiaoY0uShan/FP (3 stars, last pushed 26d ago), licensed MIT. It adds 68 tokens to every session and 732 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gamified-app

A multi-frame gamified mobile-app prototype — three phone frames on a dark showcase stage. Frame 1: cover / poster, Frame 2: today's quests with XP ribbons and a level bar, Frame 3: quest detail. Vivid quest tiles, level ribbon, bottom tab bar. Use when the brief asks for a "gamified app", "habit tracker", "RPG-style…

nexu-io/open-design · 117 tokens

amc-run-rtsp-calibration

Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.

NVIDIA/skills · 59 tokens

deepstream-run-mv3dt

Run and operate the DeepStream Multi-View 3D Tracking reference app, also known as MV3DT. Use when the user asks to set up prerequisites, run shipped MV3DT samples, run Multi-View 3D Tracking on custom synchronized MP4 datasets, import camera calibration, delegate missing calibration to AutoMagicCalib, inspect OSD or…

NVIDIA/skills · 109 tokens

nvidia-skill-finder

Use for NVIDIA-related requests where an NVIDIA skill might help, even if the user did not ask for a skill. Trigger on NVIDIA products, hardware, software, SDKs, GPUs, Jetson/JetPack/L4T/BSP/SDK Manager/driver/flashing/setup, CUDA, NIM, NeMo, Omniverse/OpenUSD/SimReady, RAPIDS/cuDF, cuPyNumeric, cuOpt, Dynamo…

NVIDIA/skills · 140 tokens

doca-aes-gcm

Use this skill when the user is doing hands-on DOCA AES-GCM work on a BlueField DPU or ConnectX NIC — configuring docaaesgcmtaskencrypt / taskdecrypt, querying docaaesgcmcap for per-key-type (only DOCAAESGCMKEY128 / 256 — AES-192 not supported) and per-task support, sizing plaintext against the max-buf cap, setting…

NVIDIA/skills · 264 tokens

doca-common

Use this skill whenever the user is doing hands-on DOCA programming on a BlueField DPU or ConnectX NIC and needs the foundation primitives every per-library context rests on — walking the docactx lifecycle, discovering docadev / docadevinfo and gating on docacap before trusting a feature, wiring docammap /…

NVIDIA/skills · 242 tokens