# Android ROM Partition Repack & Unpack (RomTools)

> Teach an AI agent to safely unpack and repack Android partitions with RomTools — EROFS, ext4, F2FS and boot images, with strict output hygiene.

Android ROM Partition Repack & Unpack (RomTools) is a free AI agent skill on Agensi by ryanistr, in Mobile Development. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [ryanistr](https://www.agensi.io/creators/ryanistr)
- Category: [Mobile Development](https://www.agensi.io/skills/mobile-development)
- Version: 1.0
- Last updated: 2026-11-29
- Security: scan passed (2026-11-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/android-rom-partition-repack-unpack-romtools
- Tags: mobile-development, devops-cloud, agents-orchestration, prompt-skill-engineering

## About this skill

A self-contained skill plus a local stdio MCP server for the menu-based RomTools CLI. It gives your agent the full, non-negotiable workflow for repacking unpacked Android partitions (EROFS, ext4, F2FS), unpacking images, and unpacking/repacking boot, vendor_boot and recovery images with cfig/bbootimg.

The judgement rules are baked in: resolve the project before any write and ask when the name is vague, honor an explicit target filesystem instead of defaulting to EROFS, list custom scripts before using one, autogenerate fs_config/file_contexts and validate only newly added contexts against sepolicy, keep unpacked trees under ROM_WORKDIR, write packed images only to the RomTools output directory, produce signed boot images by default, and clean up scratch files.

The bundled dependency-free Node.js MCP server replaces long shell pipelines with typed discovery, config and execution calls, and refuses repack/unpack until a project has been selected. The skill also documents the manual shell fallback when no MCP is available.

Setup note: the skill was written against an install rooted at /mnt/project/RomTools. Your agent should re-point those example paths to your actual RomTools root before use. The README's bootstrap prompt in the source repo covers that step.

## Requires

- RomTools CLI installed
- Node.js (for the optional MCP server)
- Git

Re-point the example /mnt/project/RomTools paths in the skill to your own install root before use. Unpacked partition trees under ROM_WORKDIR.

## Known limitations

Written against a RomTools install rooted at /mnt/project/RomTools; paths must be re-pointed to your install. It does not download ROMs, patch sepolicy source, flash devices, or create projects without explicit confirmation.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Android ROM Partition Repack & Unpack (RomTools) skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Do I need a connected Android device?

No. Repacking and unpacking are host-side; the device-related skill is separate and not bundled here.

### Does it work without the MCP server?

Yes. SKILL.md documents the manual shell flow as a fallback; the MCP is optional but recommended.

### Will it guess my project name?

No. It lists the projects and asks you to choose when the name is vague or ambiguous.

### Can it produce unsigned boot images?

Only if you explicitly ask. By default it stops and reports if a signed image cannot be produced.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
