Repository navigation
Backup critical partitions after root
Important
You SHOULD back up the critical partitions related to cellular signal and fingerprint before making any changes. If these partitions get corrupted, you can lose your IMEI, signal, fingerprint, and hardware attestation, and without a backup it may not be recoverable.
| Partition | Contains |
|---|---|
modemst1 |
IMEI |
modemst2 |
IMEI |
ocdt |
Device identifiers |
persist |
Attestation key and security items |
- A rooted device
- A terminal emulator such as Termux
- Root permission granted to the terminal emulator
Open your terminal emulator, grant it root when prompted, then copy and paste each command:
su -c dd if=/dev/block/bootdevice/by-name/modemst1 of=/sdcard/Download/modemst1.imgsu -c dd if=/dev/block/bootdevice/by-name/modemst2 of=/sdcard/Download/modemst2.imgsu -c dd if=/dev/block/bootdevice/by-name/ocdt of=/sdcard/Download/ocdt.imgsu -c dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/Download/persist.imgThe files are saved to your Downloads folder.
⚠️ Move these files to your PC (and ideally a second location such as cloud storage) for safe keeping. A backup that only lives on the phone is lost if the phone's storage gets wiped or damaged.
To pull them to your PC over ADB:
adb pull /sdcard/Download/modemst1.img
adb pull /sdcard/Download/modemst2.img
adb pull /sdcard/Download/ocdt.img
adb pull /sdcard/Download/persist.img-
Put the phone in fastbootd mode:
adb reboot fastboot
-
Flash each partition (run from the folder containing the
.imgfiles):fastboot flash modemst1 modemst1.img
fastboot flash modemst2 modemst2.img
fastboot flash ocdt ocdt.img
fastboot flash persist persist.img
-
Reboot:
fastboot reboot
- Back up before flashing custom ROMs, kernels, or modifying partitions.
- Partition names and paths can vary by device. If
/dev/block/bootdevice/by-name/doesn't exist, check/dev/block/by-name/instead. - Flash only backups taken from your own device. These partitions contain device-specific data, and using another device's images can break your IMEI and signal.
- Keep these files private. They contain unique device identifiers.
If you have some doubts still or stuck somewhere, find me on Telegram.