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

those python scripts works fine for me as well, using it on other xiaomi router that is exploitable with OpenWRTInvasion. its just that you can only use the 0.start.main to get telnet access. after that you can just go do things manually via telnet.

Tested it with a Chinese version of Router 4A 100M and it works fine.

1 Like

Hi, I used your instructions, the LED started flashing blue, so I turned the router on and off, but I couldn't connect to the router. Don't know where the mistake might be?

you need to turn your Internet adapter option again to normal what i mean revert back to connect to your router

I'm not entirely sure what your answer means. I reset the network adapter on the computer, but DHCP does not work on the router. If I look in Wireshark, you can see that the computer is asking for an IP address, but it will not get an answer. So the computer sets the default IP address and mask.

I also tried to set the static IP address of the computer 192.168.31.2 255.255.255.0 and the default gateway 192.168.31.1, but nothing happened the router is like dead. So I think it probably just failed to install the firmware properly.

I proceeded as follows:

  1. I set the static IP address on the PC 192.168.31.100 and the mask 255.255.255.0.

  2. I ran RepairTool, selected the firmware path, then selected the network adapter.

  3. Then I started the router while holding the Reset button.

  4. In Wireshark I saw the communication between the router and the computer, when the firmware was uploaded to the router. The router started flashing blue, so I turned off the router.

  5. I reset the DHCP address retrieval and the router turned on again normally.

Either I'm making a mistake somewhere during the installation or I have bad firmware that just doesn't work on my router.

Link to the router where I bought it.

I chose the 4A 1000M Gigabit version.

Does anyone have experience with this?

Hi, @db260179 do you plan to release your v1.5-stable soon?

Hello, are you waiting at least 10 minutes after the led flashes blue?
After that put the dhcp configuration in default on your computer and restart the router

I tried to reinstall the firmware, I waited about 20 minutes, the blue LED was still blinking, I restarted the router, and nothing happened. So should I wait for the LED to stop blinking blue?

Hello all,
Is this device ready for the next OpenWrt stable version? Or is there any other work left to be done?
Thank you.
ulpian

What firmware are you using in the repair tool?

If you are using a chinese version of the router you must use the chinese firmware.

If you are using an international version of the router you must use the international firmware.

Try to connect the router in the last window of the repair tool.

I connected the router in the last window of the repair tool. I looked at what version I actually have and I probably have the Chinese one, but I only installed the global firmware. I tried to find the Chinese firmware on the Internet, but without success. Would there be anyone here who has a link to the Chinese firmware? Thanks

So I finally found a solution and the router started up. The error was in the firmware, because I could not download the firmware on the official site, so I tried to download from other sources and it was an error.

Here I downloaded the repair tool and the correct firmware to my router. However, if he wants to download, you will see access denied.

link to Repair tool

bad server - http://bigota.miwifi.com/xiaoqiang/tools/MIWIFIRepairTool.x86.zip

functional server - http://cdn.cnbj1.fds.api.mi-img.com/xiaoqiang/tools/MIWIFIRepairTool.x86.zip

If you can't download it after clicking on the link, then instead of "http://bigota.miwifi.com/" put "http://cdn.cnbj1.fds.api.mi-img.com/" and you should be able to download anything.

Repair procedure:

  1. First I changed the IP address of the network adapter to 192.168.31.100 and the mask 255.255.255.0.

  2. I ran the Repair tool and selected the firmware I downloaded from miwifi.com. The link above, you must click on the ROM section.

  3. Next, I selected the configured adapter, through which I connected to the router and continued to the next window.

  4. At this point, I turned on the router while holding down the reset button for 8 seconds. The router started blinking yellow and the computer screen displayed sending firmware to the router.

  5. The router started to glow yellow, there was no blue flickering, only the yellow light was on. So I disconnected the router from the electricity. I set the IP address retrieval automatically (DHCP) on the PC and started the router. A moment after turning on the router, it looked like it was still dead, but after a while it started up and a setup page appeared in my browser.

PS. As it seemed that the router would not start even after I uploaded the software, I tried to connect it to the Internet to the WAN port. However, I have not verified this, whether it affects it or not. It's possible that the router just needed time to get started.

1 Like

Hello Everybody! Does anyone know where I can find 2.28 or 2.58 chinese rom?

I have very little knowledge in general about programming, python also new thing for me.

I successfully edited the main.py (0.start_main.bat) in that script to work in my ubuntu guest (virtual box) borrowing some line from @acecilia OpenWRTInvasion remote_command_execution_vulnerability.py file.
Note: The whole script folder included in my test, go to that directory via terminal and type/run
python3 0-Main_Ubuntu.py (just like in OpenWRTInvasion tutorial+video)
Pastebin : 0-Main_Ubuntu.py

From that script line, I also made modification to OpenWRTInvasion remote_command_execution_vulnerability.py file so we only need to enter the router password instead of stok number
Pastebin : vulnerability-stok+password.py

FFS, can someone please give me a CONCISE reply as to what the hell I'm supposed to do to get openWRT on latest revision of this router? Every, EVERY single guide or write-up I come across either has idiotic "EDIT: this is not actual anymore use X" and no damn mention of X or where to get it or find it, or it has comments saying method is wrong and dangerous and outdated like this video

or it just some sketchy custom-build russian stuff like this nonsense:
https://4pda.ru/forum/index.php?showtopic=988197&st=0#entry95012258

Like, what in the everloving frick is going on? Look, I understand openWRT itself has no support for it and unstable, but I just want to setup a battletested revision someone was running for a few month and can say is stable even if it lacks like 90% of features. All I need is Luci, support for LAN and wifi and separation of LAN and WIFI (and may be packet dumper tool). Literally the most normie needs but I cant find a single info on how to properly backup my current FMW and flash new one without bricking it because apparently every single out there is no longer relevant.

Jesus Christ I'm mad.

Then move over to another router which has "better" OpenWRT support. Which boils down to a device that is supported by 19.07.5

2 Likes

I didn't ask you the advice which router to use, so may be next time read the post you are replying to before making a snarky unrelated remark.

well maybe he's trying to tell is, instead of rambling of the issue, how about help fixing the issue or fix it for your self.

we know that mediatek in general is still have general stability issues on OpenWRT, so this is where we submit some ideas, reports, etc.... to resolve the issue not something you rambling about because you cant normally use your router after flashing openwrt on it or cant flash openwrt on it

Another one didnt even bother to read my post where I specifically addressed these "le stability issues" beforehand so randoms wont try to drag discussion that way. Obviously it didnt work.

My main questions are:

  1. Do I need to upgrade bootloader to new uboot3 version that support the recovery loading via TinyPX? Because no one here ever mentions it but in this guide: https://4pda.ru/forum/index.php?showtopic=988197&view=findpost&p=95240419 it is mentioned as recommended before doing anything. So, default stock bootloader FMW on 4AGig actually does not have this ability, why people suggest to use that then when it does not work clearly?
  2. If I back up original OS1 cant I just restore it back by flashing it again into OS1 partition? Why is every rollback method either use flasher or recovery mode via botloader?
  3. Why can I just mtd -e OS1 -r write /tmp/firmware.bin OS1 when the mtd structure between 4AG 2.x and 3.x is completely different?

i followed this guide step-by-step last summer and am still running openwrt to this day without any issues.

edit: not sure about backups and partitions though, so i guess you're out of luck on these issues

1 Like

Ok, update on new, never mentioned anywhere before 2.28.65 - the exploit is completely fixed, you can still upload payload but the netspeed test API wont process non-proper URL and always returns default 0 values without executing commands

BE CAREFUL WHEN BUYING NEW CHINESE MODELS - IF IT HAS FMW HIGHER THAN 2.28.62 - IT WONT WORK

UPD: swapped to international with additional pay and flashed db69 v1.3 first time

2 Likes