-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
ADB (Android Debug Bridge) serves as a communication interface between a computer and an Android device. It is used for debugging and file transfer.
Fastboot is a command-line tool for the Android device bootloader, allowing custom firmware and other system images to be flashed.
Both tools are highly useful for developers and advanced users when it comes to modifying and diagnosing Android devices.
The bootloader is a program that loads the operating system when an Android device starts and verifies that the software is secure and authorized.
Unlocking the bootloader bypasses this security check, enabling the installation of custom operating systems or software.
This allows flashing of custom ROMs and other image files.
Connect your device to your computer.
-
Enable Developer Options.
-
Look for Build number in the settings.
-
Tap seven times on Build number. See Build number.

-
Search for Debug in settings.
-
Enable USB debugging.
-
In USB settings, enable File transfer.
-
Use the program to check whether a connection to ADB exists.
- In the application, navigate through Restart device → Reboot into Fastboot (from ADB).
- Wait until your device enters Fastboot mode.
- Check if a Fastboot connection exists.
- Gather detailed information about your device and its chipset.
- Search for suitable custom ROMs, custom recoveries, or GSIs.
- Check whether Project Treble is supported on your device.
- Determine the partition scheme on your device (a/b devices or only-a devices).
- Back up your data locally and optionally to the cloud.
- Choose a custom ROM and download all necessary files for flashing.
- Read the developers’ instructions before flashing.
- Copy all files to be flashed into: ~/Downloads/ROM-Install/
Some information about the device can also be found under Info. See Fig. Info.

This only works if a device is connected to the computer and ADB is enabled.
Backups protect you from data loss and are recommended before any flashing process. There are two types:
- Backup with root: Partition images are copied and can later be reflashed.
- Backup without root: Open Android Backup is used. This is an open-source tool for Linux, also available for Windows.
Custom ROMs are modified versions of Android, providing additional features, performance improvements, or a different user interface.
They replace the preinstalled Android and often include newer software versions or special tweaks not offered by the manufacturer.
-
Download a custom ROM for your device.
-
Boot your device into Fastboot mode.
-
Unlock the bootloader.
-
Flash the custom recovery and boot images:
- boot.img
- init_boot.img
- vendor_boot.img
- if required: dtbo.img
-
Reboot into recovery (from Fastboot).
-
Copy the custom ROM zip to your device.
-
Tap Install and flash the zip.
- Enable ADB sideload in your recovery.
- Connect your device to your computer and copy the zip to ROM-Install.
- Under Flash: select payload.zip0. See Fig. Payload.
-
Optionally, flash Magisk (zip) or Google Services (if not included in the ROM).
-
Reboot your device.
A GSI is an Android system image that requires Project Treble (see more info).
They enable Android devices without official custom ROMs to manually run newer Android versions.
- Check if your device is Project Treble compatible.
- Download a suitable GSI.
- Prepare the images for flashing.
- Boot your device into Fastboot using the application.
- Unlock the bootloader. Some devices may not support Fastboot flashing.
Two methods exist:
- Dirty flash
- Clean flash
-
Erase all user data.
-
Flash the system image. See Fig. GSI.

-
If necessary, flash a vbmeta.img.
-
Reboot your device.
After a dirty flash, user data remains intact, but not every GSI will boot.
-
Flash the system image. See Fig. GSI.

-
Reboot your device.
It is also possible to flash the system image into the inactive slot.
Notes:
- This only works on devices with a/b partitioning.
- After flashing, you must switch to the newly flashed slot.
-
Check which slot is currently active.
-
Flash the image as described above, but into the inactive slot. See Fig. GSI.

-
Under Prepare Flash → select Set active slot and choose the inactive one.
Example:
-
active slot: b
So you must set a as active.
The recovery mode is a special boot menu on Android devices for system maintenance and recovery.
It allows functions such as factory reset, installing updates, and other basic tools to restore the system.
Custom recoveries provide far more features than stock recoveries from the manufacturer, which typically only include basic tools.
-
Check if there is a custom recovery for your device.
-
Download the matching recovery image.
-
Prepare the images for flashing.
-
Boot your device into Fastboot mode.
-
Unlock the bootloader. Some devices may not support Fastboot flashing. Research your chipset and device first.
-
Flash the recovery image with the application.
- On a/b devices, flash the recovery.img as boot.img into both slots. See Fig. Recovery in Boot.
- On a/b devices, flash the recovery.img as boot.img into both slots. See Fig. Recovery in Boot.
-
Boot your device into recovery.
Rooting Android devices grants the user superuser rights, giving full access to Android.
This allows uninstalling preinstalled apps, modifying system settings, and installing special apps that require elevated permissions.
With these powerful rights also comes significant risk, as users or apps could damage the system.
Magisk is an open-source toolkit for Android customization, including:
- MagiskSU: Provides root access for apps.
- Magisk Modules: Modify read-only partitions by installing modules.
- MagiskBoot: Comprehensive tool for unpacking and repacking Android boot images.
- Zygisk: Injects code into all Android app processes.
-
Install the Magisk APK on your device.
-
Launch Magisk and choose Install Magisk.
-
Select a Boot image (boot.img) for your device and let Magisk patch it. (Boot images are usually found online, but be careful!).
-
Copy the patched boot image to your computer.
-
Rename the image to boot.img or let the application prepare it.
-
Boot your device into Fastboot.
-
Flash the boot image for your device type. See Fig. Rooting.

-
Reboot your device. Magisk should now provide root access.