Skip to content

Sigmachan/LTBox

Repository files navigation

LTBox

🇰🇷 한국어 / 🇨🇳 简体中文

License: GPLv3 Rust Build Latest release Downloads

⚠️ Disclaimer

Educational purposes only. Modifying firmware can brick your device, cause data loss, or void your warranty. The author assumes no liability. You are solely responsible. Use at your own risk.


🚀 Quick Start

Windows Linux macOS

See Quick Start on the wiki.


📋 What Can It Do?

LTBox is a sidebar-driven desktop GUI; each entry opens a guided wizard.

Sidebar entry What it does
Dashboard Device status, region, recent folders, one-click actions
Flash Firmware One flow from region → target → wipe/keep → flash, with region conversion and rollback handled end-to-end
System Updates Disable or re-enable OTA updates; Boot Recovery revives a region-converted device that won't boot after an OTA
Root Device Root with KernelSU / KernelSU Next / SukiSU Ultra / ReSukiSU / APatch / FolkPatch / Magisk (+ forks)
Unroot Device Restore the stock boot image from an earlier root backup
Reboot Jump to System, Recovery, Bootloader, or EDL
Advanced Run individual pipeline steps by hand — see below
Settings Language (en/ko/zh/ru/ja), theme (system/light/dark), accent color, default EDL loader path

Advanced

Step-by-step manual control over the pipeline, grouped into three sections

Region/Country Edit

  • Convert Region — rewrite the vendor_boot region code (PRC ↔ ROW) and rebuild vbmeta
  • Change Country Code — dump the model's country partitions, rewrite the code, flash

AVB Image

  • Obtain Image Info — show AVB metadata for one or more .img files
  • Detect Rollback Protection — compare the rollback index on the device against the firmware
  • Bypass Rollback Protection — patch the rollback index in chained partition images
  • Rebuild vbmeta — rebuild vbmeta.img with updated hash descriptors

EDL Operations

  • Convert X to XML — decrypt .x firmware files to rawprogram .xml
  • Read / Write Partitions — dump or flash partitions by name (GPT-by-name)
  • Dump / Flash Physical Storage — dump or flash whole LUNs
  • Firmware Simple Flasher — flash only, no checks or edits (as close as possible to the stock flash script)

🏗️ Project Layout

Crate Role
ltbox-core Primitives — errors, settings, logging, HTTP clients (GitHub, nightly.link, Lenovo), crypto, XML decrypt, live-log sink
ltbox-device Transport — ADB, Fastboot, EDL / QDL, serial-port discovery, Windows Qualcomm USB driver probe + auto-install
ltbox-patch Image pipeline — AVB (bundled AOSP test-key specs), boot-image ramdisk patching, region conversion, rollback-index handling, root-provider integration
ltbox-gui iced desktop app — builds the ltbox binary (ltbox.exe on Windows)

🛠️ Troubleshooting

Crashes on launch / blank window (Windows, hybrid-GPU laptops). LTBox now defaults to the DirectX 12 renderer to avoid fragile OpenGL GPU-driver crashes. If it still won't start, launch in software safe-mode:

$env:ICED_BACKEND = "tiny-skia"; .\ltbox.exe

To force a specific GPU backend instead, set WGPU_BACKEND (e.g. vulkan, gl, dx12).


🙏 Credits


📄 License

This work is licensed under GPL-3.0-or-later.

GPLv3

About

LTBox + ltbox-tui: matrix-green ratatui front-end for Lenovo Qualcomm EDL flash/root

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors