XiaomiFirmwareUpdater/xiaomi-flashable-firmware-creator

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

MatthiasHGW opened this issue · 3 comments

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).

This has been fixed since e6ddc24 (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.

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?

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.