Skip to content

programmersd21/aurora-porter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Aurora Porter

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.


Philosophy

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.


Quick Start

# 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

Options

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

Internal Pipeline

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

6 Phases

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

Architecture

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

Output

The only artifact is:

output/system.img

Optionally (based on detected compatibility):

output/system-erofs.img
output/system-ext4.img
output/system-sparse.img

Compatible Devices

Any Treble-compatible Android device (Android 8.0+ with Project Treble).

Vendor Status Notes
Google 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

Research & Design


License

GPL-3.0-only

About

πŸ’šThe One-Command Adaptive Android ROM Universalizer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages