[Q] TWRP Backup/Restore Options - Samsung Galaxy S10 Questions & Answers

Hi, TWRP has recently added a bunch of new backup/restore options as the whole list follows:
Baseband
Boot
Data
EFS
Product
Product Image
System
System Image
Vendor
Vendor Image
Sure, the good old Boot, System and Data are still there, but what about all those other options? What do they mean? What does the "Image" versions mean? Most importantly, when I factory reset my phone after an update, should I restore only "Data"?
I've looked for these answers but couldn't really find them and I think this is a topic of interest for many people here.
Thank you

I am guessing the product, system, and vendor image is a way to create an image of those for back up purposes. As for doing a factory data reset I would say yeah just data is needed. I haven't used TWRP since the S2 days, so I am just taking shots in the dark here.

sorry to bump an old post but i am wondering the same? i havent had an android since the note 3 days and backing up through twrp had less options to choose then what is on the s10.

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

Guide to Factory Images?

There's a lot of factory images available from Google. Is there some sort of a guide as to which ones are for what? I know how to flash them in fastboot but I don't know how to choose which one. Also, if anyone could help with what partitions the Resurrection Remix zip installed through recovery replaces I would be very grateful.
Had a similar question recently as coming from N5 it was a complete zoo of the images for various providers.
Anyways, with Marshmallow they have unified all the providers under the same factory image, so just flash the latest one (MRA58R if I'm not mistaken at the moment).
I'm actually needing to revert to Lollipop...
pretty much the way it is the farther down the list = newer and I'd recommend installing the newest one for the version number you want. The T-mobile and project fi builds are obviously for t-mobile and fi phones (their only real difference is either VoLTE and/or wifi calling and the radio firmware).
Make sure your bootloader is as new or newer than the one in the image! And if you are using a t-mobile or fi build then flash the radio to make sure you get those features.
As for what to flash pretty much always boot.img and system.img will get you stock (And back on forced encryption just fyi). only do cache and userdata (userdata.img will delete your internal storage as well as data) if you're replacing your custom recovery with the stock recovery.img. If you're sticking with a custom recovery then use it to wipe cache, dalvik cache, and data instead to save your internal storage.

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.

Fixing failed OTAs after execution of TWRP

When booting TWRP using fastboot, without flashing it to the recovery partition, eg. "fastboot boot twrp-sanders-r20.img", only for the purpose of taking a partition backup, once done the device wont longer take OTA's!
That is IMHO a very unexpected behavior, as booting this way and keeping system read only should mean that nothing on the phone gets changed (well except the data partition if a backup is saved on these one).
One would expect this not to mess with the OTA process.
Now, this twrp at least: https://forum.xda-developers.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910 does, after some investigation i found out that it is mounting the oem partition writable and modifying it adding a .twrp file to the root. Since the OTAs are checking and patching this partition of cause they will fail.
Luckily there is a way out, you can reflash the OEM partition for example from here: https://forum.xda-developers.com/moto-g5s-plus/how-to/tutorial-fhash-oreo-8-1-stock-global-t3852967
that is assuming that you are running the first Oreo 8.1 update, if you had an other version when the issue hit, you will need to find the right OEM partition image for you actual build.
IMHO this behavior of TWRP is unacceptable and should be fixed in a new release ASAP.
DavidXanatos said:
When booting TWRP using fastboot, without flashing it to the recovery partition, eg. "fastboot boot twrp-sanders-r20.img", only for the purpose of taking a partition backup, once done the device wont longer take OTA's!
That is IMHO a very unexpected behavior, as booting this way and keeping system read only should mean that nothing on the phone gets changed (well except the data partition if a backup is saved on these one).
One would expect this not to mess with the OTA process.
Now, this twrp at least: https://forum.xda-developers.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910 does, after some investigation i found out that it is mounting the oem partition writable and modifying it adding a .twrp file to the root. Since the OTAs are checking and patching this partition of cause they will fail.
Luckily there is a way out, you can reflash the OEM partition for example from here: https://forum.xda-developers.com/moto-g5s-plus/how-to/tutorial-fhash-oreo-8-1-stock-global-t3852967
that is assuming that you are running the first Oreo 8.1 update, if you had an other version when the issue hit, you will need to find the right OEM partition image for you actual build.
IMHO this behavior of TWRP is unacceptable and should be fixed in a new release ASAP.
Click to expand...
Click to collapse
Agreed; received today a security update for my moto G5S plus (didn't root till i got the official 8.1 Oreo update) and every time i try to install takes me to TWRP and i keep it as READ ONLY (since TWRP itself says if u modify u won't b able to receive OTA updates) and... even without the modification i still can't get the update. this has to be fixed ASAP by TWRP
I did discover that if you keep the OTA files for older updates, you can re-run them to update the OEM partition. Unfortunately it only works one update generation.
I wonder if we just delete the .TWRP file if it can recover it. I'll test later this week. The OTA has a way to repair partitions
pizzaboy192 said:
I did discover that if you keep the OTA files for older updates, you can re-run them to update the OEM partition. Unfortunately it only works one update generation.
I wonder if we just delete the .TWRP file if it can recover it. I'll test later this week. The OTA has a way to repair partitions
Click to expand...
Click to collapse
keep us posted man
pizzaboy192 said:
I wonder if we just delete the .TWRP file if it can recover it. I'll test later this week. The OTA has a way to repair partitions
Click to expand...
Click to collapse
imho 99% sure, it still will fail, the partition does not just have to be semantically unchanged it must be 1:1 bit wise identical with what is expected.
I'll see what happens. I'm not a developer but I have pointed this out a few times to the developers of both TWRP threads, along with sharing these issues on the telegram group, but everyone else is focused on the latest custom ROM and doesn't care about stock, so the issues have fallen on deaf ears
in a nutshell how can i receive the last OTA security? do i revert to stock , install then root again? holy moly that's a lot of work
TheKicKer69 said:
in a nutshell how can i receive the last OTA security? do i revert to stock , install then root again? holy moly that's a lot of work
Click to expand...
Click to collapse
Unfortunately until they fix TWRP so it doesn't damage the OEM partition, you need a clean copy of the OEM partition to take the OTA.
However, there is a way you can prevent this, but it is a little hairy (you can't use any magisk modules). You can use the magisk app to patch the boot.img file that is from a slightly older Oreo firmware and flash that with fastboot, without using TWRP.
---------- Post added at 07:35 AM ---------- Previous post was at 07:30 AM ----------
DavidXanatos said:
imho 99% sure, it still will fail, the partition does not just have to be semantically unchanged it must be 1:1 bit wise identical with what is expected.
Click to expand...
Click to collapse
Yup. Just confirmed that deleting the .twrp file does not fix it.
I've reached out to Motorola to update their Lenovo Motorola Smart Assistant tool to support the official Oreo OTA which will allow us to download the latest full firmware file, which would give us the OEM partition to reflash before the next OTA.
I'll bother the TWRP devs again this week to get this unexpected behavior removed so we don't need to bother anyone in the future.
Update: none of the TWRP maintainers currently have replied to me about this issue.
@CheckYourScreen hasn't been active for a while but hasn't responded to a few different attempts to point this issue out (Been over a month since first notification with no acknowledgement)
@MasterAwesome has a custom TWRP that is latest, but they're still working on it. They're our best bet to possibly get it fixed since they're actively working on it. They've also been made aware, but no response yet (4 days since notifying and it was a weekend, so hopeful)
@GeneticEnginer was notified today. They developed the first unofficial TWRP (3.1.1) and might be able to help, but not holding my breath
I've also contacted a few people who do unofficial TWRP ports for some tips on unpacking one of our existing TWRP files and fixing it myself. It may be the way to go.
Hi guys. Final update. I've fixed TWRP temporarily. If we're not going to run custom ROMs, use this TWRP to backup. It does a bitwise backup of OEM and doesn't mount it as RW so it WILL work for restoring fully OTA capable stock ROM. It is NOT treble compatible as the treble compatible ones do weird things that I haven't documented.
https://forum.xda-developers.com/mo...-r20-stock-t3869192/post78205758#post78205758

Razer 2 phone won't boot after disabling a couple apps

I thought I would just casually go through my installed apps and clean some up. I disabled the following...
1. Accessibility Suite
2. Gmail
3. Google TV
4. Google Music
5. Chroma
6. Razor Store
7. Logo+ (Uninstalled)
I then thought to myself that I would probably need the Accessibility Suite for apps that needed that as a permission to work. So I re-enabled it and it updated. I then rebooted and now the phone hangs at the Razor logo. I do have TWRP installed so I can get to that. I also have a complete backup from about a year ago using TWRP which I would like to use as my last resort. I am thinking that by disabling one of the above apps caused this issue. So, can I fastboot and re-enable them using adb? If so what is the command and the name for each app above? I am not an adb guru so the exact commands and names would help. Or if someone can think of another way to get my phone working besides a complete wipe I would greatly appreciate it! I am running MR1 stock with Magisk/art97. I do remember back in the day having a similar problem and I ended up re-flashing the ROM or something and it kept all my data but I think it just repaired the OS or something and that fixed a not booting issue. That was a long time ago so I cannot remember all the specifics but if that rings any bells for anyone as to another way I can approach this I am all ears. Thank you!
Logo+ - you uninstalled it. I dont think any others will prevent booting. If there is no logo, it will sit till it gets one. Reflash logo+ if at all possible. (I have a logo.img in my firmware, but different fone.
Pachacouti said:
Logo+ - you uninstalled it. I dont think any others will prevent booting. If there is no logo, it will sit till it gets one. Reflash logo+ if at all possible. (I have a logo.img in my firmware, but different fone.
Click to expand...
Click to collapse
Thanks for your reply. Logo+ is not a system app and shouldn't have anything to do with the Razor logo when booting up. Logo+ is a 3rd party app that allows to manipulate the colored logo on the back of the phone. For example when a notification comes in Logo+ can light up the colored logo on the back of the phone or make it flash. The app is from here. I've actually uninstalled and reinstalled Logo+ in the past when updating and such with no adverse effects. I can't imagine Logo+ would be the culprit here. What do you think?
I think only logo+ is capable of preventing boot, because your bootlooping. all other apps should NOT cause ANY bootloop, because they do not access anything previous to logo+, your first step in your problem.
Try this...
Logo+ if incorrect in any way will not show. This CAN cause bootloops. No other app you mention can. Perhaps your fone took a silent update, maybe it checked for the Logo+ and 'kicked' you for messing with it. Maybe google decided not to like it, so silently ordered your fone to delete the logo you installed leaving you with no logo+, and until you can see a logo+ your fone will stay there, so try my suggestion, seems your only choice. I have been flashing chips for years so can help, just go with my suggestion, reflash ONLY stock system.img/.bin using your stock flashing application, you'll be glad you did.
Pachacouti said:
I think only logo+ is capable of preventing boot, because your bootlooping. all other apps should NOT cause ANY bootloop, because they do not access anything previous to logo+, your first step in your problem.
Try this...
Logo+ if incorrect in any way will not show. This CAN cause bootloops. No other app you mention can. Perhaps your fone took a silent update, maybe it checked for the Logo+ and 'kicked' you for messing with it. Maybe google decided not to like it, so silently ordered your fone to delete the logo you installed leaving you with no logo+, and until you can see a logo+ your fone will stay there, so try my suggestion, seems your only choice. I have been flashing chips for years so can help, just go with my suggestion, reflash ONLY stock system.img/.bin using your stock flashing application, you'll be glad you did.
Click to expand...
Click to collapse
I will follow your instructions but I am needing some clarification please.
The app Logo+ never came with the stock OS or the Razor Phone 2. It is a separate app made by a 3rd party. So flashing the system.img will not bring back Logo+. So should I first attempt to flash the Logo+ app using TWRP?
If you want me to reflash the stock system.img, I don't believe I have that. How can I obtain this? And could you please provide me with the steps to reflash? Should I use TWRP or fastboot and use Windows adb?
So the Logo+ is only an app. Not a zip. So I don't believe I can flash that. Should I attempt to sideload it? Can I install an app on the phone when the phone cannot boot?
So logo+ IS your prob. Personally I would never use an app to do such work, I'd edit and flash it myself, but hey, you prob know this by now.
Go to (motorola?) Razor support, look for your firmware, it may help if you have phone plugged in while doing so in case they have a detector script to detect firmware for your fone.
Regardless, grab stock offered for your fone. This should also point you in the direction of the correct flashing frmware. once you have them, get back to me.
Or look at what I found using startpage/google:
Need help in flashing stock rom on Razer Phone 2 ! (Stuck in Bootloop)
Hello Everyone , I have ran into a very bad problem and would appreciate some help. I tried rooting my phone (Razer Phone 2 Atnt varient) with the following method...
forum.xda-developers.com
Take your pick, so many stock firmares online here:
Startpage Search Results
www.startpage.com
(I use startpage for these results)
Choose what you believe is for your fone, then read the XDA razor thread I linked to above, I will guide you once you have your files if you still need it, but read the razor thread first
Pachacouti said:
So logo+ IS your prob. Personally I would never use an app to do such work, I'd edit and flash it myself, but hey, you prob know this by now.
Go to (motorola?) Razor support, look for your firmware, it may help if you have phone plugged in while doing so in case they have a detector script to detect firmware for your fone.
Regardless, grab stock offered for your fone. This should also point you in the direction of the correct flashing frmware. once you have them, get back to me.
Or look at what I found using startpage/google:
Need help in flashing stock rom on Razer Phone 2 ! (Stuck in Bootloop)
Hello Everyone , I have ran into a very bad problem and would appreciate some help. I tried rooting my phone (Razer Phone 2 Atnt varient) with the following method...
forum.xda-developers.com
Take your pick, so many stock firmares online here:
Startpage Search Results
www.startpage.com
(I use startpage for these results)
Choose what you believe is for your fone, then read the XDA razor thread I linked to above, I will guide you once you have your files if you still need it, but read the razor thread first
Click to expand...
Click to collapse
The Razer Phone 2 is made by Razer https://www.razer.com/mobile. Motorola makes the Razr which can be confusing.
I don't know how to edit and flash the Logo+ app. Can you do this for me and I'll test? The app is located here https://github.com/CurtisMJ/LogoPlus/releases.
As I understand it as soon as I flash the stock rom it'll put me back to factory settings right? So I'll have to re-personlize my entire phone from scratch. I'd like to leave this as my last resort if possible. So if we can I'd like to flash the Logo+ if you can make that zip for me.
Hi, developer of Logo+ here
I think there's maybe some misunderstanding as to what the app does. It doesn't work on the bootloader splash in any way (this can actually cause failed boots). It's for controlling the RGB on the Razer logo on the back of the device. I named it "Logo+" to avoid any legal issues with caling it "Chroma" since thats a trademark of Razer. The app is entirely user space and is not active during boot. It modifies the lights via sysfs values (with root) that are entirely in RAM so they're cleared on boot.
You can typically just put the .apk in /data/app in recovery mode to install it. I think this may have changed slightly with newer android versions.
Ultimately I don't think Logo+ is needed for or can interfere with boot. I would suggest flashing the system image as suggested for a clean slate.
EDIT: You may end up having to use your last resort backup if you're not keen to loose *too* much data. Not booting is a difficult thing to troubleshoot because there's no feedback as to what went wrong on Android. If its a data thing and not a system thing that is. You could try fastboot flash each system image part to maybe fix any corruption
EDIT2: Take another backup before you do anything though. Titanium back can extract app data from TWRP backups so you can restore your user data at least
CurtisMJ said:
Hi, developer of Logo+ here
I think there's maybe some misunderstanding as to what the app does. It doesn't work on the bootloader splash in any way (this can actually cause failed boots). It's for controlling the RGB on the Razer logo on the back of the device. I named it "Logo+" to avoid any legal issues with caling it "Chroma" since thats a trademark of Razer. The app is entirely user space and is not active during boot. It modifies the lights via sysfs values (with root) that are entirely in RAM so they're cleared on boot.
You can typically just put the .apk in /data/app in recovery mode to install it. I think this may have changed slightly with newer android versions.
Ultimately I don't think Logo+ is needed for or can interfere with boot. I would suggest flashing the system image as suggested for a clean slate.
EDIT: You may end up having to use your last resort backup if you're not keen to loose *too* much data. Not booting is a difficult thing to troubleshoot because there's no feedback as to what went wrong on Android. If its a data thing and not a system thing that is. You could try fastboot flash each system image part to maybe fix any corruption
EDIT2: Take another backup before you do anything though. Titanium back can extract app data from TWRP backups so you can restore your user data at least
Click to expand...
Click to collapse
Thank you for taking the time to chime in here @CurtisMJ. I did end up gettijg it to boot now in partition a. I went into TWRP and switched to partition a and phone boots but no longer has root or magisk. I'm not sure how the partitions work but it looks like there are two that the Razer uses. A and b. And I guess I've been using b since the beginning and since b won't boot now I tried booting off partition a and the phone seems to work as it did. All apps and widgets are in the same place except magisk and phone isn't rooted. I could reflash the system image but the amount of time to re-personalize everything will be extensive. So I just wanted to make sure I did everything I could before that. I'll try copying the apk as suggested and see if that works.
Do you know if there is a way to enable system apps when they've been disabled like I did when phone won't boot? I am in partition a right now and booted and I reinstalled logo+ and saw that all the apps I disabled in OP are back to being enabled. So I am not sure if partition a and b share the same system and user data but everything is exactly what it looks like from partition b. So it is a good chance they share everything except magisk which I guess is flashed at the partition level. Just trying to make sense. Thanks for everyone's time.
So the A-B partition layout is a thing that was introduced by google for more reliable system updates. Effectively the phone has 2 copies of the OS, including system partition,kernel,vendor etc and the phone flip-flops between them on every update, updating the "other" partition to the one its running so if it fails it can boot to the still good one. So you effectively went a system update backwards, but using the same user data partition (or Magisk kept an old copy of the system around). System apps disabled status is stored in /data/system/users/0/package-restrictions.xml which can edited in TWRP with some effort. Magisk is likely flashed to kernel B so you're correct in that its a partition level thing.
CurtisMJ said:
So the A-B partition layout is a thing that was introduced by google for more reliable system updates. Effectively the phone has 2 copies of the OS, including system partition,kernel,vendor etc and the phone flip-flops between them on every update, updating the "other" partition to the one its running so if it fails it can boot to the still good one. So you effectively went a system update backwards, but using the same user data partition (or Magisk kept an old copy of the system around). System apps disabled status is stored in /data/system/users/0/package-restrictions.xml which can edited in TWRP with some effort. Magisk is likely flashed to kernel B so you're correct in that its a partition level thing.
Click to expand...
Click to collapse
Thank you so much for that explanation. That makes a lot of sense. My OS has been MR1 for a long time and OTA has been turned off so I guess there hasn't been any OS updates so there's been no reason to switch between partition a and b I guess. So I guess there's technically been a backup of my OS all this time with the double partition thing which is cool. And I guess I could magisk and root partition a. If I reflash the system image to partition b will that effect partition a?
I think he's talking bootloaders re: a/b partitioning, The point of A/B being if your using 'A' to boot, and you update, the updated BOOTLOADER is flashed to 'B' and when you reboot the f'n, 'B' becomes your main bootloader until next update where that update will use 'A' having been 'emptied' after the previous update sort of thing, I dont have a/b, but this is my understanding of the a/b partitioning,,,?
Opens up the options for dual booting fone with or without magisk, If I had a/b, i'd flash magisk to one and stock to the other...
Pachacouti said:
I think he's talking bootloaders re: a/b partitioning, The point of A/B being if your using 'A' to boot, and you update, the updated BOOTLOADER is flashed to 'B' and when you reboot the f'n, 'B' becomes your main bootloader until next update where that update will use 'A' having been 'emptied' after the previous update sort of thing, I dont have a/b, but this is my understanding of the a/b partitioning,,,?
Opens up the options for dual booting fone with or without magisk, If I had a/b, i'd flash magisk to one and stock to the other...
Click to expand...
Click to collapse
I was thinking the same. I believe I have the opportunity to stick with the working partition which is a, and magisk that. And then for the partition b I could put the official lineage OS on there. My only concern is if lineage had an update does it update both a and b partitions which I would lose my original OS then. I guess I'll have to research.
I think it's safe to assume that when an update takes place, upon reboot, whichever bootloader you WERE using, a OR b, is now empty... it's staring you in the face
Just remember what we agreed on. Once you magisk your current bootloader, make a backup of said bootloader, store it on main computer, because when you flash lineage, your magisk in your current slot will be wiped. Once you have installed Lineage, you will need to boot into fastboot to re-flash magisk, and then use fastboot boot a or b for dual booting until you get an app or sumat to choose in gui what you choose to boot into
What I am thinking I will do for the time being is stick with booting into partition a which is currently not rooted and I am fine with that. At least it works unlike partition b. This is my main phone, my only phone, and I need it to work right now so would rather not risk causing issues flashing stuff. I know enough about flashing to be dangerous.
Currently the official release of lineage for the Razer Phone 2 is still not stable yet according to the forum here. So camera still doesn't work and I need the camera to work. So I'll wait until the camera is fixed which hopefully will be soon.
You stated in your previous post "sumat to choose in gui what you choose to boot into" can you clarify? Are you saying there is a GUI that helps choose what to boot into? Currently I am using TWRP to select partition a or b to boot into. It takes about a minute to load into TWRP but I wouldn't be doing it often. I don't think I really have a use for dual booting.
I appreciate the help. As soon as I am ready to proceed I'll update this post and If you're still around I'll receive your assistance. Thank you for your time.

Categories

Resources