[Nexus6P][TWRP][SuperSu] Dubts on Updating and backups - Nexus 6P Q&A, Help & Troubleshooting

So, I am new to the community and just recently created an account to make a new topic because something happened:
I have a N6P and I was disappointed with the whole "Pixel exclusives" thing, so I decided to root and flash some of the new features into the phone. Everything I wanted I could find in the threads of this forum and it was nice and easy. I did get to a nice point where I had all the features I wanted, and then, I saw that there was a beta update for the new android version 7.1.1. From there I realized how little I know about the android system, and for that reason I want to ask a few questions. First, I'll describe the steps I took and the result i got:
1 - Backed Up data with TWRP (Boot, System, System Image, Vendor, Recovery)
2 - Updated to 7.1.1 through the phone settings
3 - Reboot
4 - Checked everything (all working fine until here), I had lost my root and TWRP because the new system took place.
5 - Reflashed TWRP
6 - Patched again the Pixel Launcher and SuperSu through TWRP
7 - Reboot
From that time on, the phone did boot, but the default launcher didn't start and a system app presented errors: Everythime I closed the error box, if popped again, blocking me from doing anything.
After the inicial problem, I promptly went to TWRP and tried to restore the backup I made. Now the phone became unable to start the OS, it runs the boot animation forever and nothing happens.
Now I am downloading a Stock ROM to flash through fastboot and do everything again.
Now to the questions:
1 - What did I do wrong? Why didn't the Backup work? What should I do differently from now on to have a reliable restore point of my device(just in case I screw up again)
2 - What can I do (besides flashing stock room) in order to recover my system? It is annoying to have to start from zero again thinking i had a backup made just to prevent that.
3 - Where can I learn more about the Android filesystem and OS architecture? (I am a developer, but I'm also lazy as ****, so i'd appreciate "explain like i'm 5" links)
Thank you all.

Related

Nexus 6p not booting (running custom ROM)

A little bit of background.
Prior to this problem I was running dirty unicorns and elementalx kernel. Given that lately I had some freezing issues I decided that iro was time to update my ROM. Being the first time that I manually update a ROM and not having found anything online I thought (dumb decision) that all I had to do was to flash the most recent version. After I did that the phone did an app optimization (idk if that's how it's called, basically it optimised all the apps for the new version of the ROM) . After that the phone wasn't booting up, the dirty unicorns loading screen was running for half an hour and nothing happened so I restated the phone. When it asked for my sequence a message popped up "it looks like your vendor image is obsolete". The phone still wasn't booting up so I decided to restart once again and install the latest vendor image. After that the phone wasn't booting up so I decided to do a backup with twrp (version 3.0.0.0) and do a factory reset.
Plot twist the twrp decryption sequence (that worked 10 minutes before) now wasn't working so I had no way to access any of the phone's files.
Basically the phone won't turn on and I have no way of accessing it's files
I'd try a factory reset but there are some photos and whatsapp messages that are important to me and I'd rather not lose them.
Any tips?
Apologies for my terrible English
JustJohnItalia said:
A little bit of background.
Prior to this problem I was running dirty unicorns and elementalx kernel. Given that lately I had some freezing issues I decided that iro was time to update my ROM. Being the first time that I manually update a ROM and not having found anything online I thought (dumb decision) that all I had to do was to flash the most recent version. After I did that the phone did an app optimization (idk if that's how it's called, basically it optimised all the apps for the new version of the ROM) . After that the phone wasn't booting up, the dirty unicorns loading screen was running for half an hour and nothing happened so I restated the phone. When it asked for my sequence a message popped up "it looks like your vendor image is obsolete". The phone still wasn't booting up so I decided to restart once again and install the latest vendor image. After that the phone wasn't booting up so I decided to do a backup with twrp (version 3.0.0.0) and do a factory reset.
Plot twist the twrp decryption sequence (that worked 10 minutes before) now wasn't working so I had no way to access any of the phone's files.
Basically the phone won't turn on and I have no way of accessing it's files
I'd try a factory reset but there are some photos and whatsapp messages that are important to me and I'd rather not lose them.
Any tips?
Apologies for my terrible English
Click to expand...
Click to collapse
The best thing to do is this guide. http://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928/page384. Just go full stock without formating the internal. Flash twrp and see if you can get your photos. Next time back your photos up with Google photos if available in your area. Good luck
JustJohnItalia said:
A little bit of background.
Prior to this problem I was running dirty unicorns and elementalx kernel. Given that lately I had some freezing issues I decided that iro was time to update my ROM. Being the first time that I manually update a ROM and not having found anything online I thought (dumb decision) that all I had to do was to flash the most recent version. After I did that the phone did an app optimization (idk if that's how it's called, basically it optimised all the apps for the new version of the ROM) . After that the phone wasn't booting up, the dirty unicorns loading screen was running for half an hour and nothing happened so I restated the phone. When it asked for my sequence a message popped up "it looks like your vendor image is obsolete". The phone still wasn't booting up so I decided to restart once again and install the latest vendor image. After that the phone wasn't booting up so I decided to do a backup with twrp (version 3.0.0.0) and do a factory reset.
Plot twist the twrp decryption sequence (that worked 10 minutes before) now wasn't working so I had no way to access any of the phone's files.
Basically the phone won't turn on and I have no way of accessing it's files
I'd try a factory reset but there are some photos and whatsapp messages that are important to me and I'd rather not lose them.
Any tips?
Apologies for my terrible English
Click to expand...
Click to collapse
To update a ROM all you usually need to do is flash the newer version, but you also need to flash the newer vendor.img of the updated ROM is based on a newer Google build. Failure to do this is what caused the "it looks like your vendor image is obsolete" message to appear. I'm guessing you know this though as you went on to flash it later.
Not sure what happened with TWRP but you've done something else wrong at some point. Best idea (as pointed out above) is to flash the factory images. You can try it without formatting userdata in order to retrieve whatever it is that's important on your storage, but once you've retrieved whatever you need (if you even can) you'll need to format it because you really need to start fresh.

Nexus 6P stopped booting, nothing I do is now working. PLEASE HELP ME.

At this point I have completely run out of options. I AM CALLING UPON THE XDA COMMUNITY TO PLEASE HELP ME. Little bit of background info, nexus 6p was rooted and modified through xposed. Had some modules installed, mostly quality of life and visual/theme modules, as well as the latest version of SuperSU.
These past few days my Nexus 6P has completely stopped responding at times. Extremely laggy and could not do **** with it, systemui kept restarting over and over and over again for no reason. Had to keep force rebooting (holding down the power button for 10 seconds) multiple times over and over again, to the point where it suddenly stopped booting into the OS, it just kept giving me the boot animation loop, i could only access the TWRP recovery i had installed. Before all of this **** went down, I had created a TWRP backup because it would be my safety net if i could somehow miraculously get it to work. Now i have a backup of my TWRP BACKUP FILE on my desktop.
I have wiped caches more times than i can count, have tried factory restoring and formatted the data, and tried flashing the stock google image (the same one that i originally flashed at the time that I got the phone when i started to root) as well as flashed the old TWRP version i had, as well as the current latest version of TWRP, and then transferred the backup i made back onto the phone's internal storage. Tried restoring the old backup from TWRP, and each time it restores, it just reboots without reaching 100% and once it reboots, it still gives me a bootloop, this time, no boot animation, it just gets stuck at the Google text with a little "unlocked" logo at the bottom. I have completely run out of options, and have A LOT of EXTREMELY IMPORTANT information i have saved on the phone.
I will say it again. I am EXTREMELY DESPERATE to get my data back, to the point where i am even willing to offer a cash reward for any help to get my phone working back to the way it used to, or even at least to extract the information through the backup, if at all possible.
Additional information about the files and images I used:
angler-mdb08k is the name of the google image i had back when i had the phone and have flashed again
twrp-2.8.7.2-angler is the TWRP version i had back when i had the phone originally at the time
I had flashed and followed guides online through adb method.

Unable to reload and lock

Hello,
I've done quite a bit of reading here before posting this. I found bits and pieces of information that I tried to put together, but the outcome is not what I want, so maybe someone here knowledgeable could help me.
Device = Moto G5+
I've unlocked the bootloader, loaded twrp over the recovery partition, rooted the phone, performed a twrp backup prior to installing a custom rom. Then I tried another rom and another. They all have bugs or things to correct, so I decided to go back on my original load by recovering the «start» partiton from my twrp backup. That went well enough. However, since I restored the backup, I get errors and applications (like Settings !) crashing. There is obviously some sand in the gears somewhere. I then tried to reload the phone with POTTER_RETAIL_7.0_NPNS25.137-93-4_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip using Minimal ADB & Fastboot, but that fails. The first 2-3 steps work, then up on the 4th or 5th, I get an error message stating that flashing is unallowed (these are not the exact words, but close enough. I can provide exact words upon demand). From what I read, it seems like I cannot use the NPNS25.137-93-4 load on my phone because my phone shows version NPNS25.137-93-8 which is newer than NPNS25.137-93-4. From there, I am lost. Must I wait until I can get POTTER_RETAIL_7.0_NPNS25.137-93-8_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip or is there a way around that.
My ultimate goal is to reload my phone with a 100 % working software, relock the bootloader and wait for slow Moto to release Oreo over OTA.
Note : My twrp backup is version NPNS25.137-93-4, but an update came in right after I restored from the backup, but upon instaling, the update concluded with a failure status.

Weird bootloop

Have had my OnePlus 2 since 2015, and it's been a solid performer up to today.
I had the crDroid ROM (8.1) installed, along with Magisk, and it's been working fine for over a month with zero issues.
Today, I went to remove an app that was being troublesome, and then rebooted. And it just bootlooped. Animation is playing, but that's it. It sits there for 10-15 mins doing nothing. I hold the Power button to shut it down, and then try booting again. Same thing, just a straight bootloop for 15 mins. So I reboot to recovery (TWRP 3.2.1.0) and flash the Magisk uninstaller, to see if restoring the stock boot partition would help. It didn't, and just gave the same bootloop. So I go back into TWRP, wipe /system /cache and /dalvik and reinstall the ROM and gapps. Reboot. Same bootloop.
Now I'm starting to get a little concerned. Right now I'm restoring a backup from 10 days ago that I made before I last updated the ROM, but assuming this fails, does anyone have any good ideas? I'm not an expert, but I'm not a novice either, and this isn't making much sense. Unless my OnePlus 2 is getting ready to check out, which would suck...
idk if you had any mods like kernel or whatever or what app you removed (and if it had root acces) but first make sure you are on latest twrp, then try to clean flash a rom like normal. try to boot it it should work.
Thanks for the reply. No mods, other than Magisk. Just a stock 8.1 ROM with Magisk on top. Wiping /system, /cache and reflashing the ROM did not work. In the end, restoring a backup from a week ago was the only thing that worked. I have no idea why or what happened, but I guess it's yet another reason to keep a good backup on your phone in case of situations like this.
Gaffadin said:
Thanks for the reply. No mods, other than Magisk. Just a stock 8.1 ROM with Magisk on top. Wiping /system, /cache and reflashing the ROM did not work. In the end, restoring a backup from a week ago was the only thing that worked. I have no idea why or what happened, but I guess it's yet another reason to keep a good backup on your phone in case of situations like this.
Click to expand...
Click to collapse
This means that a date/time overflow occurred in your system
You restored a backup from 10 days ago, I'm assuming an older version of the ROM? So the newer version has an overflow bug
Even if nothing changes on the system your system time is always changing and if the ROM or kernel is somehow messed up then this value can cause an overflow and if a security module of some sort (like fortify_source or stack_buffer_protection) finds out about the overflow it can prevent boot from happening
Note: below example not completely valid in the real world, I've removed some stuff and is just for clear understanding.
Let's elaborate, "signed int" accepts values from -32768 to +32768 (0 inclusive)
What do you think happens when a value below -32768 is passed? That's an underflow and it's not defined what would happen below that limit (actually stuff does happen but see below notice)
If you pass a value over 32768 you cause an overflow
Note: I'm not going to go into details about what exactly happens. This would add too much information and cause more confusion than it would clear
What does this have to do with the date? Well every second your system date increases and if you got one of these limits you're going to run into problems
This is the only possible explanation for what could have happened
Thanks for the explanation. i think I understood most of it.
The backup from 10 days ago was from an older version of the ROM, though I have since installed the latest ROM version on top of the restored backup without issue, as I did when I first made the backup.

Unable to restore backup during configuration and cts check failed

Hi,
I have a Oneplus 6T A6013. Yesterday my phone had this state:
bootloader u
nlocked
root installed with magisk
a couple of magisk module installed
latest stable
stock rom (10.3.0)
Then an OTA update (10.3.1) arrived to me and I installed as usual:
OTA full download and
installation, without reboot
Magisk installation o
n other partition and reboot
Here begin problems. My phone reboot and get stucked on OnePlus animation.
I can force shut down, enter stock recovery, enter bootloader.
I can not rely on
Code:
fastboot boot twrp.img
because phone reboots and stucks on fastboot logo.
I decide to do factory reset phone, with Google backup it is not a big problem, during configuration I obviously login in with the same account and obviously backup is on cloud, but phone says "no backup found".
Moreover it seems that magisk root files were still present on the phone, and even "uninstalling" them from magisk manager doesn't remove sucessfully them.
At this point I have tried to make a completely fresh install of the OS:
during configuration still no backup found, even if I have created more backup in the meanwhile, one of them jsut before fresh install and on Drive I can see all of them
Google Pay sais that my system is not right, maybe cause root
using Magisk Manager I have checked that this time root is no more installed, but I can see that "cts check" fails
Play Store -> settings also says to me that "my phone is not certified"
Maybe I am not able to recover backup cause cts check fails. I have still bootloader unlocked.
So here are my questions.
Someone knows beacuse my phone doesn't recognize its own backups?
How can I pass cts check?
In case I should relock bootloader, how can I check that everything is truly stock and avoid a possible brick?
Thank you so much for your future answers, I have searched on internet and made tries for a whole day and contacted OnePlus chat assistence twice, but without any luck.
You have to actually wait a few minutes after running "fastboot boot boot.img" command to boot the TWRP, and you MUST use the latest one (always use up-to-date tools) which in that case is TWRP 3.3.1-31 - you have to use "Q" version of bootable TWRP image for OxygenOS 10.3.1 which is obviously Android 10 Queen Cake so be sure to use the right one.
Tethered Fastboot TWRP boot works just fine for me, in fact I installed crDroid 6.2 ROM atop OxygenOS 10.3.1 on my converted T-Mobile OnePlus 6T.
As for the bootloader, once it's unlocked, I strongly recommend leaving it alone unlocked unless you really like to use MSMTools more often. Use SafetyPatch in Magisk's module manager, it will fix the CTS SafetyNet issues. Locked bootloader actually causes more problems compared to unlocked one in my experience.
Sent from my ONEPLUS A6013 using Tapatalk
First of all thank you very much for your answer.
Is this type of twrp right?
I thank you really much for your suggestion about locking bootloader. I don't want to specifically remove root, the real problem Is that I am no more able to recover my old backup. I have just supposed that bootloader and root could be tha causes.
Before I fully reflashed OS I was able to Hide robot and pass all checks using Magisk, buy as I said I was not able to recover backup, neither a fresh and new just made backup.
I worry about the future. Now I could set again all the phone, but what will happens if tomorrow I will have to reset again?
Dr. Mario said:
You have to actually wait a few minutes after running "fastboot boot boot.img" command to boot the TWRP
Click to expand...
Click to collapse
I used latest version by fajita downloaded from my previous link. I have waited for 10 minutes stacked on oneplus fastboot mode logo and nothing happens. Now I have the problem that I am no more able to flash magisk...
That doesn't sound good - MSMTools may be necessary. Did you back up all the files?
If your T-Mobile OnePlus 6T is converted, install OxygenOS 9.0.11 and unlock the bootloader once again (MSMTools usually relock the bootloader, so unlock it again), then update to OxygenOS 10.3.0 or 10.3.1 via update zip file (I don't trust OTA updates at all, they tend to cause problems), then install the TWRP once you're at it, and then reboot back into the recovery and install Magisk if you want to.
Unless... You want to install custom Android 10 operating system which then you must do that; First reinstall OxygenOS 10.3.x ROM (in all slots, it is mandatory because you will install the same custom OS on both slots so it boots properly) then boot into TWRP, and do factory reset and data wipe in the Wipe menu, then reboot back into recovery and then plug in the USB flash drive or copy the TWRP, OS installation zip and whatever else you want installed onto the phone via the computer. Then install crDroid, LineageOS or any of OS of your choosing, and TWRP, and reboot back into recovery once again and install the OS and TWRP one final time in another slot. After doing the last reboot, install Gapps and Magisk. Finally, after you are done and reboot the phone after the installation, it will reboot by itself once - that's due to Magisk doing some configuration.
Android 10 apparently have made installation of custom ROM difficult. I have managed to brick my OnePlus 6T eight - ten times before deciding to find out how to do it successfully, thus the instruction for installation of custom OS above.
As for failure to restore the backup, this is the artifact of the Android 10 UEFI bootloader encryption (which is occasionally buggy, and annoying - just installing the LineageOS 17 the normal way, the whole SSD just gets corrupted, so the trick to get it to work is to, yes, remove all SSD encryption keys via factory reset prior to installing any custom ROM). As of now, TWRP backup is broken on most phones running Android 10 which is due to how the encryption works in this OS version (to the point they are so touchy).
Sent from my ONEPLUS A6013 using Tapatalk
Dr. Mario said:
That doesn't sound good - MSMTools may be necessary. Did you back up all the files?
Click to expand...
Click to collapse
Yes, my device is actually ready to be wiped and I have already the international version.
The problem is that MSMTools' link are down.
Dr. Mario said:
As for failure to restore the backup, this is the artifact of the Android 10 UEFI bootloader encryption (which is occasionally buggy, and annoying - just installing the LineageOS 17 the normal way, the whole SSD just gets corrupted, so the trick to get it to work is to, yes, remove all SSD encryption keys via factory reset prior to installing any custom ROM). As of now, TWRP backup is broken on most phones running Android 10 which is due to how the encryption works in this OS version (to the point they are so touchy).
Click to expand...
Click to collapse
Do you mean "manual backup" such as nanodroid, or "automatic Google backup"?
I have no manual backup, only that one saved on Drive, it should be restored automatically during configuration of operating system.
Any way you can back it up. TWRP backup (and any nandroid) in general are broken for many Android 10 phones because of the SSD encryption - I suspect that by each reboots, new cipher keys may be generated every time, thus making it hard to be able to successfully reinstall the Nandroid backup at any point in time - they're like the snowflakes, each and every EXT4 ciphers are different. (All that is meant to resist the hacker attack, even on the custom ROMs - Google wanted to be sure they cover everyone in term of computing security, so all that encryption Voodoos are also in the AOSP and LineageOS repositories for that reasons.)
As for MSMTools, I really wonder. OnePlus didn't object before.
Sent from my ONEPLUS A6013 using Tapatalk
Gabriel1495 said:
Yes, my device is actually ready to be wiped and I have already the international version.
The problem is that MSMTools' link are down.
Do you mean "manual backup" such as nanodroid, or "automatic Google backup"?
I have no manual backup, only that one saved on Drive, it should be restored automatically during configuration of operating system.
Click to expand...
Click to collapse
Try this thread
https://forum.xda-developers.com/oneplus-6t/how-to/op6t-collection-unbrick-tools-t3914746
Backup argumentation is now more clear, thank you
Dr. Mario said:
As for MSMTools, I really wonder. OnePlus didn't object before.
Click to expand...
Click to collapse
About MSMTools I have still some problem, fault of my really bad English...
I have not understood your answer, what does it means "OnePlus didn't object before"? Actually I am simply no able to download the tool.
Thank you again for your kindness
Striatum_bdr, that will do. The unbricking tool collection looks good.
Sent from my ONEPLUS A6013 using Tapatalk
Wonderful, I will read the "unbricking tool" thread in order to understand how to install it
Hopefully you get it to work once again.
Sent from my ONEPLUS A6013 using Tapatalk
Here I am with some good update
I have used MSMTools to truly factory reset my phone. Initially I had "sahara connection" error, but install again both Qualcomm and Oneplus drivers do the trick. After execution of MSMTools phone reboot with bootloader locked and as it was out of box.
At that point on Drive I had 3 backup (9 Feb, 10 Feb and 10 Feb) and magically last backup of 10 Feb was seen! Saddly even deleting last two backups I am not able to recover my true backup of 9 Feb (at this point it doesn't matter).
Now I have a virgin and working phone. I have no root and can use Google Pay and banking apps.
Really happy and satisfied, thank you thank you thank you very much!!!!
Dr. Mario said:
Any way you can back it up. TWRP backup (and any nandroid) in general are broken for many Android 10 phones because of the SSD encryption - I suspect that by each reboots, new cipher keys may be generated every time, thus making it hard to be able to successfully reinstall the Nandroid backup at any point in time - they're like the snowflakes, each and every EXT4 ciphers are different. (All that is meant to resist the hacker attack, even on the custom ROMs - Google wanted to be sure they cover everyone in term of computing security, so all that encryption Voodoos are also in the AOSP and LineageOS repositories for that reasons.)
As for MSMTools, I really wonder. OnePlus didn't object before.
Sent from my ONEPLUS A6013 using Tapatalk
Click to expand...
Click to collapse
What is up with that? I booted into TWRP the other day, figured I would make a backup before upgrading, and everything was garbled.
That's because of the onboard encryption; all Nandroid backup being attempted on Android 10 only hold half of the overall encryption keys, others just stays on the phone, so when you attempt to put it back on, it is already invalidated because also Android 10 ROM on some phones (particularly the Pixels, and a few OnePlus phones like this one) changes keys upon reboots for security reasons.
Google do not want anyone including the US Government to have their hands on the data thereon as it could be very bad if it falls in the wrong hands so they went extra miles to make it difficult to hack.
Sent from my ONEPLUS A6013 using Tapatalk

Categories

Resources