[Q] Nand Data Partition Restore - HTC EVO 3D

If I install an newer version of a rom, one that has had some changes to the data partition such as adds and deletes, does then restoring my most recent nand data partition over it wipe the new changes or simply combine the two? IOW, will a nand data restore keep my old data PLUS the new data from the new rom or is the new data changes simply over written by the restore?
I have been doing this for some time but now I'm faced with an updated rom with data partition changes that I would like to keep and I'm afraid that running a nand data restore will overwrite all the new rom data additions
Thanks for your assistance. A search for this subject turned up a few hits but none of them answered this question in particular.

alexv59 said:
If I install an newer version of a rom, one that has had some changes to the data partition such as adds and deletes, does then restoring my most recent nand data partition over it wipe the new changes or simply combine the two? IOW, will a nand data restore keep my old data PLUS the new data from the new rom or is the new data changes simply over written by the restore?
I have been doing this for some time but now I'm faced with an updated rom with data partition changes that I would like to keep and I'm afraid that running a nand data restore will overwrite all the new rom data additions
Thanks for your assistance. A search for this subject turned up a few hits but none of them answered this question in particular.
Click to expand...
Click to collapse
This all depends on how the custom recovery handles the data partition restore function. Most custom recoveries, CWM and TWRP are using images of the data partition as opposed to a .tar. The image of the data partition will overwrite anything previously on the partition as the process essentially copies back the full partition image made previously.
If a .tar file was being used, the .tar file could be laid on top of whatever was previously in the partition, but I don't think these are being used.
Double checked and TWRP latest open source code version is using images of the data partition opposed to .tar files. This means restoring the data partition will very likely overwrite any previously held information on the /data partition.
https://github.com/TeamWin/Team-Win-Recovery-Project/blob/master/backstore.c#L256
The best way to know for sure, make a backup and then experiment! No better answer than personal experience!
Hope that helps!

Thanks, Joey!

Related

Quick questions before I flash a rom

Hey all! I'm new to android and am ready to flash a rom. However, I am concerned that i will lose some gamesave/App data.. I have used titanium backup to backup all system and app data with the batch feature.. Can I just run the restore all feature to get everything back the way it was? Will i have to replace all my widgets?? It just seems to simple! Thanks!
Titanium backup will restore your apps and data.....and system data. It is very important that when you restore, if you have backed up any system data, do not restore that. The rom you flash will have its own system data, so you don't wan't to load your old data over that. Force close city. Just restore "user apps" and it will be just like you left it. As far as your widgets, yes, you will have to restore them. All your wifi access, wallpaper, etc is linked to your google account (if you have it checked under settings>privacy.)
another approach, slightly different, but can accomplish the same end goal is using nandroid provided in the custom recovery. i personally prefer nandroid as the source code is available online (i.e. everybody can view exactly what operations it is performing) where as titantium backup does not publish its source code.
before flashing a rom, i'd do a full nandroid backup. after you've flashed the rom, your data *should* still be intact as most ROM's are not scripted to wipe your personal data when you flash them. if for some odd reason your personal data is erased from a ROM flash, which it shouldnt, you can chose to nandroid restore just the /data partition, which is where all custom settings and user data are kept, other than a few which store on the /sdcard.
hope that makes sense and good luck!

questions about using TWRP to update a ROM without losing information

I know it's possible do restore apps and such using Titanium backup but I'm wondering if it's possible to restore using the TWRP backup?
I'm not sure what the different things do that TWRP backs up. System, cache, recovery, boot, data, (and something else). If it's possible to restore apps and such restoring from some of those, which ones?
Thanks
ItsTommyGun said:
I know it's possible do restore apps and such using Titanium backup but I'm wondering if it's possible to restore using the TWRP backup?
I'm not sure what the different things do that TWRP backs up. System, cache, recovery, boot, data, (and something else). If it's possible to restore apps and such restoring from some of those, which ones?
Thanks
Click to expand...
Click to collapse
Make sure you do a nand backup then after you flash a rom go to your nand backup and restore only the data,
This has worked for me
Sent from my EVO using xda premium
ItsTommyGun said:
I know it's possible do restore apps and such using Titanium backup but I'm wondering if it's possible to restore using the TWRP backup?
I'm not sure what the different things do that TWRP backs up. System, cache, recovery, boot, data, (and something else). If it's possible to restore apps and such restoring from some of those, which ones?
Thanks
Click to expand...
Click to collapse
josh030181 said:
Make sure you do a nand backup then after you flash a rom go to your nand backup and restore only the data,
This has worked for me
Sent from my EVO using xda premium
Click to expand...
Click to collapse
Yes, restoring only the data partition will restore both the application .apk files themselves as well as the application's data files (settings, etc). The issue is when restoring data from a different ROM, the uid/gid could mismatch and cause a boot loop. This is one of the main reasons people suggest to wipe the data before loading a new ROM. Sometimes this issue can be fixed using the script, fix_permissions, in the custom recovery.
I think using Titanium Backup might work around this permissions uid/gid issue and might be one of the reasons people chose this over a nandroid restore of just the data partition.
In regards to your other question of what the different partitions "do" which TWRP backs up, here is a rough list off the top of my head:
system (holds all the Android OS files and stock apps)
data (holds all settings and 3rd party apps)
cache (temp partition usually used to store downloaded OTAs before they are loaded)
recovery (stores the custom recovery)
boot (stores the kernel)
Hope that helps fill in some of the missing details!
joeykrim said:
In regards to your other question of what the different partitions "do" which TWRP backs up, here is a rough list off the top of my head:
system (holds all the Android OS files and stock apps)
data (holds all settings and 3rd party apps)
cache (temp partition usually used to store downloaded OTAs before they are loaded)
recovery (stores the custom recovery)
boot (stores the kernel)
Hope that helps fill in some of the missing details!
Click to expand...
Click to collapse
That does help. Thanks!

[HOWTO][GUIDE]Restore your entire data partition after updating ROM

I decided to write this guide to describe the method I’ve found to be most useful to restore my data after I've updated my ROM. I’ve discovered this method through trial-and-error for myself, and I thought it could be useful for others who are looking for an easy way to transfer all your apps, settings etc. after doing a clean ROM update.
Prerequisites to use this method
You must have root access
You must have a custom recovery (like CWM or TWRP)
You must have X-posed framework installed (http://forum.xda-developers.com/showthread.php?t=1574401)
You must have this X-posed mod that disables Play Store encryption (http://www.modaco.com/topic/361776-xmod-disable-play-store-encryption-mntasec/)
Principles behind this method
The idea behind this method is to restore your entire data partition in an easy way when you’ve done a clean ROM update, so that you get the same benefit as doing a dirty flash, except you’re doing it clean instead of dirty (some custom ROMs do not support dirty flashing).
To do this, you must ensure that all your data is actually on the data partition - this is where the X-posed mod comes into play. Normally, paid apps are put in a special encrypted folder (/mnt/asec), and thus not part of the normal /data partition, and therefore also not backed up with a backup of the data partition, but instead backup up as part of the system partition (at least this is what I think, somebody correct me if I’m wrong).
With the X-posed mod mentioned above, all apps go into /data/app instead, and are thus being backed up with the data partition. This is really handy, because you then have all your user apps in one place, instead of several different folders. This again enables you to restore only your data partition, and by that restoring all your apps, settings etc.
This also means that if you previously haven’t used this X-posed mod, you have to uninstall and reinstall all your paid apps with the X-posed mod active, so that they’re installed to /data/app instead of /mnt/asec (I’ve had to do this a couple of times).
I’ve only tried this method when updating a ROM to a later version of the same ROM (like a new build of CM), but it might also work when switching between ROMs, although this is totally untested for my part (I imagine there could be some invalid system settings getting restored, but it would be worth a try if anybody is up for it).
Step-by-step guide
Disable any set-on-boot settings that could be problematic with a new ROM/Kernel (for instance Kernel settings, themes etc).
Backup your apps and data with your backup app (Titanium or the like). This is not strictly necessary as part of the procedure, but acts as a second backup, just in case.
Boot into your custom recovery and make a Nandroid backup of your entire phone. You should do this before every ROM update anyway, and it is especially important here, as you’re later going to restore the data partition from this backup.
Now while in custom recovery, clean flash your new ROM update (factory reset/cache wipe first) - flash any kernel or Gapps as well.
Boot into Android and setup Gapps (if Gapps asks to restore your phone, you can answer no - why use the time and bandwidth to download apps again, when you can use this method?). You now have a freshly installed new system with basic Gapps settings, done as you would with any other ROM update. And now comes the good part...
Boot back into your custom recovery, and clear caches again. From backup/restore, do an advanced restore to restore only your data partition.
Boot back into Android. You will now get the screen “Android is upgrading”, while it initializes all you previous apps.
When this is done, you should basically have your old system back with the all your previous apps and system settings, including launcher, themes etc. (X-posed mods may require an extra reboot though). Some specific system settings might have been lost in translation, but I believe it’s one of the easiest way to get all your user data back, and it’s been working like a charm for me.
You could also dirty flash if your ROM supports it, but sometimes there is an update that requires a clean flash, and then this method will give you basically the same end result.
I hope somebody besides me finds this useful, as it’s been my preferred way to restore my data between updates. In this way, I only keep my app backups as a secondary backup to the data partition. Any feedback on this method is very welcome - all I can say is that it’s been working flawlessly for me so far.
:: AM ::
Reserve Q&A
ameinild said:
I decided to write this guide to describe the method I’ve found to be most useful to restore my data after I've updated my ROM. I’ve discovered this method through trial-and-error for myself, and I thought it could be useful for others who are looking for an easy way to transfer all your apps, settings etc. after doing a clean ROM update.
Prerequisites to use this method
You must have root access
You must have a custom recovery (like CWM or TWRP)
You must have X-posed framework installed (http://forum.xda-developers.com/showthread.php?t=1574401)
You must have this X-posed mod that disables Play Store encryption (http://www.modaco.com/topic/361776-xmod-disable-play-store-encryption-mntasec/)
Principles behind this method
The idea behind this method is to restore your entire data partition in an easy way when you’ve done a clean ROM update, so that you get the same benefit as doing a dirty flash, except you’re doing it clean instead of dirty (some custom ROMs do not support dirty flashing).
To do this, you must ensure that all your data is actually on the data partition - this is where the X-posed mod comes into play. Normally, paid apps are put in a special encrypted folder (/mnt/asec), and thus not part of the normal /data partition, and therefore also not backed up with a backup of the data partition, but instead backup up as part of the system partition (at least this is what I think, somebody correct me if I’m wrong).
With the X-posed mod mentioned above, all apps go into /data/app instead, and are thus being backed up with the data partition. This is really handy, because you then have all your user apps in one place, instead of several different folders. This again enables you to restore only your data partition, and by that restoring all your apps, settings etc.
This also means that if you previously haven’t used this X-posed mod, you have to uninstall and reinstall all your paid apps with the X-posed mod active, so that they’re installed to /data/app instead of /mnt/asec (I’ve had to do this a couple of times).
I’ve only tried this method when updating a ROM to a later version of the same ROM (like a new build of CM), but it might also work when switching between ROMs, although this is totally untested for my part (I imagine there could be some invalid system settings getting restored, but it would be worth a try if anybody is up for it).
Step-by-step guide
Disable any set-on-boot settings that could be problematic with a new ROM/Kernel (for instance Kernel settings, themes etc).
Backup your apps and data with your backup app (Titanium or the like). This is not strictly necessary as part of the procedure, but acts as a second backup, just in case.
Boot into your custom recovery and make a Nandroid backup of your entire phone. You should do this before every ROM update anyway, and it is especially important here, as you’re later going to restore the data partition from this backup.
Now while in custom recovery, clean flash your new ROM update (factory reset/cache wipe first) - flash any kernel or Gapps as well.
Boot into Android and setup Gapps (if Gapps asks to restore your phone, you can answer no - why use the time and bandwidth to download apps again, when you can use this method?). You now have a freshly installed new system with basic Gapps settings, done as you would with any other ROM update. And now comes the good part...
Boot back into your custom recovery, and clear caches again. From backup/restore, do an advanced restore to restore only your data partition.
Boot back into Android. You will now get the screen “Android is upgrading”, while it initializes all you previous apps.
When this is done, you should basically have your old system back with the all your previous apps and system settings, including launcher, themes etc. (X-posed mods may require an extra reboot though). Some specific system settings might have been lost in translation, but I believe it’s one of the easiest way to get all your user data back, and it’s been working like a charm for me.
You could also dirty flash if your ROM supports it, but sometimes there is an update that requires a clean flash, and then this method will give you basically the same end result.
I hope somebody besides me finds this useful, as it’s been my preferred way to restore my data between updates. In this way, I only keep my app backups as a secondary backup to the data partition. Any feedback on this method is very welcome - all I can say is that it’s been working flawlessly for me so far.
:: AM ::
Click to expand...
Click to collapse
awesome it worked for me without xposed modules cause i didnt had any paid apps. My data partition was encrypted so every time i was going to recovery i had to put password to decrypt it. But i created backup of data partition after decrypting it. Then copied all thhe internal file to the pc after that clean flashed rom with DFE , magisk , gapps. After booting into rom setting it to like new then go to my orange fox recovery clear dalvik and caches restore data partition. wollah got my encrypted data partition to decrypted partition without getting die from reinstalling apps and data.

Backup vendor in TWRP?

Hi, I'm new to the N9, I've noticed that vendor image is available for backup now in TWRP. Is it necessary to backup vendor image? Or just continue backing up boot, system and data as always.
Thanks, very much
Erik
I don't know, I noticed TWRP leaves it unchecked so I assume it doesn;t need backing up. I am interested in getting an answer too though.
The /vendor partition would only need backing up if you manually made changes to it yourself (for instance, if you use Layers). Otherwise, you can just use the vendor.img from the factory image if you need to restore /vendor
Sent from my Nexus 9

How to exclude sensitive data from nandroid backup using twrp recovery

Hello everyone,
Can I ask how do I exclude all sensitive data when I perform nandroid backup of the system and data partition of my phone using the latest TWRP recovery v3.1.1-0?
[email protected] said:
Hello everyone,
Can I ask how do I exclude all sensitive data when I perform nandroid backup of the system and data partition of my phone using the latest TWRP recovery v3.1.1-0?
Click to expand...
Click to collapse
There really isn't a way... What I would do is backup system and data, then copy all data apps you want included to the sdcard. Then factory reset. (To remove sensitive info) Skip thru the setup wizard, enable unknown sources, then backdoor the apps. (Still with no google account tied to the phone)
Next make a new backup of system and data for whoever you're sharing this with...then restore your original backup so everything is back the way you had it.
Sent from my XT1609 using Tapatalk
If you plan on sharing it. Don't. Nandroid backups also back up stuff that is device dependent. Many devices have been bricked because they restored a Nandroid from another device. Even if it is the same model.

Categories

Resources