XiaomiFirmwareUpdater / xiaomi-flashable-firmware-creator

Xiaomi Flashable Firmware Creator
https://xiaomifirmwareupdater.com/projects/xiaomi-flashable-firmware-creator/
GNU General Public License v3.0
149 stars 45 forks source link

Comparing ro.build.date.utc prevents installation when the recovery image is more recent than firmware #51

Closed MatthiasHGW closed 2 years ago

MatthiasHGW commented 2 years ago

To prevent downgrading, updater-script compares the value of ro.build.date.utc to a fixed value resembling the build date of the firmware. Unfortunately, the return value of ro.build.date.utc resembles the build date of the recovery image, preventing the installation of the firmware image when the recovery image is more recent than the firmware package (e.g. with this recovery and firmware fw_vayu_miui_VAYUGlobal_V13.0.4.0.SJUMIXM_f96a3e38af_12.0.zip).

yshalsager commented 2 years ago

This has been fixed since https://github.com/XiaomiFirmwareUpdater/xiaomi-flashable-firmware-creator/commit/e6ddc24699a7012adf9f5f1d338f7132e97ee004 (https://github.com/XiaomiFirmwareUpdater/xiaomi-flashable-firmware-creator/releases/tag/v2.2.6) All firmware packages since that date doesn't have ro.build.date.utc assert line.

MatthiasHGW commented 2 years ago

Wow, that was quick, thank you. Will you regenerate packages published before the change or would you recommend to manually remove the assert in fw_vayu_miui_VAYUGlobal_V13.0.4.0.SJUMIXM_f96a3e38af_12.0.zip?

yshalsager commented 2 years ago

Wow, that was quick, thank you. Will you regenerate packages published before the change or would you recommend to manually remove the assert in fw_vayu_miui_VAYUGlobal_V13.0.4.0.SJUMIXM_f96a3e38af_12.0.zip?

You're welcome. You will have to it manually for now, batch editing older firmware files will require much work from my side.