[Razer Phone Questions & Answers] HO-COOH:
I was using phh-treble gsi before and I always has been unable to flash anything to boot partition. Today I am trying to flash the factory image, and it also failed at flashing boot. But now because it also flashed to other parition, my phone cannot boot anymore. Tried the official oreo and pie image, both the same thing. Also tried flashing lineage recovery, also failed.

The error message is either

FAILED (Write to device failed (Invalid argument))

or

FAILED (Status read failed (Too many links))

.

I tried using different platform tools, including the ones provided by lineage tutorial, and this one [Tool] Latest ADB Fastboot and USB Driver installer tool for Windows. Same thing. I also tried using Linux and using other cables and using USB2.0 and 3.0 ports. Nothing helps so far.

Full log flashing the official android pie firmware

D:\cheryl-pie>flash_all.bat

D:\cheryl-pie>set fastboot_cmd=fastboot

D:\cheryl-pie>fastboot flash partition:0 gpt_both0.bin
< waiting for any device >
Sending 'partition:0' (44 KB) OKAY [ 0.002s]
Writing 'partition:0' OKAY [ 0.085s]
Finished. Total time: 0.098s

D:\cheryl-pie>fastboot flash partition:1 gpt_both1.bin
Sending 'partition:1' (44 KB) OKAY [ 0.001s]
Writing 'partition:1' OKAY [ 0.100s]
Finished. Total time: 0.121s

D:\cheryl-pie>fastboot flash partition:2 gpt_both2.bin
Sending 'partition:2' (44 KB) OKAY [ 0.001s]
Writing 'partition:2' OKAY [ 0.096s]
Finished. Total time: 0.113s

D:\cheryl-pie>fastboot flash partition:3 gpt_both3.bin
Sending 'partition:3' (44 KB) OKAY [ 0.002s]
Writing 'partition:3' OKAY [ 0.088s]
Finished. Total time: 0.107s

D:\cheryl-pie>fastboot flash partition:4 gpt_both4.bin
Sending 'partition:4' (44 KB) OKAY [ 0.001s]
Writing 'partition:4' OKAY [ 0.100s]
Finished. Total time: 0.125s

D:\cheryl-pie>fastboot flash partition:5 gpt_both5.bin
Sending 'partition:5' (44 KB) OKAY [ 0.002s]
Writing 'partition:5' OKAY [ 0.170s]
Finished. Total time: 0.188s

D:\cheryl-pie>fastboot flash xbl_a xbl.img
Sending 'xbl_a' (2629 KB) OKAY [ 0.074s]
Writing 'xbl_a' OKAY [ 0.015s]
Finished. Total time: 0.104s

D:\cheryl-pie>fastboot flash xbl_b xbl.img
Sending 'xbl_b' (2629 KB) OKAY [ 0.066s]
Writing 'xbl_b' OKAY [ 0.036s]
Finished. Total time: 0.112s

D:\cheryl-pie>fastboot flash tz_a tz.img
Sending 'tz_a' (1868 KB) OKAY [ 0.054s]
Writing 'tz_a' OKAY [ 0.017s]
Finished. Total time: 0.086s

D:\cheryl-pie>fastboot flash tz_b tz.img
Sending 'tz_b' (1868 KB) OKAY [ 0.047s]
Writing 'tz_b' OKAY [ 0.017s]
Finished. Total time: 0.073s

D:\cheryl-pie>fastboot flash rpm_a rpm.img
Sending 'rpm_a' (228 KB) OKAY [ 0.008s]
Writing 'rpm_a' OKAY [ 0.003s]
Finished. Total time: 0.028s

D:\cheryl-pie>fastboot flash rpm_b rpm.img
Sending 'rpm_b' (228 KB) OKAY [ 0.006s]
Writing 'rpm_b' OKAY [ 0.004s]
Finished. Total time: 0.018s

D:\cheryl-pie>fastboot flash hyp_a hyp.img
Sending 'hyp_a' (264 KB) OKAY [ 0.008s]
Writing 'hyp_a' OKAY [ 0.003s]
Finished. Total time: 0.027s

D:\cheryl-pie>fastboot flash hyp_b hyp.img
Sending 'hyp_b' (264 KB) OKAY [ 0.007s]
Writing 'hyp_b' OKAY [ 0.005s]
Finished. Total time: 0.021s

D:\cheryl-pie>fastboot flash pmic_a pmic.img
fastboot: error: cannot load 'pmic.img': No such file or directory

D:\cheryl-pie>fastboot flash pmic_b pmic.img
fastboot: error: cannot load 'pmic.img': No such file or directory

D:\cheryl-pie>fastboot flash keymaster_a keymaster.img
Sending 'keymaster_a' (373 KB) OKAY [ 0.011s]
Writing 'keymaster_a' OKAY [ 0.006s]
Finished. Total time: 0.034s

D:\cheryl-pie>fastboot flash keymaster_b keymaster.img
Sending 'keymaster_b' (373 KB) OKAY [ 0.009s]
Writing 'keymaster_b' OKAY [ 0.003s]
Finished. Total time: 0.021s

D:\cheryl-pie>fastboot flash cmnlib_a cmnlib.img
Sending 'cmnlib_a' (221 KB) OKAY [ 0.007s]
Writing 'cmnlib_a' OKAY [ 0.005s]
Finished. Total time: 0.028s

D:\cheryl-pie>fastboot flash cmnlib_b cmnlib.img
Sending 'cmnlib_b' (221 KB) OKAY [ 0.006s]
Writing 'cmnlib_b' OKAY [ 0.002s]
Finished. Total time: 0.017s

D:\cheryl-pie>fastboot flash cmnlib64_a cmnlib64.img
Sending 'cmnlib64_a' (292 KB) OKAY [ 0.009s]
Writing 'cmnlib64_a' OKAY [ 0.005s]
Finished. Total time: 0.031s

D:\cheryl-pie>fastboot flash cmnlib64_b cmnlib64.img
Sending 'cmnlib64_b' (292 KB) OKAY [ 0.008s]
Writing 'cmnlib64_b' OKAY [ 0.003s]
Finished. Total time: 0.020s

D:\cheryl-pie>fastboot flash devcfg_a devcfg.img
Sending 'devcfg_a' (56 KB) OKAY [ 0.002s]
Writing 'devcfg_a' OKAY [ 0.002s]
Finished. Total time: 0.020s

D:\cheryl-pie>fastboot flash devcfg_b devcfg.img
Sending 'devcfg_b' (56 KB) OKAY [ 0.002s]
Writing 'devcfg_b' OKAY [ 0.001s]
Finished. Total time: 0.012s

D:\cheryl-pie>fastboot flash abl_a abl.img
Sending 'abl_a' (204 KB) OKAY [ 0.007s]
Writing 'abl_a' OKAY [ 0.004s]
Finished. Total time: 0.028s

D:\cheryl-pie>fastboot reboot-bootloader
Rebooting into bootloader OKAY [ 0.000s]
Finished. Total time: 0.003s

D:\cheryl-pie>timeout /t 10

Waiting for 0 seconds, press a key to continue ...

D:\cheryl-pie>fastboot flash abl_b abl.img
< waiting for any device >
Sending 'abl_b' (204 KB) OKAY [ 0.006s]
Writing 'abl_b' OKAY [ 0.003s]
Finished. Total time: 0.018s

D:\cheryl-pie>fastboot erase ddr
Erasing 'ddr' OKAY [ 0.114s]
Finished. Total time: 0.118s

D:\cheryl-pie>fastboot flash persist persist.img
Sending 'persist' (32768 KB) OKAY [ 0.870s]
Writing 'persist' OKAY [ 0.598s]
Finished. Total time: 1.488s

D:\cheryl-pie>fastboot flash modem_a modem.img
Sending 'modem_a' (105572 KB) OKAY [ 2.857s]
Writing 'modem_a' OKAY [ 0.944s]
Finished. Total time: 3.820s

D:\cheryl-pie>fastboot flash modem_b modem.img
Sending 'modem_b' (105572 KB) OKAY [ 2.658s]
Writing 'modem_b' OKAY [ 0.948s]
Finished. Total time: 3.612s

D:\cheryl-pie>fastboot flash dsp_a dsp.img
Sending 'dsp_a' (16384 KB) OKAY [ 0.464s]
Writing 'dsp_a' OKAY [ 0.164s]
Finished. Total time: 0.645s

D:\cheryl-pie>fastboot flash dsp_b dsp.img
Sending 'dsp_b' (16384 KB) OKAY [ 0.430s]
Writing 'dsp_b' OKAY [ 0.149s]
Finished. Total time: 0.586s

D:\cheryl-pie>fastboot flash boot_a boot.img
Sending 'boot_a' (25797 KB) FAILED (Write to device failed (Too many links))
fastboot: error: Command failed

D:\cheryl-pie>fastboot flash boot_b boot.img
< waiting for any device >