Notes from attempting to extract WD PC SN740 firmware from Dell updater EXE

This is a summary of my failed attempt at extracting .fluf firmware for the WD PC SN740 from Dell’s EXE. I can’t find the firmware for the SN740 anywhere else, and it seems to experience the same fail-to-wake-from-suspend issues that other WD SN* drives suffer from, and that is fixed by a firmware update.

  1. Be angry at Framework. No really, this is an OEM drive that WD expects them to provide support for, and they don’t.

  2. unzip WD-SN740-Solid-State-Drive-Firmware-Update_P5C6P_WIN64_7391.4108_A03.EXE, you get:

    • mup.xml, UTF-8 encoded metadata about the firmware package
    • package.xml, UTF-16LE encoded (different) metadata about the firmware package with no byte-order marker, which is just rude
    • WD73914108.exe, the good stuff lies inside
  3. 7z x WD73914108.exe, you get:

    • .data, .reloc, .rsrc, etc… stuff from the actual binary, don’t care
    • CERTIFICATE I think this is where the windows “this program is by this publisher” cert is stored but whatever
    • [0] this is where the good stuff is, but it’s in a bizzaro format archive.
  4. At the end of [0] we can see YEXTPACKBIN DIRECTORY SIGNATURE which has no google results. about 4000 bytes before that we see

    002ad100: 0000 0002 0000 0066 7763 6f6e 6669 6700  .......fwconfig.
    002ad110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
    002ad120: 0000 0000 0000 0003 0100 0000 0000 0062  ...............b
    002ad130: 696e 3000 0000 0000 0000 0000 0000 0000  in0.............
    002ad140: 0000 0000 0000 0000 0000 0000 0000 0000  ................
    002ad150: d02a 0000 0000 0000 0000 0000 0000 0000  .*..............
    

    All numbers are little-endian. 02000000 means there are two files in this yextpackbin. The next 16 bytes are the name of the file, and the next 8 is the size of that file. Repeat for two files.

    • fwconfig is a file 259 bytes long (03 01 00 00 00 00 00 00)
    • bin0 is a file 2,805,760 bytes long (00 d0 2a 00 00 00 00 00)
  5. Thus to extract bin0:

    cat '[0]' | tail -c+260 | head -c2805760 > the_firmware.fluf

  6. We can approximate that this is right by comparing to a known-good FLUF file (like this one for the SN770) and see that they both start and end the same way.

    less 731120WD.fluf:
    less the_firmware.fluf:
    
  7. And then flash it! (this is where the disappointment comes)

    # nvme fw-download -f the_firmware_maybe.fluf /dev/disk/by-id/nvme-WD_PC_SN740_yougettheidea  
    Firmware download success  
    
    # sudo nvme fw-commit -a 3 -s 2 /dev/disk/by-id/nvme-WD_PC_SN740_yougettheidea
    NVMe status: Firmware Activation Prohibited: The image specified is being prohibited from activation by the controller for vendor specific reasons(0x4113)
    

Hopefully this is useful to someone. Maybe you can figure out where I went wrong.

See also Western Digital Drive Update Guide Without Windows/WD Dashboard

update: installing the firmware labeled as for the SN770 (731120WD) seemed to install correctly on my SN740.

It’s too early to be sure the spurious failures to wake are fixed, but so far so good. I’ll try to report back in Western Digital Drive Update Guide Without Windows/WD Dashboard in a couple of weeks

1 Like