line-by-line English translation of the relevant section from
https://www.right.com.cn/forum/forum.php?mod=redirect&goto=findpost&ptid=4049030&pid=10350663
2 Flashing Breed
2.1 Find bad flash modules in router (could skip, optionally check later if firmware flashing fails)
2.1.1 Commands for finding bad flash modules
dmesg | grep NAND
dmesg | grep '[B|b]ad.*block'
dmesg | grep eraseblock
Possible outcome after issuing the commands above
2.1.1.1 Nothing returns, not even after searching in logs, then reboot router and repeat the commands.
2.1.1.2 Commands return lines about "ESMT", but no log entry about bad ESMT flash,then no bad flash has been found.
2.1.1.3 Typically output includes entries about Toshiba flash: bad block 768. However, firmware flash proceeds fine.
2.1.1.4 Does have Toshiba flash and firmware flashing runs into problems, as pictured below,bad block 90+768,searching “90” for other values,speculated to be related to qualities of Toshiba flash.
2.1.2 Analysis (ignore)
2.2 Backing up firmware
2.2.1 Command to check current partitions
cat /proc/mtd
2.2.2 Command to back up firmware
mtd0-10 are all firmware and partitions,including mtd0 for programmable firmware
2.2.2.1 Comletely back up the firmware (not recommended, Editor's Note: it will use 100% of /tmp)
dd if=/dev/mtd0 of=/tmp/all.bin
mtd0 contains programmable firmware, including all the contents of mtd1-10, could back up all of them if you want to
after issuing command, must copy /tmp/all.bin off the router, such as to a computer (use SFTP/SCP if proficient with commandline SSH)
if unsuccessful with commandline, use for example newest version of MobaXterm or Xmanager or winscp), then execute the next command (below), to avoid running out of /tmp space
2.2.2.2 only back up BootLoader(recommended)
dd if=/dev/mtd1 of=/tmp/bootloader.bin
after issuing command, must copy /tmp/bootloader.bin off the router, such as to a computer, then execute the next command (below)
2.3 Flashing breed (right.com.cn tutorial)
2.3.1 Download breed
filename: breed-mt7621-xiaomi-r3g.bin
Hackpascal official link (recommended) :https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin
Baidu Cloud mirror: https://pan.baidu.com/s/187L8X0kdLFN7YbvbAZP2EA password: p6p2 (Baidu mirror may not have the most up-to-date breed,please use realtime judgment)
2.3.2 Flashing the immortal Breed
2.3.2.1 Copy breed-mt7621-xiaomi-r3g.bin to /tmp
2.3.2.2 Issue the command
mtd -r write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader
2.3.2.3 Wait for the router to reboot(When the PC obtain IP address, or when the router has only one blue LED on,breed is now successfully flashed)。
2.3.2.4 To avoid bricking your router,it is strongly recommended to wait for 5 minutes before powering off the router,use a toothpick to hold down the reset button,then reconnect power, wait for blue LED to start flickering,then let go of the reset button,use a web browser to visit the breedweb interface at 192.168.1.1.
When entering breed for the first time, remember to back up the programmable firmware and eeprom.
2.3.2.5 Change the env (environment) variable,edit and Add "xiaomi.r3g.bootfw", set value to 2, click Save. (Editor's note: Or, use the Russian method, add "autoboot.command", set to "boot flash 0x600000.)(else, when flashing non-factory firmware, the LED indicator could alternate between blue and black (boot loop))
2.3.2.6 By now, your router has been successfully flashed with breed.
PS:Do not recommend using breed for restoring stock factory firmware,which could lead to unpredictable errors!!Please find tutorial on using the manufacturer's software to restore the BootLoader!!!