full wipe - Google Pixel Questions & Answers

hi
had a pixel for about 8 months now, in the past i'd normally always root my device and load a custom rom (i liked tweaking DPI), didnt have to do that on the pixel, so never bother rooting etc, although i did unlock the bootloader, and then put the custom recovery in the too hard basket since it involved booting it from fastboot, ended up couldnt be bothered
i've recently loaded the Oreo update (signed up for beta releases), and since then, battery has been draining, friend of mine had the same issue, he factory resetted, and he reckons all is good now.
i'd like to take it a step further and perform a full wipe/reflash
is there a guide somewhere, that steps through performing a full wipe, and reload of a factory image?
can i do it all without unlocking/rooting?

You put custom recovery on?
Then you are already unlocked (bootloader)
You can directly flash-all (probably safely) the latest factory image available for your Pixel (search google for "Pixel google factory images"
You probably want to wipe everything and start over, so don't edit the flash-all file.
There are guides in the "Guides" section. It is a lot to write out every step. Make sure your Android SDK is up to date
Sent from my sailfish using XDA Labs

I have no custom recovery, if I unlock the bootloader and run flash-all will that do a full wipe ? I can see in the Shell script fastboot is called with -w, does that mean wipe?

gjw00 said:
I have no custom recovery, if I unlock the bootloader and run flash-all will that do a full wipe ? I can see in the Shell script fastboot is called with -w, does that mean wipe?
Click to expand...
Click to collapse
The -w tells it to do a full wipe. So, yes, running the flash-all will do a full wipe. I know you want to do a clean install but, just so you know,if you ever want to do an upgrade without wiping, simply remove that -w, save the file and run it. The result would be an upgraded phone with data fully intact.

Related

From 4.4.4 to patched 5.1.1

The stagefright threat, etc. is forcing me to finally move to 5.1.1. Because one misstep could mess things up, I'm looking for "reassurance" that below is the correct procedure. (I've only upgraded android versions once before and am nervous ....)
Starting point:
- Rooted nexus 5, kitkat 4.4.4,
- Xposed framework installed
- twrp 2.8.6.0 recovery installed
- adb and fastboot on Windows pc
Need to: (please correct if wrong steps)
1. Make nandroid and Titanium backups
2. Download 5.1.1 (LMY48I) from
https://developers.google.com/android/nexus/images#hammerhead
3. Uninstall xposed framework?
4. Flash downloaded 5.1.1 (LMY48I) from within twrp recovery
Questions:
A. Is 5.1.1 (LMY48I) the correct stagefright patched image for nexus 5?
I'm a T-Mobile subscriber but bought my nexus 5 from Google not T-Mobile. So is this the correct image or the T-Mobile specific 5.1.1 one?
I'm currently KTU84P
B. Will I lose root?
C. Will I lose data?
Please let me know if I have it wrong.
Thank you!
Going from Android 4.x to 5.x you'll need to end up wiping your device. Make a nandroid and store it off your device. Also make sure you have Google backing up your device, it'll make things easier.
Download the latest factory image, Google nexus factory image. Extract the .tgz file using 7-zip or winrar. In there is another zip file extract it too. Then follow method 2, long method, of this, http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
You'll need to re-root and you will lose data.
Sent from my Nexus 9 using XDA Free mobile app
Darn!
Thanks for replying. I really don't want to reroot and lose data. Is there no other way?
I don't sync with Google or the cloud, so that's not an option for me.
Isn't there a way to do it via adb or fastboot?
I thought it was unlocking the bootloader that wiped the system. But my bootloader is already unlocked.
Anderson2 said:
I thought it was unlocking the bootloader that wiped the system. But my bootloader is already unlocked.
Click to expand...
Click to collapse
The issue is you will have to flash userdata.img or you'll boot loop and not get your device to boot. Flashing userdata.img will wipe your device.
Sent from my Nexus 9 using XDA Free mobile app
Maybe I'll gear up my courage and do it. Thanks for the advice. Wish you lived next door!
If you have a nandroid you can simply restore data after the upgrade. That is after you reflash twrp (or not if you fastboot partitions one by one skipping recovery) and push your nandroid back to the device. Gives you back all of your calls, sms's, contacts, apks (except system, but the old data will come back), etc. If you have kept your apks up to date, even when on 4.4.4 they should work fine on lollipop.
I just did this on Slim. Was on SlimKat for ages, used multirom and flashed latest SlimLP build by Robbie. I swapped the new one LP to primary in modified twrp. I updated kernel to elementalx, restored data from previous nandroid, fixed up xposed for a few tweaks I use (don't do too much with a custom rom (I use greenify, bootmanager, and secure settings). I ran the new primary for a few days, the LP one with all the restored stuff. A few things needed to update through play (pain in the butt as I live in China and have to do it through a VPN). Everything was working fine, so I did one more nandroid, then deleted kitkat. I don't think this would be suggested in most guides, but it worked. If it hadn't, well, go back to my nandroid. If there are things you are really scared of losing you could go farther, export all contacts, use sms/call log backups, then titanium for all apks and data. Titanium also has an option for a selective recovery from a nandroid of the data partition. This means you can flash a new lp rom, install titanium, then restore in bulk from a nandroid. No need to back them all up individually.
Remember, once you start you have the nandroid to fall back on anyway. Nothing should be able to go wrong. If it all gets messy just get into bootloader and fastboot boot recovery (twrp image) and restore your device to where you started. Softbrick is nothing when you have a nandroid and recovery.
Thank you so much. That is very helpful to learn.
wangdaning said:
If you have a nandroid you can simply restore data after the upgrade. That is after you reflash twrp (or not if you fastboot partitions one by one skipping recovery) and push your nandroid back to the device.
Click to expand...
Click to collapse
That's what I've never done. Can I just restore "data" from a nandroid after updating to lp? (after refreshing twrp and putting my nandroid back; fastbooting partition by partition is beyond my current abilities)
wangdaning said:
Titanium also has an option for a selective recovery from a nandroid of the data partition.
Click to expand...
Click to collapse
That I will explore. Sounds like the easiest and fastest option if it works.
If you want to keep your recovery (save you from having to reinstall it):
1) open the factory image you have downloaded
2) open the image-hammerhead-(whatever version).zip
3) delete recovery.img
4) run the flash-all file
I can confirm that you can selectively restore from a nandroid in titanium backup. I opened it on my phone to check before I said you could.
OK. I decided to put aside bad memories of the pc not recognizing the phone and the like and decided to go ahead.
Did a lot of reading, took notes, did my backups (nandroid and tibu), moved them to the pc, downloaded the necessary files and moved them to where I had adb and fastboot installed and with trepidation went ahead.
First command from the adb folder
"Fastboot devices"
found the nexus 5 and gave the correct response!
So, I said "I was worried about nothing. This is going to be a breeze"!
Next command, as administrator, from the subfolder in the adb folder, with N5 attached, was the unmodified
flash-all.bat
Response:" waiting for device"
I tried again with phone in recovery: Response:" waiting for device"
I tried again with phone in bootloader mode and got:
........
error: cannot load 'bootloader-hammerhead-hhz12h.img'
rebooting into bootloader...
OKAY [ 0.065s]
finished. total time: 0.066s
error: cannot load 'radio-hammerhead-m8974a-2.0.50.2.26.img'
rebooting into bootloader...
OKAY [ 0.071s]
finished. total time: 0.072s
error: failed to load 'image-hammerhead-lmy48i.zip': No such file or*
directory
Press any key to exit...
........
What should I do? Everything is unzipped. Windows 8.1
Thank you.
*
*
Here is the folder contents from which I ran flash-all.
So the files are there.
Anderson2 said:
Here is the folder contents from which I ran flash-all.
So the files are there.
Click to expand...
Click to collapse
Try method 2 from here:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
As mentioned before you can skip the fastboot flash recovery thing, or at the end "fastboot flash recovery (twrp image)" to install custom.
Also, it is not as complicated as it seems. When you enter the command "fastboot flash bootloader" for example, you can just drag the bootloader file into the command prompt instead of typing everything out.
Did you follow the instructions from here?
https://developers.google.com/android/nexus/images?hl=en
Sent from my Nexus 5 using Tapatalk
OK, Now I am in trouble!
I followed the instructions in method 2 of http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
Everything went smoothly and I finished. When the instructions at the end said to go into recovery, I found myself in the TWRP recovery. But I am now in a boot loop. I can't boot into system. It keeps returning to the TWRP recovery.
Really need help. My PC does not see where in the Nexus 7 I can recopy the nandroid I made back to the phone so I can restore kitkat.
HELP!
Put the phone back into fastboot mode and reflash the factory images. Do you need a custom recovery? If not don't install twrp for now. Just want to get up and running first.
Sent from my Nexus 5 using Tapatalk
Am now in twrp's file manager and after rebooting my pc am transfering my nandroid back to the phone. So I feel better....
But I would like to try to boot into 5.1.1 before restoring.
ldubs said:
Put the phone back into fastboot mode and reflash the factory images. Do you need a custom recovery? If not don't install twrp for now. Just want to get up and running first.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I tried restoring my nandroid kitkat backup so I can get some work done. But that failed when restoring data with "e:extractTarFork( ) process ended with ERROR=255
Will try to restore kitkat without the data restore.
that didn't work either. It's rebooting but the little balls just keep turning..
Anderson2 said:
OK, Now I am in trouble!
I followed the instructions in method 2 of http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
Everything went smoothly and I finished. When the instructions at the end said to go into recovery, I found myself in the TWRP recovery. But I am now in a boot loop. I can't boot into system. It keeps returning to the TWRP recovery.
Really need help. My PC does not see where in the Nexus 7 I can recopy the nandroid I made back to the phone so I can restore kitkat.
HELP!
Click to expand...
Click to collapse
I out the phone back into fastboot and followed all the instructions of method 2 up to
Type the following commands, in this order (If you have a different folder, change the path)
Code:
fastboot flash bootloader C:\image-hammerhead-krt16m\bootloader.img
fastboot reboot-bootloader
fastboot flash radio C:\image-hammerhead-krt16m\radio.img
fastboot reboot-bootloader
fastboot flash system C:\image-hammerhead-krt16m\system.img
fastboot flash userdata C:\image-hammerhead-krt16m\userdata.img
(Note: this command will wipe your device (including \sdcard), EVEN if your bootloader is already unlocked.)
fastboot flash boot C:\image-hammerhead-krt16m\boot.img
fastboot flash recovery C:\image-hammerhead-krt16m\recovery.img
fastboot erase cache
fastboot flash cache C:\androidimage\cache.img
★After everything finished, select "Recovery" using the volume buttons.
★When a small Android appears, press Power Button + Volume UP
.................................................
At this point again TWRP appeared instead of the android recovery.
Just like the first time.
The problem might be at the end of the method 2 sequence. When finished with method 2 flashing I get 2 screens:
1. a screen from twrp saying it noticed an unmodified partition and asking whether I should keep it read only or modified. I tried both with the same result, boot loop into TWRP
2. a second screen offering to install supersu. I refused. same result boot loop.
maybe they are the problems? Twrp remains in place.

locking the bootloader

I just ordered the new Pixel 3 and it will be coming in the next few days, I'll be giving this Pixel 2 to my son and want to reset it and lock the bootloader back. I know how to reset the phone, but for locking the bootloader back do I just go into developer options and lock it there and that's it? I've never locked one back. Lol.
FilthyFord said:
I just ordered the new Pixel 3 and it will be coming in the next few days, I'll be giving this Pixel 2 to my son and want to reset it and lock the bootloader back. I know how to reset the phone, but for locking the bootloader back do I just go into developer options and lock it there and that's it? I've never locked one back. Lol.
Click to expand...
Click to collapse
First, absolutely MAKE SURE you're 100% stock. Flash the complete factory image using the flash all batch file with the -w in it intact. This will wipe the device. Make sure it boots and there are no issues. Note, that after flashing the flash all batch file you'll need to set up the phone from scratch. You can bypass that process when you first boot. If it boots ok then you'll want to boot back into the bootloader and run the command
fastboot oem lock
This will wipe the device again.
If you are not 100% stock and you run into problems with a locked bootloader your device will be rendered pretty much useless.
jd1639 said:
First, absolutely MAKE SURE you're 100% stock. Flash the complete factory image using the flash all batch file with the -w in it intact. This will wipe the device. Make sure it boots and there are no issues. Note, that after flashing the flash all batch file you'll need to set up the phone from scratch. You can bypass that process when you first boot. If it boots ok then you'll want to boot back into the bootloader and run the command
fastboot oem lock
This will wipe the device again.
If you are not 100% stock and you run into problems with a locked bootloader your device will be rendered pretty much useless.
Click to expand...
Click to collapse
Thank you for the info. I will go through these steps once I get the new phone.
jd1639 said:
First, absolutely MAKE SURE you're 100% stock. Flash the complete factory image using the flash all batch file with the -w in it intact. This will wipe the device. Make sure it boots and there are no issues. Note, that after flashing the flash all batch file you'll need to set up the phone from scratch. You can bypass that process when you first boot. If it boots ok then you'll want to boot back into the bootloader and run the command
fastboot oem lock
This will wipe the device again.
If you are not 100% stock and you run into problems with a locked bootloader your device will be rendered pretty much useless.
Click to expand...
Click to collapse
I just got around to relocking the bootloader and just wanted to say that your method worked flawlessly encase anyone was wondering. Thank you again for the help.

can I install custom bootloader without losing data

My pixel 3 is not booting up right now. Asks me to do a factory reset. Can I install a custom bootloader like twrp now without losing my data? I want to mount the data partition, backup my files and then do a factory reset. The phone is stock and locked right now, have never installed a custom rom/bootloader on it.
sdxda said:
My pixel 3 is not booting up right now. Asks me to do a factory reset. Can I install a custom bootloader like twrp now without losing my data? I want to mount the data partition, backup my files and then do a factory reset. The phone is stock and locked right now, have never installed a custom rom/bootloader on it.
Click to expand...
Click to collapse
If you are still on Android Pie and have an unlocked bootloader, you should be able to install TWRP. If your bootloader is still locked, you can't install a custom bootloader until you unlock the bootloader. Unlocking it will wipe the phone. If you have Android 10, you can't install TWRP. TWRP does not work on a Pixel 3 with Android 10.
dcarvil said:
If you are still on Android Pie and have an unlocked bootloader, you should be able to install TWRP. If your bootloader is still locked, you can't install a custom bootloader until you unlock the bootloader. Unlocking it will wipe the phone. If you have Android 10, you can't install TWRP. TWRP does not work on a Pixel 3 with Android 10.
Click to expand...
Click to collapse
Thanks, I'm on 10 and unlocked :/
sdxda said:
Thanks, I'm on 10 and unlocked :/
Click to expand...
Click to collapse
What happens when you boot to recovery mode? You might have to wait a really long time (30 to 60 minutes) for it to recover.
If that doesn't work, and you enabled USB debugging when you unlocked the boot loader, you should be able to flash a factory image. Be sure to edit flash-all.bat (or flash-all.sh if on Linux) to remove the -w from the flashboot command at the bottom of the file. Removing the -w will prevent it from wiping your data. Be sure you execute the edited file, and not the original file. Also, be sure to get the factory image, not an OTA image, and to download the latest platform-tools. This thread is a good guide to follow to flash the image. https://forum.xda-developers.com/pixel-3/how-to/complete-pixel-3-how-to-guide-newbie-t3922269
I'd try to flash an Android 10 image and recover the data instead of trying to downgrade to Android Pie and install TWRP.
dcarvil said:
What happens when you boot to recovery mode? You might have to wait a really long time (30 to 60 minutes) for it to recover.
If that doesn't work, and you enabled USB debugging when you unlocked the boot loader, you should be able to flash a factory image. Be sure to edit flash-all.bat (or flash-all.sh if on Linux) to remove the -w from the flashboot command at the bottom of the file. Removing the -w will prevent it from wiping your data. Be sure you execute the edited file, and not the original file. Also, be sure to get the factory image, not an OTA image, and to download the latest platform-tools. This thread is a good guide to follow to flash the image. https://forum.xda-developers.com/pixel-3/how-to/complete-pixel-3-how-to-guide-newbie-t3922269
I'd try to flash an Android 10 image and recover the data instead of trying to downgrade to Android Pie and install TWRP.
Click to expand...
Click to collapse
Recovery mode is fine. I sideloaded the latest ota 10.0.0 (QP1A.191105.003, Nov 2019).. it's 1.3 gigs. Still didnt help. Should I try an older OTA version before trying the factory image?
And my bootloader is locked, so can I flash the factory image? I'm getting the image now and will try anyways, just not sure if I want to try an older OTA first.
sdxda said:
Recovery mode is fine. I sideloaded the latest ota 10.0.0 (QP1A.191105.003, Nov 2019).. it's 1.3 gigs. Still didnt help. Should I try an older OTA version before trying the factory image?
And my bootloader is locked, so can I flash the factory image? I'm getting the image now and will try anyways, just not sure if I want to try an older OTA first.
Click to expand...
Click to collapse
okay so can't flash without unlocking. Going to try an older ota.
sdxda said:
okay so can't flash without unlocking. Going to try an older ota.
Click to expand...
Click to collapse
I don't think an OTA will fix a boot problem. According to https://developers.google.com/android/images you have to unlock the bootloader to flash a factory image. Unlocking the bootloader will wipe your data. I'm not sure the unlock command will work if you have not enabled OEM unlocking in Developer Options.
Sorry, I don't see any way to preserve your data. Maybe someone smarter than me will have some ideas.

[8 DEC 19] Root Oxygen OS 10.01 for OnePlus 6, No TWRP or Factory Reset Required

I spent all day trying to find a way to root my phone after moving from Lineage OS to Oxygen OS 10.01. Namely, https://forum.xda-developers.com/oneplus-6/how-to/patched-boot-image-magisk-16-7-beta-t3818853.
The problem is that the information given is out of date as of a few days ago, and installing the patched bootloader broke wifi, calling, and probably all sorts of other things.
I want to make sure this is as simple as possible for people having the same issues!
Before You Download
You MUST be running Oxygen OS 10.01 exactly.
You MUST be on a OnePlus 6 (not a OnePlus 6T)
You MUST have an unlocked bootloader (Google for instructions, "fastboot oem unlock", this will require a factory reset)
Install ADB and Fastboot on your computer (Google for instructions)
Installation Instructions
Make sure you're running Oxygen OS 10.01 for the OnePlus 6. If you're on an earlier version and need to install, download HERE and install it as a local upgrade (Google for instructions).
Download and install Magisk Manager. I'm using Version 7.40.
Download my modified boot image here
Put your OnePlus 6 in Fastboot mode and plug it into your computer (Google for instructions)
Place my boot file, new_boot_image_xda.img, in the same folder Fastboot is running
Run fastboot flash boot new_boot_image_xda.img
Run fastboot reboot or otherwise reboot your phone.
If you want to do this on other devices:
Extract boot.img from your ROM's zip file's payload.bin using Payload Dumper 64 (I can't post external links, Google it)
Place boot.img in your phone's local storage
Open Magisk Manager on Android, then "Install Magisk" -> "Patch a File" -> select boot.img
Move the modified boot image (magisk_patched.img) to your computer
Enter the fastboot commands from above, replacing new_boot_image_xda.img with your modified boot image
May be a dumb question: Do I lose data? There's no step of wiping, but I'm afraid this may be necessary.
Oh, and another question: how about updates? Will I lose my data on further updates?
And I'm sure I need to unlock my bootloader before.
jacdelad said:
May be a dumb question: Do I lose data? There's no step of wiping, but I'm afraid this may be necessary.
Oh, and another question: how about updates? Will I lose my data on further updates?
And I'm sure I need to unlock my bootloader before.
Click to expand...
Click to collapse
Unlocking the bootloader triggers a factory reset (nothing in internal storage is lost, but you lose apps and settings), and you need to do this before rooting. If your bootloader is unlocked, you shouldn't have to wipe anything unless you miss an instruction or install it on the wrong version. You won't be able to update OTA without losing root.
If you're new to rooting, just be prepared to lose your data no matter what, because it's incredibly easy to follow the wrong advice and end up bricked. There have been times where the only thing my OP6 can do is display a white LED because with the wrong command, I wiped everything from the boot partition, recovery partition, and internal storage. For that reason, you might wait a week or so for more documentation on rooting this phone with this version of OOS.
mouthofrandom said:
Unlocking the bootloader triggers a factory reset (nothing in internal storage is lost, but you lose apps and settings), and you need to do this before rooting. If your bootloader is unlocked, you shouldn't have to wipe anything unless you miss an instruction or install it on the wrong version. You won't be able to update OTA without losing root.
If you're new to rooting, just be prepared to lose your data no matter what, because it's incredibly easy to follow the wrong advice and end up bricked. There have been times where the only thing my OP6 can do is display a white LED because with the wrong command, I wiped everything from the boot partition, recovery partition, and internal storage. For that reason, you might wait a week or so for more documentation on rooting this phone with this version of OOS.
Click to expand...
Click to collapse
Nah, no problem. I have this phone since it came out and use custom ROMs since then, do not really new. I know that unlocking the bootloader resets my phone. I was just wondering if I can install your image without unlocking, because I'm currently locked (had a problem with the latest Syberia update and choose to stay with OOS). And how to update when OOS 10.0.2 arrives.
I tried it and it worked fine, but today after uninstalling some blotware and rebooting I am stucked on the bootloader warning page which takes me to the fastboot mode after a minute or so (this is what used to happen to me whenever I flash a magisk patch boot file) Now I'm downloading the stock rom to get the stock boot.img.
This one video is for oneplus 6t
Pretty clean guide

Question Fail safe ota method

I don't wanna risk the on device ota via restoring images through magisk again
Does the following check out?
I'd greatly appreciate if someone, perhaps @V0latyle could look over it, you already helped me a lot the last time.
Download ota, as well as firmware and check if boot.img got updated (or perhaps someone on an updated phone can check but idk how to even check your boot version)
Either patch new boot.img or keep the old one at hand if it didn't get updated
Disable all magisk modules and reboot
Go to magisk -> uninstall -> restore images and reboot
Go in sideload mode and sideload the ota
Reboot to system so the ota can complete
Turn off and boot again from magisk patched boot.img
Direct install through magisk and enable modules
Reboot so modules work and done
All those reboots might not be necessary but I don't know if f.e. magisk modules immediately stop affecting the system after disabling them or if a reboot is required to fully disable them, same with unrooting, even after restoring images the current system has still root so I might need to reboot before sideloading.
I know that technically I don't need to unroot at all for sideloading to work but I really want to make this as safe as it can get.
G5-User7080 said:
I don't wanna risk the on device ota via restoring images through magisk again
Does the following check out?
I'd greatly appreciate if someone, perhaps @V0latyle could look over it, you already helped me a lot the last time.
Download ota, as well as firmware and check if boot.img got updated (or perhaps someone on an updated phone can check but idk how to even check your boot version)
Either patch new boot.img or keep the old one at hand if it didn't get updated
Disable all magisk modules and reboot
Go to magisk -> uninstall -> restore images and reboot
Go in sideload mode and sideload the ota
Reboot to system so the ota can complete
Turn off and boot again from magisk patched boot.img
Direct install through magisk and enable modules
Reboot so modules work and done
All those reboots might not be necessary but I don't know if f.e. magisk modules immediately stop affecting the system after disabling them or if a reboot is required to fully disable them, same with unrooting, even after restoring images the current system has still root so I might need to reboot before sideloading.
I know that technically I don't need to unroot at all for sideloading to work but I really want to make this as safe as it can get.
Click to expand...
Click to collapse
No need to unroot or restore images. You can disable modules if you want. Just sideload the OTA, and live boot the old patched image, then perform Direct Install in Magisk.
By the way, instead of creating a new thread, you could have asked this question in an existing one...
V0latyle said:
By the way, instead of creating a new thread, you could have asked this question in an existing one...
Click to expand...
Click to collapse
Perhaps I could have, I am hoping that this way it might be easier to find for others than having to look somewhere on the 30th post of a thread that is about a bricked device after ota.
V0latyle said:
No need to unroot or restore images. You can disable modules if you want. Just sideload the OTA, and live boot the old patched image, then perform Direct Install in Magisk.
Click to expand...
Click to collapse
mhh I see, I'm just a little scared of the ota process after what happened the last time so I wanna be like extra sure nothing can go wrong.
Doesn't help that I don't really understand what OTA's do exactly..
That I don't have to unroot when flashing factory makes sense as I'm just overwriting boot anyway.
Is an OTA the same thing essentially? Like is it basically a bunch or partitions in a zip that get flashed over whatever is there previously?
Meaning all things that could go wrong or get checked happen through the system update app rather than through the OTA itself?
Also you are saying "unroot or restore images", is that not the same thing?
And let's say boot gets updated and I live boot the older outdated image, does that not matter at all?
why do you wanna take the OTA route if you already downloaded the complete firmware package anyway? i’ll do a firmware flash (instead of OTA) without wiping each month and that’s it, i’ll even patch boot.img before flashing (and flash it directly together with the rest of the new firmware). works just fine.
frank93 said:
why do you wanna take the OTA route if you already downloaded the complete firmware package anyway? i’ll do a firmware flash (instead of OTA) without wiping each month and that’s it, i’ll even patch boot.img before flashing (and flash it directly together with the rest of the new firmware). works just fine.
Click to expand...
Click to collapse
This sounds like the "Quick Method" mentioned here:
https://www.xda-developers.com/how-to-install-ota-updates-keep-root-google-pixel-phone/
You're doing that?
frank93 said:
why do you wanna take the OTA route if you already downloaded the complete firmware package anyway? i’ll do a firmware flash (instead of OTA) without wiping each month and that’s it, i’ll even patch boot.img before flashing (and flash it directly together with the rest of the new firmware). works just fine.
Click to expand...
Click to collapse
As far as I understood sideloading OTA is the most safe and uncomplicated way
media-fort said:
This sounds like the "Quick Method" mentioned here:
https://www.xda-developers.com/how-to-install-ota-updates-keep-root-google-pixel-phone/
You're doing that?
Click to expand...
Click to collapse
yes, sounds like that’s "my way" of doing it. originally got this from a magisk-issue-comment here, basically it’s a "complete firmware flash with an already patched boot.img, no wipe", and that’s it. never done an OTA/sideload for years tbh.
G5-User7080 said:
Perhaps I could have, I am hoping that this way it might be easier to find for others than having to look somewhere on the 30th post of a thread that is about a bricked device after ota.
Click to expand...
Click to collapse
Well, I had thought there were existing guides in this section, but either I was mistaken or they've been buried.
G5-User7080 said:
mhh I see, I'm just a little scared of the ota process after what happened the last time so I wanna be like extra sure nothing can go wrong.
Doesn't help that I don't really understand what OTA's do exactly..
Click to expand...
Click to collapse
Maybe explaining it could help you. I'll do so in response to your questions below.
G5-User7080 said:
That I don't have to unroot when flashing factory makes sense as I'm just overwriting boot anyway.
Click to expand...
Click to collapse
Exactly.
G5-User7080 said:
Is an OTA the same thing essentially? Like is it basically a bunch or partitions in a zip that get flashed over whatever is there previously?
Click to expand...
Click to collapse
Regardless of whether installed through system update or via sideload, the OTA package always installs to the other slot - if you're currently running on slot A, it installs to slot B, and vice versa. See A/B (Seamless) System Updates
G5-User7080 said:
Meaning all things that could go wrong or get checked happen through the system update app rather than through the OTA itself?
Click to expand...
Click to collapse
OTA through system update doesn't always seem to work for rooted users; some have suggested that it may be necessary to restore images in Magisk to pass verification checks in order for the update to succeed. Others, like me, don't bother with the OTA updates anymore because 1) OTA through system updates just don't seem to work and 2) Magisk patching inactive slot still seems to have issues. I personally prefer to use the factory images, but the OTA method is technically safer.
OTA sideload should always work, and AFAIK it doesn't matter what state your device is in. It overwrites whatever is on the currently inactive slot; there's no need to remove modules or restore images or unroot as the boot image gets overwritten with the new boot image.
G5-User7080 said:
Also you are saying "unroot or restore images", is that not the same thing?
Click to expand...
Click to collapse
No, they aren't.
When your device boots, it loads the contents of the /boot partition into memory - ramdisk and kernel. This remains in memory while the system is running.
Hence, if the boot image has been patched, you'll boot with root.
When you perform "Restore Images" in Magisk, this uses root access to restore the unpatched image to /boot. But, since the patched boot image was already loaded into RAM, you still have root.
If you reboot at this point, you'll lose root because the now unpatched boot image is loaded into memory.
G5-User7080 said:
And let's say boot gets updated and I live boot the older outdated image, does that not matter at all?
Click to expand...
Click to collapse
Yes and no.
After an OTA update, you want to let the system boot with the new boot image. This is because the boot image has a signature that matches the system image; if these don't match, the update engine determines that the update was a failure, and will recycle you back to the original slot. So, the boot image that the system loads after the update has to be the new one. It doesn't matter if it's been patched or not - you could, for example, download the factory image, extract the boot image from it, patch the boot image in Magisk, then sideload the OTA, force your phone to boot into bootloader, and flash the new patched image.
Patching to inactive slot in Magisk is supposed to avoid all this, and can only be used if you update through system. It works like this:
You're rooted on the February release on slot A.
You restore images in Magisk, but do not reboot.
You install the OTA through system updates. This installs to slot B
When it prompts you to reboot to finish the update, instead you go back to Magisk and use Patch Inactive Slot - this uses root access to perform the Magisk patch on the new boot image in /boot_b
You then reboot, and the system switches to slot B, and loads with root because you patched the boot image.
However, this doesn't seem to be working for everyone. Some phones don't even "see" the OTA update is available for some reason.
Therefore, this is the method I recommend you use to install the OTA update:
Download the OTA update for your device from Pixel OTA Images
In Magisk, go to Reboot > Reboot to recovery
Once in recovery mode, hold Power and click Volume Up. Then, select "Apply update from ADB" and connect your phone to your computer.
On your PC, open a command line in your ADB Platform Tools folder, and type adb sideload <path to OTA zip> - to make this easier, just drag and drop the OTA zip into the command window.
Once the update completes, let your phone boot to system. You will not have root, so it won't matter if you didn't disable Magisk modules.
Let the system complete the post-update work (there's a notification with a gear icon) and get stabilized. Wait a few minutes.
Assuming you still have USB debugging enabled, use ADB to reboot to bootloader: adb reboot bootloader or you can just do it manually - reboot your device and hold Volume Down
You can now live boot an older patched boot image: fastboot boot <drag and drop patched boot image>
You should boot with root. Note: if your phone bootloops, see my note below)
In Magisk, go to Install > Direct Install. This uses the "temporary root" of the patched image you've loaded into memory to patch the new boot image
Reboot once more. You should now be on the new boot image with root.
If your phone boot loops, double check to make sure you're still on the latest update. You can check this in Settings > About, but it's also displayed on the notification windowshade under the Quick Settings tiles. Make sure this matches the OTA image you just installed. If it doesn't, this means that your device has recycled back to the "old" slot for some reason, and you'll have to start over.
If you want to play it safe, you can use this guide to extract the new boot.img from the OTA payload. You'd then patch this manually in Magisk, and after installing the update, you'd reboot to bootloader and flash to /boot.
If you still bootloop on the new boot image after patching, you probably need to disable Magisk modules. You can do this via command line:
adb --wait-for-device shell magisk -remove-images
frank93 said:
yes, sounds like that’s "my way" of doing it. originally got this from a magisk-issue-comment here, basically it’s a "complete firmware flash with an already patched boot.img, no wipe", and that’s it. never done an OTA/sideload for years tbh.
Click to expand...
Click to collapse
Damn, I tried this and it seems that my PC cannot write the image to the Pixel 6a?!
Do I have old ADB drivers or whats the reason for that?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Edit:
Sry, I'm not involved here all the time. Figured it out myself. Reason for the failure were the freakin' platform_tools_r34. Switched to r33 and worked straight away..
https://forum.xda-developers.com/t/...el-7-pro-support-thread.4505287/post-88134573
V0latyle said:
Well, I had thought there were existing guides in this section, but either I was mistaken or they've been buried.
Click to expand...
Click to collapse
Not in the 6a forum as far as I'm aware, there might be more in the Pixel 6 forum, but I've already seen your guide that covers all kinds of methods.
V0latyle said:
the OTA package always installs to the other slot
Click to expand...
Click to collapse
Wouldn't it make sense to restore the unrooted boot partition on the currently active slot given that OTA will switch me to the currently inactive slot?
So that after the OTA procedure I'm in the same situation as now, being on a rooted slot with having the original unrooted slot as sort of "backup".
V0latyle said:
there's no need to remove modules or restore images or unroot as the boot image gets overwritten with the new boot image.
Click to expand...
Click to collapse
I think it was on the magisk ota guide but im not sure, that it said that it's important to disable all system modifying modules before attempting an update.
While all modules I use should by systemless,.. I think?.. I still think it's just easier to disable them all and re-enable them later, just to avoid trouble and make it easier to write in a guide, as in "just disable them and don't bother checking if theyre really all systemless".
V0latyle said:
After an OTA update, you want to let the system boot with the new boot image.
Click to expand...
Click to collapse
Yes, that was my intention, let it boot normally without touching anything to complete the OTA.
Didn't know I would have to wait a few minutes after already being in the system tho to wait for the notification, I'll look out for that.
V0latyle said:
In Magisk, go to Reboot > Reboot to recovery
Once in recovery mode, hold Power and click Volume Up. Then, select "Apply update from ADB" and connect your phone to your computer.
Click to expand...
Click to collapse
Is this equivalent to the way you described in your Pixel 6 guide?
As in doing adb reboot sideload to go to sideload mode, followed by adb sideload ota.zip
V0latyle said:
If your phone boot loops, double check to make sure you're still on the latest update.
Click to expand...
Click to collapse
If it bootloops how would I even get back into system?
Why would it even bootloop, if there is a known cause can't I just avoid whatever is causing it to begin with?
I mean I don't assume I'll bootloop following the steps carefully but this time I'll post and wait for replies before just nuking everything like last time ^^
V0latyle said:
If you want to play it safe, you can use this guide to extract the new boot.img from the OTA payload.
Click to expand...
Click to collapse
Yes, I'd prefer to make it as safe as possible.
Is the boot.img extracted from the OTA the same as the one from the according firmware?
Would be easier to just extract that on PC.
Oh and two more question that came to mind.
When restoring images through magisk it replaces the rooted boot partition with the stock one.
But root only disappears on next reboot.
So can I restore images and then directly do adb reboot sideload followed by doing the OTA?
Meaning I don't need to do one reboot back to system to sort of "complete the unrooting preocedure"?
Is that the same for magisk modules?
If I want to disable them just in case, do I need to reboot once after for them to like get removed from the system or are they instantly disabled the moment I press the "disable module" switch?
G5-User7080 said:
Not in the 6a forum as far as I'm aware, there might be more in the Pixel 6 forum, but I've already seen your guide that covers all kinds of methods.
Wouldn't it make sense to restore the unrooted boot partition on the currently active slot given that OTA will switch me to the currently inactive slot?
So that after the OTA procedure I'm in the same situation as now, being on a rooted slot with having the original unrooted slot as sort of "backup".
Click to expand...
Click to collapse
Not if you're going to sideload the OTA. There's no point to doing so.
G5-User7080 said:
I think it was on the magisk ota guide but im not sure, that it said that it's important to disable all system modifying modules before attempting an update.
While all modules I use should by systemless,.. I think?.. I still think it's just easier to disable them all and re-enable them later, just to avoid trouble and make it easier to write in a guide, as in "just disable them and don't bother checking if theyre really all systemless".
Click to expand...
Click to collapse
Yeah, this is the "safe" option. I just use MHPC + USNF mod + systemless hosts so I don't bother disabling, but those who use Xposed or other more "invasive" system mods might want to.
G5-User7080 said:
Yes, that was my intention, let it boot normally without touching anything to complete the OTA.
Didn't know I would have to wait a few minutes after already being in the system tho to wait for the notification, I'll look out for that.
Click to expand...
Click to collapse
This is because it seems to take a few minutes for the system to "get happy" and decide that all is well, and if you live boot an older boot image before it does so, it will assume the update failed and recycle back to the old slot.
G5-User7080 said:
Is this equivalent to the way you described in your Pixel 6 guide?
As in doing adb reboot sideload to go to sideload mode, followed by adb sideload ota.zip
Click to expand...
Click to collapse
Yep. The commands and the method is exactly the same for all Pixel devices. The only thing that is different are the files. Only the Pixel 7 / 7 Pro are slightly different in that we have to patch init_boot instead of boot.
G5-User7080 said:
If it bootloops how would I even get back into system?
Click to expand...
Click to collapse
Use the command I gave you: adb --wait-for-device shell magisk --remove-modules while booting
G5-User7080 said:
Why would it even bootloop, if there is a known cause can't I just avoid whatever is causing it to begin with?
Click to expand...
Click to collapse
There isn't a known cause, the exception being trying to boot an old boot image without letting the system complete the update post-reboot as described above
G5-User7080 said:
I mean I don't assume I'll bootloop following the steps carefully but this time I'll post and wait for replies before just nuking everything like last time ^^
Yes, I'd prefer to make it as safe as possible.
Is the boot.img extracted from the OTA the same as the one from the according firmware?
Would be easier to just extract that on PC.
Click to expand...
Click to collapse
Yes. It's just packaged differently.
Since Payload Dumper requires Python, I've found it simpler to just use the factory image - although if you're at that point, you may as well just flash the factory image anyway.
G5-User7080 said:
Oh and two more question that came to mind.
When restoring images through magisk it replaces the rooted boot partition with the stock one.
But root only disappears on next reboot.
So can I restore images and then directly do adb reboot sideload followed by doing the OTA?
Meaning I don't need to do one reboot back to system to sort of "complete the unrooting preocedure"?
Click to expand...
Click to collapse
I never suggested you'd need to reboot after restoring images. Once you've restored the original boot image, that's what is in the boot partition. It takes effect immediately. What doesn't take immediate effect is what's currently running in memory, which is why I pointed out that upon a reboot, your device will load the unpatched image because that's what's in the partition. But, as I explained above, there's no point to restoring the original boot image if you're sideloading the OTA. The only time this ever appears to be necessary is when you're taking OTA through system update.
G5-User7080 said:
Is that the same for magisk modules?
If I want to disable them just in case, do I need to reboot once after for them to like get removed from the system or are they instantly disabled the moment I press the "disable module" switch?
Click to expand...
Click to collapse
I am honestly not sure about this one, but since we are talking about OTAs, the point is moot - when the update completes and the phone reboots, it's booting an unpatched boot image, meaning there's no way for the modules to load. It doesn't matter if you've made changes to system, either, because the system partition also has two slots - system_a and system_b
The only thing that MIGHT matter is when you boot the patched image, because if you haven't disabled modules, they will load during boot, and if one of them causes a bootloop for whatever reason....It still shouldn't matter because in this case, the device -should- try to boot the same slot again, and since you never patched the new boot image, it will boot without root.
V0latyle said:
I am honestly not sure about this one, but since we are talking about OTAs, the point is moot - when the update completes and the phone reboots, it's booting an unpatched boot image, meaning there's no way for the modules to load. It doesn't matter if you've made changes to system, either, because the system partition also has two slots - system_a and system_b
Click to expand...
Click to collapse
yea it seems like its the same as restoring images, it disables them but obviously they are already loaded for the current session and probably don't get "unloaded", they just won't load again from the next boot on, so I don't think there would be any need to reboot, except when you want to do something in system that requires modules to be disabled.
So it seems like we'll have to wait til like the 20th for the march update, so I'll just go straight for the april one.
Considering what you said, would this be the correct procedure, just to confirm?
Extract boot.img from factory image and patch it, then move it to pc.
In Magisk app, disable all modules.
On pc do adb reboot sideload and after rebooting in download mode adb sideload ota.zip
Choose "reboot system" from menu or use adb reboot... does that command work in download mode?
Let it reboot, unlock, wait for the update completed notification to appear.
Confirm that adb debugging is still enabled and the version number below quick tiles matches the update, then do adb reboot bootloader.
Live boot the new magisk patched boot.img with fastboot boot patched_boot.img.
Magisk app -> Install -> Direct Install, then re-enable all modules and reboot.
done
Additionally, I'm wondering what all the different "menus" are for.
Like first there is bootloader where you can flash partitions through the fastboot command and enter recovery or boot system.
Then there is the recovery that... doesn't really do anything when it's stock?
Then there is sideload or download mode that is accessed from the recovery.
Then there is adb fastboot, does that bring you to the fastbootd screen? I have no idea what that is for.
G5-User7080 said:
yea it seems like its the same as restoring images, it disables them but obviously they are already loaded for the current session and probably don't get "unloaded", they just won't load again from the next boot on, so I don't think there would be any need to reboot, except when you want to do something in system that requires modules to be disabled.
So it seems like we'll have to wait til like the 20th for the march update, so I'll just go straight for the april one.
Considering what you said, would this be the correct procedure, just to confirm?
Extract boot.img from factory image and patch it, then move it to pc.
In Magisk app, disable all modules.
On pc do adb reboot sideload and after rebooting in download mode adb sideload ota.zip
Choose "reboot system" from menu or use adb reboot... does that command work in download mode?
Click to expand...
Click to collapse
ADB commands work in recovery mode, yes.
G5-User7080 said:
Let it reboot, unlock, wait for the update completed notification to appear.
Confirm that adb debugging is still enabled and the version number below quick tiles matches the update, then do adb reboot bootloader.
Live boot the new magisk patched boot.img with fastboot boot patched_boot.img.
Magisk app -> Install -> Direct Install, then re-enable all modules and reboot.
done
Click to expand...
Click to collapse
If you're going to download the factory image, why not just use Pixel Flasher to perform a factory flash? Contrary to popular belief, flashing the factory image itself does not wipe data. OTA updates are still the "safest" way but I've been using the factory image for a couple years now on my Pixel 5 and have never had a problem.
G5-User7080 said:
Additionally, I'm wondering what all the different "menus" are for.
Like first there is bootloader where you can flash partitions through the fastboot command and enter recovery or boot system.
Then there is the recovery that... doesn't really do anything when it's stock?
Then there is sideload or download mode that is accessed from the recovery.
Then there is adb fastboot, does that bring you to the fastbootd screen? I have no idea what that is for.
Click to expand...
Click to collapse
Bootloader is used for flashing bootloader, modem, and boot.
Recovery mode is a small kernel in of itself that can perform functions that the bootloader can't, and provides a software interface to perform a "safe" recovery should the device stop working - like flashing an OTA.
Sideload mode is part of that recovery software interface - it allows you to serve OTA files over ADB
Fastbootd is "userspace fastboot" that allows advanced flashing functions.
More information on fastbootd
V0latyle said:
If you're going to download the factory image, why not just use Pixel Flasher to perform a factory flash? Contrary to popular belief, flashing the factory image itself does not wipe data. OTA updates are still the "safest" way but I've been using the factory image for a couple years now on my Pixel 5 and have never had a problem.
Click to expand...
Click to collapse
cause I'd need to remove the -w from the update command in the flashall.bat as well as possibly add --skip-reboot
I can see the day coming when I simply forget doing that and wipe my device by accident.
Or when using pixel flasher I might just forget to untick the wipe option.
I want to use a method that ideally I only have to prepare once, say if I could just make a "flash factory without wipe" script that works every time, but due to changing version numbers I have to use the new script every time.
G5-User7080 said:
cause I'd need to remove the -w from the update command in the flashall.bat as well as possibly add --skip-reboot
Click to expand...
Click to collapse
You don't have to use the script. Learn to do the commands manually. You don't have to skip reboot either, but if you want to flash a patched boot image, it helps.
G5-User7080 said:
I can see the day coming when I simply forget doing that and wipe my device by accident.
Or when using pixel flasher I might just forget to untick the wipe option.
Click to expand...
Click to collapse
Pixel Flasher settings are persistent....
G5-User7080 said:
I want to use a method that ideally I only have to prepare once, say if I could just make a "flash factory without wipe" script that works every time, but due to changing version numbers I have to use the new script every time.
Click to expand...
Click to collapse
You seem to misunderstand how flashing the factory image works. You don't have to use the script. Learn to use ADB and fastboot commands manually. You can follow my guide for the 6 Pro here; the commands are all the same.
Otherwise, you can use Pixel Flasher. All you have to do is set it up once, and the settings persist even after updates. This is what I've gone to as a means to simply free myself for other tasks while my phone is updating; I used to do it manually.
frank93 said:
yes, sounds like that’s "my way" of doing it. originally got this from a magisk-issue-comment here, basically it’s a "complete firmware flash with an already patched boot.img, no wipe", and that’s it. never done an OTA/sideload for years tbh.
Click to expand...
Click to collapse
If you flash a full factory image via fastboot (without wiping the device in that process), is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
And can I stay logged into my Google Account on the device before flashing as well?
I don't want to brick my device, therefore I've always deleted these Login infos before full flashing process.
But after each full flash, it's always very annoying to add all that info again, for each banking app, for Google pay and so on....
media-fort said:
If you flash a full factory image via fastboot (without wiping the device in that process), is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
And can I stay logged into my Google Account on the device before flashing as well?
Click to expand...
Click to collapse
i never logged out or deleted anything before flashing. it "feels" like an OTA, i just flash (without wipe) and after the next boot the device is ready to be used.
media-fort said:
If you flash a full factory image via fastboot (without wiping the device in that process), is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
And can I stay logged into my Google Account on the device before flashing as well?
Click to expand...
Click to collapse
Flashing a full firmware w/o wiping = OTA update. Since an OTA won't delete anything of your settings/data, a full firmware flash w/o wiping will do the same.
All settings, data and apps are stored on /userdata. When saying "without wiping", then it means "do not erase /userdata".
WoKoschekk said:
Flashing a full firmware w/o wiping = OTA update. Since an OTA won't delete anything of your settings/data, a full firmware flash w/o wiping will do the same.
All settings, data and apps are stored on /userdata. When saying "without wiping", then it means "do not erase /userdata".
Click to expand...
Click to collapse
Almost, but not quite.
Flashing the full factory firmware installs it to the currently active slot and can be done regardless of what version you're already on; if you try to flash the system update alone, it'll complain if it doesn't see the right bootloader and radio version but you can use --force to get around that
Flashing the OTA installs it to the currently INACTIVE slot and can only be done when you're on an OLDER version.
V0latyle said:
Almost, but not quite.
Flashing the full factory firmware installs it to the currently active slot and can be done regardless of what version you're already on; if you try to flash the system update alone, it'll complain if it doesn't see the right bootloader and radio version but you can use --force to get around that
Flashing the OTA installs it to the currently INACTIVE slot and can only be done when you're on an OLDER version.
Click to expand...
Click to collapse
yes, that's right. but regarding to the question
media-fort said:
is it safe and possible to leave your login information for screen unlock (password, fingerprint) installed before flashing?
Click to expand...
Click to collapse
it doesn't matter which slot is active.

Categories

Resources