Cannot flash factory images to Google Pixel 2 XL

Search This thread

chimeracoder

New member
Nov 13, 2010
2
0
I'm trying to root my phone, but I can't flash any boot or recovery images to it, whether that's the patched boot.img, TWRP, or even the stock factory images themselves. I've already unlocked the bootloader, using
Code:
fastboot flashing unlock_critical
.

I am running the newest version of adb and fastboot, downloaded yesterday:

Code:
$ fastboot --version
fastboot version 0.0.1-4500957
Installed as [REDACTED]

$ adb version
Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as [REDACTED]

When I try to flash the stock factory images, downloaded straight from Google, I get this series of errors:

Code:
$ adb reboot bootloader
$ ./flash-all.sh 
target didn't report max-download-size
sending 'bootloader' (36344 KB)...
FAILED (remote: Requested download size is more than max allowed
)
finished. total time: 0.000s
rebooting into bootloader...
OKAY [  0.000s]
finished. total time: 0.201s
target didn't report max-download-size
sending 'radio' (60428 KB)...
FAILED (remote: Requested download size is more than max allowed
)
finished. total time: 0.000s
rebooting into bootloader...
OKAY [  0.001s]
finished. total time: 0.201s
extracting android-info.txt (0 MB) to RAM...
Warning: Could not determine slot for secondary images. Ignoring.
extracting boot.img (40 MB) to disk... took 0.289s
target didn't report max-download-size
archive does not contain 'boot.sig'
extracting dtbo.img (8 MB) to disk... took 0.039s
archive does not contain 'dtbo.sig'
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting system.img (1936 MB) to disk...
archive does not contain 'system.sig'
extracting vbmeta.img (0 MB) to disk... took 0.000s
archive does not contain 'vbmeta.sig'
extracting vendor.img (349 MB) to disk... took 4.445s
error: Failed to identify current slot



Other fastboot commands also fail with inconsistent error messages and failure modes:


Code:
$ fastboot flash boot boot.img 
target didn't report max-download-size
sending 'boot' (40960 KB)...
FAILED (remote: Requested download size is more than max allowed
)
finished. total time: 0.000s

If I try with the -S flag:

Code:
$ fastboot -S 512K flash boot boot.img 
Invalid sparse file format at header magic
sending sparse 'boot' 1/51 (508 KB)...

which hangs indefinitely, never sending even the first segment.

I can try booting directly, which yields the same problem:

Code:
$ fastboot boot boot.img 
downloading 'boot.img'...
# hangs indefinitely

Similarly,

Code:
$ fastboot --set-active=_a

hangs indefinitely as well. I have to restart the bootloader to kill it, at which point it just prints the confusing error:
Code:
Device does not support slots
(the Pixel 2 XL does support slots!).



The error messages aren't always consistent; sometimes the first fastboot flash boot boot.img command will appear to hang (requiring a restart, similar to
Code:
--set-active
) instead of printing the error message about max-download-size. I've let that run for about fifteen minutes before having to kill it. Unlike system.img, boot.img is only about 40MB, so it shouldn't take that long to flash - something is clearly wrong.

I've also tried this with multiple cables on different USB ports, with the same sorts of results each time.


Am I missing a step? How can I flash the factory images and the patched boot.img?
 

bioarthas

New member
Jan 14, 2018
1
0
i have the same problem, and it seems nothing works, tried every single solution on the internet i could find, multiple cables, adb/fastboot up to date
exact same problem as OP
 

danlat1415

Senior Member
Apr 18, 2011
449
128
UK
I'm trying to root my phone, but I can't flash any boot or recovery images to it, whether that's the patched boot.img, TWRP, or even the stock factory images themselves. I've already unlocked the bootloader, using
Code:
fastboot flashing unlock_critical
.

You're in the wrong forum, using the wrong unlock command, depending on whether you have Pixel 2 or Pixel 2 XL and likely using the wrong factory image too.

You're in the Pixel 2 forum (5" model), not Pixel 2 XL (6" model). You need to go here; https://xdaforums.com/pixel-2-xl/help
You need to make sure you enable developer option on phone first - then in developer option, tick - allow OEM Unlocking, and USB debugging

then it should allow you to go ahead as you have.
 
Last edited by a moderator:
  • Like
Reactions: gvsukids

nolimit78

Senior Member
May 13, 2009
1,297
206
Kansas City
Check this out here. Your issue happens when you play around with the bootloader settings and something gets borked. This tool saved me from having to RMA.
 

paulomario77

Senior Member
Sep 14, 2010
74
13
Floripa
Samsung Galaxy Z Flip3
EDIT: Never mind, the culprit was the USB C x USB C cable I was using at the office. Back home, I used my USB A x USB C cable and was able to recover the device.

I'm having the exact same problem! I have a Pixel 2, at January 8.1.0 version (OPM1.171019.013). It was rooted with Magisk latest version. Today I decided to reflash the firmware, without wipe, and the flashing was not successful. Now I'm afraid I have a small brick in my hands.

I'm now using the latest fastboot (0.0.1-4500957) and adb (1.0.39 / 0.0.1-4500957) versions. I don't know if I was on the latest versions when I tried to flash the firmware.

I always flashed the firmware using a USB A port on my Dell XPS 9560 notebook. Today I flashed from a USB C port, I don't know if this was the cause for the failed flash. I'm at the office, and I don't have a USB A x USB C cable available.

My Pixel 2 is stuck at the bootloader. Recovery mode and Download mode options don't do anything, it just goes back to the bootloader screen. Bootloader version is mw8998-002.0059.00. It tells me I'm on slot b, and I can't change slots, issuing fastboot --set-active=a either returns:

Code:
error: Device does not support slots

OR:

Code:
FAILED (remote: unknown command)

When I issue fastboot flash bootloader bootloader-walleye-mw8998-002.0066.00.img either one of these messages is displayed:

Code:
error: Failed to identify current slot

OR:

Code:
target didn't report max-download-size
sending 'bootloader' (38644 KB)...
FAILED (remote: Uploaded data exceeds max-download-size)
finished. total time: 0.000s

Has anyone found a solution?
 
Last edited:
  • Like
Reactions: KreAch3R

Az Biker

Sr. Mod / RC-RT Committees / Shred'r of MTBs
Staff member
same problem。
could you solve it?

As the post above yours suggests, swap out USB cables.

If that doesn't resolve the issue, try these:

-make sure your SDK tools are up to date
-make sure your files are in the correct "platform tools" folder for using fastboot
-make sure your fastboot commands are correct

There is a link to a Pixel 2 XL "guide" in my sig, it covers most issues and processes for the 2 XL.
 
  • Like
Reactions: CyberpodS2

opooi

Member
Dec 28, 2017
13
0
As the post above yours suggests, swap out USB cables.

If that doesn't resolve the issue, try these:

-make sure your SDK tools are up to date
-make sure your files are in the correct "platform tools" folder for using fastboot
-make sure your fastboot commands are correct

There is a link to a Pixel 2 XL "guide" in my sig, it covers most issues and processes for the 2 XL.
yes,i use platform-tools_r28.0.0-linux to fastboot,but it still failed.
I compiled AOSP to run "fastboot flashall -w" for pixel 2 xl.it showed:
target reported max download size of 536870912 bytes
wiping userdata...
mke2fs 1.43.3 (04-Sep-2016)

Warning: RAID stripe-width 1 not an even multiple of stride 2.

Creating filesystem with 13902843 4k blocks and 3481600 inodes
Filesystem UUID: e8137926-c3cb-4ddc-bdd1-311c79ed416c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done


Bootloader Version...: TMZ12a
Baseband Version.....: g8998-00164-1710262031
Serial Number........: 710KPCA0244667

checking product...
OKAY [ 0.000s]
sending 'boot_b' (40960 KB)...
FAILED (data write failure (Protocol error))
finished. total time: 0.162s
i feel sad to cry,but i can't solve it
 

joedajoester

Senior Member
Aug 11, 2012
747
100
@opooi have you made any progress on fixing it? I've had the exact same issue even with the commands hanging. I fixed it somehow, I don't remember how. I think I booted stock recovery and factory reset. I also tried different images and cleaning my driver's and starting fresh. I was going crazy trying everything I could ever think of and then it just flashed. I'm so scared about it happening again. Also another thing to try, try to reboot bootloader a couple times back to back and see if it helps.

Some guy on Reddit just said he uninstalled magisk, then ran the flash-all and his phone started having this issue. It happened to me when I booted twrp, wiped system data cache and then booted to bootloader and tried to flash.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I'm trying to root my phone, but I can't flash any boot or recovery images to it, whether that's the patched boot.img, TWRP, or even the stock factory images themselves. I've already unlocked the bootloader, using
    Code:
    fastboot flashing unlock_critical
    .

    You're in the wrong forum, using the wrong unlock command, depending on whether you have Pixel 2 or Pixel 2 XL and likely using the wrong factory image too.

    You're in the Pixel 2 forum (5" model), not Pixel 2 XL (6" model). You need to go here; https://xdaforums.com/pixel-2-xl/help
    You need to make sure you enable developer option on phone first - then in developer option, tick - allow OEM Unlocking, and USB debugging

    then it should allow you to go ahead as you have.
    1
    EDIT: Never mind, the culprit was the USB C x USB C cable I was using at the office. Back home, I used my USB A x USB C cable and was able to recover the device.

    I'm having the exact same problem! I have a Pixel 2, at January 8.1.0 version (OPM1.171019.013). It was rooted with Magisk latest version. Today I decided to reflash the firmware, without wipe, and the flashing was not successful. Now I'm afraid I have a small brick in my hands.

    I'm now using the latest fastboot (0.0.1-4500957) and adb (1.0.39 / 0.0.1-4500957) versions. I don't know if I was on the latest versions when I tried to flash the firmware.

    I always flashed the firmware using a USB A port on my Dell XPS 9560 notebook. Today I flashed from a USB C port, I don't know if this was the cause for the failed flash. I'm at the office, and I don't have a USB A x USB C cable available.

    My Pixel 2 is stuck at the bootloader. Recovery mode and Download mode options don't do anything, it just goes back to the bootloader screen. Bootloader version is mw8998-002.0059.00. It tells me I'm on slot b, and I can't change slots, issuing fastboot --set-active=a either returns:

    Code:
    error: Device does not support slots

    OR:

    Code:
    FAILED (remote: unknown command)

    When I issue fastboot flash bootloader bootloader-walleye-mw8998-002.0066.00.img either one of these messages is displayed:

    Code:
    error: Failed to identify current slot

    OR:

    Code:
    target didn't report max-download-size
    sending 'bootloader' (38644 KB)...
    FAILED (remote: Uploaded data exceeds max-download-size)
    finished. total time: 0.000s

    Has anyone found a solution?
    1
    same problem。
    could you solve it?

    As the post above yours suggests, swap out USB cables.

    If that doesn't resolve the issue, try these:

    -make sure your SDK tools are up to date
    -make sure your files are in the correct "platform tools" folder for using fastboot
    -make sure your fastboot commands are correct

    There is a link to a Pixel 2 XL "guide" in my sig, it covers most issues and processes for the 2 XL.