General help with bootloader & flashing (coming from Sony phones) - Google Pixel 2 XL Questions & Answers

Any help is greatly appreciated, I have no experience with Google phones, I was years into Sony.
I have just bought a Pixel 2 XL from a local shop in Greece, and of course, I want to root it and be able to install custom roms etc.
I have a few questions that I am searching everywhere recently and I would really appreciate if someone can make it clear to me:
1) I have read that you have to buy your phone from Google so you are able to unlock it? Can someone explain this to me? (My phone is not a specific carrier) How do I know if I am able to unlock my bootloader?
2)I have flashed roms and kernels in the past on my Sony phones, however I haven't really messed with the bootloader other than just unlocking it in the beginning. So now on the Pixel 2 XL I am reading so much about the unlock_critical vs the normal unlock, and I can admit I cannot understand the difference. Why does someone want to flash a bootloader? ( I do not understand what does "flash a bootloader" mean)
What I want to be able to do is flash custom roms, flash factory images to revert back to stock whenever I want, flash custom kernel, flash stock kernel, make a nandroid backup with twrp and restore a nandroid backup with twrp. That is all I want to be able to do without facing any errors with the bootloader,so do I need the unlock_critical ? And why?
3)If I unlock the bootloader with any of the two ways, am I able to re-lock it like nothing has happened? For example if the screen has dead pixels for some reason and I want to send it back for warranty but the bootloader is unlocked, can I lock it without it being logged? Or once unlocked, there is no going back to the warranty by re-locking? On many Sony phones we could do that.
4)If I unlock the bootloader and install TWRP I read that I will not be able to receive official updates from settings any more (OTA):
"NOTE #1: If you have mounted /system as rw at any point (like in TWRP), you must upgrade using the factory image method. OTAs will fail because they cannot verify the integrity of the disk since its verity data has been changed."
My question is, if I flash a stock image, does that get fixed? ( so if I flash 8.1.0 stock manually, will I be able to get an official update e.g. 9.0.0 from settings?)
Or if I just grab the stock boot.img of my current version of android and flash it with fastboot, then will I be able to get official updates from settings normally again?
5)Can I do the following on this order? :
Enable USB Debugging and OEM Unlocking
Unlock the bootloader (either critical or normal, whatever works)
Boot into Fastboot
Boot the twrp image from fastboot to the device
Flash the twrp zip to the phone to install TWRP
Flash the magisk zip so I root the device
Reboot and everything works? (Or do I need a custom kernel for TWRP or Magisk to work?)
Is there any issue you see with the above plan of mine?
6) Before I tweak my device in any way, is it okay if I update the device fully? So can I install any update available (OTA) and then unlock the bootloader and root etc? Or do I have to be on a specific version and not on the latest?
7)I have read something about 2 different slots on some flashing forums here, slot a and slot b, but it is not clear to me what that is. Does anyone know what that is? At which point may I face this?
Thank you very much.

A quick and not complete response to get you going
Plan 5 seems solid, unlock the bootloader to allow custom stuff. At boot you will get a warning screen to let you know.
I forgot if I only unlocked the bootloader or also the critical, try it etc.
Personally I never had to tinker with the A/B slots, within TWRP you can choose which to use.
Before Magisk, I used to flash another recovery like cwm or twrp but it is not required. You must however boot to twrp.img to flash the magisk zip.
As far as I know it is indeed the altering of the /system folder that denies future OTA (when using factory image). A manual flash (of future OTA) is easy but may require altering (removing) a switch command in the install.bat file to remove the -w (wipe).
As to the custom kernels, I never noticed the need and am running the latest v10 image with only Magisk flashed to get root.
My main goal is to get rid of ads. I use AdAway.
To get that to work in v10 you need to enable systemless host module im the Magisk manager app (reboot after).
A final feedback; when you get to sideload and need to get to recovery you may get the screen 'no command' or so; press volume-up and click power or power->click volume.
Let us know if you worked it etc!

arismelachrinos said:
Any help is greatly appreciated, I have no experience with Google phones, I was years into Sony.
I have just bought a Pixel 2 XL from a local shop in Greece, and of course, I want to root it and be able to install custom roms etc.
I have a few questions that I am searching everywhere recently and I would really appreciate if someone can make it clear to me:
1) I have read that you have to buy your phone from Google so you are able to unlock it? Can someone explain this to me? (My phone is not a specific carrier) How do I know if I am able to unlock my bootloader?
2)I have flashed roms and kernels in the past on my Sony phones, however I haven't really messed with the bootloader other than just unlocking it in the beginning. So now on the Pixel 2 XL I am reading so much about the unlock_critical vs the normal unlock, and I can admit I cannot understand the difference. Why does someone want to flash a bootloader? ( I do not understand what does "flash a bootloader" mean)
What I want to be able to do is flash custom roms, flash factory images to revert back to stock whenever I want, flash custom kernel, flash stock kernel, make a nandroid backup with twrp and restore a nandroid backup with twrp. That is all I want to be able to do without facing any errors with the bootloader,so do I need the unlock_critical ? And why?
3)If I unlock the bootloader with any of the two ways, am I able to re-lock it like nothing has happened? For example if the screen has dead pixels for some reason and I want to send it back for warranty but the bootloader is unlocked, can I lock it without it being logged? Or once unlocked, there is no going back to the warranty by re-locking? On many Sony phones we could do that.
4)If I unlock the bootloader and install TWRP I read that I will not be able to receive official updates from settings any more (OTA):
"NOTE #1: If you have mounted /system as rw at any point (like in TWRP), you must upgrade using the factory image method. OTAs will fail because they cannot verify the integrity of the disk since its verity data has been changed."
My question is, if I flash a stock image, does that get fixed? ( so if I flash 8.1.0 stock manually, will I be able to get an official update e.g. 9.0.0 from settings?)
Or if I just grab the stock boot.img of my current version of android and flash it with fastboot, then will I be able to get official updates from settings normally again?
5)Can I do the following on this order? :
Enable USB Debugging and OEM Unlocking
Unlock the bootloader (either critical or normal, whatever works)
Boot into Fastboot
Boot the twrp image from fastboot to the device
Flash the twrp zip to the phone to install TWRP
Flash the magisk zip so I root the device
Reboot and everything works? (Or do I need a custom kernel for TWRP or Magisk to work?)
Is there any issue you see with the above plan of mine?
6) Before I tweak my device in any way, is it okay if I update the device fully? So can I install any update available (OTA) and then unlock the bootloader and root etc? Or do I have to be on a specific version and not on the latest?
7)I have read something about 2 different slots on some flashing forums here, slot a and slot b, but it is not clear to me what that is. Does anyone know what that is? At which point may I face this?
Thank you very much.
Click to expand...
Click to collapse
1) The reason for this is Google had an exclusivity contract to sell through the US cellular company, Verizon; much like the original Apple iPhone did (at first) with AT&T. And, for reasons that are most likely stupid, foolish, and unconvincing in its justifications, Verizon locks their device's bootloaders. So, not that it's "locked" or "unlocked" in terms of carriers, but more-so whether a device is "locked bootloader" or unlockable because it was purchased from Google (or elsewhere, but at least originally Google) and not from Verizon. If you're wondering further, getting it from Verizon would allow Verizon subscribers and customers to be able to "lease" and pay the Pixel off in increments with their usual cell phone bill; but it's not all too exclusive because Google offers to lease if you purchase from them also! The only caveat is you have to pass a credit check when leasing from Google; but, then again, you have to pass a credit check when signing up for a Verizon cell plan as well!
2) So, with my limited understanding between the difference between just a regular "unlock" and an "unlock_critical" is that it might be that a regular unlock allows you to get a R/W access (root access) to the various vital partitions (i.e. system, data [not to be confused with userdata], even boot to a degree) while unlock_critical allows you to straight modify and replace partitions (i.e. what would've been the recovery partition [but now there's no such thing and recovery just resides in the boot partition], the whole system & data partition to have/run custom ROMs, bootloading screen, etc.). But it all is rather convoluted that Google probably agreed and, so you can/should be aware, they updated things within the past few months (I'm guessing June or July) where they rid the need to "unlock_critical" and bootloaders that are newer than a certain point/month no longer needs that fastboot command to unlock the bootloader and everything else in order to flash custom anythings...
3) Okay, so here's a very tricky thing to this.... Technically, yes you can relock the bootloader as well as there have been many who have successfully done so; BUT there are so many more that have COMPLETELY and permanently bricked their device attempting to do so and most (if not all) the experts here would advise anyone to just leave well enough alone. But, if it is insisted and must be, the way to do it is to remove all Magisk modules (because, for whatever reason, these modules can survive a complete flashing of a Full Factory stock image), run a Full Factory image where the flash-all command is left intact (meaning “-w” is unedited; I’ll go more into this later), running it through the initial set up process, then (for good measure, this step might not be at all absolutely necessary) switch slots and run the flash-all command on the other slot, running the initial set up process again, then rebooting to Bootloader Mode and running the fastboot locking command, then unticking (if wished and insisted) unticking the OEM unlocking. Again, a word of warning, that so many have relocked the bootloader and unticked the OEM unlocking which allows the unlocking of the bootloader, then find that their device goes into a bootloop; and since they had just locked the bootloader in 2/all different ways, it leaves rescuing the device with all but the fewest options – usually because it’s forgotten in one way or another returning all of the device back to stock.
If anything, what has been said around these forums is that, if returning to Google, there hasn’t been an (proven) instance that Google refused to repair/replace it because it had its bootloader unlocked. But it’s usually for that fear or re-selling the device in which this is usually sought; but in most (if not all) cases (the experts here figure), having the bootloader unlocked would be refused or looked down upon.
4) So, most of what you assumed here is correct; but may be a bit misguided due to not knowing some things – which, of course, can be expected since you had just said you just moved to this device from a totally different manufacturer (Sony). If you are rooted (Magisk), there is absolutely no way you can update via the regular System Update from an OTA from within the Settings in the OS. And even having just an unlocked bootloader will cause OTAs to not work -- but there are conflicting reports stating differently, but I, personally, am under the understanding that even at that point you cannot.
But here’s the key thing; there really isn’t any reason to install updates by download and using OTAs anyways. Most (if not all) the experts here actually forego the OTAs and merely download the Full Factory stock images from Google’s Developers website and flash those. Here’s the reason; in the “olden days”, flashing a stock Full Factory image would erase absolutely everything and return the device to a complete factory state. But Google, in their “infinite wisdom”, allowed it to be possible to flash this but still withhold and save/keep all of one’s apps, settings, and data – essentially leaving both device data and userdata untouched! This is achieved by simply editing a batch file called “flash-all.bat” (or “flash-all.sh” for Linux and MacOS) and removing the 3 characters “-w” (3rd character would be a space “character”) from within its code. In this manner, OTAs can be considered a “dirty flash” because, while a Full Factory will completely overwrite (I could be wrong, but I believe it erases and formats it) the system, radio, bootloader, boot, etc., which would/should take care of any erroneous bugs or glitches, while OTA’s do not necessarily do this and just “modifies” the existing data; and therefore bugs and glitches may still remain being more on the root of things and/or OTAs would just modify “on top” or elsewhere where those glitches may reside.
And in either/both cases, one would still be required to reflash/reinstall everything root.
But, if insisted, there are multiple methods to achieve a state where you can run an OTA; either downloading an OTA image from Google and manually flashing it (“sideloading”), or unrooting temporarily to be able to use & download the regular System Updater (can be found HERE : https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md#ota-installation under the “Devices with A/B Partitions” which is my preferred method if I was to do this sort of thing, but I have never done this so I’m unsure if it even is successful in our device). I even wrote out an in-depth and step-by-step guide, but it is rather convoluted and was written in the beginnings of our taimen and there are most likely more updated methods now; but if you want to check it out, you can HERE.
But, to answer your questions directly; No, flashing the stock image will not allow you to user the stock System Updater; although there are conflicting reports, I am under the impression that anything other than a locked bootloader will allow the stock System Updater to work.
5)More correctly, you boot into “Bootloader Mode” to be able to use the “fastboot” commands. And no, you do not need to permanently flash a custom recovery (TWRP), a custom kernel, or anything else to achieve root – although I do highly recommend it – as you can temporarily boot into TWRP (by downloading the TWRP image file (*.img) and install Magisk in that manner – I do not suggest you root/install Magisk using the app. Other people have had success, but many (most?) have issues that you wouldn’t run into if you installed it via TWRP – but here’s a key thing; no matter what you intend to flash and install, unless you need to have root for it to already be installed, you should always flash Magisk last. Moreso, as the great Az Biker of ‘round thes’ parts greatly suggests, you should even reboot to bootloader after each and every flash separately. Explanation is, for whatever reason and even though many claim to be able to “detect” and modify their flash for an already modified boot and dtbo (where modifications must happen for root access), most don’t play well with Magisk and Magisk must modify the boot and dtbo after all other modifications or else problems can arise (or at least it has for me).
Just keep these things in mind, but, for the most part, your “order” of things will do well enough. Again, just keep in mind that if you are going to install a custom recovery or kernel, try to do that before Magisk as well as if you can avoid it, don’t use the Magisk app to install or manually flash any boot.img if you can help it.
6)No, you don’t have to stick to a specific version; it might even be suggested to update it stock before doing anything. BUT (of course there is a caveat), consider this; many things (especially anything root and specifically TWRP) aren’t really “playing nice” with Android Q/10; so, if you update and go to the most up to date, but don’t wish to run into those glitches/bugs and wish to “hold off” (like I am, actually and for the same reasoning), then of course you should only go up to August (I believe that was the last before the upgrade to Q/10) Full Factory.
7) There are many great resources on the information on having the 2 different slots; I apologize if I can’t recall where I even saw them – other members (maybe an RC or Mod even) input a URL to read and I can’t for the life of me recall where it possibly could be. But, for the most part, you would really only run into identifying and manually changing to a specific one if you were attempting to rescue or deeply modify your device; I can say that me and the great @Az Biker have never felt the necessity to manually change or choose a certain, specific slot. And, my guess, is that, because the coding and flashing output when running the Full Factory states something about “system_other” or a “system_b”, but while the main system can be close to 3GB, the system_other is closer to 300MB, and that boot, dtbo, vendor, and something called lafb has a “_b” partition, I’m thinking it’s something as a safety or backup, maybe something like what used to be in old laptops a sort of RAM to help load things up faster. In any case, it seems that going from one to the other, a to b or vice-versa, doesn’t seem to be too key or much of a hassle, so….take that for what you will.
Alright…hopefully I was able to answer all your inquiries. And, if you have any more, please feel free to ask them…that’s what we’re all about here. And I know I can run on and get wordy, so thank you for bearing with me with all of this.
I mean, it’s really good to have a user/member who really does their research, reading, and due diligence before getting into their new device; there are so many instances here and in my own experience where the “…if I only knew that beforehand…” would be supremely helpful, and supremely easier on everyone else! So that’s to be commended and reinforced…!
Hope this helps and welcome to your Pixel and this taimen forum!

I really cannot thank you enough for your time. I truly appreciate it very much.
1) Very clear.
2) Do you happen to have a link or do you know how to check if my phone supports unlock_critical? How can I check if I have that newer bootloader? Or do you remember where did you learn this?
3) Thank you so much about that. Very clear aand you just saved my phone
4) Very clear.
5) Thank you for the info! Interesting, I was searching on how to root the device running Android 10 (I have fully updated and I really am not going back to Android 9 ), and I saw that you have to patch your boot.img with the Magisk app, and then flash it with fastboot. So first you get the factory image from google and you extract the boot.img and insert it to the phone. Then you load it into Magisk app and patch it. Then moving the patched to the PC, booting to bootloader and flash it on boot partition. This is the way I saw on how to get root working fine with Android 10, not sure if it is the best method or the worst.
6) What do you mean with "go up to August"? Do you mean that the "oldest" image I can flash is "9.0.0 (PQ3A.190801.002, Aug 2019)"? So one cannot go back to 8.0.0 and Google has done something to prevent us from doing that? Also, if I wanted to go back to that August image or any "compatible", the procedure is just to run the flash-all.bat file of that image?
I used to experement a lot with custom roms, custom kernels and mods with my Sony devices, but that was mainly because I wanted stock android and some more features. The thing is that I have almost anything I need with this device, with some minor wishes. So I can leave without flashing custom roms and kernels, but I wanted to just root and at least install Adaway(!!!!!! I cannot leave with those ads!!!!!!), Titanium Backup and some other similar root apps that don't really do any harm. Have you tried rooting Android 10 and it was unusable? Do you suggest that it is not really worth it? The thing is that I love Android 10, the gestures and all the features, and I could not go back to Android 9, even though I only used the phone for a week, I am used to it and really like the way it currently is.
7)Hmm okay so I should not really mess with that. Maybe as I saw online, when flashing stock or unrooting, it is best to flash the same thing to both a and b slots, seems a bit complicated but whatever
Thank you for being so helpful!!

arismelachrinos said:
I really cannot thank you enough for your time. I truly appreciate it very much.
1) Very clear.
2) Do you happen to have a link or do you know how to check if my phone supports unlock_critical? How can I check if I have that newer bootloader? Or do you remember where did you learn this?
3) Thank you so much about that. Very clear aand you just saved my phone
4) Very clear.
5) Thank you for the info! Interesting, I was searching on how to root the device running Android 10 (I have fully updated and I really am not going back to Android 9 ), and I saw that you have to patch your boot.img with the Magisk app, and then flash it with fastboot. So first you get the factory image from google and you extract the boot.img and insert it to the phone. Then you load it into Magisk app and patch it. Then moving the patched to the PC, booting to bootloader and flash it on boot partition. This is the way I saw on how to get root working fine with Android 10, not sure if it is the best method or the worst.
6) What do you mean with "go up to August"? Do you mean that the "oldest" image I can flash is "9.0.0 (PQ3A.190801.002, Aug 2019)"? So one cannot go back to 8.0.0 and Google has done something to prevent us from doing that? Also, if I wanted to go back to that August image or any "compatible", the procedure is just to run the flash-all.bat file of that image?
I used to experement a lot with custom roms, custom kernels and mods with my Sony devices, but that was mainly because I wanted stock android and some more features. The thing is that I have almost anything I need with this device, with some minor wishes. So I can leave without flashing custom roms and kernels, but I wanted to just root and at least install Adaway(!!!!!! I cannot leave with those ads!!!!!!), Titanium Backup and some other similar root apps that don't really do any harm. Have you tried rooting Android 10 and it was unusable? Do you suggest that it is not really worth it? The thing is that I love Android 10, the gestures and all the features, and I could not go back to Android 9, even though I only used the phone for a week, I am used to it and really like the way it currently is.
7)Hmm okay so I should not really mess with that. Maybe as I saw online, when flashing stock or unrooting, it is best to flash the same thing to both a and b slots, seems a bit complicated but whatever
Thank you for being so helpful!!
Click to expand...
Click to collapse
It’s really my pleasure! And I’m just as thankful that you/anyone would even go through the trouble of reading all of that…!
1) Thank you for the compliment
2)Usually, if your bootloader version is within a certain version – which you can find when in bootloader mode – then you either do or do not need unlock_critical. I can’t remember how many months prior to Android 10/Q, it was within 6 I believe, so any bootloader version from 5 or 6 months ago to now, and obviously if you’re on 10/Q, you would not need to run the command unlock_critical. But, if anything, you don’t have to have any fear of it, whether you need to or not, or don’t know your bootloader version, running the “fastboot flashing unlock_critical” when you don’t need to will just amount to a simple error and nothing bad will happen. And if it does end up doing something, well, then that’s a good thing. It almost amounts to unlock_critical-ing twice, the second on will just state that it’s already unlocked and that’s it.
If anything, I believe I found the resource here from the great Az Biker: https://forum.xda-developers.com/showpost.php?p=78908055&postcount=2843
If you are very curious, it should address much of what you’re seeking and/or at least point you to where you might find that information.
3) You’re very welcome. It really is a good thing that saves you in the future, and saves those who try to help some grief as well.
4) Thank you for the compliment.
5) I would say that the process you described is certainly doable, but is far from the best/easiest. From my experience helping many here on this forum, many bugs or things go wrong when loading the stock boot.img to the phone, having Magisk modify it, then getting the modified boot.img and successfully flashing it. More often than not, one ends up having a device turn into a boot loop and are usually forced to flash the stock boot.img and have to give it a number of tries.
The best way (subjectively) is to download the Magisk installation .zip. Then boot into TWRP (which doesn’t mean you have to replace the stock recovery since you can temporarily boot into it), and “Install” it using the .zip. Then everything is automated and done for you, if anything goes wrong you have an output log you can use to troubleshoot, but it seems best to leave it to the experts who created all this than us manually attempting to ourselves.
Oh and AFAIK this method still works on Android 10/Q as it has for Pie and Oreo.
6) I meant that, if you did not wish to update to 10/Q, then you shouldn’t do anything newer than from August’s security update/patch, since all the Full Factory images and updates are of 10/Q. But, if you go to Google’s Developers site, you’ll see that they pretty much list and make available all the Full Factory images ever published; to the point that there are some that go back to Oreo!
And everything you’ve said is understandable. And I kinda feel the same way. For me, in my humble opinion, it is supremely good idea to root and for whatever issues you get doing that, the returns are incalculable. It is most definitely worth it/rooting! The extra options and customizations and modifications all make it worth while and more! And, even if rooting gives the capability of rendering the device rather unusable, take confidence in that Google, in all their “infinite wisdom”, gave us “Bootloader Mode”…and pretty much, as long as you can get into Bootloader Mode and successfully connect to a computer, your phone would never be considered too far lost/gone. I’ve only witnessed that be opposite on less than a handful of cases.
But, most importantly, and if you have been in the rooting and ROMing game, you should well know this, but the most vital part of having root access is the ability to make the best backups! So, as long as you make sure to backup (Nandroid is best) and key times, running into some pitfalls here and there shouldn’t take you all the way out of the game….
7) Yeah…I mean, it is rather fascinating, and when up against an issue and you have an idea that deals with it, that’s when you can read up and learn about it and experiment I imagine. But for me and one of the great ones here in all of XDA, we’ve done all the custom ROM, custom recovery, custom kernel, Full Factory recover, root, Magisk modules, theming, Xposed, and countless other things, and all without the need to ever mess with manually or forcing an assignment between the two.
Again, it’s my pleasure. And if you any further questions or thoughts, bring them on! I’d be happy to address them…
Hope these are helpful….

arismelachrinos said:
I really cannot thank you enough for your time. I truly appreciate it very much.
1) Very clear.
2) Do you happen to have a link or do you know how to check if my phone supports unlock_critical? How can I check if I have that newer bootloader? Or do you remember where did you learn this?
3) Thank you so much about that. Very clear aand you just saved my phone
4) Very clear.
5) Thank you for the info! Interesting, I was searching on how to root the device running Android 10 (I have fully updated and I really am not going back to Android 9 ), and I saw that you have to patch your boot.img with the Magisk app, and then flash it with fastboot. So first you get the factory image from google and you extract the boot.img and insert it to the phone. Then you load it into Magisk app and patch it. Then moving the patched to the PC, booting to bootloader and flash it on boot partition. This is the way I saw on how to get root working fine with Android 10, not sure if it is the best method or the worst.
6) What do you mean with "go up to August"? Do you mean that the "oldest" image I can flash is "9.0.0 (PQ3A.190801.002, Aug 2019)"? So one cannot go back to 8.0.0 and Google has done something to prevent us from doing that? Also, if I wanted to go back to that August image or any "compatible", the procedure is just to run the flash-all.bat file of that image?
I used to experement a lot with custom roms, custom kernels and mods with my Sony devices, but that was mainly because I wanted stock android and some more features. The thing is that I have almost anything I need with this device, with some minor wishes. So I can leave without flashing custom roms and kernels, but I wanted to just root and at least install Adaway(!!!!!! I cannot leave with those ads!!!!!!), Titanium Backup and some other similar root apps that don't really do any harm. Have you tried rooting Android 10 and it was unusable? Do you suggest that it is not really worth it? The thing is that I love Android 10, the gestures and all the features, and I could not go back to Android 9, even though I only used the phone for a week, I am used to it and really like the way it currently is.
7)Hmm okay so I should not really mess with that. Maybe as I saw online, when flashing stock or unrooting, it is best to flash the same thing to both a and b slots, seems a bit complicated but whatever
Thank you for being so helpful!!
Click to expand...
Click to collapse
As @simplepinoi177 said, I'm part of the community that just let's the factory image flash the slot it needs/wants to, and it's never once been an issue.
Look at it like this; some people prefer to simply copy/paste a link or block of text in the PC, some people prefer to CTRL + C then CTRL + V.... BOTH take you to the same end.
Plus, knowing me, the more I manually mess with Slot A vs Slot B, the more chance there is for me to screw something up
Best of luck with your 2 XL, it's a FICKLE device, but it's a really, really great device once you get it as you want it.

Thank you all very much! I am pretty busy these days so once I find some time I will do more research and root it.
@simplepinoi177
I am not sure if your paypal address works, I felt like buying you a coffee earlier, the least I could do with all the time you spent explaining

Oh forgot to ask some minor things,
to make a nandroid backup, I just send twrp.img via fastboot to the phone and boot into it and make it? And if I want to revert back I do the same and restore it?
Also if TWRP asks me the question about if I want to enable modification to the system, what do I answer? Either for the nandroid backup, the restore or for flashing magisk.zip? Do any of those require that enabled?
Lastly, I understood that just unlocking the bootloader alone can result in no OTAs. But, will I keep getting the security updates? I heared something about security updates that are frequently available from the playstore or something like that but I have the phone for less than a week and haven't gotten anything. No OTAs mean no security updates as well? Or they are irrelevant and I will keep getting those security updates once rooted?

arismelachrinos said:
Oh forgot to ask some minor things,
to make a nandroid backup, I just send twrp.img via fastboot to the phone and boot into it and make it? And if I want to revert back I do the same and restore it?
Also if TWRP asks me the question about if I want to enable modification to the system, what do I answer? Either for the nandroid backup, the restore or for flashing magisk.zip? Do any of those require that enabled?
Lastly, I understood that just unlocking the bootloader alone can result in no OTAs. But, will I keep getting the security updates? I heared something about security updates that are frequently available from the playstore or something like that but I have the phone for less than a week and haven't gotten anything. No OTAs mean no security updates as well? Or they are irrelevant and I will keep getting those security updates once rooted?
Click to expand...
Click to collapse
So, about booting TWRP...
You can temporarily boot into TWRP just the one time if you wish. If you are using the newest version of TWRP (for the Pixel 2), they actually give an option to flash and replace the recovery with TWRP from within their recovery environment; I'm guessing they use the temporarily booted twrp.img to install. In any case, you can find the option in the Install section. In any case, it's up to you whether you install it as your custom recovery, but it's easy enough to restore it back to stock recovery either by manually flashing the stock boot.img (and maybe dtbo.img for good measure, as I'm unsure...) and/or if you update your device via a Full Factory (or even a downloaded OTA) image, as that will update and replace the boot partition regardless...
So, about the alert for enabling modification to the system; In the past, I had always enabled it. Of course you would want to have r/w and mounting capabilities towards the device's system and data partitions. But keep this in mind...until the TWRP team updates the latest version, there is no write capabilities/permissions. It will pull up an error that it either can't mount or doesn't write -- For this reason, I'm holding off so I don't have firsthand experience... -- but installing and flashing and backing up from within TWRP does work even if it spits up some errors. What you should be careful about is if/when it asks to install it as a "system service" or something, as general consensus says at no circumstance should you do this as it "forks" up many other things while at it.
But, to answer your question directly, I'm unsure whether you can or cannot install Magisk root or restoring without enabling this "modification" capability, but I say it can't hurt.....
As for your inquiries on OTAs, as I understand it (so anyone please correct me if I'm wrong), but the monthly security updates come with the OTAs (also monthly, so I believe they may be one in the same). I'm unsure about the whole seeing the security updates on the Play Store or something like that, but I highly doubt that is the case. Conventional knowledge says that you can only get these either from the stock System Updater or if you download them yourself and either sideload or "flash-all" it. That's why many (most) experts will download the Full Factory image every month (usually first Monday of the month) and we have this whole step-by-step process in updating platform-tools, unregistering Magisk modules and screenlocks/fingerprints, running the flash-all, temporarily booting TWRP, installing all custom modifications (Magisk last), rebooting after each and every flash/install, then going back into the OS and resetting up the screenlock/fingerprints and Magisk modules. As it would be nice if we could simply and always use the stock System Updater, but in any case, one would need to re-install all the custom modifications anyways. So, it is one of the sacrifices/compromises having a rooted Pixel 2….
But it is peculiar that you haven’t gotten any alert (unless you inadvertently updated to the latest already), for it still should alert you that there is an update available, and usually, if you have unlocked your bootloader, while it’s downloading and attempting to install, it will throw up an error; but everything would look like normal up to that point. But, then again, Google notifying updates on their various devices are intermittent at best. It would be simpler and best if you just keep it in mind that there’s usually the monthly update on/after the first Monday of the month and do what we all do and have to manually install the updates to keep most up to date.
If there’s anything else, you know you can ask…
Good luck and hope this helps…!

I'm on 10 with an unlocked bootloader, 1st gen Pixel. I still get security updates. Twrp doesn't mount /system or /vendor, so I take system/vendor IMAGE backups with no issue. Not sure if I'll get updates still after unrooting. I've always flashed factory after rooting. Theoretically it should return to stock if you flash the Magisk uninstaller. The boot image (boot + recovery + base system) will be restored. You should then be able to get OTA updates. They will be installed to the OTHER slot, so if the phone fails to boot (3 times?) it will switch back to the first slot. If you have issues and want to go back, you can manually switch slots in fastboot or go into twrp, tap reboot, tap the other slot, then reboot system. It will show a message that the slot has changed. You can of course always check the active slot in fastboot to make sure. If you want to roll back an OTA update, reboot to twrp, change the active slot, then reboot system, and it should boot to the older version. Make sure to turn off automatic updates or else it will redownload the same update again. I believe I've lost twrp by installing an OTA update, which installs to the inactive slot, which overwrites recovery, and then boots to that slot. Meaning if you don't have a pc to switch slots in fastboot, you can't go back to the first slot which still has twrp. The command is fastboot set_active, something like that. Quick google search.. No pc means no restore if something goes wrong while you're away from a computer. The only way I know of to change slots at that point is to hard reset 3 times, which will trigger the phone to switch slots. ALWAYS reboot after flashing bootloader/radio. I'm decently sure that the bootloader has to match the system, so if you install lineage Pie, you need to flash the bootloader/radio from Pie or the phone won't boot. Flash bootloader, reboot, flash radio, reboot, flash matching rom. It is technically possible to have dual boot, where one slot is lineage and the other is stock, as long as they're the same Android versions. Lineage Pie/stock Pie for example, because the bootloader won't match if you flash Lineage Oreo/stock Pie. Keep in mind OTAs will overwrite twrp with stock recovery, so if you reboot, you might lose access to twrp, and I don't know of a way to OTA and reboot on the same slot. I don't know if there is an app or command for this, WHICH WOULD BE REALLY FREAKING NICE. Also, when restoring boot from twrp, I always reflash twrp to make sure. It will install to both slots. You can keep a copy of twrp on your data partition. To reflash twrp from within twrp, Install > Select Image > find twrp.img > flash to RAMDISK. If you flash to boot, it will overwrite system, and leave you with only twrp. When installing in older twrp's, I believe it will install to the same slot. With newer twrp's that specifically support Treble, it will flash to the other slot. Don't quote me on that. Due to the single data partition, there's a chance Lineage will have issues with stock data. I've never seen it though. I've dirty flashed a couple times with few issues. I think I've even dirty flashed different OS versions. If you get app crashes, open that app's info, delete its storage/cache, and reopen the app. Most of the app data is the same across versions anyway. The Pixel is a complete pain in the ass when coming from non Treble phones. Sorry if this is repeated info, the posts above are LONG lol. Hope this helps.
Edit- not sure if relevant to you, but I get bootloops when flashing twrp to the ramdisk. There should be an option in twrp to fix it. I always do this after flashing twrp this way.

Related

What is the cleanest way to install updates?

I'm fairly new to Android and the Nexus 7. I am unlocked, rooted, and have installed Ti Backup. I just recently received the OTA for 4.4.4 and installed it, and then manually loaded TWRP back and rerooted.
This doesn't seem like the cleanest install (maybe it's my OCD tendencies with hardware and software), so I'm wondering what is the best way to install Android updates? Should I reset to the factory image and then use Ti back up for all my apps? Is the way I proceeded just as good as other possible methods? My goal is to follow a plan that will support the 7 performing as best as possible.
Any info or opinions would be appreciated.
Thanks,
Rick
C5Longhorn said:
I'm fairly new to Android and the Nexus 7. I am unlocked, rooted, and have installed Ti Backup. I just recently received the OTA for 4.4.4 and installed it, and then manually loaded TWRP back and rerooted.
This doesn't seem like the cleanest install (maybe it's my OCD tendencies with hardware and software), so I'm wondering what is the best way to install Android updates? Should I reset to the factory image and then use Ti back up for all my apps? Is the way I proceeded just as good as other possible methods? My goal is to follow a plan that will support the 7 performing as best as possible.
Any info or opinions would be appreciated.
Thanks,
Rick
Click to expand...
Click to collapse
I prefer using multirom. What I do, is wait for a flashable full version of the latest and greatest stock from Tasssadar (he usually has one the same day or 2), then flash it as secondary, root it, install xposed, gb, and a couple other modules and viper4android, qualcom dalvik and bionic patches, flash elementalx, go into primary, make backups with TiB, go into recovery and do a complete nandroid, put them onto my meenova (and pc), delete all the big apps that take up a lot of room, then boot into secondary, restore android ID with TiB, install only small apps I need (I prefer reinstalling instead of restoring from backup), then use TiB to restore app data only (only the things I need) and wifi networks, once I am satisfied with it being complete, I use multiroms swap rom function to swap secondary to primary, then confirm it works, then I delete the secondary (which is the old version), then I install and restore data for the big items. If you have a 32GB N7, you probably can be more careless with the deleting of big app data.
This way I get a clean start, loose nothing and have multple ways of going back if I need to, also I can take my time restoring stuff and still use my working older version until I am ready.
C5Longhorn said:
I'm fairly new to Android and the Nexus 7. I am unlocked, rooted, and have installed Ti Backup. I just recently received the OTA for 4.4.4 and installed it, and then manually loaded TWRP back and rerooted.
This doesn't seem like the cleanest install (maybe it's my OCD tendencies with hardware and software), so I'm wondering what is the best way to install Android updates? Should I reset to the factory image and then use Ti back up for all my apps? Is the way I proceeded just as good as other possible methods? My goal is to follow a plan that will support the 7 performing as best as possible.
Any info or opinions would be appreciated.
Thanks,
Rick
Click to expand...
Click to collapse
Well, i think it depends a bit on what kind of update it is. Usually the "smaller OTA updates (like 4.3.1 to 4.3.2) doesnt wipe your system, so all you have to do is re-root it again (if you want). All Apps and Data is kept. If the update is one that changes the Android Version like 4.1 to 4.3 (wich wont happen on the Nexus) then i would suggest a factory-reset before and maybe even after again, yes.
Off topic a bit: To be honest, i never bothered with backup systems because i somehow doesnt feel its a good idea but that is really my own thinking, im very aware that many ppl use backups successfully.
Games i play are usually saved on the server anyway, contacts, emails and all that are automatically there anyway if you use a google account and if your system is set to automatically restoe apps then all the apps get automatically downloaded again anyway.
Somehow i dont seem to use a single app that needs data to be backed up. And theres none that comes to my mind, besides savegames of non-server-saved games probably. But for that theres Helium. The cloud (be it "owncloud" or the official ones) saves me all this trouble with backups.
For the cleanest install I can think of (and usually do myself):
1. Grab latest factory image from Google and extract it so you're left with a folder with scripts and stuff (can be 4.4.4, or even L preview atm; folder should look similar to razor-lpv79)
2. Get platform-tools (either straight from Android SDK or from a trusted location (do not use a toolkit) ; make sure it's up-to-date, and for a good idea, add the executable path to PATH)
3. Boot N7 to Bootloader (power it off, hold vol down + power)
4. Unlock bootloader via fastboot oem unlock (confirm it on N7 with vol and power buttons)
5. Run flash-all.bat found in the factory image folder (fastboot executable either needs to be put into that folder, or you need it on PATH already)
6. Watch the tablet and wait for it to reboot, immediately when it reboots, hold vol down and go back to bootloader
7. Do fastboot oem lock to re-lock the bootloader
8. Boot to recovery
9. Clean Cache, then Data/Factory Reset (in that order)
10. Reboot
11. Profit
That process should ensure future updates work without issue or snag But of course you'd lose root. You probably don't have to re-lock the bootloader though.
espionage724 said:
For the cleanest install I can think of (and usually do myself):
1. Grab latest factory image from Google and extract it so you're left with a folder with scripts and stuff (can be 4.4.4, or even L preview atm; folder should look similar to razor-lpv79)
2. Get platform-tools (either straight from Android SDK or from a trusted location (do not use a toolkit) ; make sure it's up-to-date, and for a good idea, add the executable path to PATH)
3. Boot N7 to Bootloader (power it off, hold vol down + power)
4. Unlock bootloader via fastboot oem unlock (confirm it on N7 with vol and power buttons)
5. Run flash-all.bat found in the factory image folder (fastboot executable either needs to be put into that folder, or you need it on PATH already)
6. Watch the tablet and wait for it to reboot, immediately when it reboots, hold vol down and go back to bootloader
7. Do fastboot oem lock to re-lock the bootloader
8. Boot to recovery
9. Clean Cache, then Data/Factory Reset (in that order)
10. Reboot
11. Profit
That process should ensure future updates work without issue or snag But of course you'd lose root. You probably don't have to re-lock the bootloader though.
Click to expand...
Click to collapse
In fact, unless it's going back to the factory I'd recommend never relocking it.
mdamaged said:
In fact, unless it's going back to the factory I'd recommend never relocking it.
Click to expand...
Click to collapse
It's not really too much trouble to unlock it again, but if anything, re-locking it can be pretty nice from a security-standpoint.
I mainly just re-lock it just to keep that Google experience
espionage724 said:
It's not really too much trouble to unlock it again, but if anything, re-locking it can be pretty nice from a security-standpoint.
I mainly just re-lock it just to keep that Google experience
Click to expand...
Click to collapse
To each their own I guess.:good:
Thanks to all who responded. Good info and ideas on installs. I may end up doing a clean install and following the methods you all mentioned. Right now, I'm monitoring the performance to see if anything further is necessary.
Thanks,
Rick
espionage724 said:
It's not really too much trouble to unlock it again, but if anything, re-locking it can be pretty nice from a security-standpoint.
I mainly just re-lock it just to keep that Google experience
Click to expand...
Click to collapse
I agree that it's not too much trouble to unlock the bootloader BUT... you will completely wipe your entire device everytime you unlock the bootloader! There is only one way that I know of to get around that. "BootUnlocker for Nexus Devices" is supposed to be able to unlock the bootloader without wiping the device but for it to work you will have had to unlock the bootloader to gain root beforehand, then you can use the app to lock unlock. I've never used "BootUnlocker for Nexus Devices" so I can't make any claims as to how well it works or if it will continue to work after future updates. If you ever want to fastboot flash the factory image or parts of a factory image the bootloader will need to be unlocked. And as far as I know to flash images with a toolkit (I don't use any) like Wug's the bootloader needs to be unlocked. Unlocked bootloader from a security standpoint? You're absolutely right that there is a risk! IF your device physically ends up in someone else's possession. We do have the "Android Device Manager" now that gives the ability to locate and wipe our devices. And, I have an additional theft warranty provided by Ruger so I don't spend much time worrying about losing any devices. ; ) There are much bigger security risks from just being rooted and/or having "unknown sources" enabled, web exploits and sideloaded apps. Unless you leave your device completely stock and unrooted, relocking your bootloader can create a significant hurdle that needs to be overcome to solve problems, especially for inexperienced android users. For what it's not worth, just my 2 cents! ; )
Update: after doing some research and installing BootUnlocker it seems to work well! Sweet! I don't need it and prefer to just stay unlocked so I'm deleting the app. Downside of having a locked bootloader is if you can't boot up and want to flash the system or factory images you'll need to "fastboot oem unlock" which equals "wiped device"
C5Longhorn said:
I'm fairly new to Android and the Nexus 7. I am unlocked, rooted, and have installed Ti Backup. I just recently received the OTA for 4.4.4 and installed it, and then manually loaded TWRP back and rerooted.
This doesn't seem like the cleanest install (maybe it's my OCD tendencies with hardware and software), so I'm wondering what is the best way to install Android updates? Should I reset to the factory image and then use Ti back up for all my apps? Is the way I proceeded just as good as other possible methods? My goal is to follow a plan that will support the 7 performing as best as possible.
Any info or opinions would be appreciated.
Thanks,
Rick
Click to expand...
Click to collapse
I think you and I feel the same way about OTA updates. I've always felt that flashing the factory image will provide a much more consistent and reliable result. I'm not a big fan of using the OTA's but do use them occasionally for very small updates like 4.4.4. Usually the bigger OTA updates will fail because I have too many modified files in the system and because they are bigger I would rather flash the image anyway. Generally, for the most part, I will open the factory image and pull (extract) from there the specific images that were updated in the OTA and fastboot flash those. On the N7 only the system image was changed with the 4.4.4 update. The 4.4.3 update changed the boot and system images. You can either flash the images that are needed for the update individually or the whole factory image. Flashing the individual images will not wipe your storage, settings or user apps and the factory image Can also be flashed without wiping your storage, or losing your installed apps and settings. When you extract the factory image you will see;
bootloader-flo-flo-04.02.img
flash-all.bat
flash-all.sh
flash-base.sh
image-razor-ktu84p.zip
Inside the "image-razor-ktu84p.zip" is where you will see the individual images;
android-info.txt
boot.img
cache.img
recovery.img
system.img
userdata.img
To flash the factory image without wiping data all you have to do is open up the 'flash-all.bat' with editpad lite or whatever notepad you use and remove the -w from the text. The -w flag will cause the userdata.img to be flashed which wipes your device. If you really want to make sure the os is clean you can do a factory reset with TWRP after flashing the images which will wipe the cache, data and dalvik and remove any settings but will leave your storage intact. I seldom do that though. If you are using a custom recovery it will be replaced with the stock recovery image when you flash the factory image which is why I generally flash the images separately. Not a big deal though because it only takes a few seconds to fastboot flash a custom recovery. My bootloader is always unlocked and I always have TWRP installed on my devices. Leaving TWRP installed gives the ability to flash an OTA that you sideloaded if you don't want to wait for it to get to your device. When you flash the system image, factory image or an OTA you will always lose the supersu binary which causes you to lose root. Before booting up after flashing the images you can go into your custom recovery and flash the supersu zip to regain root. Which is what I always do and I always leave a recent copy of the supersu zip on my devices. I always recommend learning how to use adb/fastboot, toolkits work fine for a lot of people but learning adb/fastboot is not hard and gives you more options and a better understanding of what is being done. A lot of problems you see posted here in the forums are from inexperienced users that are using toolkits. Just saying! ; )
Thanks for the response. I'm actually going back to just using adb/fastboot and flashing. I seem to run into more hiccups using toolkits that just a command line window.
Rick

ideas when root will come?

Any ideas when root will come? What was last year's track record? I'm really anxious to root and get rid of this tethering bypass get titanium arise Etc
we should have root when either:
1) google releases factory images. then we can use magisk manager to patch stock boot image and flash with fastboot, even if we don't have twrp yet.
2)TWRP gets built
my money is on #1 happening first
That is correct. Last year root and recovery took a long time for a couple of reasons.
First, this was the first device with two slots for boot, system, etc.
Second, it was the first device to use file based encryption.
Lastly, there is no true recovery partition. Recovery is contained within the boot partition, so that makes everything more complicated and why flashing things still requires very specific ordering.

Confusion about flashing roms on A/B

Hi all
I come from the Oneplus one where flashing has been pretty straight forward. Now I am in the possession of a Pixel 2 XL and I would like to flash some roms on it. I have read many threads on flashing on the Pixel 2 xl and it always seems to have some caveats involved. I have tried to search the internet for a good tutorial but I have not discovered one yet. In advance, I am sorry if I missed some good resource on this.
So, here is my situation: I am currently on the latest patch (February 2019) and let's assume I would want to flash HavocOS. My bootloader is unlocked and I know thaf I either have to flash TWRP or only temporarily boot into TWRP. Usually, here I would flash the Rom, gapps, and magisk. For updates I would simply dirtyflash the newest rom version. As far as I have gathered, flashing the Pixel is not that straightforward.
Does TWRP flash automatically both A and B?
Do I need to flash the rom twice? Once A and once B? Or simply flash it once?
Do I need to extract things such as vendor, radio, bootloader etc and flash that once/twice? Only for the first time or for every (dirty)flash?
I would love to learn the standard procedure on flashing the Pixel 2 XL.
Again, I am sorry if I missed some good resource on this.
Thank you for your time and your help!
Welcome to the 2 XL family.
The 2 XL is a fickle beast, which you will soon find out
There is a link for upgrading/updating the 2XL in my sig, but as usual there are many ways to skin the proverbial cat.
As far as slots; I have never manually selected a slot for ANYTHING. Not TWRP, not cust Roms, not stock Roms, not kernels, not Magisk.
Whenever I flash something, the slots are always automatically chosen by whatever I'm flashing.
I know that you CAN manually select slots, but in all the time and the hundreds of Roms, kernels, Magisk versions I've flashed, I have never manually selected a slot.
Again, there are many ways to do nearly everything related to the 2 XL, and my way certainly is not the only or absolute best method, but the step by step in my sig has always, without fail, been successfully followed by myself and many other for flashing cust kernels, cust Roms, updating stock images, rooting, fastbooting, etc.
If you ever get into a sticky situation, hit up some of the 2 XL regulars who have a wealth of knowledge individually and can fix anything collectively.
@Badger50, @clothednblack, @Pkt_Lnt, @post_mortem, @simplepinoi177, @TonikJDK just to name a few.
Thank you for your insightful comment! Very helpful!
I went through your signature and got a lot of good information.
However, I still have some questions regarding about vendor, boot, radio etc.
I found this comment in the Havoc ROM thread: https://forum.xda-developers.com/showpost.php?p=78842872&postcount=1800
Are you usually dirty flashing that way?
Thank you so much for your help!
hascherpur said:
Hi all
I come from the Oneplus one where flashing has been pretty straight forward. Now I am in the possession of a Pixel 2 XL and I would like to flash some roms on it. I have read many threads on flashing on the Pixel 2 xl and it always seems to have some caveats involved. I have tried to search the internet for a good tutorial but I have not discovered one yet. In advance, I am sorry if I missed some good resource on this.
So, here is my situation: I am currently on the latest patch (February 2019) and let's assume I would want to flash HavocOS. My bootloader is unlocked and I know thaf I either have to flash TWRP or only temporarily boot into TWRP. Usually, here I would flash the Rom, gapps, and magisk. For updates I would simply dirtyflash the newest rom version. As far as I have gathered, flashing the Pixel is not that straightforward.
Does TWRP flash automatically both A and B?
Do I need to flash the rom twice? Once A and once B? Or simply flash it once?
Do I need to extract things such as vendor, radio, bootloader etc and flash that once/twice? Only for the first time or for every (dirty)flash?
I would love to learn the standard procedure on flashing the Pixel 2 XL.
Again, I am sorry if I missed some good resource on this.
Thank you for your time and your help!
Click to expand...
Click to collapse
Thank you @Az Biker! You are the best! You don't know how flattered I am that you even kept me in mind, let alone be among that great list...I am truly humbled...
So, hascherpur, I'll answer a bit of your questions, then I'll offer you some general advice when starting up with this Pixel 2 XL (taimen) as well as some dire tips if/when you get yourself in trouble (as Az Biker had alluded, it seems with this device, it is rather "inevitable" :good: )...
TWRP (and most other flashing installation files/process [ROMs, Magisk, etc.]) actually consider and keep in mind the multi-slot possbility and have made it that, if it's called for, it will automatically patch/boot/load either/both/individual slot. You'll see many and mmaannyy others go about manually/forcibly "set[ting]" and choosing specific slots, but I, like Az Biker, in my (roughly) 16 months of using this device have never, ever found a reason to -- and, for better or worse, I've broken my taimen and my gf's walleye countless times and managed to save/recover it but completely got it bricked twice.
The time you need to extract those (bootloader, radio, vendor, etc.) is when you're updating or reparing/recovering your device. A note about that though: if you wish to manually update our device (monthly; for the security updates), the absolute best way to go about it is to download the Full Factory image direct from the Google Developer's website, and extract the files within the .zip (usually these bootloader, radio, vendor, and others totalling usually 9-ish files) into the folder that has adb.exe and fastboot.exe, modify/edit the "flash-all.bat" file/script (flash-all.sh depending on your OS) and remove the "-w" (unless you wish to "w"ipe your internal), and then run that flash-all file. Because this manner of updating essentially re-installs the /system and /vendor folders and partitions, this would actually be more of a "clean" flashing than the other methods; downloading the OTA (not Full Factory) image and manually (via adb) updating and/or modifying your device so it will take an OTA update -- which is it's own hairpulling and (imo) unnecessary process -- these methods should be considered "dirty" flashing/updating, if anything.
I'm unsure how HavocOS ROM updates and if it needs to be done within its own environment or in the recovery, but I imagine much of what I just said would still apply, at least in some manner.
Okay, some general info you would find helpful and would (hopefully) keep you from falling into some of the "pitfalls" that we've all run into and have told ourselves "...if I had only known beforehand...". There is the fact that, for all Pixels -- and I'm pretty sure any multi-slot device -- there is no more recovery partition! It now resides in & with the boot partition/image. This has thrown so many new users of Pixel phones for a loop...they're usually attempting to "flash to recovery" for 24 hours before finding this out :silly:. Then there is ALL the issues you'll run into with adb, fastboot, and platform-tools in general; When you get issues when using adb and/or fastboot, you're initial instincts is going to lead you into thinking something is wrong with the image, device, and/or commands -- and with this/our phone, many times that is not the case (believe it or not, it'll put up a flashing-type error, but it's actually the USB cord?!)! Az Biker has the best troubleshooting guide in his signature, and it holds advice that usually gets things working 90% after having issues -- some general tips to keep in mind is make sure you UPDATE the platform tools and sometimes, for some reason, you have to run the same commands/process 4-5+ times before it "...works all of a sudden, this time...!" But, basically (as Google is genius in this), as long as you have access to Bootloader Mode, then there's always hope! I've gone as far as re-formatting partitions, changing the partition type, changing the size of the partition, and even manually flashing 12+ image files after forcing the partition size to change for those image files, and I've been able to come back from it because of being able to have access via Bootloader Mode.
Now, being able to unlock the bootloader and have a custom recovery, especially considering you plan on flashing custom ROMs and/or kernels and such, IT IS BEST THAT YOU MAKE A BACKUP (NANDROID IS BEST)! I know that this isn't exclusive advice for the Pixel 2 XL, but it still bears reminding; but here's some taimen specific advice -- keep in mind that many backup processes (TWRP specifically) does not (normally*) backup the data in your /internalsd (which includes your Download, Music, Photos folders)! (*i say "normally" because there is a convoluted method I've found that actually does backup the internal sd which I do every month, which I could walk you through if you are interested...). But I believe it's the best backup method because it at least backs up the system, boot, and data partitions -- note: you don't have to replace and install the custom recovery in order to utilize it; there is always temporarily booting the twrp "image" and running it off that -- but there is also TB and the other myriad ways to backup as you see fit (I'm completely unfamiliar with HavocOS, but there might even be a backup method via its environment). The key thing is: that you make backups!
And, lastly, some specific advice for when you run into issues... Re-installing/Re-flashing the Full Factory image is always a great way to fix a lot of the issues out there -- I still remember the days of my Galaxy S5 and Motorola Droids where "flashing" would wreck and wipe all data and customizations, so I love how Google made it so that's not the case with the Pixels -- but if you find that it hasn't resolved the issue, using Deuce's script (that can be found HERE) has saved countless many in repairing and recovering our devices. One of the greatest things about it is that it manually and individually flashes each and every image file to BOTH slots! Thereby covering a lot of "little bases" that a standard flash-all script doesn't do -- the only caveat is that you'll have to additionally extract all 15+ image files from the image .zip file (that resides within the Full Factory .zip file). One last recovery bit of advice, running the command "fastboot getvar all" will provide a great deal of pertinent information about the device, to say the least! It'll be good if you wish to check and to include when requesting help...
My deepest apologies for making this as long as it is; for those who know me, sometimes I can't help myself. Well, there's really that many crazy things that would be so helpful to know at the beginning with this device as well as I type very fast and fluently (kind of as fast as I talk), so I get away from myself...In any case, thanks for reading this far, if anything, and my sincerest apologies...
Again, I'm very happy to help and so glad the Great Az Biker had thought of me to include. This is a wonderful, great device and I don't want any other! But, as with all great things and loves, it will also have its "hair-pulling" headaches...so, just take your time and read and re-read, keep some of these things in mind, and good luck to ya!
Well @simplepinoi177: How am I even supposed to answer to your post? This is an incredible resource (maybe even warrants a sticky somewhere) and I am very grateful for all the details you just shared. Thank you so much. I did not expect such a warm welcome!
I have one last question: as it turns out, I was using a Taimen before (for a few months), but did not really bother using roms. In the end this proved to be really helpful as my USB port broke. I could still charge the phone, but I was unable to access the phone through cable (no bootloader, no adb, nothing). Luckily the RMA process gave me a completely new phone.
Now I wonder: if my phone's USB port breaks, I then need to RMA it and it has a rom on it, how could I restore it to a stock-like situation? I got a new device even though the bootloader was unlocked. I guess I could flash the stock image through TWRP somehow. How would I remove TWRP without a cable though?
simplepinoi177 said:
.....
.
.
.....But, as with all great things and loves, it will also have its "hair-pulling" headaches...so, just take your time and read and re-read, keep some of these things in mind, and good luck to ya!
Click to expand...
Click to collapse
Tons of solid advice, willingness to help, and a lot of experience.
^^^^^This is why I included you in the list of great resources!
hascherpur said:
Well @simplepinoi177: How am I even supposed to answer to your post? This is an incredible resource (maybe even warrants a sticky somewhere) and I am very grateful for all the details you just shared. Thank you so much. I did not expect such a warm welcome!
I have one last question: as it turns out, I was using a Taimen before (for a few months), but did not really bother using roms. In the end this proved to be really helpful as my USB port broke. I could still charge the phone, but I was unable to access the phone through cable (no bootloader, no adb, nothing). Luckily the RMA process gave me a completely new phone.
Now I wonder: if my phone's USB port breaks, I then need to RMA it and it has a rom on it, how could I restore it to a stock-like situation? I got a new device even though the bootloader was unlocked. I guess I could flash the stock image through TWRP somehow. How would I remove TWRP without a cable though?
Click to expand...
Click to collapse
Thank you hascherpur, I appreciate the sentiment. But, as I mentioned, as much as it helps you, it helps the helpers here as well. Anyone whose worked on our taimen and walleye can attest to those few things that would save soooooo many people if they just knew these small insignificant-seeming tidbits...
I am actually in this particular situation currently myself. Me (and this other fellow) got our devices (my gf's walleye to be exact) bricked where fastboot does not recognize and detect the USB plug, even though it is charging and just because of this fact, there's nothing that can be done and only a RMA is in order... But the key difference is that my custom recovery also somehow broke. That's why, at it's base purpose, a custom recovery is meant to replace and enhance your repair/recovery options -- so you can have it in dire situations and boot it up and utilize it if needed. If my TWRP was still accessible, I would more than have a chance to repair the device.
But to answer your specific question, I imagine a data wipe/erase from either stock or custom recovery would be in order. And, depending on how particularly broken the USB port is, you might still consider and try a USB-C flash drive and attempt the OTG enabled feature. If that could still work, then I've gotten the idea that attempting to install the system via OTA update installation .zip might be able to help -- but I would have my doubts because, like I kind of stated in my last post, that's more of a "dirty flash" and I wonder how well an not-so-complete OTA update can work and establish itself when its base /system and /data partition is wiped and essentially just empty space...But, also, if even a flash drive can be read, then you should be able to use adb to move essential flashing files to the device and utilize fastboot to make repairs and re-flash (i'm unsure if fastboot can manage this off of a flash drive; i'm not even sure it has OTG capabilities...). If, at that situation, the one resource I mentioned, Deuce's script, would be great as it will flash all pertinent and important stuff if, for some reason, the flash-all can't get passed flashing certain portions like bootloader or vendor.
So that's the ideas that come to my mind as possibilities that might work...hope this helps...
simplepinoi177 said:
Thank you hascherpur, I appreciate the sentiment. But, as I mentioned, as much as it helps you, it helps the helpers here as well. Anyone whose worked on our taimen and walleye can attest to those few things that would save soooooo many people if they just knew these small insignificant-seeming tidbits...
I am actually in this particular situation currently myself. Me (and this other fellow) got our devices (my gf's walleye to be exact) bricked where fastboot does not recognize and detect the USB plug, even though it is charging and just because of this fact, there's nothing that can be done and only a RMA is in order... But the key difference is that my custom recovery also somehow broke. That's why, at it's base purpose, a custom recovery is meant to replace and enhance your repair/recovery options -- so you can have it in dire situations and boot it up and utilize it if needed. If my TWRP was still accessible, I would more than have a chance to repair the device.
But to answer your specific question, I imagine a data wipe/erase from either stock or custom recovery would be in order. And, depending on how particularly broken the USB port is, you might still consider and try a USB-C flash drive and attempt the OTG enabled feature. If that could still work, then I've gotten the idea that attempting to install the system via OTA update installation .zip might be able to help -- but I would have my doubts because, like I kind of stated in my last post, that's more of a "dirty flash" and I wonder how well an not-so-complete OTA update can work and establish itself when its base /system and /data partition is wiped and essentially just empty space...But, also, if even a flash drive can be read, then you should be able to use adb to move essential flashing files to the device and utilize fastboot to make repairs and re-flash (i'm unsure if fastboot can manage this off of a flash drive; i'm not even sure it has OTG capabilities...). If, at that situation, the one resource I mentioned, Deuce's script, would be great as it will flash all pertinent and important stuff if, for some reason, the flash-all can't get passed flashing certain portions like bootloader or vendor.
So that's the ideas that come to my mind as possibilities that might work...hope this helps...
Click to expand...
Click to collapse
Thank you simplepinoi177! Very helpful. I have also seen that it is possible to access adb via wifi. But I doubt that I am able to use fastboot via wifi.
In any case, I am deliberating what the best course of action at the moment is. It seems that the Pixel 2 XL's usb port is a common point of failure. Therefore, I am trying to make sure that I leave my phone in a state, where I can easily revert it into an RMA-able state. I think with TWRP installed, I could get the stock image easily installed. I am still not sure how to remove TWRP without a cable, should the USB port break.
hascherpur said:
Thank you simplepinoi177! Very helpful. I have also seen that it is possible to access adb via wifi. But I doubt that I am able to use fastboot via wifi.
In any case, I am deliberating what the best course of action at the moment is. It seems that the Pixel 2 XL's usb port is a common point of failure. Therefore, I am trying to make sure that I leave my phone in a state, where I can easily revert it into an RMA-able state. I think with TWRP installed, I could get the stock image easily installed. I am still not sure how to remove TWRP without a cable, should the USB port break.
Click to expand...
Click to collapse
To remove twrp without a cable, simply put the stock boot.img on your internal storage, and flash it with twrp. After you reboot, twrp will be gone.
Here's the February boot.img if your interested :good:
https://drive.google.com/file/d/1khLnNH7emt38sDsD7UmKX3HJG3lhxdXQ/view?usp=drivesdk
Badger50 said:
To remove twrp without a cable, simply put the stock boot.img on your internal storage, and flash it with twrp. After you reboot, twrp will be gone.
Here's the February boot.img if your interested :good:
https://drive.google.com/file/d/1khLnNH7emt38sDsD7UmKX3HJG3lhxdXQ/view?usp=drivesdk
Click to expand...
Click to collapse
Oh, thanks! I guess I am all set . Thanks to everyone for the very helpful answers!
Badger50 said:
To remove twrp without a cable, simply put the stock boot.img on your internal storage, and flash it with twrp. After you reboot, twrp will be gone.
Here's the February boot.img if your interested :good:
https://drive.google.com/file/d/1khLnNH7emt38sDsD7UmKX3HJG3lhxdXQ/view?usp=drivesdk
Click to expand...
Click to collapse
genius idea! I was actually asking myself that question, and this is a great set up. But, usually, if I'm in so much trouble that I need to return it to stock recovery that urgently, the device most likely is probably so messed up that it probably wouldn't be able to read/find the boot.img I would keep in the sdcard storage...
simplepinoi177 said:
genius idea! I was actually asking myself that question, and this is a great set up. But, usually, if I'm in so much trouble that I need to return it to stock recovery that urgently, the device most likely is probably so messed up that it probably wouldn't be able to read/find the boot.img I would keep in the sdcard storage...
Click to expand...
Click to collapse
You gotta approach this stuff like the first part of your name my friend. Take it from an old guy...."Simple" is good! :laugh::good:
Deuces script will synch your a and b sides so you don't need to worry about them getting weird.
madscribblerz said:
Deuces script will synch your a and b sides so you don't need to worry about them getting weird.
Click to expand...
Click to collapse
That is precisely why I use it every month.

[HELP REQUEST] WILL PAY TO WHOEVER HELPS ME GET THROUGH THIS SOFTBRICK

.
rodagola said:
Hello everyone on xda, please bare with me. Here's my story
I own a Redmi Note 8 pro, chinese rom model. It was running miui 11.0.3 over android 9 If I recall correctly.
Ok so... I was tired of some of the china apps pushing their notifications over and over and auto installing stuff, so I looked up how to apply adb commands to remove such bloatware, which was a fairly simple process. I copied and pasted a list of safe stuff to delete I found around some forums.
then... there were some other packages I checked out using an app called "app inspector", which directly tells you which app is under which package (totally useful for this purpose).
I tried to be careful not go overboard since I don't have any root access, or custom recovery, and wasn't really planning to have these, just wanted to keep this as my simple daily driver cellphone, but also perform this little maneuver to get rid of some bloatware.
little did I know, I was about to somehow softbrick it. More info: I did not use a screen lock method other than the "swipe up".
Ok, so I uninstalled some packages I cannot remember exactly how they went, but they had the terms "xman" and "yman" on them I think, I wasn't so sure about them because I looked them up on the web yet they didn't appear anywhere. I think they went something among the lines of "com.android.miui.xman". I also uninstalled 2 or 3 more, but after googling, they seemed unsuspecting.
Anyways, I'm aware there's a command to reinstall the packages because they're still on the phone's ROM image. That is in case I had to restore anything back to normal. Turns out I later rebooted the phone and when it launches the lock screen, I keep swiping up but it won't take me over to the actual MIUI launcher. The screen is frozen on the lock screen.
I'm not freaking out at this time because I still tried to connect the device to the pc, and it still shows as connected, I then go to the adb console and type "adb devices", it is still recognized, however, it says next to it that it is unauthorized... damn it. So now I might not be able to run the commands that allow me to reinstall the exact packages that are rendering the phone softbricked (I guess), plus I'm not really sure which package caused this.
After about a minute or two on the lock screen, the phone takes me to the "redmi-recovery 3.0",
which displays 3 options:
Reboot to system: which basically forms a loop
Wipe date: godforbid... really don't want to do it since I likely had many files not backedup
Contact miassistant: not sure what to do with this, says "pcsuite.mi.com" at the bottom
on the miassistant option you can apparently sideload stuff, idk how to go about this, maybe it allows me to install a slightly upgraded ROM, which in turn will work the same as if it was an OTA update (so it will keep my data as it was instead of wipe)? Because the point is not to erase my user data!!
I'm not sure how to feel or what to do without losing my pictures, notes and documents
I have hopes this situation can be turned around back to normal, and like the title implies... I'm WILLING to PAY you through paypal or something to WHOEVER offers to guide me through in the best way possible. Please if you have the knowledge/experience don't hesitate I'll also be grateful timelessly.
I'm not an expert at these scenarios so I might as well ask on xda where most are really skilled! Thanks in advance to those amazing souls
Click to expand...
Click to collapse
tldr;
If you can boot into fastboot mode you can just flash a official MIUI fastboot ROM:
Xiaomi Firmware Updater (where you can download official MIUI ROMS): https://xiaomifirmwareupdater.com/
This is the current hard unbrick method: https://telegra.ph/Installing-Redmi-Note-8-Pro-firmware-via-SP-Flash-Tool-01-21
It should also work in your case and there's even a video guide.
This is another video guide for fixing a hard brick:
Both methods above will format your phone though (afaik all data will be lost).
Compass.
.
rodagola said:
are these the kind of roms that you unzip and have the BL, AP, CP, CSC files? I could try that, but I've heard installing home_csc will not override/wipe my personal data. If this is what you meant, can you confirm? Or do you reckon these linked video tutorials would not wipe the data?
Click to expand...
Click to collapse
Nope, it doesn't.
If you can boot into Fastboot, flash the ROM using Mi Flash, otherwise, use this tutorial:
.
Compass Linux and juliusjr have told you the method, so I will just add supplemential infos.
In your case, I think simple upgrade will do the trick, dirty flash is applicable both via fastboot flash (mi flash) and recovery flash (the mi assistant method). If you want to stop the ads, I will recommend you to unlock your bootloader, move to global, root, and use an adblocker (a bare minimum config, in trade of some bangking apps being blocked).
I don't know the corresponding version for miui china rom, but in global rom, prior 12.0.0.7 (the one with the early 2021 security update), you can dirty flash back and forth while keeping your data.
.
rodagola said:
Hi, thanks for your info, I would like to try the mi flash tool as I've been told before the stock recovery thing has less chances of working. However, I had dev options turned on before but didn't manage to turn on the "OEM unlock" option, will flashing original ROMs work this way? or did I need that option toogled on? That's my last doubt, and thanks a lot. Btw, the China ROM this Redmi N8P had never ever showed me any ads, but thanks a lot as well for such input
Click to expand...
Click to collapse
You still have a locked bootloader? (How do I know? You will see "Unloked" on the bottom of the screen everytime your device reboots and showing mi logo if your device is unlocked)
Hmm, mechanically it work like normal ota update. Full recovery update will ony erase nessesary partitions (system, boot, and some other things) while keeping your data intact. So doing this to your phone technically safe. You can do this with MiFlashPro, do a recovery update using a recovery rom (the 2 gigs one) greater than your current MIUI version. But please bear in mind that I have never done this before to a locked phone. A same distribution version IS A MUST (i.e. global with global).
Oh and it will need you to log in to your xiaomi account. My guess is you need the flash permission open for your account (if you have unlocked your phone you shouldn't have a problem). I have never flashed with an account that never have been used to unlock a bootloader, so I might be wrong.
If your phone is bootloader unlocked, Mi Flash is the least demanding and it can retain your data with "save user data" in the bottom right corner option on, regardless your miui version (but I think there will be some problem with installed apps if you downgrade from A10 to A9).
Hope this help.

Question Grateful for root and bootloader unlockables but ..

I am grateful and I bought this because next tk Samsung s22 yktra this phone is definitely #2 in my opinion, which is saying a lot.
However the root process is tedious because I am not around a computer I am just lazy to get ito do flashing etc.
My question is, why do. We not have a a real recovery and ability to back up and restore various roms we or flash zips senselessly.
So my question is (since I just bought this) do you guys rhibj we will have to dastboir flash everything or at least much harder then with cwmod or twrp recovery. Is it not possible to have a recovery like those on t his phone?
Is there a better phone in the us that is unlockaable but has the quality like this phone and screen or the Samsung s22 yktra phone?
Thanks
Without a PC you can't run fastboot commands to unlock bootloader and root it. Twrp isn't available for stock a12, let alone the upcoming release of a13
Yes I know that is what I am saying. Is twrp or some recovery similar ever going to be compatible? If not I may be returning but I really don't want to. It's a great phone but I love playing with tweaks and mods. This is my not my main phone. My pixel is on a line I only use very seldomly
jgrimberg1979 said:
Yes I know that is what I am saying. Is twrp or some recovery similar ever going to be compatible? If not I may be returning but I really don't want to. It's a great phone but I love playing with tweaks and mods. This is my not my main phone. My pixel is on a line I only use very seldomly
Click to expand...
Click to collapse
I don't think that you will find too many phones from the primary companies (Google, Samsung, etc) nowadays that will have TWRP builds. As time progresses, the technology (and what is available) progresses as well.
jgrimberg1979 said:
Yes I know that is what I am saying. Is twrp or some recovery similar ever going to be compatible? If not I may be returning but I really don't want to. It's a great phone but I love playing with tweaks and mods. This is my not my main phone. My pixel is on a line I only use very seldomly
Click to expand...
Click to collapse
This is the most recent news about Android 12 compatibility for TWRP:
TWRP 3.6.2 Released
TWRP 3.6.2 is out now for most currently supported devices.
twrp.me
We are continuing work on Android 12. There is no ETA currently. You can follow our status on Zulip
Click to expand...
Click to collapse
Disclaimer: I am not advocating signing up for "Zulip", and I won't be doing so myself. When/if TWRP for Android 12 becomes available, I'll hear about it whether I sign up on there or not. It's also likely Android 13 will be stable by then.
Supposedly, the Official TWRP App (not itself updated since 2020) will notify when there's a new version - but I don't know if that applies to when there's no current version of TWRP Recovery already installed.
The reality is that for any device that actually has full working FASTBOOT, there is really no need for these types of recovery systems (i.e. twrp).
Screwing around with different OS builds while out and about is ill-advised no matter what. Leads you to the likely situation of getting yourself unbootable, which is bad. Its really not that big of a burden to plug in a wire when doing radical changes like that.
96carboard said:
The reality is that for any device that actually has full working FASTBOOT, there is really no need for these types of recovery systems (i.e. twrp).
Screwing around with different OS builds while out and about is ill-advised no matter what. Leads you to the likely situation of getting yourself unbootable, which is bad. Its really not that big of a burden to plug in a wire when doing radical changes like that.
Click to expand...
Click to collapse
It's not that much of a burden. You got to understand. It's been several years to a decade since I had a android and what I was used to was much different than now. I was used to always having a recovery that backs everything up and could swap roms if I wanted to if I flashed something wrong I could easily get into recovery and reflash the rom or just restore to another one. It's just different but I am grateful for what I have now but was hoping maybe there would be a recovery like twrp or cm recovery etc. Either way still happy for what we have
Pixel devices do not have a recovery partition; recovery lives in /boot with the kernel, as well as whatever patches you've applied. Currently, TWRP and Magisk cannot coincide for whatever reason. You can patch a boot image with TWRP, and it'll work AFAIK....but if you try to patch it with Magisk too, you'll get a boot loop.
Because we have full fastboot access, there's not really any need for TWRP. You can dump and backup partition contents using fastboot, but it's tedious.
jgrimberg1979 said:
It's not that much of a burden. You got to understand. It's been several years to a decade since I had a android and what I was used to was much different than now. I was used to always having a recovery that backs everything up and could swap roms if I wanted to if I flashed something wrong I could easily get into recovery and reflash the rom or just restore to another one. It's just different but I am grateful for what I have now but was hoping maybe there would be a recovery like twrp or cm recovery etc. Either way still happy for what we have.
Click to expand...
Click to collapse
ADP, Nexus, and Pixel devices have NEVER needed a recovery to function fully. This goes right back to the first Android phone in 2008. So nothing really has changed in this respect. Its mostly the "other" brands that need a recovery to work around various restrictions.
Backups can be taken from within the main OS, and restored similarly, and this is actually much preferred since the backup can be stored to a remote location such as a self-hosted Nextcloud server. You can look into seedvault (integrated solution) and neobackup (root solution).
Since Android 11 you cannot have TWRP and Magisk installed at the same time or it will lead to a bootloop. However, you can fastboot boot TWRP (without installing it) and have Magisk installed without getting into a bootloop. At least this is the way it was on Android 11 with the Pixel 2 XL.
Haven't used TWRP in a long time and don't miss it at all, to be honest.

Categories

Resources