The installation guide points to the OpenWRTinvasion script to flash the router:
I have Python3 installed on my Linux laptop.
Before proceeding with the installation, I have a question regarding the following note on the OpenWRTInvasion Github page:
" NOTE: FROM VERSION 0.0.2 THE ROUTER NEEDS INTERNET ACCESS."
How can I ensure that my router has internet access during the installation? You typically connect the router on the WAN port via a lan cable to the ethernet port of the laptop, which is then offline during the flashing process.
Is there a way around this requirement or how can you serve the router internet access via the laptop?
It can download busybox to your pc and upload to router, just one of 2 needs internet. And it is not permanent - no busybox, just restart connect and try again.
There is script_tools/busybox.mipsel that will be uploaded in absence of internet connection.That line in readme is moot.
Exploit is in memory only, you have unlimited tries.
Courage, my friens, and run script to record your terminal for replay.
Wouldn't it be possible to simply connect a second USB-ethernet card to my laptop so that I can connect to the WAN port of the Xiaomi router while connecting my laptop via the standatd built-in ethernet port to my normal router (internet facing)?
Wouldn't that meet the internet connectivity requirement of the OpenWRTInvasion script without any further difficulties?
You dont need connection, script gives question - do you want to use existing busybox, download via router or download from host.
Worked for me 3 times
invasion script starts webserver with included busybox, extracts stok, like you dont have to copy paste anything. Just press "enter" 7 times and you are ready to flash OpenWRT.
Worked like that both times i tried, looking at screen recordings in invasion checkout directory 02/2019 and 08/2022
Temporary processes in temporary filesystem:
16917 root 0 SW [kworker/u2:2]
18787 root 1740 S < ./busybox telnetd
18789 root 1740 S < ./busybox tcpsvd -vE 0.0.0.0 21 ./ftpd -Sw /
18908 root 564 S < /tmp/dropbear/dropbear
19608 root 1804 S sleep 120
19645 root 1804 S sleep 300
19662 root 640 R < /tmp/dropbear/dropbear
19667 root 1820 S < -ash
19677 root 1812 R < ps
I would reset device first, may help if some self-protecting backdoor is active....
In openwrt luci web interface System/Software...
Update lists, then type in filter zram-swap, install it.
Then also install luci-app-attendedsysupgrade and upgrade to 23.05.3
If you like command lines try wiki or we give you links.
Just for info, for many Xiaomi routers there is no need to connect them to the internet for setupt to complete. You could just connect WAN and LAN1/2 with ethernet cable, then the router sees itself as upstream router. Your PC then gets IP in 192.168.28.0/24 (important for OpenWRTInvasion). For xiaomi 4C there was a bug, where TX power was limited. I wonder if it is still there. There are some workarounds online.