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

May 5, 2018
43
5
0
so just want to say a huge THANK YOU. totally thought i fried my new pixel 3 xl. on android q beta. i couldnt take the ota to revert back to pie. after some research found this, opened this script up, modified it to work with the pixel 3 xl images. some are the same some are different. just folllowed your steps in linux, rewrote the script and blammo back on pie. again huge thanks, saved me some time on writing out a whole new script.
 

nolimit78

Senior Member
May 13, 2009
1,268
189
0
Kansas City
So here is what happened, I installed TWRP on my device and completely wiped my phone so I can install bootleggers OS and Gapps on my Pixel 2 Walleye. But I accidentally booted into Boot slot B on twrp and now the only thing the device can boot into is the bootloader mode, recovery and download mode is completely useless, It gives me either operation denied error or Error slot unbootable. The worst part is no computer will recognize my pixel in device manager at all. Mac computer will not detect it either. Ant tips on how to fix this? And again my I have all drivers installed and platform tools are up to date

Anything helps!
Ok, this is what happened to me with my device before I RMA'd it and I swear it was like, two days after I sent it in (even kept working on it up until the very last minute) I found someone who did some additional things that I didn't try and they had success.

https://forum.xda-developers.com/showpost.php?p=78691702&postcount=12
 

loki993

Senior Member
Apr 4, 2011
384
27
0
Ok I must got my phone back from RMaing it for another issue. Since I had it in a clean state I thought I root it and put a kernel on. I followed the step by step guide but it wouldn't flash the latest image with flash all. It would fail and say not enough space. I tried with the all in one tool and it also wouldn't flash, it sais flash-all is not a valid command???? WTF???. It was on January firmware so I figured I could deal with it later. Installed TWRP and ran Magisk with the all in one tool. I found a kernel I liked and it said it was on the latest april updates...so I thought I needed to flash the latest april google image for them. So I found this tool, ran it everything seemed ok and my phone bricked.

So now I get the standard your phone is unlocked message or whatever, orange, but I also now get a red message that says your phone is corrupted. It can't be trusted and may not work properly, and it will not boot. It will get to the g screen and just sit, or sometimes it goes back the the corrupted screen. I can get it into fastboot but its finicky about that too if I hold the buttons too long the screen just goes blank. I cant boot into TWRP either it just says the same thing. I rant deuces tool again because it seems to be the only want the phone would flash and it seems to flash the b partition but can't get back to the a partition and fails.

Im sure there is something stupid that I'm doing or have done but I need help. This phone for some reason had fought my in the process every step of the way to this point.

I DLed the latest platform tools from google, april factory image and checked the hash. Updated to the latest android usb drivers, so I think Im all up to date on all of that but maybe I missed something?


Edit.....I went into driver for the phone and said update driver...it found something and updated it. The driver I was using I got from google today...so I don't know how it could have been different. I made a new folder and put everything in there..platform tools and I extracted the factory image. I flashed all and it actually worked. I also used the march update just to rule out something being wrong with the april one, though now that I think about it that's very unlikely. So I don't know if it was the driver or the fact that I out everything in one folder, though I tried the folder thing before I'm pretty sure.
 
Last edited:

Rukbat

Senior Member
Feb 15, 2012
536
120
63
Fayetteville NC
Make sure you have a USB 2,1 in there somewhere (the port, the cable, something - 3.0 will not work with the Pixel 2.

Before you use the zip you downloaded, check the SHA256 (the number is right at the download location , next to the package number.

Unzip the package (I find 7zip easiest for this package) and extract everything but the image-walleye-pq2a.190405.003.zip file. Then open that and extract everything in it. Boot to recovery (with it still unlocked, of course) and run Deuces flashing script (from here). (There has to be enough space on the system partitions. even if you load 118GB of files, that's on the user partition, it has nothing to do with the system partition.)

If it still doesn't work, call them back and ask them to RMA the RMAed unit.

(The first thing you should check with an RMAed unit is the build date. If it's current, leave it. )
 
Last edited:

Rukbat

Senior Member
Feb 15, 2012
536
120
63
Fayetteville NC
Locked bootloader? No, you have to unlock the bootloaded in Debug, then again either in the script or using fastboot (either one after you've booted to the bootloader).

I don't know whether the script itself will work on the 3A, but you can look at it to see what it does (it's just text) - either the .bat file or the .sh file, whichever you're more comfortable with.

But in your case, the fix is even easier. If the computer doesn't see the phone (fastboot devices should return the phone's serial number), hold the power button down until the phone vibrates - it could take 30 seconds or more. Then the computer will see the phone.

Then download the factory ROM (from https://developers.google.com/android/images#sargo) and extract everything in the folder in that file to the same folder that the .zip file is in. Run the flash-all file for your PC (.bat for Windows, .sh for MacOS or Linux) and it should install the OS. (I ran into the same sort of thing when I went from Beta back to Pie on my Pixel 2 - locked in the bootloader, and the computer didn't even recognize that anything had been plugged in. Someone here on XDA figured out the "power button until it vibrates" trick, but I didn't save a link to the post to credit him for it - sorry, whoever it was. once it gets recognized by the phone, you can try fastboot boot.img [after you extract boot.img from the .zip file you'll be left with after extracting everything]. If everything is back, use fastboot flash boot boot.img to replace the boot file and you're back in business. If not, open the .bat or .sh file in a plain text editor, remove the -w from the last fastboot line, run the file and you'll get everything replaced except all your apps and files - they'll still be there. [Unless you really did trash the whole phone, in which case you'll just have a new Android installation.])

But if the bootloader is locked, you can't do any of that, so contact Google and explain that you joined the Beta program, left it, and after that the phone is locked into the bootloader - and would they please replace the phone. (It's still under warranty.) If you're nice, not demanding, they're great people to work with. I push my phone to the limit, and I've been on the phone with hem many times, asking for a replacement (like the time my phone was locked into the bootloader but the computer wouldn't recognize it - before I read the fix here on XDA). They run about the best customer service organization I've ever run across - including two that I'VE run in my career.
 

Ameelo

Member
May 12, 2018
17
1
0
Hi Rubkat,

I knew it wont work but trying running the descus script. And it is stuck at sending sparse 'vendor_a' (262140 KB)...
and adb screen prior to it was is below. It did not give me option to select power button but keep rebooting. So I NEED A SIMILAR SCRIPT THAT DESCUS WROTE FOR PIXEL 2 FOR PIXEL 3A...THAT WILL BE THE ONLY WAY I MAY BE ABLE TO RESTORE MY PHONE I THINK. DO you want to try anything more?

Thanks, Amrit

Deuces-flash-all-script-V4.5-Windows
for Taimen or Walleye - Google Pixel 2 / XL
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 . . .
Unlock Bootloader[Y/N]?y
Running Unlock
Look at your device,
press up arrow and Power to confirm
usage: fastboot [ <option> ] <command>

commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message

options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
This will say "failed" if already unlocked - ignore
Running Unlock_critical
Look at your device,
press up arrow and Power to confirm
usage: fastboot [ <option> ] <command>

commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message

options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
This will say "failed" if already unlocked - ignore
Locating Bootloader and Radio Filenames
Flashing...
it is safe to ignore errors about active partition - there are multiple entries to support multiple versions of platform tools
fastboot: unknown option -- set-active=_a
fastboot: unknown option -- set-active=a
target reported max download size of 268435456 bytes
sending 'bootloader' (8349 KB)...
OKAY [ 0.252s]
writing 'bootloader'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.629s
rebooting into bootloader...
OKAY [ 0.049s]
finished. total time: 0.057s
target reported max download size of 268435456 bytes
sending 'radio' (72988 KB)...
OKAY [ 1.789s]
writing 'radio'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 1.864s
rebooting into bootloader...
OKAY [ 0.051s]
finished. total time: 0.058s
fastboot: unknown option -- set-active=_b
fastboot: unknown option -- set-active=b
< waiting for device >
target reported max download size of 268435456 bytes
sending 'bootloader' (8349 KB)...
OKAY [ 0.353s]
writing 'bootloader'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 1.195s
rebooting into bootloader...
OKAY [ 0.050s]
finished. total time: 0.053s
target reported max download size of 268435456 bytes
sending 'radio' (72988 KB)...
OKAY [ 1.763s]
writing 'radio'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 1.841s
rebooting into bootloader...
OKAY [ 0.052s]
finished. total time: 0.056s
fastboot: unknown option -- set-active=_a
fastboot: unknown option -- set-active=a
target reported max download size of 268435456 bytes
sending 'abl_a' (1024 KB)...
OKAY [ 0.106s]
writing 'abl_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.182s
error: cannot load 'aes.img'
error: cannot load 'apdp.img'
target reported max download size of 268435456 bytes
sending 'boot_a' (65536 KB)...
OKAY [ 1.535s]
writing 'boot_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 1.612s
target reported max download size of 268435456 bytes
sending 'cmnlib_a' (364 KB)...
OKAY [ 0.112s]
writing 'cmnlib_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.182s
target reported max download size of 268435456 bytes
sending 'cmnlib64_a' (480 KB)...
OKAY [ 0.100s]
writing 'cmnlib64_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.177s
< waiting for device >
target reported max download size of 268435456 bytes
sending 'devcfg_a' (40 KB)...
OKAY [ 0.101s]
writing 'devcfg_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.173s
target reported max download size of 268435456 bytes
sending 'dtbo_a' (8192 KB)...
OKAY [ 0.256s]
writing 'dtbo_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.325s
target reported max download size of 268435456 bytes
sending 'hyp_a' (340 KB)...
OKAY [ 0.111s]
writing 'hyp_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.176s
target reported max download size of 268435456 bytes
sending 'keymaster_a' (212 KB)...
OKAY [ 0.114s]
writing 'keymaster_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.188s
error: cannot load 'laf.img'
target reported max download size of 268435456 bytes
sending 'modem_a' (72988 KB)...
OKAY [ 1.670s]
writing 'modem_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 1.735s
error: cannot load 'msadp.img'
error: cannot load 'pmic.img'
error: cannot load 'rpm.img'
target reported max download size of 268435456 bytes
sending 'tz_a' (1992 KB)...
OKAY [ 0.141s]
writing 'tz_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.208s
target reported max download size of 268435456 bytes
sending 'vbmeta_a' (4 KB)...
OKAY [ 0.107s]
writing 'vbmeta_a'...
FAILED (remote: Fastboot command (flash:) is not allowed when locked)
finished. total time: 0.185s
target reported max download size of 268435456 bytes
sending sparse 'vendor_a' (262140 KB)...
 

Rukbat

Senior Member
Feb 15, 2012
536
120
63
Fayetteville NC
Did you have the bootloader unlocked in the debug screen before you started having the problems? If not, you can't flash anything, and you'll have to contact Google and have the phone replaced.
 

Rukbat

Senior Member
Feb 15, 2012
536
120
63
Fayetteville NC
No, unlocking the bootloader wipes the phone. You should do this before even setting the phone up the first time. You could manually back up as much as you can get to, then unlock the bootloader. (Assuming the bootloader on your phone can be unlocked - some can ne, many can't be.)
 

Rukbat

Senior Member
Feb 15, 2012
536
120
63
Fayetteville NC
How about some details? Port level (USB2 ? USB 3.0? USB 3.1?) Type of cable (USB 2? USB 3?)

Also, what's going wrong? What is or isn't it doing?

I've had it working on my 2 since 2018 with a USB 3.0 port but a USB 2 cable.
 

drancill

Member
Jun 15, 2007
5
0
0
Used this script worked wonders, the second time

Little hint to those who may be failing, your fastboot.exe may be old.

Pixel 2 Android 11 October Update