[TOOL] Deuces Bootloop-Recovery & Flashing Script v4.4/v4.5 [06-13-2018]

Deuces

Senior Member
Jun 4, 2009
396
410
0
Houston
Download script: HERE
Download Factory Images: HERE
Download ADB/Fastboot: Platform Tools
Download USB Drivers: USB Drivers -- Driver Installation Video


-----------------------------------------------------------------------------------------------------------------------------------------------------------

This script is for the UNLOCKED BOOTLOADER pixel2 / pixel2 XL, and will help:
Fix Bootloops
Flash both Slots A and B
Work with any Google-provided factory image
Detect bootloader and radio special *.img names automagically
(Optional): Unlock Bootloader and Critical
(Optional): Format Userdata


-----------------------------------------------------------------------------------------------------------------------------------------------------------

Instructions:
Extract factory image zip file, as well as the image zip file within it!
This will lead to ~21 .img files in the same folder, with the deuce-flash-all script!
SEE SCREENSHOT!!.
Once you have all these together, run the Deuce-Flash-All script. ( .bat for Windows, .sh for Linux)


-----------------------------------------------------------------------------------------------------------------------------------------------------------

If you are having issues with this script:
Verify you have the environment variable (path) set for adb and fastboot
Try a different USB port
Try a different cable (preferably USB A -> USB C)
Format Userdata in Stock Recovery
Boot plain factory image before doing mods like Locking Bootloader / Kernel / TWRP / Magisk
 

Attachments

Last edited:

Deuces

Senior Member
Jun 4, 2009
396
410
0
Houston
This was built for the 2 xl but I have modified it to work with the pixel 2.

The main thread, which has lots of troubleshooting Q/A is here:
https://forum.xda-developers.com/pi...ol-deuces-bootloop-recovery-flashing-t3704761

Changelog:
  • 06-13-2018: Added support for latest platform tools
  • 01-14-2018: Fixed bug. Made unlocking optional to speed it up, combined scripts for taimen & walleye
  • 01-09-2018: Removed support for locking bootloader, added hard-coded slot selections
  • 12-26-2017: Added support for Pixel 2 (Walleye)
 
Last edited:

razrlover

Senior Member
Mar 28, 2012
3,466
1,440
0
I have been using this on my walleye since v4, guess now we no longer get the errors for the critical unlock status.

Makes sense, thanks as always most beneficial tool besides adb itself for a pixel device!
 

DumbleCore

Senior Member
Nov 27, 2012
1,590
1,041
143
Hobb’s End
I used it to recover from a softbrick, had an error on mac address 02:00 etc and fingerprint hardware, not sure if related to your Tool, but it did let me Boot back into system after everything else failed, all working again after factory flash with wipe
 

Deuces

Senior Member
Jun 4, 2009
396
410
0
Houston
I modified the script to take away the locking section, as people can't seem to RTFM
Also included changes to hard-select the slot A/B and further warnings on relocking bootloader
 
Last edited:
  • Like
Reactions: Slomies

JayBlack_686

Member
Nov 23, 2012
49
6
0
Dallas
I modified the script to take away the locking section, as people can't seem to RTFM
Also included changes to hard-select the slot A/B and further warnings on relocking bootloader
Hi @Deuces, I wonder if you could take a look at this. I just tried running your script (third time so far). I used the latest Walleye script, made sure I had the latest fastboot and adb. Please see below...it looks like the script got as far as trying to write bootloader_b...then it got stuck at "waiting for any device" with the display blank. Eventually (after a long time) I gave up and unplugged the phone. I can't get it to turn on at ALL. Not by holding down power, not by using the key combo to get into fastboot...the phone just seems DEAD. I plug it into a charger, and nothing happens. Plug it back into PC, and the computer doesn't know that the phone has been plugged in. It's just not there in the Device Manager.

I tried following Google's steps to troubleshoot a phone that doesn't turn on. I did find that if I hold the power button down for about 30 seconds, I do feel the phone vibrate, and see a line across the display, like the few times that I've had to hard reboot. But that was it. Trying to get into fastboot mode, even holding the buttons for a long time, doesn't work.

Any idea what could have happened, or what I can do? The battery wasn't 100% full when I started, but it was at least at 85%. I'm sure the battery didn't die. I'm a bit freaked out, as I can't even get it to power on. Thanks in advance.

Deuces-flash-all-script-V4.3-Windows
for Walleye - Google Pixel 2
USE AT YOUR OWN RISK
Press any key to continue . . .
Make Sure your Device is in Fastboot Mode
(Power off, hold Volume-Down, hold Power)
Once you are in fastboot,
Press any key to continue . . .
Running Unlock
Look at your device,
press up arrow and Power to confirm
...
FAILED (remote: Device already : unlocked!)
finished. total time: 0.006s
This will say "failed" if already unlocked - ignore
Locating Bootloader and Radio Filenames
Flashing...
Setting current slot to 'a'...
OKAY [ 0.012s]
finished. total time: 0.014s
target reported max download size of 536870912 bytes
sending 'bootloader_a' (38644 KB)...
OKAY [ 1.189s]
writing 'bootloader_a'...
(bootloader) Updating: partition:0 @00002000 sz=0000B000
FAILED (remote: Command Flash Error)
finished. total time: 1.206s
rebooting into bootloader...
OKAY [ 0.004s]
finished. total time: 0.005s
target reported max download size of 536870912 bytes
sending 'radio_a' (60428 KB)...
OKAY [ 1.851s]
writing 'radio_a'...
(bootloader) Updating: modem @00001000 sz=03B01000
OKAY [ 0.690s]
finished. total time: 2.545s
rebooting into bootloader...
OKAY [ 0.004s]
finished. total time: 0.005s
Setting current slot to 'b'...
OKAY [ 0.015s]
finished. total time: 0.017s
target reported max download size of 536870912 bytes
sending 'bootloader_b' (38644 KB)...
OKAY [ 1.051s]
writing 'bootloader_b'...
(bootloader) Updating: partition:0 @00002000 sz=0000B000
FAILED (remote: Command Flash Error)
finished. total time: 1.069s
rebooting into bootloader...
OKAY [ 0.003s]
finished. total time: 0.005s
< waiting for any device >
 
Last edited:

Deuces

Senior Member
Jun 4, 2009
396
410
0
Houston
Hi @Deuces, I wonder if you could take a look at this. I just tried running your script (third time so far). I used the latest Walleye script, made sure I had the latest fastboot and adb. Please see below...it looks like the script got as far as trying to write bootloader_b...then it got stuck at "waiting for any device" with the display blank. Eventually (after a long time) I gave up and unplugged the phone. I can't get it to turn on at ALL. Not by holding down power, not by using the key combo to get into fastboot...the phone just seems DEAD. I plug it into a charger, and nothing happens. Plug it back into PC, and the computer doesn't know that the phone has been plugged in. It's just not there in the Device Manager.

I tried following Google's steps to troubleshoot a phone that doesn't turn on. I did find that if I hold the power button down for about 30 seconds, I do feel the phone vibrate, and see a line across the display, like the few times that I've had to hard reboot. But that was it. Trying to get into fastboot mode, even holding the buttons for a long time, doesn't work.

Any idea what could have happened, or what I can do? The battery wasn't 100% full when I started, but it was at least at 85%. I'm sure the battery didn't die. I'm a bit freaked out, as I can't even get it to power on. Thanks in advance.

Deuces-flash-all-script-V4.3-Windows
for Walleye - Google Pixel 2
USE AT YOUR OWN RISK
Press any key to continue . . .
Make Sure your Device is in Fastboot Mode
(Power off, hold Volume-Down, hold Power)
Once you are in fastboot,
Press any key to continue . . .
Running Unlock
Look at your device,
press up arrow and Power to confirm
...
FAILED (remote: Device already : unlocked!)
finished. total time: 0.006s
This will say "failed" if already unlocked - ignore
Locating Bootloader and Radio Filenames
Flashing...
Setting current slot to 'a'...
OKAY [ 0.012s]
finished. total time: 0.014s
target reported max download size of 536870912 bytes
sending 'bootloader_a' (38644 KB)...
OKAY [ 1.189s]
writing 'bootloader_a'...
(bootloader) Updating: partition:0 @00002000 sz=0000B000
FAILED (remote: Command Flash Error)
finished. total time: 1.206s
rebooting into bootloader...
OKAY [ 0.004s]
finished. total time: 0.005s
target reported max download size of 536870912 bytes
sending 'radio_a' (60428 KB)...
OKAY [ 1.851s]
writing 'radio_a'...
(bootloader) Updating: modem @00001000 sz=03B01000
OKAY [ 0.690s]
finished. total time: 2.545s
rebooting into bootloader...
OKAY [ 0.004s]
finished. total time: 0.005s
Setting current slot to 'b'...
OKAY [ 0.015s]
finished. total time: 0.017s
target reported max download size of 536870912 bytes
sending 'bootloader_b' (38644 KB)...
OKAY [ 1.051s]
writing 'bootloader_b'...
(bootloader) Updating: partition:0 @00002000 sz=0000B000
FAILED (remote: Command Flash Error)
finished. total time: 1.069s
rebooting into bootloader...
OKAY [ 0.003s]
finished. total time: 0.005s
< waiting for any device >
I've seen something similar as far as the phone not powering on. Technically tho, it was on but with a black screen.
Try holding VOL- and POWER for 30+ seconds to see if it powers off, then again to see if it comes back on.

I did read thoroughly and read that you've kinda tried this already, but after you get it to "power on" - do you get any return on the command:
fastboot devices
or
adb devices

?

Then, maybe try the new script i just updated - or tell me what OS you are running? if it's MAC / OSX, might wanna hold off.
 
  • Like
Reactions: JayBlack_686

JayBlack_686

Member
Nov 23, 2012
49
6
0
Dallas
I've seen something similar as far as the phone not powering on. Technically tho, it was on but with a black screen.
Try holding VOL- and POWER for 30+ seconds to see if it powers off, then again to see if it comes back on.

I did read thoroughly and read that you've kinda tried this already, but after you get it to "power on" - do you get any return on the command:
fastboot devices
or
adb devices

?

Then, maybe try the new script i just updated - or tell me what OS you are running? if it's MAC / OSX, might wanna hold off.
Hi, thanks. I did try holding VOL - and power down for 30 seconds+. Actually, I did feel a vibration, but...nothing after. Couldn't get it to act like it was turning back on. Now that you mention it...I wonder if I did get it to turn on at some point during trying this over and over, because at times I saw the "scan line" appear across the screen briefly, like when I hard power off the device. But I've never seen the display light up at all, and nothing I've done has shown a device when issuing the "devices" command, either via fastboot or adb. I guess I need to screw around until I see that scan line, then it's "off." Then I've gotta get the thing to vibrate again, so it's "on." Then try seeing if I can run your script.

Boy am I glad I didn't try this late at night.

Oh, sorry, I'm on Windows 10.
 

JayBlack_686

Member
Nov 23, 2012
49
6
0
Dallas
Based on the return it looks like your bootloader got jacked up. I haven't seen that issue before. May want to get on chat with Google about an RMA.
Sheeeeeeeit, just did that. Man...honestly, I might just go stock when I get this new one. Too much risk of mishaps, since I only keep the one phone around. Was just hoping to recover this one, as I'll be phone-less for a few days.

Side question - let's say I get the new phone, unlock the bootloader just in case, then don't do anything else, no rooting, etc. Do you know if that'll affect my ability to get OTAs actually over the air? I'm just bummed that every time there's an update, I've gotta go manually flash stuff and risk some shenanigans like this (and there's that persistent notification that doesn't go away unless I do so!). Should be easy, but I never had any luck with Google's flash-all script and always had to use yours to recover. Your script worked great...except for this time, something clearly went wrong (not pointing fingers, it's just how it goes).

Anyway, if you've got any other ideas, I'd try them out. Thanks for the responses thus far.
 

Deuces

Senior Member
Jun 4, 2009
396
410
0
Houston
Sheeeeeeeit, just did that. Man...honestly, I might just go stock when I get this new one. Too much risk of mishaps, since I only keep the one phone around. Was just hoping to recover this one, as I'll be phone-less for a few days.

Side question - let's say I get the new phone, unlock the bootloader just in case, then don't do anything else, no rooting, etc. Do you know if that'll affect my ability to get OTAs actually over the air? I'm just bummed that every time there's an update, I've gotta go manually flash stuff and risk some shenanigans like this (and there's that persistent notification that doesn't go away unless I do so!). Should be easy, but I never had any luck with Google's flash-all script and always had to use yours to recover. Your script worked great...except for this time, something clearly went wrong (not pointing fingers, it's just how it goes).

Anyway, if you've got any other ideas, I'd try them out. Thanks for the responses thus far.
If you can't get into bootloader, there's nothing I can do. There's some talk about using LG's downloader mode but LG has not released an image for it that I know of.
You can see this download mode by: Powered Off. Hold Vol+, insert USB cable connected from laptop.

If you have an unlocked bootloader, play store knows it - and some apps (netflix for example) - won't allow you to download their app from the play store. You could sideload the apk and it works fine, but still no updates from play store.. All of the apps I have work fine unlocked, minus Netflix.

You could disable OTA updates via developer options so that the notification goes away.

If you decide to stay stock, you could technically leave the bootloader locked, but the "allow oem unlocking" enabled in developer options. However, if something corrupts your OS, it's unlikely you'd be able to issue the unlocking commands from bootloader. That's the main reason I stay unlocked.

I've got the process down for upgrades myself. Download image, unzip, unzip the image within that, run my deuce-flash-all script. Boot up to Android once. Reboot to bootloader, fastboot boot twrp img, install magisk, reboot.

I do not flash twrp zip b/c it has been problematic for touchscreen drivers, and I'm around a computer anyway when doing these things.

The only reason I root is to use adaway. Every time I try to get used to stock, I hate using my phone because of ads.
I've tried the no-root-required VPN adblockers, but they drain battery.
 
Last edited:

JayBlack_686

Member
Nov 23, 2012
49
6
0
Dallas
If you can't get into bootloader, there's nothing I can do.
...

If you have an unlocked bootloader, play store knows it - and some apps (netflix for example) - won't allow you to download their app from the play store. You could sideload the apk and it works fine, but still no updates from play store.. All of the apps I have work fine unlocked, minus Netflix.

...

The only reason I root is to use adaway. Every time I try to get used to stock, I hate using my phone because of ads.
I've tried the no-root-required VPN adblockers, but they drain battery.
Hey, thanks. I hear you. Oddly, I could've sworn that I had Netflix installed and updating on my bootloader-unlocked Pixel 2. Can't verify, sadly!
 

donlu30

Senior Member
Jan 2, 2008
66
19
38
Hey, thanks. I hear you. Oddly, I could've sworn that I had Netflix installed and updating on my bootloader-unlocked Pixel 2. Can't verify, sadly!
I can verify! I watch Netflix on my phone at work, downloaded from the play store on a pixel 2 unlocked, twrp installed and rooted with magisk. Not sure why everyone is having problems with it.