I've been trying to make a custom firmware for the Mi Band 5 (or at least understand its inner workings) by disassembling the firmware image and seeing how it works.
However, any modifications make the firmware image unable to be flashed (it gets to 100%, and then says "Update failed", going...