linux-phone-porting skill
A skill for porting mainline Linux to a phone that makes the agent gather evidence and research sources before writing a fix.
- 56 ★ on the repository
- Last commit
- CC-BY-4.0
Broad access
Why this level
- Flashing a partition and booting a home-built kernel can break the device boot or erase data.
- The agent handles a device partition backup that holds the owner's unique data.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/linux-phone-portingDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Flashing a partition and booting a home-built kernel can break the device boot or erase data.
- The agent handles a device partition backup that holds the owner's unique data.
This is third-party code. Review the repository files before installing.
What it does
Every guess in a port costs a build, a flash and a boot, five to ten minutes, and most guesses are wrong. The skill imposes a four-phase order. First a backup of the stock system while it is still readable, which is also the best research source. Then evidence from the live device: a full `dmesg`, `pstore` records and console output. Then research across an ordered list of independent source families. Only after that comes a fix, one variable per experiment. Commands cover individual stages: `/port-setup` prepares the workspace, `/evidence-sweep` captures evidence after a failure, `/source-sweep` and `/port-research` study sources, `/flash-gate` asks questions before a flash, `/port-loop` runs iterations and `/port-upstream` prepares changes for upstream. The skill originated in one real port, a Xiaomi Mi A3 running NixOS on kernels 7.1 and 7.2.
Who it is for. Enthusiasts and developers porting the mainline Linux kernel to phones and tablets with the help of an agent.
Good fit when
- A new port is just starting and the stock system must be saved and the boot path described.
- The device failed to boot and evidence must be collected before the next flash.
- The agent suggests a blind fix and you want to make it research sources first.
- A fix is ready and the checking questions must be passed before a flash.
Not a fit when
- The device bootloader is locked: the skill does not unlock bootloaders or advise on it.
- You need a non-Linux kernel: the method covers mainline Linux only.
- You need a ready list of compatible systems: the target OS is chosen by release and kernel requirements.
Example request
/port-setup for my phone: back up the stock system, determine the boot model and prepare the port workspace.Limitations
A device with a demonstrated boot path is required: on retail Android phones that means an unlocked bootloader, and locked devices are out of scope. The skill does not unlock bootloaders and gives no advice on it. The method covers mainline Linux porting and OS userspace integration but certifies no platform and device combination and does not cover non-Linux kernels. Results of one port cannot be carried over as a guarantee for another device. The install commands use symbolic links, and `-f` must not be added to get past a collision.
How to disable. Delete the symbolic links to the skill and commands from `~/.claude/skills/` and `~/.claude/commands/`, then the `~/.agents/skills/linux-phone-porting` folder. Keep device backups separately.
FAQ
How do I install the skill?
Clone the repository: `git clone https://github.com/angelwzr/linux-phone-porting ~/.agents/skills/linux-phone-porting`. Then link the skill into `~/.claude/skills/` and `commands/*.md` into `~/.claude/commands/`.
Can I ask the agent to install it?
Yes. The README has a ready prompt: it asks to clone into an unused directory and create symbolic links after inspecting the content.
How do I update the skill?
With `/linux-phone-porting-update` between hardware sessions. The installed copy must stay free of local edits, and development belongs in a separate clone.
What are the four phases?
Setup with a backup, evidence capture from the device, source research and a fix implemented one variable per experiment.
Are extra skills required?
No, there are no hard dependencies. The skill calls `linux-kernel-development`, `find-docs`, `wigolo` and `graft` by name and falls back to plain tools without them.
Discussion
No questions or reviews yet.
Related
Skills24 skills for microcontroller firmware: build, flash, GDB debugging, UART, Modbus, CAN, logic analyzers and static analysis
Over 140 skills for systems programming: compilers, debuggers, profilers, firmware, the Linux kernel and binary analysis.
A Claude Code skill for designing PCBs, CAD and firmware as code that writes fab files only after every gate passes
Claude Code skills and a Raspberry Pi testbench: the agent writes ESP32 firmware, flashes the board and tests it on hardware
A cleanup skill for agent-written code: finds surplus tests, self-checks and fallbacks and deletes them, keeping behavior
Embedded Skills
embeddedskills
Skills for embedded development: AI drives compilers, debuggers (J-Link and others) and buses (CAN) from code to hardware checks. README in Chinese and English
README in short
The README explains why order matters, compares work with and without the skill and describes installation, phases and commands. The recommended folder structure, paired skills and a cost note follow.