Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot flash OpenWRT on Mi Router 4A 100M (Chinese version) firmware 2.28.62 #176

Open
Cubytus opened this issue May 21, 2023 · 1 comment

Comments

@Cubytus
Copy link

Cubytus commented May 21, 2023

Hi there,

I have the Chinese version of the R4A router with stock Xiaomi firmware 2.28.62.

From a Mac, I was able to successfully run OpenWRTInvasion and get a root shell (Python has to be installed first of course). I ignored the instructions to build an image using Docker since I didn't find it made much sense to install a heavy app just to build an image that's already compiled. I also connected a serial console though I haven't found yet how to pause the scrolling.

Since the flashing instructions didn't appear right, I adapted them to my needs, mostly following OpenWRT's wiki page. The original instructions in this project call for mir3G firmware, which is obviously incorrect. Adapted instructions are:

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 # 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
(many times using curl results in a failure to reach the host using IPv6. I don't know the reason of this failure since I never had any IPv6 connectivity, so I just used a FTP client to upload the firmware to the router)

Upon successfully checking SHA256 and rebooting, the router is stuck in an infinite rebooting loop. The serial console always shows a LZMA error (non-specific) just before rebooting.

I then restored the Xiaomi-provided firmware using Hoddys Debrick Tools and a Win 7 virtual machine, which installed version 2.28.62, twice (two failed attempts).

What would be the correct way to flash this router?

  1. Follow wiki's instructions: first flash an older version of the firmware (2.18.28) by TFTP (same as debrick method), then run OpenWRTInvasion, then flash current (22.03.5) sysupgrade image in OS1 mtd partition?
  2. Ignore wiki's instructions: first use OpenWRTInvasion on 2.28.62 firmware as it appears to work anyway, then flash 22.03.5 version of kernel image in OS1 partition, then use SSH access to re-flash sysupgrade image in OS1?
  3. Something else?
@ngn13
Copy link

ngn13 commented Aug 5, 2023

having a similar problem
you need to flash the kernel image first, not the sysupgrade image (wiki is incorrect)

you can then ssh into the openwrt but im not sure how to do the sysupgrade, I tried using the sysuprgade image from the wiki and followed generic.sysupgrade, first I tried installing the sysupgrade using the luci interface and ended up bricking the router, I tried again, this time with the sysupgrade command, same result

now idk what to do, guess ill try installing different versions, please let me know if you resolved this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants