When you’re rooting, flashing custom ROMs, and otherwise playing with Android’s system, there are a lot of things that can go wrong. Before you start, you should know how to back up and restore your phone with the TWRP recovery environment.
If you’re here, you’ve probably already read our guides on how to unlock your bootloader and install TWRP recovery. If you haven’t, you’ll need to perform both of those tasks first–this is a guide on how to use TWRP once you have it up and running.
TWRP makes “nandroid” backups, which are near-complete images of your system. Instead of using them to restore individual files or apps, you use nandroid backups to restore your phone to exactly the state it was in when you backed up: the version of Android, your wallpaper, your home screen, right down to which text messages you had left unread.
That means nandroid backups won’t work if you’re only trying to restore certain elements. If you want to restore the apps from your old ROM onto your new ROM, for example, you’ll need to use something like Titanium Backup instead. TWRP is meant to back up and restore the entire system in full.
How to Make a Nandroid Backup in TWRP
Whenever you start messing with Android’s system–rooting, flashing custom ROMs, and so on–you should first make a nandroid backup in TWRP. That way, if anything goes wrong, you can restore your phone to its pre-broken state.
To do so, boot into TWRP recovery. Doing this is a bit different on every phone–for example, you may have to hold the Power and Volume Down buttons simultaneously, then use the volume keys to boot “Recovery Mode”. Google instructions for your specific model to see how it’s done.
Once you’ve done so, you’ll be greeted with the familiar TWRP home screen. Click the Backup button.
The following screen will appear. Tap the “Name” bar at the top to give the backup a recognizable name. I usually use the current date and what I was doing when I backed up–like
2016-01-25--pre-cyanogenmod. Check the Boot, System, and Data boxes, and then swipe the bar along the bottom to back up.
NOTE: Backups are fairly large, so if you get an error about there not being enough space, you may have to delete some things on your internal storage or SD card before continuing.
If TWRP asks if you want to root your phone, choose “Do Not Install”. It’s best to flash the latest version of SuperSU yourself rather than having TWRP do it for you.
How to Restore from a Nandroid Backup in TWRP
If you ever need to restore from a previous backup, it’s simple. Boot back into TWRP, and tap the “Restore” button on the home screen.
TWRP will show you a list of your previous backups. Tap the one you want and you’ll see the following screen. Make sure all the boxes are checked and swipe the bar to restore.
Once again, if it asks you to root, be sure to tap “Do Not Install”.