How to get Verizon pixel xl back to stock so I can install TWRP.

defens23

Senior Member
Jan 22, 2012
187
19
0
Noob again. So I am rooted and I'm currently on build NDE63X on my Verizon 128 gb XL. If i understood the instructions correctly, I have to go back to stock before I can put TWRP on the phone. I know I get the factory images here.

https://developers.google.com/android/images

Do I get the NDE63P image for the phone since that was what was on the phone before I sideloaded the OTA for my current version which is NDE63X or do I just need to download the full image for NDE63X?

Can someone also list the steps needed to accomplish getting phone back to stock? I read Google's instructions and I was a little confused. I understand that I will lose root but should be able to root after installing TWRP since it looks like Chainfire updated the root method for those using TWRP.

Thanks.
 
Last edited:

Rydah

Inactive Recognized Contributor
Oct 4, 2008
5,512
2,084
0
Southern California
It's easy bro. For starters, grab the factory image for the X build. No need to go back to P.

Next, extract the zip. Depending on which OS your computer runs, you'll be running one of the flash-all scripts. the one with the ".bat" extension is for Windows and the one ending with the ".sh" extension is for macOS and Linux. If you don't want it to wipe your device, before running one of those two files I just mentioned, your gonna wanna edit the script file using an application like Notepad++ (on Windows) or Text Wrangler (on macOS.) What you want to do in the script file is remove the wipe command. To do so, delete the following piece from the script: (it's towards the bottom.)
Code:
-w
Save the changes.

Next, copy everything from the factory image folder to where you have adb/fastboot stored. (I suppose you could copy your adb/fastboot files to this folder if you wanted to.)

Assuming that your device is plugged in and USB debugging is enabled, start command prompt (or Terminal.) and type the following commands:
Code:
adb devices (it should return with your devices serial number and say online, if not check your device for a prompt asking to allow or deny.)
adb reboot bootloader
fastboot devices
flash-all.bat (or flash-all.sh)
That should do it. ?

Sent from my Pixel XL
 
Last edited:

defens23

Senior Member
Jan 22, 2012
187
19
0
It's easy bro. For starters, grab the factory image for the X build. No need to go back to P.

Next, extract the zip. Depending on which OS your computer runs, you'll be running one of the flash-all scripts. the one with the ".bat" extension is for Windows and the one ending with the ".sh" extension is for macOS and Linux. If you don't want it to wipe your device, before running one of those two files I just mentioned, your gonna wanna edit the script file using an application like Notepad++ (on Windows) or Text Wrangler (on macOS.) What you want to do in the script file is remove the wipe command. To do so, delete the following piece from the script: (it's towards the bottom.)
Code:
-w
Save the changes.

Next, copy everything from the factory image folder to where you have adb/fastboot stored. (I suppose you could copy your adb/fastboot files to this folder if you wanted to.)

Assuming that your device is plugged in and USB debugging is enabled, start command prompt (or Terminal.) and type the following commands:
Code:
adb devices (it should return with your devices serial number and say online, if not check your device for a prompt asking to allow or deny.)
adb reboot bootloader
fastboot devices
flash-all.bat (or flash-all.sh)
That should do it.

Sent from my Pixel XL
Thank you. Gonna attempt it this weekend.
 

Veid71

Senior Member
Apr 1, 2015
520
42
48
It's easy bro. For starters, grab the factory image for the X build. No need to go back to P.

Next, extract the zip. Depending on which OS your computer runs, you'll be running one of the flash-all scripts. the one with the ".bat" extension is for Windows and the one ending with the ".sh" extension is for macOS and Linux. If you don't want it to wipe your device, before running one of those two files I just mentioned, your gonna wanna edit the script file using an application like Notepad++ (on Windows) or Text Wrangler (on macOS.) What you want to do in the script file is remove the wipe command. To do so, delete the following piece from the script: (it's towards the bottom.)
Code:
-w
Save the changes.

Next, copy everything from the factory image folder to where you have adb/fastboot stored. (I suppose you could copy your adb/fastboot files to this folder if you wanted to.)

Assuming that your device is plugged in and USB debugging is enabled, start command prompt (or Terminal.) and type the following commands:
Code:
adb devices (it should return with your devices serial number and say online, if not check your device for a prompt asking to allow or deny.)
adb reboot bootloader
fastboot devices
flash-all.bat (or flash-all.sh)
That should do it.

Sent from my Pixel XL
im trying to do the same thing but i cant find somewhere to download the factory img from i have a 32 gb xl
 

chipslate

Member
Sep 7, 2013
19
1
0
My command prompt hangs when I try to execute the .bat file
Says "Waiting for any device"
And yes the device is listed when I do ADB devices
Any ideas?
THANKS!!
 

uicnren

Senior Member
Jun 19, 2007
1,245
440
113
My command prompt hangs when I try to execute the .bat file
Says "Waiting for any device"
And yes the device is listed when I do ADB devices
Any ideas?
THANKS!!
if you are executing the commands, you are in fastboot, not adb.

try fastboot devices

if it doesnt return anything, your computer is not seeing the device.

you will need the computer to see the device in fastboot before you can proceed.
 
  • Like
Reactions: chipslate

uicnren

Senior Member
Jun 19, 2007
1,245
440
113
OK so ADB Devices finds my cellphone but fastboot devices yields nothing.

Any ideas?
first thing to try is to go into fastboot, then unplug the cable, and then plug it back in.

if it is still not recognized, then its either an outdated adb/fastboot issue, or a driver issue (if you are using windows, if not there may be other possibilities).
 
  • Like
Reactions: chipslate

magestic1995

Senior Member
Jun 18, 2011
366
154
0
See attached. That is what I get every time. I have had the same thing happen on 2 different Windows 10 boxes. Makes me think it is something on the phone?
What happens now when you attempt the next command?

Edit: So after running adb devices, you should be running adb reboot bootloader command next I believe.
 
Last edited:
  • Like
Reactions: chipslate

chipslate

Member
Sep 7, 2013
19
1
0
Yes, ADB reboot bootloader brings up the fastboot screen on the Pixel XL with the green android thingy.

Also, I have the phone in MTP File Transfer mode and USB Debugging enabled.
 
Last edited:

magestic1995

Senior Member
Jun 18, 2011
366
154
0
I am fine wiping all my data but running flash-all.bat hangs the CMD window saying "Waiting for any device"

That's my problem.
Post a picture of when you have that and of your phone at the time you type flash all if you can. Also hit the reply button on my post and itll give my notifications when you reply.
 
  • Like
Reactions: chipslate

chipslate

Member
Sep 7, 2013
19
1
0
Post a picture of when you have that and of your phone at the time you type flash all if you can. Also hit the reply button on my post and itll give my notifications when you reply.
It finally worked!!! Thanks again for your help and going back and forth. I finally installed Android Studio and it inserted the ADB drivers at the top of Device manager. Worked like a charm then. Finally, Android 7.1.1 and unlocked bootloader... Bring it on, world!
 

disconnecktie

Senior Member
Oct 23, 2011
5,657
1,345
0
i have been trying to take my pixel xl back to stock but the flash-all.bat script hangs on the part where it should flash the system img zip. it says the file size is to large