Root, TWRP and Flashing - Samsung Galaxy S7 Questions and Answers

I recently got an S7 (Exynos) SM-G930F and decided to root it. So I went with the typical CF-Auto-Root method... I used the latest ODIN with the correct auto root file and everything went well. I have root.
But then I noticed that I didn't have any recovery, so I installed TWRP Manager from the Play Store and flashed recovery with that. Everything works fine except for not having access to backup /Data, this was expected.
But despite everything pretty much working, I've read on a few threads here that I was supposed to wipe my phone after flashing TWRP. Now I've also read the TWRP install thread which doesn't mention anything about wiping my device, but it does offer another method of rooting the S7... Flash TWRP first using ODIN, then flash SuperSU and dm-verity/force encryption disabler.
So I have a couple of questions.
In the TWRP guides it mentions this: "By swiping right, you will trigger dm-verity, and if you don't follow the next step you will be unable to boot!". I've never had this issue, does CF-Auto-Root or SuperSU resolve this issue?
Do I need to install the dm-verity/force encryption disabler?
If I do have to wipe my device, am I going for a standard (factory reset) wipe? Advanced wipe (if so, which partitions?) or format data?
Unless there's another way to gain full access to all partitions in order to perform a complete nandroid backup (including data)?
Basically, once I've completely backed up the S7 I'd like to install the Xposed Framework. Will installing this lose any data?

d3adm8n said:
I recently got an S7 (Exynos) SM-G930F and decided to root it. So I went with the typical CF-Auto-Root method... I used the latest ODIN with the correct auto root file and everything went well. I have root.
But then I noticed that I didn't have any recovery, so I installed TWRP Manager from the Play Store and flashed recovery with that. Everything works fine except for not having access to backup /Data, this was expected.
But despite everything pretty much working, I've read on a few threads here that I was supposed to wipe my phone after flashing TWRP. Now I've also read the TWRP install thread which doesn't mention anything about wiping my device, but it does offer another method of rooting the S7... Flash TWRP first using ODIN, then flash SuperSU and dm-verity/force encryption disabler.
So I have a couple of questions.
In the TWRP guides it mentions this: "By swiping right, you will trigger dm-verity, and if you don't follow the next step you will be unable to boot!". I've never had this issue, does CF-Auto-Root or SuperSU resolve this issue?
Do I need to install the dm-verity/force encryption disabler?
If I do have to wipe my device, am I going for a standard (factory reset) wipe? Advanced wipe (if so, which partitions?) or format data?
Unless there's another way to gain full access to all partitions in order to perform a complete nandroid backup (including data)?
Basically, once I've completely backed up the S7 I'd like to install the Xposed Framework. Will installing this lose any data?
Click to expand...
Click to collapse
Of course you are going to want to flash .zips through your Recovery, but as you have recognised there is the DM-Verification that will stop you doing so. In order to get rid of the encryption you will have to firstly have to Factory Reset but as you know this will also delete all apps and data that you have on your Internal Storage.
Then, you need to flash a .zip called 'no-verity-encryption-opt' and this will apply a patch onto your boot so you can flash unknown images and zips through.
If you can't find this no verity zip, leave me your email and I'll try and send it to you.
Good luck!
Also, installing the Xposed Framework will not cause you to lose any of your data.

AzzyC said:
Of course you are going to want to flash .zips through your Recovery, but as you have recognised there is the DM-Verification that will stop you doing so. In order to get rid of the encryption you will have to firstly have to Factory Reset but as you know this will also delete all apps and data that you have on your Internal Storage.
Then, you need to flash a .zip called 'no-verity-encryption-opt' and this will apply a patch onto your boot so you can flash unknown images and zips through.
If you can't find this no verity zip, leave me your email and I'll try and send it to you.
Good luck!
Also, installing the Xposed Framework will not cause you to lose any of your data.
Click to expand...
Click to collapse
Thanks for the info.
I may have already done this, I honestly can't remember. Is there any way to check if I've already installed no-verity-encryption-opt? Because I am already able to install zips in Recovery, so far I've installed a SuperSU update and AdAway. Although I do get a fair amount of 'Failed/Unable to mount /data' messages which may suggest that these zip installs didn't actually work.
I guess I still need to factory reset? And I guess that also means rooting again and installing no-verity-encryption-opt, then finally Xposed?

d3adm8n said:
Thanks for the info.
I may have already done this, I honestly can't remember. Is there any way to check if I've already installed no-verity-encryption-opt? Because I am already able to install zips in Recovery, so far I've installed a SuperSU update and AdAway. Although I do get a fair amount of 'Failed/Unable to mount /data' messages which may suggest that these zip installs didn't actually work.
I guess I still need to factory reset? And I guess that also means rooting again and installing no-verity-encryption-opt, then finally Xposed?
Click to expand...
Click to collapse
I had the same error message you are facing right now. Can you let me know what values you see when you view the Data, System and Cache partition, after clicking on 'Partition Options' - If you're on the latest TWRP you can take screenshots by hitting the Power and Vol Down.
^^^IGNORE^^^
No factory reset required. Basically, the file system of your Data partition is incorrect and that is why it can't be mounted on to.
Go to 'Wipe'->'Advanced Wipe'->Click on the Data box->'Partition Options'->(You may be seeing values like 0mb for most of the information displayed and why you can't mount to it; if you are not let me know!)->'Change File System'->(Try out different File Systems until you being to see true values for the sizes, but avoid using EXT2 and EXT3 if you can)
Doing all this you will be able to Mount to your Data partition, however your OS will be deleted! So get your phone into Download mode, open up Odin program on your PC, and flash a Bootloader (BL) and your phone will be fine.
Then flash the 'no-verity-encryption-opt.zip' and then your SU Binary and Xposed Framework etc.
Good luck again Buddy!
---------- Post added at 05:41 PM ---------- Previous post was at 05:12 PM ----------
Wait Install the No-verity zip first then, then flash a BL

AzzyC said:
I had the same error message you are facing right now. Can you let me know what values you see when you view the Data, System and Cache partition, after clicking on 'Partition Options' - If you're on the latest TWRP you can take screenshots by hitting the Power and Vol Down.
^^^IGNORE^^^
No factory reset required. Basically, the file system of your Data partition is incorrect and that is why it can't be mounted on to.
Go to 'Wipe'->'Advanced Wipe'->Click on the Data box->'Partition Options'->(You may be seeing values like 0mb for most of the information displayed and why you can't mount to it; if you are not let me know!)->'Change File System'->(Try out different File Systems until you being to see true values for the sizes, but avoid using EXT2 and EXT3 if you can)
Doing all this you will be able to Mount to your Data partition, however your OS will be deleted! So get your phone into Download mode, open up Odin program on your PC, and flash a Bootloader (BL) and your phone will be fine.
Then flash the 'no-verity-encryption-opt.zip' and then your SU Binary and Xposed Framework etc.
Good luck again Buddy!
---------- Post added at 05:41 PM ---------- Previous post was at 05:12 PM ----------
Wait Install the No-verity zip first then, then flash a BL
Click to expand...
Click to collapse
Hey man, i'm having that problem.
I want to root my phone but i am not able to acess Internal Storage, on twrp its showing 0mb.
I did what you says in this post but i always have caught in ''Encrypetd phone'' or something like this.
What are the steps? 1- format data (then deletOS) and then? Can you help me please?

Related

Phone encryption and TWRP backup

Hey,
So my phone is encrypted as part of my job, and I wanted to run the latest update (XNPH38R) to the Phone and found that:
1. TWRP ( 2.8.0.1) won't let me create a nandroid backup of the phone
2. I can't apply the update because I can't see the content of my storage.
Bootloader in unlock and the phone is rooted
So my first question, Is there a way to do a nandroid backup to encrypted phone?
Is there a way to mount the encrypted storage in TWRP and apply the update
Regards
Same problem with my XT1068!
Also like to be able to format dalvik and do an backup in TWRP, but can't get around the encryption from TWRP.
As it seems, The Samsung S4 has an option to (temporary?) decrypt the Phone as shown in the following video:
https://www.youtube.com/watch?v=W_qcTycR3UY
But I don't have this on my XT1068.
So Guess/hope there should be some work around somehow?
Edit: Maybe this could do the trick...
http://forum.xda-developers.com/galaxy-nexus/help/how-to-decrypt-encrypted-phone-restore-t1964358
1. No, it would be pretty insecure if you could do a Backup of your phone without entering the password
Sadly an encrypted Backup is currently not possible too. (I understood that you can do a Backup but no restore?)
2. Don't know, but I expect you are locked into OTA updates for now.
Send from OnePlus One using Tapatalk
The problem with OTA is that I'll loose root after running the OTA and i need that.
I can't even do a backup,
BTY- you can do an encrypted backup in TWRP so you can put a password to the backup, bit it WON'T let you do a backup to encrypted system.
gallico916 said:
The problem with OTA is that I'll loose root after running the OTA and i need that.
I can't even do a backup,
BTY- you can do an encrypted backup in TWRP so you can put a password to the backup, bit it WON'T let you do a backup to encrypted system.
Click to expand...
Click to collapse
I would also be careful upgrading to 38R with encryption as I have read about some people running into problems. But have you tried Philz recovery? May have some more options.
gallico916 said:
The problem with OTA is that I'll loose root after running the OTA and i need that.
I can't even do a backup,
BTY- you can do an encrypted backup in TWRP so you can put a password to the backup, bit it WON'T let you do a backup to encrypted system.
Click to expand...
Click to collapse
Re-rooting the phone is easy and takes seconds.
I am having much the same issue that you are. I encrypted my phone and TWRP doesn't allow me to create a nandroid. I get an error stating the it can't mount the data partition. Is that what you're experiencing? I tried to search different forums and couldn't find anything definitive about a solution or if it's even possible to create a nandroid while the phone is encrypted.
---------- Post added at 03:40 AM ---------- Previous post was at 03:06 AM ----------
OP - I think I found the solution to our problem. Or rather, Solo1 from the oneplus forum provided the following solution:
..."Eventually I managed to get TWRP v2.7.1.1 (as I previously used 2.8.0.1 and that didn't work) to work on my device. I have now successfully boot into recovery with the data partition mounted and perform my device upgrade from 33R to 38R."
OP - I think I found the solution to our problem. Or rather, Solo1 from the oneplus forum provided the following solution:
..."Eventually I managed to get TWRP v2.7.1.1 (as I previously used 2.8.0.1 and that didn't work) to work on my device. I have now successfully boot into recovery with the data partition mounted and perform my device upgrade from 33R to 38R."
Thanks for the advise,
I found a solution but it's a huge workaround:
1. created Titanium Backup
2. Plug the phone to the computer and backup the folders I need including Titanium Backup
3. Boot to recovery and do full phone wipe,
4. Use TWRP mount option and mont my data partition and copy the new image and Titanium Backup folder.
4. flash image, and boot devices,
5. after initial setup and another restart restore all apps and setting via Titanium Backup app
6. Enjoy the phone
I know it's a work around but This is way we are here at the first place, we like to thinker with our phones
Running the encryption again, and so far all is good
Regards

FlashFire with HTC One A9?

Anyone used ChainFire's FlashFire with the One A9?
I've used it for backups successfully but have yet to restore anything with it (a little squeamish to do so :silly.
And I'll just add, if anyone has used it and could offer any tips or procedures that would be great.
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
Click to expand...
Click to collapse
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
theNdroid said:
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
Click to expand...
Click to collapse
Of course. Root is required to use FlashFire. I use Xposed as well, and I've had no problems updating via FlashFire.
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Click to expand...
Click to collapse
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
eelpout said:
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
Click to expand...
Click to collapse
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
CSnowRules said:
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
Click to expand...
Click to collapse
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
eelpout said:
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
Click to expand...
Click to collapse
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
CSnowRules said:
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
Click to expand...
Click to collapse
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
eelpout said:
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
Click to expand...
Click to collapse
Ok, this post will go a bit off topic. That being said, I can offer two courses of action. I take no responsibility for anything in this post.
Safest--almost no risk (my personal preference)
1. Backup your data partition, including internal SD via TWRP to ext SD or USB OTG drive. Flash the latest RUU from HTC. Boot stock and apply OTAs until there are no more updates available. Fastboot flash the latest TWRP, and finally restore your data and flash the latest SuperSU via TWRP. Reboot your fully updated, rooted A9 with all your data still intact.
A little risky and untested to my knowledge--could result in a hard brick if something partially fails. FLASHING BOOTLOADERS IN FLASHFIRE IS STILL ALPHA FOR HTC DEVICES!!! This may work with s-on...but may require s-off.
Your system partition must have never been mounted r/w for this to work.
2. Download the OTA zips for your phone from the first update available to the latest and the latest SuperSU and TWRP. Use FlashFire to do everything in one shot. Select allow flashing bootloaders in FlashFire settings, select your OTAs for installation from oldest to newest (don't select restore boot and recovery), select TWRP and SuperSU for installation, disable everroot and preserve recovery. Cross your fingers and timidly press flash... If all is successful, you should have the same end result as option 1.
I STRONGLY recommend the first method, but if you're feeling lucky and decide to try the second method, please share how it goes, since this post is FlashFire related and this would be the ultimate test of FlashFire for our devices.
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
NuShrike said:
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
Click to expand...
Click to collapse
The solution for problem 1 can be handled in TWRP. The files can be deleted via TWRP's file manager or the built in terminal, which may be easier for some people.
Also, the solution for the corrupted data and internal SD is to create an image of the data partition (just like the system image backup option). This can be done via dd in TWRP or adb. It requires a large amount of storage and it takes longer, but I've had to do it, since I use VIP Access by Symantec for work. A normal file based backup in TWRP breaks that app. This also keeps the pin/fingerprint data intact.
If we could have that implemented in a user friendly manner, that would be great, but I'm sure CaptainThrowback and Chainfire both have bigger issues to deal with. I could probably figure out a solution, but the work wouldn't be worth it for my own benefit, since I'm fluent with the Linux command line.

Oneplus 6 bootloop after upgrade to 9.0.4 (+failed to restore the nandroid backup!)

So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Thank you for making the time writing this, it is relief to hear that you figure this out. Will try this first in the morning.
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
This guide can also be used to restore from other roms;
b217260 said:
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
Click to expand...
Click to collapse
What did you do?
---------- Post added at 02:14 PM ---------- Previous post was at 02:13 PM ----------
petran07 said:
This guide can also be used to restore from other roms;
Click to expand...
Click to collapse
I guess so. I never had to use a backup to restore on a custom ROM yet.
tabletalker7 said:
What did you do?
Click to expand...
Click to collapse
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
b217260 said:
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
Click to expand...
Click to collapse
It's my bad. I always store my backups on an SD card with my OTG card reader. I forget others don't think like I do sometimes
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Had faced this many times. ...after trying diff options and failed Qualcome MSM method works perfectly.
Yep, You cant restore data i think as it being already formated as per knowd based on your steps above on diff posts
ahacker said:
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
Click to expand...
Click to collapse
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
tabletalker7 said:
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
Click to expand...
Click to collapse
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
ahacker said:
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
Click to expand...
Click to collapse
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
tabletalker7 said:
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
Click to expand...
Click to collapse
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
ahacker said:
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
Click to expand...
Click to collapse
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
tabletalker7 said:
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
Click to expand...
Click to collapse
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
ahacker said:
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
Click to expand...
Click to collapse
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
tabletalker7 said:
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
Click to expand...
Click to collapse
-It is as horrible as not being able to restore a full backup. No more, no less.
-Twrp has an ability to encrypt your backups, with your experience you must know this.
-You are suggesting someone to switch to iphone only because they point out that the things are wrong or dont add up.
-It is quite a common knowlege that you get good security out of encryption if you make things explicit and clear. And not how you may think it is. Cause you don't seem to know where the keys are stored for the data partition. Obviousely, because the phone eventually decrypts your data, the keys must be stored somewhere or derived from you swipe pattern.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
Following these instructions seems to be the only way of restoring a nandroid backup (at least for my Op6 bought on AliExpress from China). Important: step 1 wipes your sdcard, so the backup you want to restore must be on otg usb stick.
After spending many hours I managed to restore a backup at least once. Fortunately for me I have no plans of upgarding Android and will likely forever stick with the following set:
1) 5.1.11-OREO-OnePlus6Oxygen_22_OTA_015_all_1808102118_770880-FASTBOOT.zip (found here)
2) twrp-3.2.3-x_blu_spark_v9.85_op6.img + twrp-3.2.3-x_blu_spark_v9.85_op6.zip (found here)
3) Magisk-v18.1.zip (found here)
My plan is to fully debloat the phone and then I will keep everything unchanged for years, because nowadays updates are more about twisting your arms than giving you usefull features. I almost got to that state, but one little glitch forced me to roll back and the whole hell with the Nandoid backups on Op6 started.
PS: It's very interesting what is really going on with this A/B system. There must be a storage where the encryption keys are stored (if it is the encryption that does prevent the phone from restoring. Which I doubt because Twrp sees the files fine). There also probbaly stored what slot is used. That information does not get captured by the Nandroid backup.
(Btw, It seems that blu_spark Twrp is really NOT encrypting your backups with the passwod you supply. Official Twrp does. I have plenty of old encypted backups, from wich I could not extract any personal data (/data/data folder) but yesterday I could extract my private information from a backup done by blu_spark Twrp. This is serious iussue. I'll double check and will post if confirmed.)
Not confirmed, I was looking at unencrypoted file.

[Rooted] [Q] I uninstalled Google Playstore HELP!!

I uninstalled Google Playstore using ES file explorer's root uninstaller and rebooted my phone. Then I reinstalled Google Playstore with an apk file (now shown as user app. The re-installation was success but the app keeps crashing after I tried to download an app with it.
I uninstalled Google Playstore in the first place because I encountered the "waiting for download" bug (apps stuck on that messages without downloading at all).
I cannot flash GApps in TWRP because it says /system partition not found.
I'm using Rooted Asus ROG phone, stock ROM 15.1630.1903.89, magisk
Please help
GphonePrince said:
I uninstalled Google Playstore using ES file explorer's root uninstaller and rebooted my phone. Then I reinstalled Google Playstore with an apk file (now shown as user app. The re-installation was success but the app keeps crashing after I tried to download an app with it.
I uninstalled Google Playstore in the first place because I encountered the "waiting for download" bug (apps stuck on that messages without downloading at all).
I cannot flash GApps in TWRP because it says /system partition not found.
I'm using Rooted Asus ROG phone, stock ROM 15.1630.1903.89, magisk
Please help
Click to expand...
Click to collapse
Anytime you uninstall/remove system files and apps or anytime you reinstall/replace system files and apps, it is best to boot into recovery then wipe cache and dalvik cache then reboot. The reason why this must be done is because when you remove/add stuff from/to system, the OS is looking for stuff that is there when it shouldn't be or is not finding stuff that should be there but isnt.
Wiping cache and dalvik then rebooting allows the device to rebuild cache as it should be for what is currently in system.
The most effective fix with the least possible issues in your situation is to reflash your stock firmware then flash TWRP on the device again then root the device again using Magisk.
Next time, before you add/remove system files/apps, boot into TWRP and create a nandroid backup of your current ROM, then, if you encounter issues when you add/remove system files/apps, you can boot into TWRP and restore the backup and you'll be restored to exactly what you had before you added/removed the system files/apps.
The ability to create and restore backups via TWRP is the main purpose for using TWRP, the ability to flash ROMs and such is a minor secondary feature or purpose of TWRP.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Anytime you uninstall/remove system files and apps or anytime you reinstall/replace system files and apps, it is best to boot into recovery then wipe cache and dalvik cache then reboot. The reason why this must be done is because when you remove/add stuff from/to system, the OS is looking for stuff that is there when it shouldn't be or is not finding stuff that should be there but isnt.
Wiping cache and dalvik then rebooting allows the device to rebuild cache as it should be for what is currently in system.
The most effective fix with the least possible issues in your situation is to reflash your stock firmware then flash TWRP on the device again then root the device again using Magisk.
Next time, before you add/remove system files/apps, boot into TWRP and create a nandroid backup of your current ROM, then, if you encounter issues when you add/remove system files/apps, you can boot into TWRP and restore the backup and you'll be restored to exactly what you had before you added/removed the system files/apps.
The ability to create and restore backups via TWRP is the main purpose for using TWRP, the ability to flash ROMs and such is a minor secondary feature or purpose of TWRP.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
Thanks for the detailed reply. I have re-flashed the stock ROM and re-rooted the phone now.
Now, I am just wondering why I am still encountering the "/system partition not mounted" error in TWRP for both (now and the previous time) rooting procedures? This prevents me from installing busybox and flash anything with TWRP.
PS: I am following the rooting guide here, since it is the most detailed one for newbies like myself. According the the screenshots shown in this guide, the OP also encountered the "/system partition not mounted" error in TWRP (system shown as 0MB, and before booting to system with TWRP, the message "no OS found" appeared). Hence I suspect his guide was not perfect despite getting root successfully. Mind having a look at the guide for me to see whether you could spot any missing/wrong steps please? (I know it is in Chinese but it does have loads of screenshots) I would really appreciate it. Thanks so much!
GphonePrince said:
Thanks for the detailed reply. I have re-flashed the stock ROM and re-rooted the phone now.
Now, I am just wondering why I am still encountering the "/system partition not mounted" error in TWRP for both (now and the previous time) rooting procedures? This prevents me from installing busybox and flash anything with TWRP.
PS: I am following the rooting guide here, since it is the most detailed one for newbies like myself. According the the screenshots shown in this guide, the OP also encountered the "/system partition not mounted" error in TWRP (system shown as 0MB, and before booting to system with TWRP, the message "no OS found" appeared). Hence I suspect his guide was not perfect despite getting root successfully. Mind having a look at the guide for me to see whether you could spot any missing/wrong steps please? (I know it is in Chinese but it does have loads of screenshots) I would really appreciate it. Thanks so much!
Click to expand...
Click to collapse
Is your device an A/B partition device?
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Is your device an A/B partition device?
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
It's Asus ROG phone. seems like it is according to here: https://www.xda-developers.com/list-android-devices-seamless-updates/
GphonePrince said:
It's Asus ROG phone. seems like it is according to here: https://www.xda-developers.com/list-android-devices-seamless-updates/
Click to expand...
Click to collapse
That is the problem then, the process of rooting and flashing TWRP on A/B devices is very much different than how it is done on other non A/B devices.
Look for instructions on how to use TWRP on devices that have A/B partitions.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
That is the problem then, the process of rooting and flashing TWRP on A/B devices is very much different than how it is done on other non A/B devices.
Look for instructions on how to use TWRP on devices that have A/B partitions.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
I will look into it thanks

Backup and Restore - a Hybrid Method (Android 9)

I am developing this method because TWRP will not restore correctly ever since I upgraded my bootloader from U2 to U4.
Boot and Data will restore but System will not, so I do the following.
Backup
1. Use TWRP to backup Boot and Data and reboot
2. Use a root explorer to copy /system/app to external sd
3. Copy /system/priv-app to external sd
Debloat by deleting apps from these 2 backup files
Restore
1. Boot into TWRP and install system.img (extract from ap section of downloaded firmware for stock) or install UPie
2. Restore Boot and Data as usual
3. Go to Advanced - File Manager
4. Delete /system/system/app and /system/system/priv-app
5. Copy and paste backup app files to /system/system
6. Reboot
Note: TWRP has its own system which holds the ROM system as a sub directory.
If anyone can think of another system directory which I can backup and restore please let me know.
physwizz said:
I am developing this method because TWRP will not restore correctly ever since I upgraded my bootloader from U2 to U4.
Boot and Data will restore but System will not, so I do the following.
Backup
1. Use TWRP to backup boot and Data and reboot
2. Use a root explorer to copy /system/app to external sd
3. Copy /system/priv-app to external sd
Debloat by deleting apps from these 2 backup files
Restore
1. Boot into TWRP and install system.img
2. Restore boot and Data as usual
3. Go to Advanced - File Manager
4. Delete /system/system/app and /system/system/priv-app
5. Copy and paste backup app files
6. Reboot
Note: TWRP has its own system which holds the ROM system as a sub directory.
Click to expand...
Click to collapse
This is great. I have issues that caused my settings app to show extra and weird options after a restore from TWRP in the past. But since then I've updated to a new TWRP but haven't done any restoring because of what the previous one did. Hope this works when I need it to.
Jeremy_J7 said:
This is great. I have issues that caused my settings app to show extra and weird options after a restore from TWinRP in the past. But since then I've updated to a new TWRP but haven't done any restoring because of what the previous one did. Hope this works when I need it to.
Click to expand...
Click to collapse
I think the system settings are stored in /data
I'll add it to the list.
physwizz said:
I think the system settings are stored in /data
I'll add it to the list.
Click to expand...
Click to collapse
Test it before you add to the list, can't be giving these people false information bro ?
Jeremy_J7 said:
Test it before you add to the list, can't be giving these people false information bro
Click to expand...
Click to collapse
True
I debloated from here
https://forum.xda-developers.com/galaxy-a20/development/debloat-samsung-a20-variants-t4070957
Then I added the updated camera from Ultimate Pie.
My app folders are here
https://mega.nz/file/dtkkES5L#YfHwWC3rlswwYUeA_cdUESCMQo8rvq8k8n20N-oc-8w
Alright will take a look, is this bootloader specific?
Jeremy_J7 said:
Alright will take a look, is this bootloader specific?
Click to expand...
Click to collapse
Not sure.
If it doesn't work it might reboot into recovery and then you need to copy and paste your own /app and /priv-app folders back in place.
@jajk
Try this
@physwizz My appetite for being screwed by Samsung and the dirty traps they lay is severely diminished. Since going to U4, I can't reliably get TWRP to work without triggering the evil red text screen of death.... I have been watching what is happening with the work on custom kernels and Ultimate Pie ROMs but definitive information on what is actually working reliably or not is very patchy..... one person will say "Yep, this definitely works" the other will say "nope can't even boot"... almost like some people don't even own this phone or have not actually tried what they are promoting or are unable to follow instructions properly....
So....starting from stock U4, I can root and install TWRP, magisk and dmverity no problems at all but after going back into the O.S and attempting to reboot into recovery a 2nd time....bang! Samsung screws me!!!! The question is.....is there a custom kernel for U4 and above that truly removes all of Samsung's dirty tricks (security features) and a custom ROM that also holds no hidden surprises?
jajk said:
@physwizz My appetite for being screwed by Samsung and the dirty traps they lay is severely diminished. Since going to U4, I can't reliably get TWRP to work without triggering the evil red text screen of death.... I have been watching what is happening with the work on custom kernels and Ultimate Pie ROMs but definitive information on what is actually working reliably or not is very patchy..... one person will say "Yep, this definitely works" the other will say "nope can't even boot"... almost like some people don't even own this phone or have not actually tried what they are promoting or are unable to follow instructions properly....
So....starting from stock U4, I can root and install TWRP, magisk and dmverity no problems at all but after going back into the O.S and attempting to reboot into recovery a 2nd time....bang! Samsung screws me!!!! The question is.....is there a custom kernel for U4 and above that truly removes all of Samsung's dirty tricks (security features) and a custom ROM that also holds no hidden surprises?
Click to expand...
Click to collapse
If you're talking about the red text that talks about 'official binaries' when booting after you flash TWRP (FRP LOCK) then there's a very easy fix.
@physwizz Yes the evil red text...but it is not after flashing TWRP, it is only if you try to go back into TWRP.
I already know of one easy fix... called don't buy Samsung. All this wouldn't be a problem if manufacturers could resist the temptation to "monetize" private data but that ain't going to happen anytime soon in this dog eat dog world.....
jajk said:
@physwizz Yes the evil red text...but it is not after flashing TWRP, it is only if you try to go back into TWRP.
I already know of one easy fix... called don't buy Samsung. All this wouldn't be a problem if manufacturers could resist the temptation to "monetize" private data but that ain't going to happen anytime soon in this dog eat dog world.....
Click to expand...
Click to collapse
I got that because i was using old data
solved by doing a clean install
The data was then good in future
@physwizz Went through the Samsung dance from scratch, installed UltimatePie4, rebooted into Ultimate Pie no problems, completed the initial setup.....rebooted and back to red text of death!!!
Yes, I did all the format /data etc.... it is not a procedural problem on my part but my phone has always given me more grief than you appear to have - something is different
jajk said:
@physwizz Went through the Samsung dance from scratch, installed UltimatePie4, rebooted into Ultimate Pie no problems, completed the initial setup.....rebooted and back to red text of death!!!
Yes, I did all the format /data etc.... it is not a procedural problem on my part but my phone has always given me more grief than you appear to have - something is different
Click to expand...
Click to collapse
You didn't restore old data?
Clean install?
@physwizz Did nothing but complete the initial setup after install and rebooted.....all started from a clean install of U4, then rooted and TWRP from your tar file, then installed new ROM with data freshly formatted i.e. absolutely no messing around with the stock ROM or custom ROM through the entire process and never getting to the point of rebooting into TWRP which triggered the previous red text of death.....
jajk said:
@physwizz Did nothing but complete the initial setup after install and rebooted.....all started from a clean install of U4, then rooted and TWRP from your tar file, then installed new ROM with data freshly formatted i.e. absolutely no messing around with the stock ROM or custom ROM through the entire process and never getting to the point of rebooting into TWRP which triggered the previous red text of death.....
Click to expand...
Click to collapse
What does red writing say?
@physwizz Writing says "You have just been screwed by Samsung yet again" or something about official binaries which is the same thing....
jajk said:
@physwizz Writing says "You have just been screwed by Samsung yet again" or something about official binaries which is the same thing....
Click to expand...
Click to collapse
I've had that twice
1. When I forced reboot before UPie was finished installing
2 when I didn't wipe caches , data and system before installing UPie
Could also be Samsung Conspiracy Theorist Detection Program (SCTDP) lol

Categories

Resources