XiaomiFirmwareUpdater/xiaomi-flashable-firmware-creator

redmi note 10 5g: seems to not work

hfmrow opened this issue · 4 comments

Hi,
I tried to get a 'non-arb firmware' version from the miui stock rom [redmi note 10 5g].
miui_CAMELLIANEEAGlobal_V12.5.1.0.RKSEUXM_b68dbc127b_11.0.zip
But XiaomiFirmwareUpdater can't find anything to extract.

$ xiaomi_flashable_firmware_creator -N miui_CAMELLIANEEAGlobal_V12.5.1.0.RKSEUXM_b68dbc127b_11.0.zip
Unzipping MIUI ROM...
Traceback (most recent call last):
  File "/home/******/.local/bin/xiaomi_flashable_firmware_creator", line 8, in <module>
    sys.exit(main())
  File "/home/******/.local/lib/python3.8/site-packages/xiaomi_flashable_firmware_creator/xiaomi_flashable_firmware_creator.py", line 41, in main
    new_zip = firmware_creator.auto()
  File "/home/******/.local/lib/python3.8/site-packages/xiaomi_flashable_firmware_creator/firmware_creator.py", line 366, in auto
    self.extract()
  File "/home/******/.local/lib/python3.8/site-packages/xiaomi_flashable_firmware_creator/firmware_creator.py", line 339, in extract
    raise RuntimeError("Nothing found to extract!")
RuntimeError: Nothing found to extract!

Maybe I'm not doing things the right way?
Do you have any idea or information of incompatibility with the device?
Thank you.

First, this device is MTK, so you can't create non-ARB firmware from its rom.

Second, you don't need to, it doesn't have ARB enabled, so use the regular firmware.

Thanks for the answer.

  • If I understand correctly, the Mtk sockets are not compatible with your script? (I didn't see a notice about this, sorry). I didn't know that.
  • You answer me that there is no ARB on my device. The fastboot command on the redmi note 10 5g gives this result:
$ fastboot getvar anti
anti: 1
  • And by digging into the fastboot stock rom image, you can find in the bash script file flash_all.sh, the code below:
fastboot $* getvar product 2>&1 | grep -E "^product: *camellia"
if [ $? -ne 0 ] ; then echo "error : Missmatching image and device"; exit 1; fi

CURRENT_ANTI_VER=1
version=`fastboot getvar anti 2>&1 | grep "anti:" | awk -F ": " '{print $2}'`
if [  "${version}"x == ""x ] ; then version=0 ; fi
if [ ${version} -gt ${CURRENT_ANTI_VER} ] ; then  echo "error : current device antirollback #version is greater than this package" ; exit 1 ; fi

I don't know if this information makes sure that ARB is enabled but I would never try to flash a stock rom that has CURRENT_ANTI_VER=0. There is a topic where it is said that the values anti= 0, 1, 2, 3, allow to downgrade the version of the rom, but if you search in the comments belonging to this article, you can find some of them that give some doubts about this. In fact, I can't be sure that there is no ARB protection on my device. So, thanks for sharing your knowledge.

Regards.

@hfmrow The tool supports MTK, but creating non-arb fw zip is limited to QCOM devices only.

Anti 1 doesn't mean it's enabled, it just means it "exists". The OEM can "increase" that value "and enable arb" to prevent rolling back to older version, in this case custom ROMs users might want to extract non-arb fw to keep the old anti value while using files from the newer firmware.

@yshalsager Thank you for these useful clarifications, have a nice day.
Regards.