xiaomi-flashable-firmware-creator
xiaomi-flashable-firmware-creator copied to clipboard
Fix some Windows specific issues
The first commit avoids removing payload.bin
while it's still in use, which is OK in Unix-like systems but disallowed in Windows; the second uses pathlib's with_suffix
method to remove the .zip
extension without explicitly forming paths in a platform-specific manner.
I just tried flashing a zip I generated on Windows and it seems like the recovery doesn't like it... might be that the Windows implementation of shutil
generates zips that are different than the Linux ones, need to research this further
@hadeutscher First of all, thanks for the PR!
I just tried flashing a zip I generated on Windows and it seems like the recovery doesn't like it... might be that the Windows implementation of
shutil
generates zips that are different than the Linux ones, need to research this further
Hmm, You can compare a firmware of the same version made on Linux and Windows then see.
Your changes seem good, I will wait for your checking.
@yshalsager the firmware itself is binary identical to the one in the zips on your site; the zip file is slightly different though, and LOS recovery complains that it can't unpack it. I don't think I'll dig into this further right now, but I'm suspecting the Windows zip implementation doing some weird things in the format of the zip itself
@yshalsager the firmware itself is binary identical to the one in the zips on your site; the zip file is slightly different though, and LOS recovery complains that it can't unpack it. I don't think I'll dig into this further right now, but I'm suspecting the Windows zip implementation doing some weird things in the format of the zip itself
Could you upload me any example of firmware zip created on Windows please? I might be able to check it sometime soon.
@yshalsager the firmware itself is binary identical to the one in the zips on your site; the zip file is slightly different though, and LOS recovery complains that it can't unpack it. I don't think I'll dig into this further right now, but I'm suspecting the Windows zip implementation doing some weird things in the format of the zip itself
Could you upload me any example of firmware zip created on Windows please? I might be able to check it sometime soon.
Yes, I'll send you by mail since it's complicated to upload large files here