We may often come across a line saying, Always Backup before proceeding while reading an Android guide on flashing. Having a Backup of Current/Working ROM is an important thing if you are an Android modder. Read out, to Know how to do a Backup yourself using TWRP backup.
What should I backup in TWRP Backup:
The mandatory backup options of TWRP includes system, and boot. Data is optional if you want to backup your existing apps and app data. For most cases, these three components are sufficient for backing up a ROM. If your device has an option, backing up to an external sd card is a good idea. There’s usually no reason to backup cache. Some devices have “special partitions” like pds, efs, etc. It’s usually a good idea to include these partitions as they are relatively small in size.
Partitions to select:
- System, Boot – Mandatory, must be included.
- Data, recovery, Cache, – Optional, they include personal data and apps and the backup takes up more storage.
- Special partitions like Modem, pds, efs, – Present only in few devices, recommended including them. They contain few important details such as IMEI number and other device details.
- There are also few additional options like encryption, where we can protect a backup with password.
- Enable compression for the options to reduce the backup size of the file. It is an extremely useful feature and decreases the backup size by almost half.
Points to Remember:
- TWRP backups are Nandroid backups, stating that you can select from the images (system, boot, and data) available in the backup and you simply cannot restore a specific part from the backup image. (ex: a few apps or photos from the data partition.)
- You can change the Storage locations and default name of Backup from the settings.
- Backup files will be large and we recommended having a free space around 5GB. TWRP has introduced a new feature, to directly backup the files over a USB Cable to your PC. Alternatively, you can transfer the Files to your PC after a backup and restore them when needed.
Steps to backup your ROM using TWRP backup:
- Reboot your device into TWRP Recovery.
- Select the Backup Option from the main menu.
- Select the partitions to backup. If, still you are not sure which one to select, leave the default selections, as they are.
- Swipe right and wait till the process is completed and then reboot the device.
Steps to restore your ROM from TWRP backup:
- In Twrp recovery, select restore.
- Navigate to the TWRP backup file present on the device.
- select the partitions to restore and confirm the flashing.
- This will restore back the partitions and previous data.
System v/s System Image Backup:
Starting with Android 6.0 and above, Google has enabled the dm-verity as a security measure by default. This prevents TWRP from its ability to successfully restore a normal system backup and in this case, system image backups are useful. (If you are a beginner and quite unable to understand these, just move with normal system backup, and most of the times it should work.)
A system image backup is a bit-perfect and takes up more space. But, when restored, will not break dm-verity. So, If you need a perfect backup to go back to complete stock ROM with OTA updates then you should be using System Image and Vendor Image (when available) instead of normal system backup.