Getting from custom ROM to stock with TWRP backup - Galaxy S6 Q&A, Help & Troubleshooting

Hi , as the title says, I want to go back from NexusOS 9.0 to the Nougat Stock ROM on my SM-G920F.
Fortunately, I made a /system + /data backup with TWRP before flashing NexusOS.
I was thinking of (correct me if i'm wrong) :
wiping system, data and cache
Restore backup from within TWRP
Will this procedure allow me to get my stock ROM back with all my apps, sms, contacts,calls, etc... ?

Wait for anyone who has done the exact change, but I'll add:
/data/media/ (.../sdcard, internal storage) might not be backed up and could be lost once the /data is formatted.
Any loss of cellular is probably related to /data/data/..., and the firmware in use, backup the EFS anyway but don't wipe the EFS or restore the EFS (unless 100% sure)

Thanks for your answer !
Internal storage isn't wiped when wiping data (I kept all my files when installing NexusOS) and I didn't experience any problems related to cellular, so I guess EFS hasn't been modified/wiped.
But you're right, I'll wait a bit too have more advices

Nobody ever did this procedure ?

Related

Nandroid backup..

I did a nandroid backup bit it said fatal error while backing up bpws...or something like that...(one more thing...will nandroid backup...backup my apps if I lost them??)
Sent from my XT720 using XDA App
vari9 said:
I did a nandroid backup bit it said fatal error while backing up bpws...or something like that...(one more thing...will nandroid backup...backup my apps if I lost them??)
Click to expand...
Click to collapse
For some reason we can't back up all the partitions in nandroid. It should be enough to backup system and data. Optional: boot, logo (if you modified M boot logo), cache (usually not necessary), sd data (if you use ext partition on SD card).
With nandroid of system and data (and the others, but only if you use them) you should expect to be able to go back to exactly how your phone was at the time you made the backup. But you will lose changes you made after you made the backups.
When I'm about to start testing ROMs, I backup system and data. To go back to my pre-testing ROM I restore system and data and then wipe cache partition.
Mioze7Ae said:
When I'm about to start testing ROMs, I backup system and data. To go back to my pre-testing ROM I restore system and data and then wipe cache partition.
Click to expand...
Click to collapse
You want to say system and boot ?
Because changing a room modify system.img and boot.img
The boot.img is the same on all the ROMs thanks to the locked bootloader.
Yeah, I never even bother changing boot.img from the sbf version. If I did I'd probably use the Russian one because I think it was the most recently compiled.
Ok, I wasn't knowing that I always flash boot.img that come with ROM.

[Q] How does a custom recovery works?

Ok, so i'm new to all this stuff about custom recoverys and ROMs. How exactly do they work?
Let's say i make a custom recovery image of my current ROM, wich is stock, does it just backup the OS or my personal files (music, photos, apps, etc.) too?
I'm asking this primarly because i want to upgrade my phone, but to do so i have to flash the stock firmware because i've modified some system files. Wich bring to my other question, flashing ROMs wipe user data? i've read some split responses to this, some people say it does some say it doesn't.
And my final question, let's say i made a backup, wiped my phone flashed stock firmware and updated, now how i recover my data from the
backed up ROM, i mean it is a different version, does it have an option to just restore user data?
Thanks in advance, and sorry if these are too much questions.
it'll back up system, data, boot.img and dalvik cache.
your sd partition isn't backed up, but all the stuff on it will be readable by whatever new rom you put on it (unless you wipe EVERYTHING [not a good idea]).
when you're changing roms/etc, you want to place the rom.zip + gapps.zip (and custom kernel.zip if you're going to use one) on your sd partition. you do this because usb storage mostly doesn't work with custom recoveries as of yet on this device meaning once you've wiped, if you don't have a rom on your sd partition you're mildly screwed in that you'd have to reflash everything from a stock image (meaning you will lose root, all your personal files and whatever rom was on the phone - basically everything goes back to stock bar the bootloader).
e: as for restoring all apps data, use something like titanium backup. i always have a backup on my sd partition of all my current apps (plus wifi passwords, accounts info, sms messages etc to save time/effort when restoring after putting a new rom on). i also always set TB to backup all modified/new data every night at about 3am, then upload the backup to google drive so that if i either brick my phone or accidentally wipe everything, at least i can get back to where i left off.
If you forget to place the ROM zip, and have formatted the device, it is not necessary to flash stock. You use adb side load which is present in every recovery.
in that case i need to remember that for future use - i hardly ever use my pc with my phone now as you can pretty much do anything (update recovery etc) on the phone alone.
that, and i'm on windows 8.1 which afaik doesn't play nicely with fastboot or adb.
twist3d0n3 said:
....and i'm on windows 8.1 which afaik doesn't play nicely with fastboot or adb.
Click to expand...
Click to collapse
....i think this is a rumor. Never ever had any problems on W8.1
^ good to know, thanks

Backup and Restore

What do you guys typically do when you try out new ROMs and want to do a clean flash and get back up and running quickly?
1. Restore via Google
(Very slow to redownload everything, doesnt restore everything)
2. Sony Backup/Restore
(Sometimes Restore doesnt work)
3. Titanium Backup
(This is what I currently do, but can also be extremely slow)
4. Titanum Backup (creating update.zip for use in TWRP)
(Backup only seems to allow backup to internal storage so I run out of space)
5. Something Else
I use twrp recovery menu to backup my data, system and kernel
I usually backup to my internal storage since its faster than my mSD
From there i wipe and flash
Or to restore wipe and restore (since cache/art cache wasnt included in the backup)
Sent from my E6653 using XDA-Developers mobile app
Envious_Data said:
I use twrp recovery menu to backup my data, system and kernel
I usually backup to my internal storage since its faster than my mSD
From there i wipe and flash
Or to restore wipe and restore (since cache/art cache wasnt included in the backup)
Sent from my E6653 using XDA-Developers mobile app
Click to expand...
Click to collapse
If you wipe/restore from TWRP, then haven't you've just wiped your brand new ROM and returned back where you started?
My question is specifically for people who try custom ROMs do a backup and restore.
eng3 said:
If you wipe/restore from TWRP, then haven't you've just wiped your brand new ROM and returned back where you started?
My question is specifically for people who try custom ROMs do a backup and restore.
Click to expand...
Click to collapse
I think i made a bit of a typo there
when going to flash
- backup
- wipe
- flash rom
- flash gapps if needed
when going to restore
- wipe (cache, art cache)
- restore
I'm sorry, I still don't understand.
1. You backup (system, data, etc)
2. wipe
3. Flash rom (which writes new rom to system and data)
4. Then you restore your backup, which now overwrites system and data, thus erasing the new rom you just flashed
I need a way to restore apps and app data while keeping the new rom, otherwise it defeats the purpose

Titanium Backup error 3 when flashing "update.zip" from TWRP!

TL;DR: How to fix Titanium Backup error 3 while flashing "update.zip" from TWRP?
I have been using Android for more than five years now seriously and it is a bit funny that I did not know I could restore data to newly flashed ROM.
Previously, I would just wipe system and flash new ROM not touching data partition and that worked just fine.
That is past seems.
I have flashed new ROM which is based on stock Samsung Galaxy S9 Plus ROM so I could get official updates. The problem is my phone lost one fifth of its performance according to benchmark and it experiences random reboots (I hope not while I am typing ?)
All in all, by restoring previous data on new ROM some of the files seem not to be overwritten well on new ROM (possibly application versions not getting downgraded well).
LogCat did not help.
I deleted my data (I have backup of course) and my system works normally so it is a data problem.
That is where Titanium Backup came into play.
I made backup of all user applications and an "update.zip".
When I want to flash "update.zip I get error code 3.
Some say it is due system partition but I formatted it in couple of manners and I am still unable to restore.
Is there any other way to restore applications and its data to new ROM?
I have tried backing up the applications and moving the Titanium Backup folder to SD card and moving it back when I flash new ROM. Backup does not get detected.
Thank you in advance!
dedq said:
TL;DR: How to fix Titanium Backup error 3 while flashing "update.zip" from TWRP?
I have been using Android for more than five years now seriously and it is a bit funny that I did not know I could restore data to newly flashed ROM.
Previously, I would just wipe system and flash new ROM not touching data partition and that worked just fine.
That is past seems.
I have flashed new ROM which is based on stock Samsung Galaxy S9 Plus ROM so I could get official updates. The problem is my phone lost one fifth of its performance according to benchmark and it experiences random reboots (I hope not while I am typing [emoji854])
All in all, by restoring previous data on new ROM some of the files seem not to be overwritten well on new ROM (possibly application versions not getting downgraded well).
LogCat did not help.
I deleted my data (I have backup of course) and my system works normally so it is a data problem.
That is where Titanium Backup came into play.
I made backup of all user applications and an "update.zip".
When I want to flash "update.zip I get error code 3.
Some say it is due system partition but I formatted it in couple of manners and I am still unable to restore.
Is there any other way to restore applications and its data to new ROM?
I have tried backing up the applications and moving the Titanium Backup folder to SD card and moving it back when I flash new ROM. Backup does not get detected.
Thank you in advance!
Click to expand...
Click to collapse
When switching ROMs, restoring data from a previous ROM causes issues, especially when the data contains system data and apps from the previous ROM, user apps and their data usually restore fine, but the system stuff doesn't.
Sent from my SM-S767VL using Tapatalk
Solved using Migrate.

Stuck in recovery after rom update

Hello,
I just updated the rom Evolution X 11 on my Xiaomi Mi 9T Pro after using an older version for about half a year.
Now my phone does not boot anymore, its stuck in recovery (TWRP). Also all data seems to be encrypted and TWRP is not asking for a password.
Is there a way to get my phone to boot again or at least backup my data before I do a full wipe?
You should always do a full twrp backup before messing with roms.
The best solution would be to backup the "Data" and "Internal Storage" partitions. Data contains all apps, their appdata and settings, while internal storage contains all of your own files (photos, videos etc.). After you back these up, wipe your phone (system, data, cache, dalvik) and flash the version of evolution x you were using previously. Now restore data and internal storage and your device should be back to normal.
If you get a bootloop while booting after restoring data and internal storage, then wipe the device again and this time flash evolution x, but only restore internal storage. This way, it should boot and you will be able to recover your files, though your apps will be gone.
If you only restore internal storage then it will no doubt boot up and you will have access to your files, but since you'll have already backed up the important stuff (data + internal storage), you might as well try restoring data as well, as there is no harm, and if the phone boots correctly after restoring both partitions, your phone will be as it was before your updated your rom.
This happened a while back to me with my J5, the issue was that I made a full TWRP backup, then began to test other roms. After I was done, I tried to restore my backup, but it would constantly fail. I sat down for a while, confused and sad about how my TWRP backup had failed me. I tried every solution I could think of, eventually this solution I've mentioned in the above paragraph came to my mind. Thank god for putting it into my mind, otherwise I would've lost a lot of stuff (mainly whatsapp chats which werent backed up, and a lot of apps which I took the time to pain-stakingly configure in the best way for my device).
Anyways, enough of my story, hope this helps you out! If it does, message back here and let us know, and also mark my post as the solution if it was able to help you, so that anyone else who stumbles upon this thread can be saved too!
Cheers!
PhotonIce said:
You should always do a full twrp backup before messing with roms.
The best solution would be to backup the "Data" and "Internal Storage" partitions. Data contains all apps, their appdata and settings, while internal storage contains all of your own files (photos, videos etc.). After you back these up, wipe your phone (system, data, cache, dalvik) and flash the version of evolution x you were using previously. Now restore data and internal storage and your device should be back to normal.
If you get a bootloop while booting after restoring data and internal storage, then wipe the device again and this time flash evolution x, but only restore internal storage. This way, it should boot and you will be able to recover your files, though your apps will be gone.
If you only restore internal storage then it will no doubt boot up and you will have access to your files, but since you'll have already backed up the important stuff (data + internal storage), you might as well try restoring data as well, as there is no harm, and if the phone boots correctly after restoring both partitions, your phone will be as it was before your updated your rom.
This happened a while back to me with my J5, the issue was that I made a full TWRP backup, then began to test other roms. After I was done, I tried to restore my backup, but it would constantly fail. I sat down for a while, confused and sad about how my TWRP backup had failed me. I tried every solution I could think of, eventually this solution I've mentioned in the above paragraph came to my mind. Thank god for putting it into my mind, otherwise I would've lost a lot of stuff (mainly whatsapp chats which werent backed up, and a lot of apps which I took the time to pain-stakingly configure in the best way for my device).
Anyways, enough of my story, hope this helps you out! If it does, message back here and let us know, and also mark my post as the solution if it was able to help you, so that anyone else who stumbles upon this thread can be saved too!
Cheers!
Click to expand...
Click to collapse
Thank you for your help but backing up the data and internal storage doesnt seem possible right now because all the data is encrypted in TWRP...
If you can't backup anything, then wipe system, cache and dalvik, and flash the version of evolutionx you were previously using. Then boot, it should be fine. If it wont boot (give it some time, it will take the time of a fresh install), then this time wipe system+data+cache+dalvik, then flash whichever rom you like and you'll be able to access the files.
You can also try using platform tools and fastboot or adb ( i dont remember exactly which one) to copy the filess from your phone onto your pc.
Sorry if this doesn't apply to your situation, I've never used a phone which has been encrypted, as such I have no experience with them.
PhotonIce said:
If you can't backup anything, then wipe system, cache and dalvik, and flash the version of evolutionx you were previously using. Then boot, it should be fine. If it wont boot (give it some time, it will take the time of a fresh install), then this time wipe system+data+cache+dalvik, then flash whichever rom you like and you'll be able to access the files.
You can also try using platform tools and fastboot or adb ( i dont remember exactly which one) to copy the filess from your phone onto your pc.
Sorry if this doesn't apply to your situation, I've never used a phone which has been encrypted, as such I have no experience with them.
Click to expand...
Click to collapse
That sounds like a good idea. I found the old version on my PC.
Now I just need a way to install it... because twrp cant read the file. I tried with adb sideload but that results in an error for some reason. Flashing Magisk for example with adb sideload is possible.
Edit: Got it to work by using a tool called "Large Address Aware". Now waiting for the results...
PhotonIce said:
If you can't backup anything, then wipe system, cache and dalvik, and flash the version of evolutionx you were previously using. Then boot, it should be fine. If it wont boot (give it some time, it will take the time of a fresh install), then this time wipe system+data+cache+dalvik, then flash whichever rom you like and you'll be able to access the files.
You can also try using platform tools and fastboot or adb ( i dont remember exactly which one) to copy the filess from your phone onto your pc.
Sorry if this doesn't apply to your situation, I've never used a phone which has been encrypted, as such I have no experience with them.
Click to expand...
Click to collapse
This did not help unfortunately... Im still in the same recovery-bootloop and my data is still encrypted.
It's probably still bootlooping as the data partition got modified when you flashed the newer version of evolutionx, and now it will not work with the old one. You can try wiping system+data+cach+dalvik and then flashing any rom of your choice. This will give you access to your internal storage (photos, media etc), but it will remove your apps and their settings. Whatsapp images are stored in the internal storage so you won't need to worry about those.
Again, this is risky, as it may not work (I don't know much about encryption), or you might still not be able to access your files after flashing the new rom. Proceed at your own risk.
PhotonIce said:
It's probably still bootlooping as the data partition got modified when you flashed the newer version of evolutionx, and now it will not work with the old one. You can try wiping system+data+cach+dalvik and then flashing any rom of your choice. This will give you access to your internal storage (photos, media etc), but it will remove your apps and their settings. Whatsapp images are stored in the internal storage so you won't need to worry about those.
Again, this is risky, as it may not work (I don't know much about encryption), or you might still not be able to access your files after flashing the new rom. Proceed at your own risk.
Click to expand...
Click to collapse
Thank you for still helping me out but I already did a full reset yesterday. I did not lose much except for the time setting it all up again.
I still dont really get the point of encrypting all your data if you cant decrypt it even if you know the password...

Categories

Resources