Do it your self Hobby

OpenWRT Xiaomi Mi Router 4A Gigabit Edition Windows 10

This tutorial is about installing Openwrt firmware to Xiaomi Mi router 4A Gigabit edition using Windows 10 pro computer.


  • Windows 10 pro
  • DockerDesktop
  • Git
  • Internet connection

First, setup your Xiaomi router and connect your windows computer using ethernet cable. On your computer open Powershell as administrator.

Install DockerDesktop with this command:

winget install Docker.DockerDesktop

Install Git

winget install Git.Git

Restart your computer

Open run Docker and accept the terms.

Run Powershell again as administrator and run this command:

docker build -t openwrtinvasion
docker run --network host -it openwrtinvasion

Enter Mi router ip: and your password

Copy ssh command listed and paste in the command line. If the connection is successful, type this:

cd /tmp
curl --output openwrt.bin

cat /proc/mtd

if you see “OS1”, then type this:

mtd -e OS1 -r write openwrt.bin OS1

Your router will restart. I would suggest removing the router internet to avoid ip conflict.

Go to your browser and enter this address:

Login with no password

Changing router’s ip

Click Network, Interfaces, edit LAN and change Ipv4 address to and save

Click Save & Apply

Wait for a few seconds and enter the address to the browser.

Connect the internet and it should work.

Xiaomi Mi 4A Gigabit Edition Custom Firmware

Download firmware here

Custom Firmware Details:

Version: 22.03.0

IP address:
  User: root
  Password: root

Local SSH port: 22
Remote SSH port: 22222

WIFI enabled
  2.4Ghz, Wifi name: MI, Key: 12345678
  5Ghz, Wifi name: MI5 (hidden), Key: 12345678

Wan, Lan: dhcp
  Lan: - 150

Added software: mwan3, autossh