Skip to content

Backing up your device

Langsdorff edited this page Oct 23, 2026 · 1 revision

This backs up the partitions of your current ROM, not the full firmware. Partition names differ between devices, read the whole page before running anything. Flashing your stock firmware is the safer way back, if it is available for your device.

The commands need root: run them from a custom recovery (TWRP/OrangeFox, adb is root there) or from a rooted ROM (wrap them as su -c '...').

1. List partitions and the active slot

adb shell ls /dev/block/by-name/
adb shell getprop ro.boot.slot_suffix

Empty slot output means an A-only device. Otherwise note the suffix (_a or _b) and use it for every partition except super.

2. Dump partitions to your PC

Images are written straight to the PC, so they don't need free space on the device. super is several GB.

adb exec-out cat /dev/block/by-name/boot_a > boot_a.img
adb exec-out cat /dev/block/by-name/init_boot_a > init_boot_a.img
adb exec-out cat /dev/block/by-name/vendor_boot_a > vendor_boot_a.img
adb exec-out cat /dev/block/by-name/dtbo_a > dtbo_a.img
adb exec-out cat /dev/block/by-name/vbmeta_a > vbmeta_a.img
adb exec-out cat /dev/block/by-name/vbmeta_system_a > vbmeta_system_a.img
adb exec-out cat /dev/block/by-name/super > super.img

Replace _a with your active slot, or drop the suffix on A-only devices. Partitions that don't exist on your device (init_boot, vendor_boot, recovery, dtb and others vary) fail without causing damage. Look up which partitions your device uses before you start.

3. Verify

Compare the checksum on the device with the one of the file on your PC:

adb shell md5sum /dev/block/by-name/boot_a
md5sum boot_a.img        # Linux
md5 boot_a.img           # macOS

Keep the checksums next to the images.

Clone this wiki locally