### If you find issues with this document or have improvements, please contribute here: https://github.com/dgiese/dustbuilder-howto/ # This document describes the rooting method via reset method. This method was patched in newer version, but might still work with the factory version of your robot. # If you do not get a login prompt, your device might be too new or you updated the robot to a new firmware version. # In such cases, and if you are in US or Germany, please open a ticket at vaers.dontvacuum.me for help (You might want to have a firmware build before starting) It is recommended that you copy and paste the commands. Connect via UART to your robot (115200 baud, no flow control). Check this document for the pinout and further information: https://builder.dontvacuum.me/dreame/dreame.pdf Power on the robot and make sure that you can see text output. When the robot finished booting, press the "reset" button for less than one second. You should see a login prompt. If you don't, your version is too new. Use the username "root". Compute the password here: https://builder.dontvacuum.me/dreamepassword.php If successful, you should have a shell. Check the current installed version (check "fw_arm_ver"): cat /etc/os-release Run these commands to print the configuration (save output): grep "" /mnt/private/ULI/factory/* Run these commands to save the calibration (save output, outside of the robot): grep "" /mnt/misc/*.json grep "" /mnt/misc/*.yaml cat /mnt/misc/*.txt hexdump /mnt/misc/*.bin Make copies of the firmware encryption keys (e.g., to restore the robot to a factory state) cat /etc/OTA_Key_pub.pem cat /etc/publickey.pem Make sure that you save the output of the calibration and the encryption keys before proceeding Run these commands to create binary backups: mkdir -p /tmp/backup tar -cvzf /tmp/backup/misc_backup.tgz -C /mnt/misc . tar -cvzf /tmp/backup/factory.tgz -C /mnt/private/ULI/factory/ . cp /tmp/backup/*.tgz /data/ Run this command (replace SSID and password) to connect to your wifi (this will connect the robot to the internet and temporarily to the cloud): wifi_cli -c "SSID" "password" ^^^ Warning: If you do this, you MUST reset your WiFi after you installed the custom firmware. Otherwise Valetudo will not work fully. ^^^ If wifi_cli does not work, try this instead: wifi_connect "SSID" "password" ^^^ Do not use wifi_cli or wifi_connect if the robot is already in your WiFi! ^^^ Run this commands to download and install the rooted firmware: cd /tmp wget --no-check-certificate {url-of-firmware.tar.gz} tar -xzvf {name-of-firmware.tar.gz} ./install.sh Side note: You can transfer the firmware via nc or via a local webserver. In that case you do not need to use wifi_cli # If "Prepackage valetudo (only valid for manual install fw) ver. ..." has been selected during firmware build, valetudo is already in place and your robot is already rebooting. If you used wifi_cli, this step still needs to be done. Download valetudo binary to /data: https://github.com/Hypfer/Valetudo/releases Device dependent (check our website): 1C, F9, D9: valetudo-armv7-lowmem 1T, L10 Pro, Z10 Pro: valetudo-aarch64 wget --no-check-certificate https://github.com/Hypfer/Valetudo/releases/latest/download/valetudo-armv7-lowmem -O /data/valetudo Make valetudo executable chmod +x /data/valetudo Enable boot script cp /misc/_root_postboot.sh.tpl /data/_root_postboot.sh chmod +x /data/_root_postboot.sh Reboot (If you used wifi_cli, you need to delete files in /data/config/miio, reboot, connect to the robot WiFi and provision the WiFi via Valetudo): rm /data/config/miio reboot - wait for the open WiFi of the robot to show up - press the Home and Spot button at the same time (if the open WiFi does not show up) - connect to that WiFi - navigate to http://192.168.5.1 in your browser - go to settings/wifi and enter your WiFi credentials