DoMagic turns one Android phone into a rooting tool for another. Instead of needing a PC, you use an emitter phone (with DoMagic installed) to patch and flash a receiver phone connected via USB.
Under the hood it uses Magisk's own magiskboot binary to patch the boot image, and flashes it via Fastboot — all from your phone.
[Emitter phone — DoMagic installed]
│
│ USB cable
▼
[Receiver phone — gets rooted]
- Connect the receiver to the emitter via USB
- DoMagic detects the device over ADB and shows its info
- You select the stock
boot.imgfor your receiver (downloaded separately) - DoMagic patches it locally using Magisk's
magiskboot - Reboots the receiver into fastboot and flashes the patched image
- Receiver reboots — rooted ✅
Emitter phone (this app)
- Android 8.0+
- USB Host / OTG support
Receiver phone (the one getting rooted)
- ADB debugging enabled
- Bootloader must be unlocked before using DoMagic
- Not a Samsung device (see below)
You will need
- A USB-OTG or USB-C to USB-C cable
- The stock
boot.imgfor the receiver's exact build number (download from the manufacturer or your ROM's official source)
Samsung devices use their own proprietary flashing system (Odin) combined with Knox security. DoMagic does not support Samsung. To root a Samsung device you need a PC with Odin or Heimdall.
DoMagic includes a community section powered by Firebase Realtime Database where users can share boot image download links for their devices. If your device's boot.img is already there, you can grab the link directly from the app.
Want to contribute? Open the Community tab → Upload → fill in your device info and paste an external download link (Google Drive, Mega, MediaFire, etc.).
- Android Studio Hedgehog or newer
- A Firebase project with Realtime Database enabled (free Spark tier works)
1. Clone the repo
git clone https://github.com/jzadl/DoMagic.git
cd DoMagic2. Add google-services.json
Create a Firebase project at console.firebase.google.com, add an Android app with package name com.domagic, and place the downloaded google-services.json inside the app/ folder.
3. Add Magisk binaries
Download the latest Magisk APK from Magisk releases, rename it to .zip and extract it. Then copy:
lib/arm64-v8a/libmagiskboot.so → app/src/main/assets/arm64-v8a/magiskboot
lib/arm64-v8a/libmagiskinit.so → app/src/main/assets/arm64-v8a/magiskinit
lib/x86_64/libmagiskboot.so → app/src/main/assets/x86_64/magiskboot
lib/x86_64/libmagiskinit.so → app/src/main/assets/x86_64/magiskinit
assets/stub.apk → app/src/main/assets/stub.apk
4. Add a static fastboot binary for ARM64
Grab one from AndroidIDEOfficial/platform-tools releases and place it at:
app/src/main/assets/fastboot/arm64-v8a/fastboot
5. Build
Open the project in Android Studio and hit Run, or:
./gradlew assembleDebug| Component | Library |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose + Material 3 |
| ADB communication | dadb |
| Boot image patching | Magisk magiskboot (GPL-3.0) |
| Community database | Firebase Realtime Database |
| Navigation | Jetpack Navigation Compose |
This is an experimental alpha. Core functionality is implemented but not yet tested on real hardware. Contributions, testing reports, and PRs are very welcome.
- UI screens (intro, connect, device info, patch, flash, community)
- ADB device detection via dadb
- Magisk boot image patching pipeline
- Fastboot flash flow
- Community boot image database
- Real hardware testing
- Automatic boot.img lookup by build number
- Proper error recovery
Rooting may void your warranty and can brick your device if something goes wrong. Use at your own risk. The authors are not responsible for any damage caused by using this tool.
DoMagic is licensed under the AGPL-3.0 license.
This project uses code from Magisk by topjohnwu, licensed under GPL-3.0.