根据 https://github.com/PatriciaLee3/wr30u_ssh https://github.com/hqvv/wr30u_ssh 进行SSH破解, 里面对路由器的设置是必须的,否则破解不了。另外Ubuntu上也可以进行操作,也比较简单,就是把网线连接里面的IPv4设置成"shared to other computers"
网线从wan口换到任意的lan口。
在 https://github.com/hanwckf/bl-mt798x 下载最新的uboot,解压文件出来,在里面找到mt7981_wr30u-fip-fixed-parts-multi-layout.bin文件,
利用scp传到服务器上,如果遇到错误
ash: /usr/libexec/sftp-server: not found
scp: Connection closed
在可以在scp后加上-O参数,这是因为新版的scp客户端需要用sftp-server进行沟通,而openwrt上没有sftp server,加上参数后使用老的协议传输。
利用命令刷入uboot
mtd write /tmp/uboot.bin FIP
如果出现错误
Could not open mtd device: FIP
Can't open device for writing!
可以用下面办法解决
#直接用opkg在线安装,如果碰到ssl错误,可以考虑更新同步更新一下路由器时间
opkg update
opkg install kmod-mtd-rw
#或者手动下载安装
https://downloads.openwrt.org/releases/[openwrt-version]/targets/mediatek/filogic/kmods/
insmod mtd-rw i_want_a_brick=1
mtd write /tmp/uboot.bin FIP
uboot刷写完成后,拔掉电源,先按住reset键,再插入电源保持10秒,目的是让路由器启动到uboot。
然后把电脑的共享关掉,然后把IP地址设置成静态地址,网段是192.168.31.0/24,比如192.168.31.2,这一步注意,不是192.168.1.0/24的网段,
这里很容易注意到不到,然后以为自己刷写错误,进不去uboot。
进入uboot webui之后,mtd layout选择default,然后就可以刷入OpenWrt原版的系统了。比如https://downloads.openwrt.org/releases/24.10.2/targets/mediatek/filogic/openwrt-24.10.2-mediatek-filogic-xiaomi_mi-router-wr30u-stock-squashfs-sysupgrade.bin
然后就可以正常的进入系统了。
- 已我的理解,在刷uboot的时候,选择multi-layout版本,是为了兼容更多的系统镜像。比如第三方更大可用空间的版本,但是我没有尝试,原版就够我用了。
- 有些教程提到用ubi进行一些分区操作,可能我是用的原厂OpenWrt,没有使用大分区的,所以只是直接刷,目前当作AP使用,没有遇到问题。
https://www.cnblogs.com/dingshaohua/p/18821929
https://www.cnblogs.com/dingshaohua/p/17986926
https://cmi.hanwckf.top/p/mt798x-uboot-usage/
openwrt/openwrt#12770
https://fire0594.com/tech/openwrt-on-xiaomi-router-wr30u/
https://www.right.com.cn/FORUM/thread-8417278-1-1.html
https://www.right.com.cn/forum/thread-8328967-1-1.html
https://blog.qust.me/wr30u
https://www.right.com.cn/forum/thread-8265832-1-1.html