• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Restoring from backup, confused about the files I have

Simple Echo

Newbie
Oct 4, 2010
16
5
I'm a bit confused on how to do this. I followed the XDA root guide, and used unrevoked to root my phone. First thing I did was make a backup, it gave me a clockworkmod folder with various .img files in it. boot.img, cache.img, and data.img just to name a few. Do I just put these folders in a zip file to install it?

Sorry if this is a stupid question, I just don't want to brick my phone. I tried doing a search, but most of the time this question seems to go unanswered.

Meh, nevermind I just figured it out after posting this. :p
 
  • Like
Reactions: Mr. Ed
Congrats on rooting :). So, when you make a backup, it creates .img files for each partition it backs up. Those img files can only be restored using the same recovery that they were created in (Don't try to restore them in Amon RA, for example). Once the backup is created, just leave it alone the way it is. You're welcome to copy backups to your computer, but don't mess with the structure. Simply copy the entire directory with all the .img files in them. When it comes time to restore a backup, if you need to, all you need to do in Clockwork is select the option restore a backup. It will give you a list of previous backup, where you'll be able to select that backup. Do not zip up the files or anything. This is not the same as a flashable package in zip format. That is different.
 
  • Like
Reactions: Simple Echo
Upvote 0
Thank you for explaining this, it made me a little more comfortable with this backup and restore system.

No problem :). If you have any other questions, let me know. Just so you understand the difference even better, a nandroid backup is basically a complete snapshot of your phone the way it is now. Recovery has the ability to copy the entire contents of the phone while the OS isn't running. It packages everything up in its own format, with the .img extension. When you're ready to restore, recovery knows where to look without you changing anything.

A flashable zip, on the other hand, is completely different, and uses a different process. These files have nothing to do with backup. Basically, it's a set of files (can be any files you want, but typically system files), along with a script. Recovery reads the script so it knows what to do with the packaged files. Usually it's used for flashing ROMs, mods, etc. Just remember, the restore option for nandroid and flashing zips are two completely different processes using different formats.
 
  • Like
Reactions: Simple Echo
Upvote 0
Above is quite useful, although had another question or two. Do I need to be running the same rom [as the nandroid backup] when I restore or can I be running... say miks and restore a myn backup? Also does anything need to be wiped before a backup can be restored? Thanks in advance.

1) Nope, the whole point of nandroid backup is to go back to a previous state no matter what you've done since the backup. Note that radio/pri/nv upgrades will not be restored. Despite that, though, any other changes to the system will be wiped out and restored with the contents of the backup. You can certainly be on mik's and restore your myn's backup.

2) The short answer is no, you don't need to wipe anything. The nandroid backup will overwrite the partitions it backed up with the contents of the backup, wiping out what was there. Here's the thing, this assumes you're doing a full backup/restore, as in, all normal partitions (boot, system, data, cache...). If you don't include cache, for example, it would be smart to wipe it first. For the most part, don't worry about. That being said, if you're the paranoid type, it certainly can't hurt to wipe first. It takes all of a minute, tops.
 
Upvote 0
1) Nope, the whole point of nandroid backup is to go back to a previous state no matter what you've done since the backup. Note that radio/pri/nv upgrades will not be restored. Despite that, though, any other changes to the system will be wiped out and restored with the contents of the backup. You can certainly be on mik's and restore your myn's backup.

So... even if backup was made after those changes [upgraded radios]... it still won't keep radios? Without getting too technical, why doesn't that work? Or is similar with how custom kernels are "erased" when you flash a new rom?
 
Upvote 0
Nandroid backup only restores things on internal storage such as your ROM, kernel, data, etc. Of course, RA and CW now give you the option of doing a full restore, or restoring only certain partitions. That being said, the radios firmware is lower than that, and not something stored on internal storage, necessarily. If nothing else, it's not something affected by wiping and restoring anything on any of the partitions that recovery affects during a nandroid backup/restore. So, if you make a nandroid backup, update radios, restore than nandroid backup, you'll have an older ROM with newer radios. In the case of the most recent OTA, if you do that, you'll most likely end up with an unbootable ROM, assuming you were using the stock kernel. You can:

a) restore the nandroid backup and downgrade at least your radio and PRI
b) restore the nandroid backup, downgrade at least PRI, and flash a custom kernel

That should at least make the nandroid backup bootable. As a general rule, make sure everything works after updating radios (4g, for example, is something you should check right away), save your nandroid backups just in case, but don't expect to actually go back to them often unless you must.
 
  • Like
Reactions: fmalcolmr
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones