Proper TWRP backup and restore procedures? - Essential Phone Questions & Answers

For the life of me I cant restore a backup of my current rom. What am I missing?
Ive tried backup on both slots and attempted to restore Individually.

enigma2446 said:
For the life of me I cant restore a backup of my current rom. What am I missing?
Ive tried backup on both slots and attempted to restore Individually.
Click to expand...
Click to collapse
Backing up with encryption is messy...
If you disable all security with the OS booted... And are on F2FS... You probably stand the best chance...
Otherwise... Might I recommend Migrate or Titanium Backup and forget about the backup feature in TWRP altogether...
Or use adb backup with your PC... But I don't know if that is restorable either

I'm not sure what goes wrong for people with TWRP backup's? I often see people talking here and on telegram about this. I didn't get my ph-1 till late September of last year so I missed the unofficial TWRP builds and I'm sure there were lots of improvement's made along the way. This being said, backup's work flawlessly for me and I use them almost daily since December when I started flashing lots of different ROMs. The only time I've run into a problem restoring a backup is from custom to stock or vice versa.
When I run into a backup not restoring I flash that ROM plus TWRP zip and then try again I don't even boot into the system just reboot and try again and it works for me. I hope this helps you.
I am encrypted on all my setups these days and always flash the exact same way from TWRP : select install , choose rom zip, select add more zips, select TWRP zip, flash/ select home button, select reboot, select recovery. Again from TWRP: select install, choose gapps (if needed), choose add more zips, select Magisk, flash and reboot into the system.
I stated the obvious above because I assume there must be either a subtle nuance btwn the way that people flash or something btwn the phone and twrp changed at some point before December (when I began using regularly)
@rignfool isn't alone in his belief that TWRP backup's don't work well. He is also one of many people that know more about Android development and the ph-1 then myself. However I disagree with anyone who would say TWRP backup's don't work well because I depend on them and they do work, precisely as they are supposed to.

Related

TWRP 2.6.0 restore data

Ladies and gentlemen,
Recently, whilst flashing a new ROM, I had an issue. I tried to restore a backup that I created with TWRP 2.6.0 with the same version. I got to the "Restore data" stage in the logs, and it failed.
I have two data.ext4 files in my TWRP backup folder: the first is data.ext4.win000 and data.ext4.win001. I'm thinking this is the issue.
I have already flashed a ROM and booted, so I am out of the woods. Just wanted to know if anyone has had any success with split data files in a TWRP recovery.
Thanks for your time.
richardpunch said:
Ladies and gentlemen,
Recently, whilst flashing a new ROM, I had an issue. I tried to restore a backup that I created with TWRP 2.6.0 with the same version. I got to the "Restore data" stage in the logs, and it failed.
I have two data.ext4 files in my TWRP backup folder: the first is data.ext4.win000 and data.ext4.win001. I'm thinking this is the issue.
I have already flashed a ROM and booted, so I am out of the woods. Just wanted to know if anyone has had any success with split data files in a TWRP recovery.
Thanks for your time.
Click to expand...
Click to collapse
Look for TWRP-Recovery-jfltespr-2.5.0.2 seems to be the most reliable for backup and restores right now.
The 'splitting of the EXT/data is NOT the problem. That's the way twrp is compressing the images.
Also there are some ROMs that have partition problems with certain kernels, so take note of that.
I make a crap load of nandroids and switch back and forth pretty often. 2.5.0.2 has been the most reliable for me.
Once more thing I do is verify the nadroid via the AFV app. I boot to recovery, create backup (always of every partition) then boot to ROM and run the AFV app on the backup and make sure it verifies. Then I'll boot back to recovery and wipe/format and flash away according to the dev's instructions.
Leader,
Thanks for such an informative write up. I will check into rolling back to a different twrp build. It's an unpleasant solution, but if it works I'll have to bite the bullet.
Thanks again!
-Mobile post

Stuck at boot screen after restoring ány Nandroid backup.

Hey,
I've had this problem for ages now, and always gave up on my data, but now I really want to fix this for good.
Yesterday I was ready to update my CM12 nightly to the lastest version (didn't see it was actually CM13), and did a backup in cwm before the update. The backup succeeded, but it gave the message that .android_secure couldn't be found and it didn't back that up. It always gives me this message after a backup and after google searching, it seems to me that it doesn't matter.
After installing the update, I noticed it was CM13, and my gapps wasn't updated to the marshmellow stock, as expected, so errors occured all the time.
I didn't want to upgrade to CM13 just yet, so I decided to restore my backup.
As always, the restore process goes without errors, but upon reboot I'm stuck at the CM logo. I can wait untill the battery is dead or ignites from the heat, but nothing happens. This has also happened to me every time I make a backup. I've watched about every video on youtube on how to do a proper backup and how to restore one, so I'm confident that I did it right.
For some reason, any backup I make, no matter what android version (didn't work with stock kitkat, either, before I switched to CM12) it never works and I'm forced to do a clean install and start over again.
I've tried to do partial restores from the backup file, and if I only restore the data partition (and wipe dalvik) It does boot, but gives me non stop errors that apps are crashing.
I've tried to do a dirty flash to no avail, always endless error messages.
When I do a clean install and check the MK5 of the backup with nandroid manager it gives no errors.
Is there anything wrong with my phone or something? I'm not making backups to be unable to restore them.
Can anyone help me out with this?
(I have a i9505)
Try a different recovery. CWM is outdated. TWRP is nice. Worked for ne every time. There are TWRP flashable zips so you won't have to mess around with Odin.
GDReaper said:
Try a different recovery. CWM is outdated. TWRP is nice. Worked for ne every time. There are TWRP flashable zips so you won't have to mess around with Odin.
Click to expand...
Click to collapse
Won't changing recovery make my old backups useless? I'm all for changing to TWRP, but first I'd love to restore my CWM backup...
Yes it will. Unfortunately I don't know what to suggest. Haven't used CWM since I switched to the S4.

Soft-Bricked Nova / No system

Hello,
Today I tried to root my Nova and somehow I managed to delete the system while doing that. I don't know how or when, I did wipe the phone at some point, but left system unchecked. So now it is stuck in an endless boot, I just see the orange "Your phone is unlocked and not safe etc" message, nothing more. I can access TWRP and fastboot, and tried to use the LineageOS 13. But it failed, it told me I need a CAN-model, and mine is "generic_a53". So I figured I'll just put EMUI back on it, but I can't seem to find a working version for my phone. The huawei-website is pretty useless in that regard, they don't offer it. And the HiSuite-recovery just said that my model is not supported anymore.
So.. help? I know I screwed up and should have made a full backup, but I never figured I'd screw this up so spectacularly.
EDIT: Okay, I just clicked on "Backup" in TWRP, out of curiosity, and it said that "System" is 2516mb, but "Data" is 0mb, so maybe that's what's lacking?
Seems you are using the wrong TWRP. Use the one made for lineage. Also, what is your exact model number, you should be able to recover that way. My guess is you wiped data, factory reset, or formatted data. You could try using the backup made by bluesmoothie to restore data. You will have to search around this forum as I can't remember exactly which thread it is in.
fragee said:
Hello,
Today I tried to root my Nova and somehow I managed to delete the system while doing that. I don't know how or when, I did wipe the phone at some point, but left system unchecked. So now it is stuck in an endless boot, I just see the orange "Your phone is unlocked and not safe etc" message, nothing more. I can access TWRP and fastboot, and tried to use the LineageOS 13. But it failed, it told me I need a CAN-model, and mine is "generic_a53". So I figured I'll just put EMUI back on it, but I can't seem to find a working version for my phone. The huawei-website is pretty useless in that regard, they don't offer it. And the HiSuite-recovery just said that my model is not supported anymore.
So.. help? I know I screwed up and should have made a full backup, but I never figured I'd screw this up so spectacularly.
EDIT: Okay, I just clicked on "Backup" in TWRP, out of curiosity, and it said that "System" is 2516mb, but "Data" is 0mb, so maybe that's what's lacking?
Click to expand...
Click to collapse
Just like @wangdaning said, you're using wrong TWRP.
If you wanna flash LOS13, you gotta flash the TWRP mentioned at requirements.
It told you that your model is "generic_a53" because you're using "twrp_huawei_generic_a53.img".
To restore your phone, try to restore the backup made by bluesmoothie.
1) Download the TWRP backup (emui 4.1) made by @bluesmoothie from here: https://www.dropbox.com/sh/qrk0fbpn...ffYdia7raa/TWRP/BACKUPS/FPFDU16930014596?dl=0 . I had to download the files one by one, as I couldn't download the whole folder because dropbox was telling me that it's too big. After you've downloaded all the files from backup, put them in a folder named 1970-03-18--16-40-58_CANC432B100.
2) Download this recovery: https://www.androidfilehost.com/?fid=745425885120713827 , which is made by @Grarak.
3) Make a backup of boot.img so a folder will be created at TWRP > BACKUPS (e.g. FPFDU16A20001907).
4) Place the TWRP backup folder into the folder created at step 3). So, it'll be like this: TWRP > BACKUPS > FPFDU16A20001907 > 1970-03-18--16-40-58_CANC432B100.
5) Restore the backup.
Okay, it was the wrong TWRP, now that I flashed the recommended one, I was able to install LOS13, and now everything is working again. Thank you very much guys!

Need a little help understanding A/B partitions

I have a few questions I'm new to the a/b partitions thing I've read the page on a/b partitions. But I'm still in the mud.
1 I'm on Verizon bootloader unlocked twrp 3.2.3-23 and magisk installed I have 9.0.11 installed twrp and magisk in slot a/b
now is it necessary to backup stock rom? If I install lets say crDroid in slot A install twrp installer I know twrp goes into both slots reboot back to recovery making sure I'm still in A install gapps and magisk reboot back to recovery making sure again I'm still in A slot then reboot to crDriod that should work yes?
2 Now If I wanted to go back to my stock rom witch is in B slot can I not reboot back to twrp and switch to slot B and go to stock?
Thanks guys this A/B partition is still clear as mudd
Making a back up is always recommend, but it's up to the user to decide if the want to or not. The down side is loosing all your data, so there is that.
The short answer to your 2nd question is no you can not dual boot ROMs on this device. I posed the same question in a different thread and you can read the explanation from Dark Nightmare here.
https://forum.xda-developers.com/showpost.php?p=78375631&postcount=988
Sent from my ONEPLUS A6013 using Tapatalk
foamerman said:
I have a few questions I'm new to the a/b partitions thing I've read the page on a/b partitions. But I'm still in the mud.
1 I'm on Verizon bootloader unlocked twrp 3.2.3-23 and magisk installed I have 9.0.11 installed twrp and magisk in slot a/b
now is it necessary to backup stock rom? If I install lets say crDroid in slot A install twrp installer I know twrp goes into both slots reboot back to recovery making sure I'm still in A install gapps and magisk reboot back to recovery making sure again I'm still in A slot then reboot to crDriod that should work yes?
Click to expand...
Click to collapse
I'm new to A/B as well but have been flashing quite a bit. Maybe someone can correct me if I'm wrong. From what I've observed, ROMs are designed to flash to the slot you're not using and, on reboot, switch slots. TWRP zip installer is designed to install to both slots. Magisk and Gapps, however, install to the current slot. This means you should flash the ROM (which flashes to the non-active system and boot partitions and possibly others), flash the TWRP installer (which installs to both boot partitions, including the one that was just flashed). Then reboot back into recovery (which will be the other slot that the ROM was installed to), and then install all the other zips needed (i.e., Gapps, Magisk, etc...).
Switching A/B partitions in the TWRP reboot menu also triggers the partition switch after reboot, if needed. It doesn't seem to immediately switch before a reboot however, even though it gives that impression.
foamerman said:
2 Now If I wanted to go back to my stock rom witch is in B slot can I not reboot back to twrp and switch to slot B and go to stock?
Click to expand...
Click to collapse
The data partition, which contains user apps and system and user app data, is not slotted. Moving back and forth between slots that share a common ROM type and are close in version might not pose a problem. But A/B slotting wasn't designed for switching Roms back and forth. It was designed to try to ensure that there is always a valid bootable ROM without regard to use data (i.e., potentially, after a factory-reset). Don't expect to boot up an AOSP modded ROM using the data and apps from an OygenOS ROM. Do a backup of all partitions to be safe (with the exception of system and vendor since system_image and vendor_image give a bit-for-bit copy, instead of file-for-file copy). Copy the TWRP directory to a computer afterward, if possible. Make sure to wipe data if flashing a ROM of a different type, not just a different version (after flashing everything but before initial system boot).
phillymade said:
Making a back up is always recommend, but it's up to the user to decide if the want to or not. The down side is loosing all your data, so there is that.
The short answer to your 2nd question is no you can not dual boot ROMs on this device. I posed the same question in a different thread and you can read the explanation from Dark Nightmare here.
https://forum.xda-developers.com/showpost.php?p=78375631&postcount=988
Sent from my ONEPLUS A6013 using Tapatalk
Click to expand...
Click to collapse
Nsane457 said:
I'm new to A/B as well but have been flashing quite a bit. Maybe someone can correct me if I'm wrong. From what I've observed, ROMs are designed to flash to the slot you're not using and, on reboot, switch slots. TWRP zip installer is designed to install to both slots. Magisk and Gapps, however, install to the current slot. This means you should flash the ROM (which flashes to the non-active system and boot partitions and possibly others), flash the TWRP installer (which installs to both boot partitions, including the one that was just flashed). Then reboot back into recovery (which will be the other slot that the ROM was installed to), and then install all the other zips needed (i.e., Gapps, Magisk, etc...).
Switching A/B partitions in the TWRP reboot menu also triggers the partition switch after reboot, if needed. It doesn't seem to immediately switch before a reboot however, even though it gives that impression.
The data partition, which contains user apps and system and user app data, is not slotted. Moving back and forth between slots that share a common ROM type and are close in version might not pose a problem. But A/B slotting wasn't designed for switching Roms back and forth. It was designed to try to ensure that there is always a valid bootable ROM without regard to use data (i.e., potentially, after a factory-reset). Don't expect to boot up an AOSP modded ROM using the data and apps from an OygenOS ROM. Do a backup of all partitions to be safe (with the exception of system and vendor since system_image and vendor_image give a bit-for-bit copy, instead of file-for-file copy). Copy the TWRP directory to a computer afterward, if possible. Make sure to wipe data if flashing a ROM of a different type, not just a different version (after flashing everything but before initial system boot).
Click to expand...
Click to collapse
OK I understand what you both are saying my understanding is that data is still there in both slots yes? so If I want to go back to my 9.0.11 stock rom I should be able to just reboot to twrp and select slot B and go back to to stock yes? guys I'm sorry this is my first A/B partition phone I'm just trying to figure it out
foamerman said:
OK I understand what you both are saying my understanding is that data is still there in both slots yes?
Click to expand...
Click to collapse
As long as it isn't wiped, yes.
foamerman said:
so If I want to go back to my 9.0.11 stock rom I should be able to just reboot to twrp and select slot B and go back to to stock yes? guys I'm sorry this is my first A/B partition phone I'm just trying to figure it out
Click to expand...
Click to collapse
No. Except for the possible exception that both slots contain different versions of the same ROM, the data will work with one ROM but not the other.
When flashing a ROM in TWRP, just mke sure to make a nandroid backup first and follow the installation directions. If you have to switch back, you will need to flash the nandroid backup.
It is a pain and there are pitfalls. This phone is relatively new and this is the cost of flashing a custom ROM/bootloader.
No. Except for the possible exception that both slots contain different versions of the same ROM, the data will work with one ROM but not the other.
When flashing a ROM in TWRP, just mke sure to make a nandroid backup first and follow the installation directions. If you have to switch back, you will need to flash the nandroid backup.
It is a pain and there are pitfalls. This phone is relatively new and this is the cost of flashing a custom ROM/bootloader.[/QUOTE]
OK one more I think lol If I have 9.0.11 on my internal storage can I not go into slot A and wipe it and install it back on there and be OK?
foamerman said:
OK one more I think lol If I have 9.0.11 on my internal storage can I not go into slot A and wipe it and install it back on there and be OK?
Click to expand...
Click to collapse
Internal storage is an encrypted folder in the data partition that is wiped separately from data. As long as you don't wipe internal storage for any reason it should be ok, in theory. But it's not in practice.
Most of the problem with this phone is maintaining encryption back and forth between ROMs. Honestly, if you can't afford to lose data, don't try to flash ROM's yet. I have had very little luck flashing back and forth and, after reflashing data, being able to avoid a bootloop. TWRP has only supported encryption on this phone for a month or so and IMHO it's not ready for prime time. I have relied on Titanium Backup and moved it's backup folder back and forth between my phone and computer.
Nsane457 said:
Internal storage is an encrypted folder in the data partition that is wiped separately from data. As long as you don't wipe internal storage for any reason it should be ok, in theory. But it's not in practice.
Most of the problem with this phone is maintaining encryption back and forth between ROMs. Honestly, if you can't afford to lose data, don't try to flash ROM's yet. I have had very little luck flashing back and forth and, after reflashing data, being able to avoid a bootloop. TWRP has only supported encryption on this phone for a month or so and IMHO it's not ready for prime time. I have relied on Titanium Backup and moved it's backup folder back and forth between my phone and computer.
Click to expand...
Click to collapse
Well the mud is starting to clear up a little. Yea I've been a little leery about trying to install roms yet. I have read all the post in the Recovery thread mauronofrio is getting a 6t soon so maybe he can figure it out. But again Thank you.

How do you go from a custom rom back to OOS?

Love this phone, but using custom roms have been the most frustrating thing with this device. I like testing out multiple roms because you never know which one you will enjoy until you actually use it. But every time I want to go back to OOS, I find myself having to use the MSM tool and start from scratch.
TWRP Nandroid backups are pretty much useless it seems. There are probably over 20 methods here explaining how to backup and restore (don't restore vendor, don't restore system, etc...). I have tried literally every combination and every time I restore, it never works and just loops back to TWRP and leaves me w/an encrypted device. Bring in the MSM.
Flashing the full stock rom usually results in the same thing or no change at all.
Does anybody have a simple straight to the point method of going back to OOS from custom rom? Much appreciated
msmdownloadtool will 100% wipe the phone (backup!!) And return the phone to 100% stock with OxygenOS and even re-lock the bootloader. That's the fastest and easiest way and I've done it a few times.
Edit : just fully read your post and you're familiar with MSM. Just use Google cloud backup in combination with backing up files and using sms backup and restore... There is no way you can keep your data partition from a custom ROM and have it boot or work right on OOS. Even switching custom ROMs without wiping data can cause massive instability, but at least it has a chance at booting.
How to restore,I have no real clue, but to get back to at least a working version of OOS with your internal storage intact..
After you flash OOS and twrp installer, reboot back to twrp.. it will likely be encrypted.. from there go to the wipe menu, then swipe for factory reset.. wipes data, not internal storage.. then boot into OOS.. at that point you can boot back to twrp and flash magisk or whatever else you need to do.
If that fails, you'll lose all data doing this next step, but it will boot.. use the "format data" option in twrp, type yes, then reboot to system. Then you can set it up, download or transfer whatever you want to flash, then reboot to recover and flash away... All without having to use the msm tool

Categories

Resources