[Moto Z2 Force  Questions & Answers] aydun:
I have a XT1789-04 on TMO and yesterday decided to go with LineageOS 16. I followed the instructions at https://wiki.lineageos.org/devices/nash/install

Anyway, I clearly messed something up, because after rebooting my phone never started up.

I am now in 9008 mode(?) with Qualcomm HS-USB QDLoader 9008 (COM10) in my device manager. After a bit of reading, this seemed pretty straightforward to fix with a blankflash.

Anyway, so far no luck. Device is detected, but the process keeps failing and printing "ReadFile() failed, GetLastError()=0" repeatedly.

If I use blankflash_oreo.zip, I also get "Unexpected command, expecting 3 or 18 or 4, got 1 instead."

My thoughts are that I need a Pie blankflash considering I just flashed LineageOS 16? Either that or my phone's somehow permascrewed.

I have tried two Windows 10 computers with various USB 2.0 and 3.0 ports.

Any help would be appreciated!

Flashing most Z2 Force blankflashes does this:

[ -0.000] Opening device: \\.\COM10
[ 0.001] Detecting device
[ 2.590] ReadFile() failed, GetLastError()=0
[ 3.155] ...cpu.id = 94 (0x5e)
[ 3.155] ...cpu.sn = 830812879 (0x318532cf)
[ 3.155] Opening singleimage
[ 3.156] Loading package
[ 3.160] ...filename = pkg.xml
[ 3.163] Loading programmer
[ 3.164] ...filename = programmer.elf
[ 3.165] Sending programmer
[ 3.323] Handling things over to programmer
[ 3.324] Identifying CPU version
[ 3.324] Waiting for firehose to get ready
[ 34.704] ReadFile() failed, GetLastError()=0
[ 50.778] ReadFile() failed, GetLastError()=0
[ 66.852] ReadFile() failed, GetLastError()=0
[ 78.432] Waiting for firehose to get ready
[ 82.927] ReadFile() failed, GetLastError()=0
[ 98.996] ReadFile() failed, GetLastError()=0
[115.068] ReadFile() failed, GetLastError()=0
[131.141] ReadFile() failed, GetLastError()=0
[142.618] ...MSM8998 unknown
[142.618] Determining target secure state
[142.618] Waiting for firehose to get ready
[147.215] ReadFile() failed, GetLastError()=0
[163.291] ReadFile() failed, GetLastError()=0
[179.370] ReadFile() failed, GetLastError()=0
[195.442] ReadFile() failed, GetLastError()=0
[259.719] ReadFile() failed, GetLastError()=0
[271.209] ...secure = no
[271.286] Initializing storage
[271.288] Waiting for firehose to get ready
[275.787] ReadFile() failed, GetLastError()=0
[291.856] ReadFile() failed, GetLastError()=0
[307.928] ReadFile() failed, GetLastError()=0
[323.999] ReadFile() failed, GetLastError()=0
[335.482] Configuring device...
[335.482] Waiting for firehose to get ready
[340.068] ReadFile() failed, GetLastError()=0
[356.139] ReadFile() failed, GetLastError()=0
[372.206] ReadFile() failed, GetLastError()=0
[388.277] ReadFile() failed, GetLastError()=0
[399.835] Waiting for firehose to get ready
[404.346] ReadFile() failed, GetLastError()=0
[420.418] ReadFile() failed, GetLastError()=0
[436.491] ReadFile() failed, GetLastError()=0
[452.561] ReadFile() failed, GetLastError()=0
[464.128] Waiting for firehose to get ready
[468.632] ReadFile() failed, GetLastError()=0
[484.708] ReadFile() failed, GetLastError()=0
[500.778] ReadFile() failed, GetLastError()=0
[516.849] ReadFile() failed, GetLastError()=0
[528.327] Waiting for firehose to get ready
[532.919] ReadFile() failed, GetLastError()=0
[548.992] ReadFile() failed, GetLastError()=0
[565.065] ReadFile() failed, GetLastError()=0
[581.138] ReadFile() failed, GetLastError()=0
[592.701] Initializing storage
[592.703] Waiting for firehose to get ready
[597.213] ReadFile() failed, GetLastError()=0
[613.284] ReadFile() failed, GetLastError()=0
[629.356] ReadFile() failed, GetLastError()=0
[645.429] ReadFile() failed, GetLastError()=0
[656.979] Configuring device...
[656.979] Waiting for firehose to get ready
[661.502] ReadFile() failed, GetLastError()=0
[677.573] ReadFile() failed, GetLastError()=0
[693.648] ReadFile() failed, GetLastError()=0
[709.720] ReadFile() failed, GetLastError()=0
[721.202] Waiting for firehose to get ready
[725.793] ReadFile() failed, GetLastError()=0
[741.865] ReadFile() failed, GetLastError()=0
[757.942] ReadFile() failed, GetLastError()=0
[774.018] ReadFile() failed, GetLastError()=0
[785.502] Waiting for firehose to get ready
[790.094] ReadFile() failed, GetLastError()=0
[806.169] ReadFile() failed, GetLastError()=0
[822.242] ReadFile() failed, GetLastError()=0
[838.312] ReadFile() failed, GetLastError()=0
[849.858] Waiting for firehose to get ready
[854.382] ReadFile() failed, GetLastError()=0
[870.451] ReadFile() failed, GetLastError()=0
[886.522] ReadFile() failed, GetLastError()=0
[902.592] ReadFile() failed, GetLastError()=0
[914.145] Waiting for firehose to get ready
[918.662] ReadFile() failed, GetLastError()=0
[934.733] ReadFile() failed, GetLastError()=0
[950.805] ReadFile() failed, GetLastError()=0
[966.880] ReadFile() failed, GetLastError()=0
[978.357] Configuring device...
[978.357] Waiting for firehose to get ready
[982.951] ReadFile() failed, GetLastError()=0
[999.019] ReadFile() failed, GetLastError()=0
[1015.089] ReadFile() failed, GetLastError()=0
[1031.160] ReadFile() failed, GetLastError()=0
[1042.637] Waiting for firehose to get ready
[1047.230] ReadFile() failed, GetLastError()=0
[1063.303] ReadFile() failed, GetLastError()=0
[1079.378] ReadFile() failed, GetLastError()=0
[1095.454] ReadFile() failed, GetLastError()=0
[1107.020] Waiting for firehose to get ready
[1111.526] ReadFile() failed, GetLastError()=0
[1127.610] ReadFile() failed, GetLastError()=0
[1143.668] ReadFile() failed, GetLastError()=0
[1159.737] ReadFile() failed, GetLastError()=0
[1171.214] Waiting for firehose to get ready
[1175.804] ReadFile() failed, GetLastError()=0
[1191.876] ReadFile() failed, GetLastError()=0
[1207.953] ReadFile() failed, GetLastError()=0
[1224.013] ReadFile() failed, GetLastError()=0
[1235.571] ERROR: do_package()->do_recipe()->do_configure()->fh_send()->get_fh()->no response
[1235.571] Check qboot_log.txt for more details
[1235.573] Total time: 1235.575s
[1235.574] There were some hiccups in backup and restore.
[1235.574] Please save the following files and see a Bootloader member.
[1235.575] 1) ./qboot_log.txt
[1235.575] 2) ./backup_0x318532CF_2019-09-03_191355.img
[1235.575]
[1235.576]
[1235.576] qboot version 3.86
[1235.576]
[1235.576] DEVICE {
[1235.576] name = "\\.\COM10",
[1235.576] flags = "0x64",
[1235.576] addr = "0x62FD54",
[1235.576] sahara.current_mode = "0",
[1235.576] api.buffer = "0x2AFD020",
[1235.576] cpu.serial = "830812879",
[1235.576] cpu.id = "94",
[1235.576] cpu.sv_sbl = "0",
[1235.576] cpu.name = "MSM8998",
[1235.576] storage.type = "UFS",
[1235.576] sahara.programmer = "programmer.elf",
[1235.576] module.firehose = "0x748D00",
[1235.576] cpu.ver = "0",
[1235.576] cpu.vername = "unknown",
[1235.576] api.bnr = "0x2A406D8",
[1235.576] }
[1235.576]
[1235.576]
[1235.576] Backup & Restore {
[1235.576] num_entries = 32,
[1235.576] restoring = "false",
[1235.576] restore_error = "not started",
[1235.576] entries[00] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="cid"},
[1235.576] entries[01] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="frp"},
[1235.576] entries[02] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="hw"},
[1235.576] entries[03] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="misc"},
[1235.576] entries[04] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="persist"},
[1235.576] entries[05] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="utags"},
[1235.576] entries[06] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="devinfo"},
[1235.576] entries[07] = { skipped = 0, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="sp"},
[1235.576] entries[08] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="abl_a"},
[1235.576] entries[09] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="cmnlib_a"},
[1235.576] entries[10] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="cmnlib64_a"},
[1235.576] entries[11] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="devcfg_a"},
[1235.576] entries[12] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="hyp_a"},
[1235.576] entries[13] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="keymaster_a"},
[1235.576] entries[14] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="tz_a"},
[1235.576] entries[15] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="storsec_a"},
[1235.576] entries[16] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="prov_a"},
[1235.576] entries[17] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="rpm_a"},
[1235.576] entries[18] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="pmic_a"},
[1235.576] entries[19] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="xbl_a"},
[1235.576] entries[20] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="abl_b"},
[1235.576] entries[21] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="cmnlib_b"},
[1235.576] entries[22] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="cmnlib64_b"},
[1235.576] entries[23] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="devcfg_b"},
[1235.576] entries[24] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="hyp_b"},
[1235.576] entries[25] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="keymaster_b"},
[1235.576] entries[26] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="tz_b"},
[1235.576] entries[27] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="storsec_b"},
[1235.576] entries[28] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="prov_b"},
[1235.576] entries[29] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="rpm_b"},
[1235.576] entries[30] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="pmic_b"},
[1235.576] entries[31] = { skipped = 1, backup_tried = 0, backup_failed = 0, restore_tried = 0, restore_failed = 0, name ="xbl_b"},
[1235.576] simg = {
[1235.576] filename = "backup_0x318532CF_2019-09-03_191355.img",
[1235.576] entries[00] = { size = 558096, name = "programmer.elf" },
[1235.576] }
[1235.576] }
[1235.576]

Flashing blankflash_oreo.zip gives this:

[ 0.000] Opening device: \\.\COM10
[ 0.001] Detecting device
[ 10.584] ReadFile() failed, GetLastError()=0
[ 26.656] ReadFile() failed, GetLastError()=0
[ 27.215] ...cpu.id = 94 (0x5e)
[ 27.216] ...cpu.sn = 830812879 (0x318532cf)
[ 27.219] Opening singleimage
[ 27.261] Loading package
[ 27.263] ...filename = pkg.xml
[ 27.265] Loading programmer
[ 27.265] ...filename = programmer.elf
[ 27.265] Sending programmer
[ 27.338] ReadFile() failed, GetLastError()=0
[ 27.591] Unexpected command, expecting 3 or 18 or 4, got 1 instead.
[ 27.595] ERROR: sahara_download()->general error
[ 27.596] Check qboot_log.txt for more details
[ 27.598] Total time: 27.599s
[ 27.605]
[ 27.605] qboot version 3.86
[ 27.605]
[ 27.605] DEVICE {
[ 27.605] name = "\\.\COM10",
[ 27.605] flags = "0x64",
[ 27.605] addr = "0x62FD54",
[ 27.605] sahara.current_mode = "0",
[ 27.605] api.buffer = "0x2A1F020",
[ 27.605] cpu.serial = "830812879",
[ 27.605] cpu.id = "94",
[ 27.605] cpu.sv_sbl = "0",
[ 27.605] cpu.name = "MSM8998",
[ 27.605] storage.type = "UFS",
[ 27.605] sahara.programmer = "programmer.elf",
[ 27.605] api.bnr = "0x2951CA0",
[ 27.605] }
[ 27.605]
[ 27.605]
[ 27.605] Backup & Restore {
[ 27.605] num_entries = 0,
[ 27.605] restoring = "false",
[ 27.605] backup_error = "not started",
[ 27.605] restore_error = "not started",
[ 27.605] }
[ 27.605]

And if I flash a known wrong blankflash, i.e. a Moto G one (just trying anything now!):

[ 0.000] Opening device: \\.\COM10
[ 0.001] Detecting device
[ 27.016] ReadFile() failed, GetLastError()=0
[ 27.579] ...cpu.id = 94 (0x5e)
[ 27.584] ...cpu.sn = 830812879 (0x318532cf)
[ 27.592] Opening singleimage
[ 27.611] Loading package
[ 27.625] Failed identify board. Wrong package?
[ 27.629] ERROR: error loading package
[ 27.634] Check qboot_log.txt for more details
[ 27.645] Total time: 27.647s
[ 27.653]
[ 27.653] qboot version 3.86
[ 27.653]
[ 27.653] DEVICE {
[ 27.653] name = "\\.\COM10",
[ 27.653] flags = "0x64",
[ 27.653] addr = "0x62FD54",
[ 27.653] sahara.current_mode = "3",
[ 27.653] api.buffer = "0x29F3020",
[ 27.653] cpu.serial = "830812879",
[ 27.653] cpu.id = "94",
[ 27.653] cpu.sv_sbl = "0",
[ 27.653] api.bnr = "0x2931CA8",
[ 27.653] }
[ 27.653]
[ 27.653]
[ 27.653] Backup & Restore {
[ 27.653] num_entries = 0,
[ 27.653] restoring = "false",
[ 27.653] backup_error = "not started",
[ 27.653] restore_error = "not started",
[ 27.653] }
[ 27.653]