Xiaomi 4A 3-Gigaport cannot flash OpenWrt 21.02

Don't you have to use OpenWrt exploit to be able to use telnet or ssh into stock firmware?

I've not witnessed any issues flashing 21.02.2 sysupgrade.bin from stock firmware using windows method on two of my older 'Giga' models.

21.02.1 can be found here

Did you try to use MiWifiRepairTool to restore Global firmware?

Otherwise, please read last paragraph of Debricking section.
links to:

Yes I did.

Only the MIWIFIRepairTool worked for me but I can't flash the global firmware on it for some reason. As soon as the flash completes(Which is instantaneous btw), the light is white-blue and blinks rapidly and after the reboot it loads right back into the chinese firmware. (I probably should've flashed the global firmware when it was bricked but I couldn't find it at that time)

Any ideas why that might be happening? I wish the invasion just worked but welp

Out of curiosity, which chinese version is currently installed?

fwiw, have you tried resetting the router to clear down all settings back to defaults.

Then try windows openwrtinvasion method to install openwrt?

fwiw, the Windows openwrtinvasion instructions does mention how to change from chinese to global firmware, but it is not something I've tried using provided the interim v2 to v3 xiaomi file. But as openwrtinvasion exploit is not working, you won't be able to install it anyway.

Yes, I was just about to reply on that. I used the windows version and then was able to telnet into the router. I tried installing OpenWRT again but it's bricked again.....

I guess this router doesn't like OpenWRT or something? I'm gonna try unbricking it again by using the international version in the first place. Otherwise I'll try that 2to3 firmware properly and then go to OpenWRT again.

If that doesn't work either I'm just gonna return it :frowning:

Not sure why it keeps on bricking after I flash OpenWRT on it. The process on my other router was flawless..

It even has the same flash chip as the other one sigh

I think you said you used initramfs.bin on your other R4AG is may be only other difference?

Dare I suggest installing Padavan to see if it bricks the router?

I received an open box R4AG 'Giga' yesterday (PCB labelled 2019, 25Q127CSIG flash). I allowed router to autoupdate from v2.28.132 Global, to v3.x Global firmware.. I flashed it with Padavan. Earlier today, I reverted to v3 Global using MiWifiRepairTool, then flashed it with 21.02.2 using Windows method. No issues. Reverted to v3.x Global before flashing Padavan again.

made by GigaDevice. Datasheet claims this is a 128Mbit density chip.

Finally!! OpenWRT worked! Thanks a lot for helping out man!

What I did in the end is:

  1. Use the latest chinese firmware with MiWifiRepair Tool to unbrick the router.
  2. Use the Windows Tools (The russian ones) to upgrade from version 2 to 3.
  3. Use the same tool to flash OpenWRT instead of using telnet & downloading the firmware.

It finally booted up and worked. I think I should edit those bat files and add English translations in them and additionally create a new doc with better translations too.

Thanks again.

1 Like

fwiw, did you see the English instructions contained in separate folder, which I created in the dropbox?
dropbox folder

The bat files and python scripts have already been translated to English, but only ones I frequently use are, and known to work are:


ps. I've added a link to your last post to the device wiki's Debrick section regarding use of 2to3 bin file.

btw, did you keep original uboot ?

Ahhh I actually used the "OlegLOM original files hosted at 4pda.to" folder.

The other folder was named "ENGLISH instructions - Partially Tested" So I thought it simply had instuctions and nothing else......

About the uboot, I did run the "2.start_write_uboot_3.bat" file just in case. But I'm not sure if that helped or not. I don't mind testing without the uboot again if there a way to revert it? (I did take a backup though, would that restore it?)

Thanks for updating the the wiki and helping me out!

TBH, I don't know why OlegLOM advises to install new uboot, and whether the 'backup' includes backup of the uboot. I have not examined the backup script to find out what it actually does.

Of the three R4AG 'Giga', I did blindly replace the Uboot' on the first unit when following the original russian instructions before installing Padavan.

But later discovered after viewing a number of non-English YouTube videos using similar Windows based batch files, it was not necessary to replace Uboot when installing OpenWrt or Padavan. For the later two units, I kept the original uboot.

1 Like

Ohh got it. I didn't do any of this stuff on my first router just the second one gave me issues.

The first one was simple Invasion and then installation through telnet.

I'm now trying to find a serial flash chip that is more than 16MB and uses the same layout.

I've a serial programmer and it would be cool to transfer over the firmware to the new "larger" chip. Have you seen any chips like that?

Sorry, I can't help regarding your query about larger chip. It's beyond my skill level.

Unless I'm mistaken, I would also think a bigger chip would require custom firmware too, but don't quote me?

1 Like

It most definitely would, it would be quite an endeavour.

Thanks for the help though.

In step 2, what is the Windows Tools? do you mean OpenWRTInvasion ?

It's in this dropbox folder:

Hi everyone.

Sorry for a bit of an off-topic...

I just bought 2 units. Now that I looked around and found out about the issue with the darn flash chip, I am completely rattled.
Could someone please confirm if what I've got is supposed to work or if it is one of the unconfirmed cases?

The devices are bought in Europe and the production date stated on the boxes is 12/2020.
I tried to see the print on the chip through the plastic mesh, without opening it, and I think it says the following:

Would it be advisable to use OpenWRTInvasion installation method, if the chip is fine?

Thanks a lot in advance!

The Winbond W25Q128BV is mentioned in this commit

It seems to be only 'newer' models with Eon flash chip with issues reported so far.

Note you should be able to use the MiWifiRepairToolx86 to unbrick the R4AG.

Are your pair of R4AG the chinese, Giga, or Gigabit model (check label on bottom of router)?

On the label it says Mi Router 4A Gigabit Edition (R4A).

Update: If that might be relevant to anyone, 21.02 has been installed without a problem on Winbond 25Q128JVSQ (production date 12/2020).

1 Like

Does your R4AG have large RF metal shields fitted to the PCB?

No. Just one heatsink around the middle of the board.

1 Like

Reducing the frequency wont fix this issue.

Because they are new flash chip there is no support added in the linux kernel that openwrt is using.

Someone needs to add the required spi ids and test.