acecilia / OpenWRTInvasion

Root shell exploit for several Xiaomi routers: 4A Gigabit, 4A 100M, 4, 4C, 3Gv2, 4Q, miWifi 3C...
1.54k stars 278 forks source link

Xiaomi Mi Router R4AG. Can`t complete OpenWrt install successfully #152

Closed azimut3 closed 2 years ago

azimut3 commented 2 years ago

For those who struggle with installing OpenWrt after the invasion script is applied, check if you selected the correct OpenWrt version to install on your router. I downloaded the stable release from this page as it was suggested in one of the comments on a forum . The link for stable release download page (xiaomi_mir4a-100m-squashfs-sysupgrade.bin).

When I used a link for release from this page I was forced to use --insecure to run a command and install correct OpenWrt version.

cd /tmp
curl --insecure link --output firmware.bin # Put here the URL you want to use to download the firmware
./busybox sha256sum firmware.bin # Verify the firmware checksum before flashing, very important to avoid bricking your device!
mtd -e OS1 -r write firmware.bin OS1 # Install OpenWrt

In case you bricked your device, you can follow the instructions in this comment The only difference for me was the fact that it worked only with automatic IP settings and sometimes it took a few reboots of the router before firmware was automatically uploaded by MIWIFIRepairTool. Just tried a few times before it worked.

Hopefully, this note can save someone`s time significantly. Best of luck

RadioOperator commented 2 years ago

more remarks before you try to install openwrt on R4A / R4AG:

  1. If the rom IC is Eon or CFeon EN25QX128A, Do Not use any official openwrt build, because the kernel not support for now, you have to use a special build for the chip.
  2. If your xiaomi factory fw is version 2.30.20 or later, be careful it's the R4AGV2, openwrt still not support the version.

more info, please check openwrt WiKi.

RadioOperator commented 2 years ago

@azimut3 did you try to upgrade the factory fw to 2.28.69 ?

I'm using 2.28.69 on my 4AG, no Bus Error on it, any openwrt build ok.

Veoxys0910 commented 2 years ago

@RadioOperator It was me that got the Bus Error, but I still was able to install OpenWRT.

azimut3 commented 2 years ago

@azimut3 did you try to upgrade the factory fw to 2.28.69 ?

I'm using 2.28.69 on my 4AG, no Bus Error on it, any openwrt build ok.

I was able to install everything successfully and decided to give a hint to someone who can be stuck like me. My Mi firmware version was 2.18.58. I also had a bus error and my issue was resolved with another version of OpenWrt that I left a link to in the original comment. Thanks for your attention. Maybe 2.28.69 can also be an option to resolve such an issues

Probably I will close the issue now.

RadioOperator commented 2 years ago

@azimut3 Sorry. Need to confirm your 4A model number, I'm talking an R4AG (R4A Gigabit) version also refered in this title. 2.18.58 maybe for R4AC (100Mbit) only, could not upgrade to 2.28.69.

azimut3 commented 2 years ago

@RadioOperator yes, I have R4AC (100Mbit) and I used 2.18.58