Then, just when victory seemed near, the tool spits out:
Don’t throw your phone against the wall just yet. This error is frustrating, but it is fixable. Here is exactly what Error 1004 means and how to beat it. In the world of Xiaomi modding, Error 1004 is a communication error between the Mi Unlock Tool and Xiaomi’s authentication servers.
Unlike Error 10008 (device not found) or timeout errors, Error 1004 usually pops up at or 99% of the verification process. It tells the user: "Your device is ready, but Xiaomi's server is rejecting this specific unlock attempt right now."