Automated GitHub Actions workflow to build Treble GSIs for multiple ROMs across Android 10-16. No code editing requiredβjust select, run, and build.
This workflow supports the following ROMs via a simple dropdown menu:
- LineageOS 𧬠(Android 10-16)
- crDroid π€ (Android 10-16)
- DerpFest π€ (Android 11-16)
- Evolution X π₯ (Android 10-16)
- PixelOS π± (Android 12-16)
- ArrowOS πΉ (Android 11-16)
- RisingOS π (Android 13-16)
- Project Elixir βοΈ (Android 12-16)
- Corvus OS π¦ (Android 11-14)
- Cherish OS π (Android 11-14)
- Awaken OS π (Android 12-14)
- PixelExperience πΈ (Android 10-14)
- Havoc OS π₯ (Android 10-13)
- AOSP π€ (Android 10-16)
- Custom (Any other AOSP-based ROM)
.
βββ .github/
β βββ workflows/
β βββ build.yml # Main workflow file
βββ scripts/
β βββ utils.sh # Utility functions & progress bars
β βββ setup-environment.sh # Environment setup
β βββ set-java-version.sh # Java version configuration
β βββ configure-rom.sh # ROM manifest configuration
β βββ sync-source.sh # Repository sync with progress
β βββ setup-treble.sh # Treble environment setup
β βββ setup-ccache.sh # ccache configuration
β βββ build-gsi.sh # Main build script with progress
β βββ package-output.sh # Compression & packaging
β βββ build-summary.sh # GitHub summary generation
β βββ telegram-notify.sh # Telegram notifications (optional)
βββ README.md # This file
The workflow is modular - each script handles a specific phase of the build process with visual progress indicators and detailed logging.
| Script | Purpose | Key Features |
|---|---|---|
utils.sh |
Common functions | Progress bars, colored output, timers, retry logic |
setup-environment.sh |
Install dependencies | Package installation with progress tracking |
set-java-version.sh |
Configure Java | Auto-selects Java 8/11/17 based on Android version |
configure-rom.sh |
Set ROM source | Validates and configures manifest URL |
sync-source.sh |
Download sources | Repo sync with progress display and retry |
setup-treble.sh |
Treble setup | Detects ROM type and runs generation scripts |
setup-ccache.sh |
Configure cache | Sets up build cache for faster rebuilds |
build-gsi.sh |
Main build | Compiles GSI with real-time ninja progress |
package-output.sh |
Compress & package | Creates compressed image and build info |
build-summary.sh |
Generate report | Creates GitHub Actions summary |
telegram-notify.sh |
Send notifications | Sends Telegram alerts on success/failure (optional) |
- π Real-time Progress Bars: Visual progress indicators for all major build phases
- π¨ Color-Coded Output: Easy-to-read colored console output
- β±οΈ Time Tracking: Automatic timing for each build phase
- π Automatic Retry: Smart retry logic with exponential backoff
- πΎ Build Caching: Optional ccache support for faster rebuilds
- π Detailed Logs: Comprehensive logging with automatic error capture
- π¦ Auto-Packaging: Automatic compression and build info generation
- π± Telegram Notifications: Get instant notifications on build success/failure (optional)
- Fork this repository to your account.
- Go to the Actions tab.
- Select Universal Treble GSI Builder and click Run workflow.
- Fill in the options (see the guide below) and click the green button.
- Wait for the build to finish (usually 1-4 hours) and grab the artifact.
Get instant notifications when your builds complete!
Quick Setup (5 minutes):
- Create a bot via @BotFather
- Get your Chat ID via @myidbot
- Add secrets to your repository:
TELEGRAM_BOT_TOKEN- Your bot token from BotFatherTELEGRAM_CHAT_ID- Your chat ID
- Send
/startto your bot - Done! You'll get notifications on every build
For detailed setup instructions, see TELEGRAM_SETUP.md
Notifications include:
- β Build success with download link
- β Build failure with error details
- π Automatic error log file attachment
- β±οΈ Build duration and details
- π Direct link to workflow
The workflow provides real-time visual feedback:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Setting Up Build Environment
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[ββββββββββββββββββββββββββββββββββββββββββββββββ] 100% - Installing dependencies
β All dependencies installed successfully
β Environment setup completed in 3m 24s
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Starting Compilation
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[ββββββββββββββββββββββββββββββββββββββββββββββββ] 42% (1247/2956) Building...
Each phase shows:
- Progress bars with percentage completion
- Current/total tasks where applicable
- Elapsed time for each phase
- Color-coded success/error messages
The build process follows these phases:
1. βοΈ Setup Environment (3-5 min)
ββ Install dependencies, configure tools
2. β Configure Java (< 1 min)
ββ Auto-select correct Java version
3. π§ Configure ROM Source (< 1 min)
ββ Set manifest URL
4. π₯ Sync Repository (30-90 min)
ββ Initialize repo
ββ Clone Treble manifests
ββ Sync all sources
5. π¨ Setup Treble (< 1 min)
ββ Generate device configs
6. πΎ Setup ccache (< 1 min) [Optional]
ββ Configure build cache
7. ποΈ Build GSI (1-3 hours)
ββ Source environment
ββ Configure target
ββ Compile system image
8. π¦ Package Output (5-15 min)
ββ Compress image
ββ Generate build info
9. β
Upload Artifacts
ββ Save to GitHub
Each phase includes automatic retry logic and detailed error reporting.
Refer to the table below to fill out the form correctly. The most important part is matching the ROM Branch with the correct Treble Manifest Branch.
| Field Name | Description & Tips |
|---|---|
| Choose ROM Base | Select your ROM from the list. If your ROM isn't listed, choose Custom and paste the manifest URL in the next field. |
| Custom Manifest URL | Only required if you selected Custom. Paste the full Git repository URL (e.g., https://github.com/RisingTechOSS/android). |
| ROM Branch | The specific version/branch of the ROM. Examples: lineage-22.0, 15.0, fourteen, thirteen, tiramisu, fenix. |
| Treble Manifest Branch | Must match the Android version of the ROM branch. Common mappings: β’ Android 16 β android-16.0β’ Android 15 β android-15.0β’ Android 14 β android-14.0β’ Android 13 β android-13.0β’ Android 12/12.1 β android-12.1β’ Android 11 β android-11.0β’ Android 10 β android-10.0 |
| Lunch Variant | The target architecture and build type. Common options: β’ treble_arm64_bvN-userdebug (64-bit A/B with VNDKLite)β’ treble_arm64_bgN-userdebug (64-bit A-only with VNDKLite)β’ treble_a64_bvN-userdebug (32/64-bit A/B)β’ treble_arm64_bvS-userdebug (64-bit A/B Slim variant) |
| Android Version | Treble Branch | Common ROM Branch Names |
|---|---|---|
| Android 16 | android-16.0 |
16.0, lineage-23.0, sixteen, baklava |
| Android 15 | android-15.0 |
15.0, lineage-22.0, fifteen, udc |
| Android 14 | android-14.0 |
14.0, lineage-21.0, fourteen, upside-down-cake |
| Android 13 | android-13.0 |
13.0, lineage-20.0, thirteen, tiramisu |
| Android 12.1 | android-12.1 |
12.1, lineage-19.1, twelve-plus, snow-cone |
| Android 12 | android-12.1 |
12.0, lineage-19.0, twelve, snow-cone |
| Android 11 | android-11.0 |
11.0, lineage-18.1, eleven, red-velvet-cake |
| Android 10 | android-10.0 |
10.0, lineage-17.1, ten, quince-tart |
Here are some common configurations to help you get started:
- Choose ROM Base:
LineageOS - ROM Branch:
lineage-23.0 - Treble Manifest Branch:
android-16.0 - Lunch Variant:
treble_arm64_bvN-userdebug
- Choose ROM Base:
LineageOS - ROM Branch:
lineage-22.0 - Treble Manifest Branch:
android-15.0 - Lunch Variant:
treble_arm64_bvN-userdebug
- Choose ROM Base:
crDroid - ROM Branch:
14.0 - Treble Manifest Branch:
android-14.0 - Lunch Variant:
treble_arm64_bvN-userdebug
- Choose ROM Base:
PixelOS - ROM Branch:
fourteen - Treble Manifest Branch:
android-14.0 - Lunch Variant:
treble_arm64_bvN-userdebug
- Choose ROM Base:
Evolution X - ROM Branch:
tiramisu - Treble Manifest Branch:
android-13.0 - Lunch Variant:
treble_arm64_bvN-userdebug
- Choose ROM Base:
RisingOS - ROM Branch:
fifteen - Treble Manifest Branch:
android-15.0 - Lunch Variant:
treble_arm64_bvN-userdebug
- Choose ROM Base:
Custom (Input URL manually) - Custom Manifest URL:
https://github.com/yaap/manifest - ROM Branch:
fifteen - Treble Manifest Branch:
android-15.0 - Lunch Variant:
treble_arm64_bvN-userdebug
Choose the correct variant based on your device architecture:
| Variant | Architecture | Partition | VNDK | Description |
|---|---|---|---|---|
treble_arm64_bvN |
ARM64 only | A/B | Lite | Most modern devices (Recommended) |
treble_arm64_bgN |
ARM64 only | A-only | Lite | Older devices with single system partition |
treble_a64_bvN |
ARM32/64 | A/B | Lite | Devices with 32-bit app support |
treble_arm64_bvS |
ARM64 only | A/B | Slim | Minimal variant, smaller size |
treble_arm_bvN |
ARM32 only | A/B | Lite | Very old 32-bit devices (rare) |
Note: Always use -userdebug suffix for GSI builds (e.g., treble_arm64_bvN-userdebug).
For detailed troubleshooting, see TROUBLESHOOTING.md.
"remote github already exists with different attributes"
- β Now automatically handled by the sync script
- Script removes conflicting manifests and cleans remotes
- If still fails, the issue is with the ROM's manifest structure
- Try: Use a different ROM branch or see TROUBLESHOOTING.md
Build Fails During Sync
- Check if the ROM branch name is correct by visiting the ROM's GitHub repository
- Verify the manifest URL is accessible
- Some ROMs may have renamed their branches recently
- Download the error logs artifact from the failed workflow
- Common issues:
- Insufficient disk space (workflow automatically clears space, but very large ROMs may still fail)
- Missing dependencies for specific Android versions
- ROM-specific build requirements not met
- Always verify the Android version of your chosen ROM branch
- Check the ROM's official documentation or GitHub tags
- When in doubt, check the ROM's
build/core/version_defaults.mkfile in their repository
After forking this repository, the structure should look like:
your-repo/
βββ .github/workflows/build.yml
βββ scripts/
β βββ utils.sh
β βββ setup-environment.sh
β βββ set-java-version.sh
β βββ configure-rom.sh
β βββ sync-source.sh
β βββ setup-treble.sh
β βββ setup-ccache.sh
β βββ build-gsi.sh
β βββ package-output.sh
β βββ build-summary.sh
βββ README.md
Important: Make sure all scripts in the scripts/ directory are present. The workflow will automatically make them executable.
- Once the workflow completes, scroll to the Artifacts section at the bottom.
- Download the zip file (named
gsi-[ROM]-[branch]). - Extract the zip to find
system.img.xz. - Decompress the image:
xz -d system.img.xz
- Flash the resulting
system.imgto your device using fastboot:fastboot flash system system.img
Important Notes:
- Ensure your device supports Project Treble (check with Treble Check app)
- Your bootloader must be unlocked
- Back up your data before flashing
- Some ROMs may require additional steps (wiping data, formatting partitions)
- Telegram notifications are optional - if you don't set them up, the workflow works normally
While these are generic GSIs, you can optimize for your device by:
- Choosing the correct architecture variant (arm64 vs a64)
- Selecting A/B vs A-only based on your partition scheme
- Using slim variants for devices with limited storage
The workflow includes standard flags, but you can fork and modify to add:
BOARD_VNDK_VERSIONoverrides- Custom kernel configurations
- Additional ROM-specific flags
- Maximum build time: 6 hours (GitHub Actions limit)
- Disk space: ~80GB available (very large ROMs may fail)
- Some ROMs with heavy customization may not build successfully
- Android versions older than 10 are not officially supported
- Android 16 Note: As a new release, some ROMs may not have stable Android 16 branches yet. Check the ROM's GitHub repository for availability.
- phhusson for the original Treble work
- TrebleDroid for maintaining the device manifests
- All the respective ROM maintainers for their great code
- GitHub Actions for free CI/CD infrastructure
Found a ROM that doesn't work? Have suggestions for improvements?
- Open an issue with details about the ROM and error logs
- Submit a pull request with fixes or new ROM additions
- Share your successful builds and configurations
This project is licensed under GPL-3.0. See individual ROM projects for their respective licenses.
Happy Building! π