TWRP DATA backup - How does it work - Moto X4 Questions & Answers

Im on Superior OS - Android 10.
I wanted to know how does TWRP DATA backup work, and where can I have problems?
I was thinking of giving a try to Pixel Experience 10.
If I backup just DATA usign TWRP, install pixel, gapps, magisk and after that I restore DATA, will the rom work perfectly and I will have all my configuration, settings, etc; or it just will work perfectly if I restore it to a clean installation of Superior OS.
Following that question.
May I go and try Havoc - Android 9, and restore DATA from Android 10? Will there be any problems?
And the last one.
If I go from Android 9 to 10, may I restore DATA?
Thanks!

When changing operating systems it's always best to re-install all apps.

I believe TWRP backup doesn't backup apps & data. Stuff like photos, music etc will not be backed up. You'll need to back those up separately. If you use Titanium, that would do more but reinstall your apps from their source and then restore data.
Sent from my Galaxy Tab S5e using XDA Labs

TWRP absolutely backups and restores data... But you only want to do this to the same OS version. You will likely get a bunch of force closes, and instability if you attempt to restore to different version.
A fresh install is always recommended, but you may want to check out the app called "Migrate" - YMMV.

jhedfors said:
TWRP absolutely backups and restores data... But you only want to do this to the same OS version. You will likely get a bunch of force closes, and instability if you attempt to restore to different version.
A fresh install is always recommended, but you may want to check out the app called "Migrate" - YMMV.
Click to expand...
Click to collapse
I would add, "same OS version" yes, but even custom 10 to another custom 10, I would strongly advise re-installing everything.

The problem is that you don't know what the environment is in an operating system and each app looks at its environment while it is installing and sets itself up appropriately.
So you have problems and you waste your own and others' time trying to shoot needless problems just in the hope of saving a few minutes.
You might think, "well, this custom 10 is like that custom 10" but unless you compare the full build trees and sources, you really don't have the faintest idea. They are different, because, well, they ARE different!

Related

[Q] Fixed bootloop - Is there anyway to get everything back?

Background info:
Updated Cyanogenmod 12.0 to 12.1 through a nightly update that the OS automatically recommended me do. Upon updating, the phone went into a boot loop. I did a data backup through TWRP and then I wiped the dalvik-cache and cache, but it still bootlooped, so I wiped the data. After wiping the data, the phone booted up just fine. At this point, I'd like to restore my data and I have tried doing so through TWRP, but then it just goes into a bootloop again.
Primary Questions:
Can I restore my data and not get the boot loop? If not, can I go back to Cyanogenmod 12.0 and then restore my data and not get the boot loop? If not, what are my options from here?
Secondary Questions:
What did I do wrong to get the boot loop and how can I prevent this from occurring in the future when updating to a new nightly?
thex2 said:
Background info:
Updated Cyanogenmod 12.0 to 12.1 through a nightly update that the OS automatically recommended me do. Upon updating, the phone went into a boot loop. I did a data backup through TWRP and then I wiped the dalvik-cache and cache, but it still bootlooped, so I wiped the data. After wiping the data, the phone booted up just fine. At this point, I'd like to restore my data and I have tried doing so through TWRP, but then it just goes into a bootloop again.
Primary Questions:
Can I restore my data and not get the boot loop? If not, can I go back to Cyanogenmod 12.0 and then restore my data and not get the boot loop? If not, what are my options from here?
Secondary Questions:
What did I do wrong to get the boot loop and how can I prevent this from occurring in the future when updating to a new nightly?
Click to expand...
Click to collapse
I'm going to answer your second question first, as the second answer shapes the first answer.
Sometimes a ROM needs a wipe before flashing..the reason for this is conflicting data.. Most commonly,.this will happen if going from one ROM to another from a different dev, but can also happen upgrading roms from the same dev.
The conflict will happen due to system settings.. All system settings go in /data/data along with your user app settings. Most settings will go in an sqlite database.
The boot loop problem occurs usually when there is an entry in one or more of these databases that correlates with a setting that no longer exists, or the entry doesn't match the options in a ROM. For example, if your ROM allows you to set screen sleep in 15, 30, 60 seconds only, but your database has your setting set at 45, android doesn't know what to do and boot loops.*
The fix is of course, wiping data.. This is why when restoring using titanium backup on a new ROM, we recommend only restring your user apps and data (using the filters and options) otherwise if you restore system apps and data you're restoring the problem.
The first question, you can restore app a from a nandroid backup using titanium. There is an option in preferences.
*please note, this is just a basic example for illustration purposes. Screen sleep may or may not cause a loop
Thank you for the detailed response. It was very helpful. I have a few more questions for you below.
rootSU said:
Sometimes a ROM needs a wipe before flashing..the reason for this is conflicting data.. Most commonly,.this will happen if going from one ROM to another from a different dev, but can also happen upgrading roms from the same dev.
Click to expand...
Click to collapse
Is there an easy way to predict whether this will occur prior to upgrading? And if so, how?
Can I downgrade back to my old nightly and restore my data to go back to the working setup that I previously had?
Is there a way to get my old OS customizations back from the nandroid backup that I created? For example, my desktop icon positions for my apps, etc..
Is it probable that a new version will come out that's compatible with the old versions settings? For example, you mentioned the screen sleep timer being 15, 30, 60 and then changing to 45 and the boot loop occurs. Do the developers ever recognize this issue occurred and then correct it in the next nightly to allow for 15, 30, 45 and 60 so I could restore my data without the boot loop occurring?
thex2 said:
Thank you for the detailed response. It was very helpful. I have a few more questions for you below.
Click to expand...
Click to collapse
Let's see what I can do
thex2 said:
Is there an easy way to predict whether this will occur prior to upgrading? And if so, how?
Click to expand...
Click to collapse
There are no hard and fast rules.. If you're going from Dev A ROM to Dev B ROM, you will almost certainly have to wipe. Also, between major version updates (5.0 to 5.1 for example) you too will most likely have to wipe
Usually for any upgrade on the same ROM that isn't a major version update (dev a 5.0 to dev a 5.0 base) you usually won't have to wipe, but you may well have to, depending on whether the dev changes things a lot. Always have a titanium and a nandroid backup before updating.
thex2 said:
Can I downgrade back to my old nightly and restore my data to go back to the working setup that I previously had?
Click to expand...
Click to collapse
Yes probably. Restore the full nandroid if you want.
thex2 said:
Is there a way to get my old OS customizations back from the nandroid backup that I created? For example, my desktop icon positions for my apps, etc..
Click to expand...
Click to collapse
It depends which launcher you're using.. If you install a launcher from play store, it is a user app.. So if you're restoring user also using titanium filters, it should restore it fully, including widgets etc. That said, sometimes it doesn't always work out. If the launcher has built in backup, it may be wise to use it.
If the launcher is built into the ROM, its classed as a system app, so even though user apps and system apps both keep their app data in /data/data, it will not be seen with titanium if you're using a filter to shoe only user apps and data.. Work around is backup system and user data without a filter in titanium then when restoring, apply the filter for user apps.. Then once user apps are restored, find the system apps you need to restore data for and restore individually as required. You need to restore as little as possible though to avoid the boot loop.
thex2 said:
Is it probable that a new version will come out that's compatible with the old versions settings? For example, you mentioned the screen sleep timer being 15, 30, 60 and then changing to 45 and the boot loop occurs. Do the developers ever recognize this issue occurred and then correct it in the next nightly to allow for 15, 30, 45 and 60 so I could restore my data without the boot loop occurring?
Click to expand...
Click to collapse
Usually not.. Generally ROM v2 changes from ROM v1.. ROM v3 is usually even further away from ROM v1. If a dev is changing such a setting they are probably doing so for a reason.. Sometimes if the setting is part of a function that the dev decides to remove again ROM v3, its possible. But its best to be prepared and accept that wiping and restoring is a common practice in custom ROM flashing

Help with Pure Nexus Project would be greatly appreciated

I am new to my Nexus 6 and new to flashing custom roms. I have read the thread all morning long and still don't feel comfortable with what information I have obtained. I'm currently running marshmallow 6.0 rooted with supersu 2.52. How can I flash the latest pure Nexus project 6.0.1 correctly? I do have TWRP recovery installed and I'm running on build number MRA58R
Make a backup in TWRP, wipe your system partition, Flash the ROM zip and the GAPPS zip, reboot, profit. If anything fails you can roll back to your backup and try again.
Real simple. Download the latest built as well as the latest google apps (gapps)
Reboot to TWRP
Do a backup, so you have a restore point if something happens
Go to wipe->advanced wipe and choose both caches, system and data. DO NOT wipe internal storage
Go to install, choose the ROM and gapps and install them
Reboot
You will now be on the latest. You will have to set your phone up again, and all your text messages, home screen, act will be gone but all your stuff on your sdcard (internal storage) will be untouched.
You can also get real ambitious and make backups with something like titanium backup of all your apps and data and restore it after booting PN, but try to not back up system apps or system data (it should be an option... I dont know, I never use tibu). The main thing you lose without backing up is texts, I usually just deal with it/redownload apps/set up home screen again.
On future updates, unless there are major changes and its indicated by a majority of people in the PN thread, just dirty flash.
That is, backup, wipe caches, install new ROM version( I wouldn't reflash gapps ) this will leave all your apps, settings, ect... But should only be done when flashing the same or a very similar ROM. If you dirty flash and experience problems, go back and clean flash as I first instructed.
So I should not worry about flashing the new 32r radio?
shouldnt this have been one of the first things to learn BEFORE you ever rooted your phone? yea, nice job jumping in before learning your way around. i bet you even used a toolkit to root your device..
Everyone's got to start somewhere. And no toolkit here but thanks for your input! And thank you for the helpful responses.
roy.garlington said:
Everyone's got to start somewhere. And no toolkit here but thanks for your input! And thank you for the helpful responses.
Click to expand...
Click to collapse
no tool kit? ok, your -1 on not learning before rooting has a +1 right by it, for rooting the proper way. you just might earn some respect
Hey there simbo, what do you say about flashing the radio?
Sure. Or don't.
Whatever.
The radio is pretty separate from android. Its basically drivers to tell you phone how to use hardware.
FI has certain requirements for activation that may check what radio you have, but outside of that run what ever works good for you., its not going to for sure be any specific one. Newer may often be better but its not uncommon that an older one may work a little better.
Different apps can help you monitor (I dunno which ones... But I know its a thing ), you can also go into about phone -> status -> sim status and check signal strength where lower dBm is better(well a lower numeric value... Its technically a negative number, so higher is better i.e. -113 is worse then -104). This will vary slightly minute to minute and place to place so just taking a glance once won't really settle it for you
I just use it for a day or two, pay attention to how my signal is (just kinda how often did I have decent # of bars, nothing scientific), and check battery stats clicking on cell standby and looking at % of time with out signal.
roy.garlington said:
Hey there simbo, what do you say about flashing the radio?
Click to expand...
Click to collapse
youre choice. you can try any of the radios, from previous android versions, on any android version. they arent specific. im using the 27R radio. whichever one works best for you, thats whats important
roy.garlington said:
I am new to my Nexus 6 and new to flashing custom roms. I have read the thread all morning long and still don't feel comfortable with what information I have obtained. I'm currently running marshmallow 6.0 rooted with supersu 2.52. How can I flash the latest pure Nexus project 6.0.1 correctly? I do have TWRP recovery installed and I'm running on build number MRA58R
Click to expand...
Click to collapse
Well, it's all very easy if you read a little. Still i will give you one extra tip in case you start flashing all kinds of roms: You unlocked your bootloader. Before doing that you enabled "OEM unlocking" in 'Developer options'. Leave that enabled (this setting is 'sticky'. even when you wipe the device)!!!!. Leaving OEM unlocking enabled will disable "Device Protection" that causes sometimes a 72 hours lock-out from your Google account.

If I just flash a new full version instead of the OTA will nothing get deleted?

I've tried to look for the sultan otas but haven't found so if I just flash the whole ROM I should be fine right? Is there some other way to get the OTA from the updater if that deletes stuff?
Escabrera said:
I've tried to look for the sultan otas but haven't found so if I just flash the whole ROM I should be fine right? Is there some other way to get the OTA from the updater if that deletes stuff?
Click to expand...
Click to collapse
You'll be fine. What you're doing is called dirty flashing. It's not always the most stable thing to do especially if subsequent versions have significant changes, but if the update is just adding things like security patches and minor bugs, go ahead. Be aware that it's best to clean flash, or wipe the system partition because there will be no chance of conflicting code. Even if you're unsure if flashing a whole ROM would delete data, you can always just make a backup on TWRP. In fact, always make a backup before doing something like this.
Inflection said:
You'll be fine. What you're doing is called dirty flashing. It's not always the most stable thing to do especially if subsequent versions have significant changes, but if the update is just adding things like security patches and minor bugs, go ahead. Be aware that it's best to clean flash, or wipe the system partition because there will be no chance of conflicting code. Even if you're unsure if flashing a whole ROM would delete data, you can always just make a backup on TWRP. In fact, always make a backup before doing something like this.
Click to expand...
Click to collapse
It's just that I'm getting Google play services crashes constantly and 2 patches ago it wasn't happening so I'm trying to reflash the newest release. So I'll probably do a TWRP back up first. Does it also back up stuff like downloads and files on the phone?
Escabrera said:
It's just that I'm getting Google play services crashes constantly and 2 patches ago it wasn't happening so I'm trying to reflash the newest release. So I'll probably do a TWRP back up first. Does it also back up stuff like downloads and files on the phone?
Click to expand...
Click to collapse
You should probably also be reflashing the gapps as well since you are having issues with play services. In the case of TWRP, it doesn't back up files on the phone; rather it backs up the system partition, data (excluding storage), and some other optional stuff. Even if you were to clean flash, you wouldn't need to worry about your files (that is in the partition Internal Storage) because you almost never need to wipe media. A clean flash only requires you to wipe Dalvik, system, data, and cache. What you're doing is dirty flashing, where you wipe nothing and flash your zips over the existing ROM. The backup is just insurance in the instance that something goes wrong and you soft brick the phone.
i tried to flash it again and old updates with the issue still being there so i just nuked everything. I'm just going to use titanium backup plus having the files on a computer to get back to where i was before.

switching between treble and nontreble

Hello!
I am currently using a nontreble build (RR Nougat) and I want to try out a treble build (perhaps Havoc Pie) soon and I wonder what is needed to make sure I can switch back to my current setup without effort in case of problems. It would be nice if someone can give me some input and prevent me from shooting in my own foot
What partitions do I have to backup (using TWRP) and to whipe for making a clean install and still being able to revert everything?
I think there are parts of the data that can not be backed up with TWRP. Which data is affected of this, and will the be destroyed/modified when I install a treble build?
I am a bit nervous as I do not have much time for reverting in case of problems, and I cannot test my backup in advance.
Thanks!
theBoatman
theBoatman said:
Hello!
I am currently using a nontreble build (RR Nougat) and I want to try out a treble build (perhaps Havoc Pie) soon and I wonder what is needed to make sure I can switch back to my current setup without effort in case of problems. It would be nice if someone can give me some input and prevent me from shooting in my own foot
What partitions do I have to backup (using TWRP) and to whipe for making a clean install and still being able to revert everything?
I think there are parts of the data that can not be backed up with TWRP. Which data is affected of this, and will the be destroyed/modified when I install a treble build?
I am a bit nervous as I do not have much time for reverting in case of problems, and I cannot test my backup in advance.
Thanks!
theBoatman
Click to expand...
Click to collapse
First of all you need treble supported twrp.
If you have your old rom zip.
Then just backup data
Then wipe everything just leave vendor partition.
If you dont like pie than again wipe everything just leave vendor.
Install the old zip with gapps
Then restore the backup of data.
Thats it.

Switching between roms.

Hello ,
I need a little help. I am using Galaxy M205F. Recovery: orange fox,
current rom : Project Sakura 5.R (Android 11)
Now I want to switch to Project sakura 2.Q(Android 10). I want to switch because the latest version causing many problems such as : I can't even open 2 apps at a time. Its ram management is too poor. Also I want a gapps version.
Now what should I do to switch to that rom.
I mean can anyone guide me with full explanation.
Also can I use migrate to move apps and app data to that rom. (I am concerned cause am using Orange fox. )
Use the app Migrate for moving apps and such
[APP][ROOT][5.0+][1st Nov 2020] Migrate - custom ROM migration tool
Jumping from one custom ROM to another can be a challenging task. So I decided to make an app to simplify the process. Introducing Migrate! Migrate-GPE (v4.0) is on Google Play It was temporarily suspended. Read more here...
forum.xda-developers.com
And after backing up your apps and such with migrate format data and cache then flash the new rom.
Instructions on restoring the backup is in the Migrate XDA post.
Kenora_I said:
Use the app Migrate for moving apps and such
[APP][ROOT][5.0+][1st Nov 2020] Migrate - custom ROM migration tool
Jumping from one custom ROM to another can be a challenging task. So I decided to make an app to simplify the process. Introducing Migrate! Migrate-GPE (v4.0) is on Google Play It was temporarily suspended. Read more here...
forum.xda-developers.com
And after backing up your apps and such with migrate format data and cache then flash the new rom.
Instructions on restoring the backup is in the Migrate XDA post.
Click to expand...
Click to collapse
So I don't need to wipe system, data? I had to wipe these when i switched to custom rom from stock .
Should I just format data and cache?
You should wipe them for sure, just in case of breaking stuff.
Just make sure you keep your Migrate backup somewhere safe.
Kenora_I said:
You should wipe them for sure, just in case of breaking stuff.
Just make sure you keep your Migrate backup somewhere safe.
Click to expand...
Click to collapse
Are you sure I can go to Android 10 from Android 11. (Current rom Android 11 and i want to go to Android 10 but same rom.)
Oops, no you cant if the bootloader has changed.
Your are running 5.R?
Isnt it 5.1?
Kenora_I said:
Your are running 5.R?
Isnt it 5.1?
Click to expand...
Click to collapse
Oops sorry its 5.1. and i wanna go back to 2.Q.
Yoh should see if the bootloader version has changed, samsung phones brick if you try to flash a older bootloader on a newer one.

Categories

Resources