Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) -- fully supported and flashable with OpenWRTInvasion

Hey hey :slight_smile:

There has been a new release of OpenWrt, version 19.07.4. I see in the release notes that this version includes new supported devices:

Device support

New devices

  • Backported support for several 4/32 devices in ath79: TP-Link TL-WR802N v1/v2, TL-WR940N v3/v4/v6, TL-WR941ND v6, TL-MR3420 v2, TL-WA701ND v1, TL-WA730RE v1, TL-WA830RE v1, TL-WA801ND v1/v3/v4, TL-WA901ND v1/v4/v5

  • Add new device in ath79: TP-Link TL-WR710N v2.1

Does anybody know why the Xiaomi 4A is not getting included in this stable release?

cc @slh

No idea why they only backport some devices. My guess is that the developers can only vouch for those, and the rest stays on the master branch, but as I said, it's only a guess.

Anyhow I just finished baking a build based on that tag with my patches. I published it here should anyone be interested:

Like my previous builds, the package selection is the basic plus what I use. It isn't too hard to make your own builds if you wish, by cloning that repo, or cloning the official one and rebasing to your liking.

But since this build is based on the stable release tag, and uses its repos, most stuff should be installable with opkg (although packages related to kernel modules don't seem to be compatible... if anyone knows how to make a build and force a certain magic number, please share and I can try, but even then compatibility probably isn't guaranteed and may brick your router).

4 Likes

I own 2 units of the Xiaomi 4A Gigabit Edition (China Edition)
The first unit if I flash with Build Zorro, Byte, Araujorm runs smoothly
The second unit only works with the Araujorm Snapshot Build https://github.com/araujorm/openwrt/releases/tag/mir4ag-19.07-20200722

After I unpacked the box and checked the IC flash there was a difference, the first made GigaDevice and the second was WinBond

In the meantime I conclude, if the router with the WinBond manufacturing Flash IC is only suitable for the Araujorm Snapshoot build ( 20200722 ) and if it is a GigaDevice then all builds are fine.

WInbond1 GigaDevice

I don't know why that is, whether the influence of the kernel or the difference in the quality of the Flash IC brand or Is it possible that the device has been counterfeited so that it has a different FLASH IC

Hopefully this information can be input for all of you.

1 Like

The reason:

Thanks @araujorm.
Have just flashed upgrade image via LuCI portal keeping existing settings.
No issues seen so far.
FYI, I have GigaDevice gd25q128.

Hello acecilia, I can confirm that with latest firmware I still can run exploit and can access telnet CLI of my router, great work. Another thing to note:
pycryptodome - can replace pycrypto (deprecated) - on windows instalation with python 3.7-3.8 is required to do so, otherwise this command cannot work: pip3 install -r requirements.txt

Can you please confirm that this exploit works with "pycryptodome" on Mac or linux?

2 Likes

@GoTex By latest, are you referring to 3.0.24 ?

Yes, Brett.

1 Like

Hey guys i am new here,

I just wanna ask about a problem since i couldn't find any other forum for xiaomi's this product.

I didn't use openwrt or any other thing, i was using router as stock software. It's global version of 4A Gigabit.
However this monday when i woke up, i saw that router isn't working. There is stable orange light instead of blue one. I made some research on google and i think it's on bootfail status. I tried to reset reset modem with reset button however it's still on the same status. I am trying to reinstall its stock latest software however i can't access to router from browser. Computer keeps seeing as ethernet device but saying no internet connection.

I am open to any suggestion from you precious members of this forum to fix my device :frowning:

can anyone point me to the recovery guide using tftpd?

Please try searching the topic for "guide". You'll find this post and perhaps others:

It has some videos that may help. Other than that, can't help much further since I've never tried any of these guides as I used a flasher to unlock mine (a year ago, when there was no exploit available) and thus never needed these.

1 Like

You can try @hoddy's debrick guide. See the post I mentioned above. If it doesn't work, probably will be a hardware failure :frowning:

1 Like

Try another power adapter; the one that ships with the unit is really lousy.

You need 12 volts DC, 5.5 x 2.1 mm plug, center positive, and at least 1 amp. This is a rather standard size plug.

1 Like

I've just tested this using Ubuntu 20.04 and it worked:


3 Likes

It's difficult to get to work in Windows but it can be done, its much easier to run in Linux, I made a video that shows you how to do it plenty of links here to that (I'm trying not to spam!). In the description of that video I also have a link to a video on how to set up a VM so you can run Linux (Ubuntu) in windows. Hopefully, this will solve your issues.

Did you manage to find the way to download the firmware ?

watched your videos on youtube Installing OpenWrt on the Xiaomi 4A will it work on version 2.18.28 ? i cant download the latest version

1 Like

Hi is that firmware would work on my Mi 4A Non Giga ?

Yes, it will work.

1 Like

It's not that difficult to make it work on windows, If there is a right package "pycryptodome" instead of pycrypto which is deprecated. I would suggest to change requirements.txt from acecilia github, since it's confirmed working on linux by Brett. I can make quick tutorial if someone wants to run under windows, if there is an interest give a like to my post. BTW - hoddy if it was not clear I was having issues with deprecated package pycrypto. Never with acecilia instructions on how to use this exploit.

3 Likes