# This root was possible by the generous donations to the vacuum robot buying fund # Especially I want to thank Vtel (https://github.com/zvldz) for his donation # go to dustbuilder.dontvaccum.me and generate a firmware for your robot # for S5 Max: https://dustbuilder.dontvacuum.me/_s5e.html # for S6 Pure: https://dustbuilder.dontvacuum.me/_a08.html # for S4 Max: https://dustbuilder.dontvacuum.me/_a19.html # connect uart to the robot (115200 baud, no flow control) # power on the robot while pressing the "s" key. you should get into the uboot shell ("sunxi#") # you need to press the power button for 3 seconds for the device to power up # force to boot system B setenv boot_fs b setenv nand_root /dev/nandf setenv setargs_nand ${setargs_nand} init=/bin/sh boot # disable watchdog after linux is booted (you have 7 seconds) echo 'V' > /dev/watchdog # start required system services mount -n -t proc none /proc mount -n -t tmpfs none /run mkdir -p /run/shm mount -n -t tmpfs tmpfs /var -o size=30m mkdir -p /var/tmp /var/log /var/modules /var/lib/misc/ /var/lib/dhcp ln -s /run /var/run mkdir -p /dev/pts mount -n -t devpts none /dev/pts mount -n -t sysfs none /sys ln -s /run/shm /dev/shm echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s /etc/init/S01logging start /etc/init/S02hostname start /etc/init/S02network start /etc/init/S02rrboot start /etc/init/S03mountall start # change SSID and password, skip this if your robot was already connected to your wifi before echo ssid=\"your WiFi SSID here\" > /mnt/data/miio/wifi.conf echo psk=\"your WiFi password here\" >> /mnt/data/miio/wifi.conf echo key_mgmt=\"WPA\" >> /mnt/data/miio/wifi.conf echo uid=0 >> /mnt/data/miio/wifi.conf echo region=us >> /mnt/data/miio/wifi.conf echo cfg_by=miot >> /mnt/data/miio/wifi.conf echo 0 > /mnt/data/miio/device.uid echo "us" > /mnt/data/miio/device.country # this connects the robot to the wifi /opt/rockrobo/wlan/wifi_start.sh # cleanup log files rm -rf /mnt/data/rockrobo/rrlog mkdir /mnt/data/backups cd /mnt/data/backups dd if=/dev/nanda | gzip -9 > nanda.dd.gz dd if=/dev/nandb | gzip -9 > nandb.dd.gz dd if=/dev/nandc | gzip -9 > nandc.dd.gz dd if=/dev/nande | gzip -9 > nande.dd.gz dd if=/dev/nandg | gzip -9 > nandg.dd.gz dd if=/dev/nandh | gzip -9 > nandh.dd.gz dd if=/dev/nandi | gzip -9 > nandi.dd.gz dd if=/dev/nandj | gzip -9 > nandj.dd.gz cd /mnt/data/backups tar -czvf robot-backup.tar.gz *.gz rm *.dd.gz # Click on the directory/netcat link in the dustbuilder email, and select start_server.php # Start the streamer and copy the command line from it, and execute it on the robot # e.g. nc builder.dontvacuum.me $port | dd of=/mnt/data/update.tar.gz cd /mnt/data/ tar -xzvf update.tar.gz md5sum -c firmware.md5sum # DO NOT PROCEED IF YOU DID NOT GET "OK" FOR BOTH FILES!! # Write firmware for system A dd if=boot.img of=/dev/nandc dd if=rootfs.img of=/dev/nande # power off the robot # force to boot system A setenv boot_fs a setenv nand_root /dev/nande setenv setargs_nand ${setargs_nand} boot # if update was successful, you should be able to SSH into the robot (user:root) # after SSH, update system B # !! DO NOT PROCEED IF THE SYSTEM SEEMS UNSTABLE OR REBOOTS !! cd /mnt/data/ dd if=rootfs.img of=/dev/nandf # check that you have 35Mbyte free on /mnt/data df -h # this step activates valetudo cd /mnt/data/ wget https://github.com/Hypfer/Valetudo/releases/download/2021.01.1/valetudo -O valetudo chmod +x valetudo cp /root/_root.sh.tpl /mnt/reserve/_root.sh chmod +x /mnt/reserve/_root.sh