Adaptive Treble-style GSI generator β produces a portable system.img from any Android ROM.
Aurora Porter is a pure system-image generator that takes a stock ROM (for vendor expectations) and a target ROM (for framework), and generates a single Treble-compatible system.img that boots on the stock device vendor.
Aurora Porter thinks like Project Treble, not like a ROM kitchen.
| Keeps from stock device | Replaces with target framework |
|---|---|
| vendor partition | /system |
| kernel & boot image | (untouched) |
| firmware & HALs | (untouched) |
| vendor_boot / dtbo / vbmeta | (untouched) |
| ODM hardware stack | (untouched) |
Aurora Porter never touches vendor, boot, kernel, firmware, or hardware layers. It only re-packs the Android framework layer β the part you actually want to change.
# Prerequisites: Python 3.12+, Linux/WSL2
# Required external tools: mkfs.erofs / mke2fs + e2fsdroid
# Install
pip install aurora-porter
# Generate a GSI
aurora-porter stock-ROM.zip custom-ROM.zip
# Output: workspace/output/system.img| Flag | Description |
|---|---|
--debug |
Verbose debug output |
--permissive |
Build with permissive SELinux |
--clean |
Clean workspace before starting |
--keep-workspace |
Keep workspace after completion |
--analyze-only |
Analyze only, don't build |
stock ROM target ROM
β β
extract vendor extract framework
expectations β
(SELinux, VINTF, sanitize hardware
HAL configs, bindings
OEM quirks) β
β rewrite properties
ββββββββββββββββββΊ inject overlays
β merge SELinux
β resolve VNDK deps
β β
β build system.img
β (EROFS / EXT4)
βΌ
ONE portable system.img
| Phase | Name | What happens |
|---|---|---|
| 0 | Intake | Parse both ROM ZIPs, detect metadata (API level, arch, OEM) |
| 1 | Analysis | Compare compatibility, analyze vendor/VINTF/APEX structure |
| 2 | Extract Framework | Extract system/system_ext/product from target, merge tree |
| 3 | Sanitize | Remove hardware bindings, rewrite props, inject overlays |
| 4 | Analyze Libraries | Check VNDK/LL-NDK dependency compatibility |
| 5 | Build | Repack merged tree as EROFS or EXT4 system.img |
aurora/
βββ cli/main.py # Click CLI, 6-phase pipeline
βββ core/ # Base classes, config, exceptions
βββ engines/ # Processing engines
β βββ intake.py # RomIntakeEngine
β βββ payload.py # PayloadExtractionEngine
β βββ filesystem.py # FilesystemEngine (mount, extract)
β βββ gsi_repack.py # GSIRepackEngine (system.img builder)
β βββ elf_analyzer.py # ELF dependency scanner
β βββ shared_lib.py # VNDK/LL-NDK dependency analyzer
β βββ hal_sanitizer.py # Hardware binding sanitizer
β βββ bootloop.py # Boot diagnostics
βββ analyzers/ # Analysis modules
β βββ rom_analyzer.py # Stock vs target comparison
β βββ vendor.py # Stock vendor structure analysis
β βββ vintf.py # VINTF manifest analysis
β βββ apex.py # APEX container analysis
βββ patchers/ # Adaptation engines
β βββ selinux.py # SELinux policy merging
β βββ props.py # GSI property rewriting
β βββ overlay.py # RRO overlay injection
β βββ auto_patch.py # Orchestrated patch pipeline
βββ profiles/ # OEM knowledge base
β βββ oem.py # Samsung, Xiaomi, OnePlus, Google profiles
β βββ quirks.py # Chipset-specific workarounds
βββ plugins/ # Plugin system
βββ utils/ # Helpers, subprocess, Android constants
The only artifact is:
output/system.img
Optionally (based on detected compatibility):
output/system-erofs.img
output/system-ext4.img
output/system-sparse.img
Any Treble-compatible Android device (Android 8.0+ with Project Treble).
| Vendor | Status | Notes |
|---|---|---|
| Reference | Acts as official GSI baseline | |
| Samsung | Supported | RKP/CFP must be disabled in kernel |
| Xiaomi | Supported | MIUI-specific overlay adaptation |
| OnePlus | Supported | Alert Slider and FOD workarounds |
| Nothing | Experimental | Minimal testing |
| Huawei | Unsupported | Kirin bootloader restrictions |
GPL-3.0-only