xiaomi-flashable-firmware-creator icon indicating copy to clipboard operation
xiaomi-flashable-firmware-creator copied to clipboard

Fix some Windows specific issues

Open hadeutscher opened this issue 2 years ago • 5 comments

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.

hadeutscher avatar May 20 '22 10:05 hadeutscher

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 avatar May 20 '22 11:05 hadeutscher

@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 avatar May 20 '22 12:05 yshalsager

@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

hadeutscher avatar May 20 '22 12:05 hadeutscher

@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 avatar May 20 '22 16:05 yshalsager

@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

hadeutscher avatar May 22 '22 08:05 hadeutscher