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
Related
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!
can back more partitions ignore the partitions that say zero i think i need to fix those. u can backup and restore other partitions if u want to or feel the need toohttps://drive.google.com/open?id=0Bx88t3CJrNjoNDBreGFUT3JXYVk
madvane20 said:
can back more partitions ignore the partitions that say zero i think i need to fix those. i also fixed where system was listed 2 times u can backup and restore other partitions if u want to or feel the need too https://drive.google.com/open?id=0Bx88t3CJrNjoQjhFQXBqSm0zRUk@yuweng guess he accidental added extra system to backup
Click to expand...
Click to collapse
The extra System your referring too is a System.img it's flashable with fastboot unlike the regular system backup in TWRP.
If you look at the file size you would notice the System.img is the same size as if you dd dump system
it also backs up cust.img and tz.img and modem1.img, it's by design not a mistake
On most devices shipping with Android 6.0 or higher, the device maker has enabled dm-verity as a security measure. The device will signature check blocks of data on the system partition during boot at the block level. The usage of dm-verity prevents TWRP from being able to successfully restore a normal system backup. On most of these devices, you will see an option on the backup page for System Image. A system image backup takes up more space than a regular system backup, but the system image backup is a bit-perfect backup that, when restored, will not break dm-verity (assuming that you don't break dm-verity before making the backup). On a handful of devices, you may also find a Vendor and Vendor Image backup option. The same rules apply with regards to dm-verity. If you need a perfect "go back to completely stock" backup then you should be using System Image (and Vendor Image, when available) instead of just system.
Click to expand...
Click to collapse
theirs more info here > https://twrp.me/FAQ/
its fixed see original post
Hi! I have a Leeco Le Max 2 X829, and as there arenĀ“t any official stock ROM I wanna save a 100% stock Backup of my X829 with 16S USA ROM. I mean ROM + Recovery, just as it is unpacked(without downloaded Apps and my data).
Could I make it booting in temporaly TWRP with fastboot and doing NAND backup choosing:
- Boot
- Recovery
- System
- Data...
Any other option? All options that TWRP show? thanks!
Yes. EFS too
Turn on phone with power+volume keys.
Fastboot boot TWRP.img
unrafa said:
Yes. EFS too
Turn on phone with power+volume keys.
Fastboot boot TWRP.img
Click to expand...
Click to collapse
Then must I choose all options in TWRP backup?
One more thing... I Will be in a booted Recovery, so original Recovery is going to be still, then the one saved in the backup Will be the booted one ore the stock one? Thanks!
If you just want a factory setup without your apps and data I would say just backup the system image in twrp, backing up data definitely uncheck .
Only system is bit to less...
I would keep the us version.
eUI is not that bad and until we all get the update to android 7 ... it s probably the best and most stable rom running.
Why change it, when the other opportunities are leading to an less smooth running phone ?
To me all the cooked roms have disadvantages.
I need to have a fully working phone/ camera /fingerprint sensor...
without option to go back to the US rom I wouldn't change a thing!
castuis said:
If you just want a factory setup without your apps and data I would say just backup the system image in twrp, backing up data definitely uncheck .
Click to expand...
Click to collapse
Mmm, then all options least Data? Thanks!
Don't listen to them. Back up everything. Who cares about a few space? Besides data is probably empty or with a few stock tools. Just backup all for your complete image. EFS contains IMEI and other stuff. It is important to have it. You can Back up everything, and then move it to a computer or somewhere else
It will have stock recovery backed up to TWRP and it's better if you backup as image, that way it saves the partition structures too.
Only first backup as image,to have perfect copy, the next backups you do is better do them as normal backups compressed (not image).
unrafa said:
Don't listen to them. Back up everything. Who cares about a few space? Besides data is probably empty or with a few stock tools. Just backup all for your complete image. EFS contains IMEI and other stuff. It is important to have it. You can Back up everything, and then move it to a computer or somewhere else
It will have stock recovery backed up to TWRP and it's better if you backup as image, that way it saves the partition structures too.
Only first backup as image,to have perfect copy, the next backups you do is better do them as normal backups compressed (not image).
Click to expand...
Click to collapse
Hi, I have done and it made a lot of .win archives, is that right? thanks
Yes those are md5 or Sha sums, drag the whole TWRP folder to computer and you are good to go, don't change any name of any folder inside TWRP folder or TWRP will never detect that backup.
I don't know why but once I copied all except 73shf38 folder, and it turned out that folder with those numbers matter, and I couldn't restore without the exact name
dears, please, post which partitions to backup in twrp to get fullly restored system and data?
dimdimdim said:
dears, please, post which partitions to backup in twrp to get fullly restored system and data?
Click to expand...
Click to collapse
The default TWRP settings under "Backup" will give you a nandroid that should allow you to restore when changing roms or a failed "something" install. Generally "Boot," "System," and "Data" are what you should backup. A more comprehensive device backup might include other partitions.
ktmom said:
The default TWRP settings under "Backup" will give you a nandroid that should allow you to restore when changing roms or a failed "something" install. Generally "Boot," "System," and "Data" are what you should backup. A more comprehensive device backup might include other partitions.
Click to expand...
Click to collapse
Okay, thanks! That is pretty basic.
whether there are other important partitions to backup at least once?
And why system image partition is checked for backup by default? Do we need it at all? - at least for me backup even can't be finished with that system image checked. So, I unchecked it to succeed with the backup.
Take a look at team TWRP's What should I back up in TWRP?
ktmom said:
Take a look at team TWRP's What should I back up in TWRP?
Click to expand...
Click to collapse
if that system image backup reason applies to the custom-to-custom restore for moto z? -
I know that for other devices twrp (or custom versions of it) disables dm-verity check by default.
so, the question also is if that applies to moto z too?
Hi! So, I have a newer Android 10 device with no TWRP support. I think my question is not model specific, so I'm posting generally, but if it matters, it's a OnePlus 7T Pro, bootloader unlocked of course.
Anyway, since there's no good custom recoveries for Android Q (none that I know of that can decrypt /data), I was trying to be safe and using a hacked (adb enabled) stock recovery to make backups from the command line. I have a nice tarball created in recovery mode with "tar cvf - /data/". It looks like it was made properly, I can unpack the files on back onto the device in recovery mode, and it's not corrupt or anything.
The problem is that naively trying to restore it back to my /data partition (e.g. tar xvf) after a wipe causes two problems:
1) after rebooting to recovery, the /data partition just looks encrypted again. If it was working properly, stock recovery can decrypt /data
2) normal system boot just bootloops.
If anyone has tried manually saving and restoring /data from a tarball, I'd appreciate any tips on getting it to work.
My best guess is that the ext4 encryption keys are the culprit - since after a factory reset the device creates new encryption keys, I think I need to figure out how to restore 99% of my backup without overwriting the fresh encryption keys that were created after wiping. I think I need to combine the new encryption keys with the other files in my tarball backup. If I can get past that, I might have to worry about things like SELinux xattrs as well, but one thing at a time.
If any experienced Android hackers know how filesystem encryption works in Android 10, I would appreciate a map of which files should not be overwritten. For example, I'm thinking I should probably avoid restoring some of these files:
Code:
/data/unencrypted/key
/data/unencrypted/key/encrypted_key
/data/unencrypted/key/keymaster_key_blob
/data/misc/vold/user_keys
/data/misc/vold/user_keys/de/0/keymaster_key_blob
/data/misc/vold/user_keys/de/0/encrypted_key
/data/misc/vold/user_keys/ce/0/current/keymaster_key_blob
/data/misc/vold/user_keys/ce/0/current/encrypted_key
/data/misc/systemkeys
/data/misc/keystore
/data/misc/keychain
/data/system/recoverablekeystore.db
[edit] spoke too soon
I ended up doing something janky and wrote a little shell script to repack the files from /data/data and /data/app into files that Titanium Backup could understand. I also figured out how to restore my SMS messages from /data/user_de. That was enough to recover the things I cared most about.
Still begs the question of what's the best method of doing backup and restores of /data on Android 10 when you don't have custom recovery but you do have Magisk, root, and stock recovery with adb. I want to keep hacking and playing with this phone so gotta figure something out.
I like Titanium Backup, have used it for many years, but the maintainance hasn't really kept up with Android development, theres a lot of gotchas like it hangs trying to restore multi APK packages. I still want to figure out something more seamless like a nandroid backup solution even if its from the command line. At least until TWRP eventually supports Android 10.
try backing up data partition in a external storage live usb or sd card
DrWowe said:
I ended up doing something janky and wrote a little shell script to repack the files from /data/data and /data/app into files that Titanium Backup could understand. I also figured out how to restore my SMS messages from /data/user_de. That was enough to recover the things I cared most about.
Still begs the question of what's the best method of doing backup and restores of /data on Android 10 when you don't have custom recovery but you do have Magisk, root, and stock recovery with adb. I want to keep hacking and playing with this phone so gotta figure something out.
I like Titanium Backup, have used it for many years, but the maintainance hasn't really kept up with Android development, theres a lot of gotchas like it hangs trying to restore multi APK packages. I still want to figure out something more seamless like a nandroid backup solution even if its from the command line. At least until TWRP eventually supports Android 10.
Click to expand...
Click to collapse
try backing up data partition in a external storage live usb or sd card, first you for encryption, then restore from external source after formatting phone storage