I'd like to install the latest OpenWRT version (as of this post) which is 22.03.5 on a Xiaomi Mi 4A 100M (Chinese version). Thanks to acecilia's great work, I was able to install the exploit, but my first attempt to install OpenWRT itself was unsuccessful and resulted in a bricked router.
I followed Hoddy's Guide to un-brick using a Windows 7 virtual machine.
Current firmware: 2.28.62 (Official version)
Root access: yes
FTP access: yes
This is where I lost track of the proper way to flash OpenWRT. acecilia's page doesn't say specifically how to use the shell for the 4A 100M (Chinese version) to load and start the upgrade process, and the wiki isn't too clear either.
From acecilia's, but adapted to my needs from the wiki: first line from acecilia's exploit redirected to the MIR3G's firmware, which is obviously not the same as the R4A:
cd /tmp curl https://downloads.openwrt.org/releases/22.03.5/targets/ramips/mt76x8/openwrt-22.03.5-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin --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
But the wiki says the last line should be:
mtd -r write firmware.bin OS1
Why would one first erase the partition but not the other?
But more importantly, is it the correct way to flash OpenWRT?
I'd rather avoid bricking it a second time.