zvldz / vacuum Goto Github PK
View Code? Open in Web Editor NEWfirmware builder for roborock (gen1/gen2)
License: GNU General Public License v3.0
firmware builder for roborock (gen1/gen2)
License: GNU General Public License v3.0
Hi,
First thank you for development of this project!
My cleaner has been running 1898 for some time now without any issue.
I tried to upgrade to 2020 (generating an image with the same options as with the 1898 firmware) using flasher (dustcloud), mirobo or Valetudo (url+md5) without success.
The new firmware is downloaded but after some minutes it reboots and says it kept the previous firmware as the new one is NOT OK.
Do I need to reset the cleaner to factory firmware to upgrade?
Is there a way to write the new firmware directly on the vacuum cleaner by manually (using bash) extracting the firmware and writing it to a partition (dd)?
Thanks!
Gen2 vacuum on FW v2008 with miio client 3.3.9 does not allow local (http) OTA firmware updates.
OTA updates using https links with valid certificates are working with local OTA update.
This patches the check in AppProxy to allow LAN updates on HTTP for v2008 firmware with miio 3.3.9, so scripts like flasher.py
can still work:
sed -i 's/\x7F\xF4\x29\xAF\x13\x79\x03\xF0\xDF\x03\x53\x2B\x7F\xF4\xCD\xAC\x21\xE7\x38\x46\xF0\xF7\xE2\xEB/\x7F\xF4\x29\xAF\xD3\x78\x03\xF0\xDF\x03\x50\x2B\x7F\xF4\xCD\xAC\x21\xE7\x38\x46\xF0\xF7\xE2\xEB/g' AppProxy
Pattern:
Original Hex: 7F F4 29 AF 13 79 03 F0 DF 03 53 2B 7F F4 CD AC 21 E7 38 46 F0 F7 E2 EB
Patched Hex: 7F F4 29 AF D3 78 03 F0 DF 03 50 2B 7F F4 CD AC 21 E7 38 46 F0 F7 E2 EB
md5sum of patched AppProxy for v2008 is fb89529e947607a8cf7dd965dcd2f057
vacuum_valetudo and vacuum_valetudo_re
Hi everybody,
I would like to create a custom image with the following command:
sudo ./builder_vacuum.sh --run-custom-script=ALL \
--timezone=Europe/Berlin \
--ntpserver=x.x.x.x \
--public-key=../.ssh/id_rsa.pub \
--enable-greeting \
--disable-logs \
--replace-adbd \
--valetudo-path=./Valetudo \
--replace-miio \
--enable-dns-catcher \
--enable-ramdisk \
--fix-reset \
--soundfile=./sounds/mysounds.pkg \
-f ./firmware/v11_002008.fullos.fd043420-6ddb-4e54-bdb7-a8deec19f0fd.pkg
But I get error messages that the remaining space is not enough. I get messages like these:
sed: couldn't flush /some/folder/fw.cjOoh6/image/etc/sedATSz0N: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
cat: Schreibfehler: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
tar: ./etc/init/S09xdnsmasq: Funktion write fehlgeschlagen: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
And so on. If I remove one command like --valetudo-path or --soundfile the file generation seems to work. My filesystem has about 6 GB left, so now I'm wondering what is the cause of these errors. Does that mean, that the root partition of the S50 is not large enough to handle all of my customs?
P.S. I'm working with Linux Mint in Virtual Box. Can this be a problem?
When Roborock switched from Upstart to Busybox on 2008+ for Gen2, OOM adjustment for valetudo was lost. Reintroduce this feature for added operational safety. Implementation is through a sub shell, which adjusts its own OOM score and then execs the valetudo binary, replacing itself.
--- valetudo-daemon.sh.orig
+++ valetudo-daemon.sh
@@ -15,7 +15,12 @@
echo "Running Valetudo"
echo '|/bin/false' > /proc/sys/kernel/core_pattern
if [ -f "/root/bin/busybox" ]; then
- /root/bin/busybox ionice -c3 nice -n 19 /usr/local/bin/valetudo >> /var/log/upstart/valetudo.log 2>&1
+ (
+ # Make valetudo very likely to get killed when out of memory
+ echo 1000 > /proc/self/oom_score_adj
+ # Also run it with absolutely lowest CPU and I/O priority to not disturb anything critical on robot
+ exec /root/bin/busybox ionice -c3 nice -n19 /usr/local/bin/valetudo >> /var/log/upstart/valetudo.log 2>&1
+ )
else
nice -n 19 /usr/local/bin/valetudo >> /var/log/upstart/valetudo.log 2>&1
fi
root@dexter:/home/florian/Schreibtisch/TEMP/vacuum_re/vacuum# ./builder_vacuum.sh --replace-adbd --enable-appproxy-patcher --enable-addon --dnsserver="192.168.0.3" --enable-history --ntpserver=192.168.178.1 --enable-turn-off-ny --disable-logs --disable-firmware-updates --replace-miio --soundfile=../de.pkg --public-key=../authorized_keys --timezone=Europe/Berlin --valetudo-re-path=../valetudo/ --firmware ../v11_001898.fullos.a5a3abad-09c1-4285-88c9-9640ec7b3e88.pkg
--dnsserver does not take an argument
Hello back:)
I built my firmware on linux:
Then I uploaded it:
The result:
the current build is an old build I tried with dustbuilder, this is not your vacuum build
Also no files added, for example oucher.yml,oucher.conf, ect
Thanks for help
All text code:
https://hastebin.com/eyezadawuz.coffeescript
Hey really nice tool,
I need it for oucher but I think you did not upload it yet ?
I tried to build myself, on mac os seems not working 🈂️
thanks !
Hi,
I own 2nd genenration of Roborock (S55). It was purchased from the EU stock and therefore it was locked to EU region.
I've flashed your pre-built FW: vacuum_2prc_1910.pkg and successfully get rid of the lock. I was able to connect vacuum to China mainland servers. However, I wanted to build my own FW and therefore I've done a factory reset of the device. After that I was not able to use the vacuum with EU nor China servers. MiHome app was saying that device is locked to China region on both servers! Yes even if I was connected to China Mainland! I ended up with flashing the vacuum_2prc_1910 FW back to device.
I would be very grateful if you can advice how is the region lock bypass done in your prebuilt FW and how can I patch it myself.
Thanks!
Hi,
also i am missing information for example why should i need AppProxy patch to disable timezone checking?
Regards,
Florian
Could you implement a new parameter to configure/set a remote syslog-server (IP:Port
) directly during image building?
For ubuntu-firmware it will be necessary to add the following line at the end of file /etc/rsyslog.conf
:
*.* @IP:Port
For busybox firmware it will be necessary to replace line 3 of /etc/init/S01logging
:
original: SYSLOGD_ARGS=-n
new: SYSLOGD_ARGS="-n -R IP:Port -L -O /var/log/messages"
Greetings
Hello and thanks for this repo..
I tried building gen 1 4007 with valetudo 0.5.0 but valetudo is acting strange, not autostart, no service..can start from /bin but I think some problem with the package perhaps?
could you build one please? :) thanks
Is there any other way to install Valetudo with vacuum_2008_beta4 because my standard way to update firmware doesn't work.
After install of vacuum_2008_beta4.pkg I can't update any other firmware (e.g. Valetudo).
miio inform me
ERROR:miio.updater:No request was made..
rrcc give me a error:
Robot does not send firmware package request!
Make sure your firewall accepts incoming tcp connections for 192.168.6.17 -> 192.168.6.21:8080 and try again...
Moreover downgrade or any other fw update does not work either
Hi! I created issue in valetudo repository but maybe the problem is here
Hypfer/Valetudo#706
Prebuild image vacuum_4028_valetudo_2021_02_0.pkg doesn't save config settings and it recreates clear /tmp/valetudo_config.json after each reboot
log after reboot:
[2021-02-20T15:02:19.602Z] [INFO] Set Logfile to /tmp/valetudo.log
[2021-02-20T15:02:19.610Z] [INFO] Autodetected RoborockV1ValetudoRobot
[2021-02-20T15:02:19.759Z] [INFO] Starting Valetudo 2021.02.0
[2021-02-20T15:02:19.760Z] [INFO] Configuration file: /tmp/valetudo_config.json
[2021-02-20T15:02:19.761Z] [INFO] Logfile: /tmp/valetudo.log
[2021-02-20T15:02:19.762Z] [INFO] Robot: Beijing Roborock Technology Co., Ltd. Xiaomi Mi SDJQR02RR (RoborockV1ValetudoRobot)
[2021-02-20T15:02:19.763Z] [INFO] JS Runtime Version v14.4.0
[2021-02-20T15:02:19.765Z] [INFO] Max Heap Size: 33.5 MiB
[2021-02-20T15:02:19.766Z] [INFO] Node Flags: --max-old-space-size=32
[2021-02-20T15:02:19.775Z] [INFO] DeviceId 82651588
[2021-02-20T15:02:19.776Z] [INFO] IP 127.0.0.1
[2021-02-20T15:02:19.778Z] [INFO] CloudSecret ogp36NPfP2wzhvHe
[2021-02-20T15:02:19.779Z] [INFO] LocalSecret f3Z7yeLTOiDEJSju
[2021-02-20T15:02:19.949Z] [INFO] Dummycloud is spoofing 127.0.0.1:8053 on 127.0.0.1:8053
[2021-02-20T15:02:19.957Z] [INFO] Webserver running on port 80
[2021-02-20T15:02:19.964Z] [INFO] Map Upload Server running on port 8079
[2021-02-20T15:02:19.981Z] [WARN] Error during time sync: Error: queryA ECONNREFUSED pool.ntp.org
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19) {
errno: undefined,
code: 'ECONNREFUSED',
syscall: 'queryA',
hostname: 'pool.ntp.org'
}
[2021-02-20T15:02:27.873Z] [INFO] Cloud connected
[2021-02-20T15:03:19.004Z] [INFO] Successfully set the robot time via NTP to 2021-02-20T15:03:19.890Z
Hi,
the log disable function would be better if you remove the file in rsyslog.d directory. Then i can still send the logs to my remote location.
Regards,
Florian
Hi,
I just installed an ready-built-firmware with firmware 2008 and valetudo 5.3 and after installing it turned out not to have apt-get installed on the robo.
Older firmwares doesn't have this issue.
Is there a reason for that? Can I install apt-get afterwards anyhow? dpkg isn't installed neither...
Christian
Hi, how can I flash a pre-build package into my vacuum??
Valetudo changed.
Expected support for Valetudo 0.3.0?
there is a typo in LIST_CUSTUM_FUNCTION variable name
Hi,
I saw that it's a new relase of Valetudo 2021.01.0b0 it's possible to make the .pkg file for the roborock s 50 with this new version of Valetudo ?
Thanks a lot
Bye
I recently updated the firmware of my S50 to your latest 2008 version.
Thanks a lot for the great work!
After some time I experienced some English voice information coming from the device in special cases even if I use a German voice package.
That is why I wonder if the voice packages need to be updated as well (most of the voice information coming from the device are correctly played in German)?
If yes, could you please upload them to vacuumz.info?
Hi,
why not add an basic example with which the user can start.
Thanks, Florian
Hi,
on valetudo page I see a warning to not use firmware 4004 but I see prebuilt images with this firmware version. Furthermore it seems like 3600 is older then e.g. 3532?
v11_003532.fullos.pkg | 2019041901REL | 3.5.0_003532
v11_003570.fullos.pkg | 2018120302REL | 3.3.9_003570
v11_003600.pkg | 2018112300REL | 3.3.9_003600
v11_004004.amhd98763.fullos.pkg | 2019090500REL | 3.5.4_004004
Currently I am running 3600 with valetudo-RE. Just wondering :)
But a big thanks from my side to all the people creating this solution ...
Just noticed that the robot doesn't announces its hostname in the network on the 2008 firmware.
I can confirm that the script custom_hostname.sh
sets the hostname correctly on the system. After that, I'm lost 😅
I guess that a system package is missing on the newer firmware.
How to update to a new firmware release?
I am currently on 1910 Valetudo RE and would like to update to the latest 2008 version without starting from scratch.
Is that possible?
To avoid the nightly reboot which might result in a stock firmware reset you can add the following code:
# nano /etc/crontab
0 23 * * * root service rrwatchdoge stop
10 23 * * * root rm /mnt/data/rockrobo/rrlog/*REL -R
15 23 * * * root /root/check_all
0 4 * * * root service rrwatchdoge start
# nano /root/check_all
umount /mnt/updbuf
umount /mnt/data
umount /mnt/reserve
umount /mnt/default
fsck -y /dev/mmcblk0p10
fsck -y /dev/mmcblk0p1
fsck -y /dev/mmcblk0p11
fsck -y /dev/mmcblk0p6
mount /dev/mmcblk0p10 /mnt/updbuf
mount /dev/mmcblk0p1 /mnt/data
mount /dev/mmcblk0p11 /mnt/reserve
mount -o ro /dev/mmcblk0p6 /mnt/default
# service cron restart
Hello,
i have an issue with my S5 robot, not showing any map data and i was told it's a dns issue and was pointed to this builder. It's a great script. But somehow the DNS Catcher isn't working for me and i am still facing the map issues. The entire page is just showing: "no map data" and a box reading "Status: Connecting ... Battery: 0%".
I've used this command to build the firmware:
./builder_vacuum.sh --firmware=files/v11_002034.fullos.55915876-2190-407a-9fcb-f1e760d9b623.pkg --run-custom-script=ALL --replace-adbd --enable-appproxy-patcher --convert2eu --fix-reset --enable-local-ota --enable-history --ntpserver=192.168.X.X --enable-turn-off-ny --disable-logs --replace-miio --soundfile=files/my-sounds.pkg --public-key=files/my-key.pub --timezone=Europe/Berlin --valetudo-re-path=files/valetudo --hostname=MY-HOSTNAME --enable-addon --enable-dns-catcher --custom-dropbear
According to the script it will add 2 lines to /etc/rc.local and i can see the lines in the file that ended up on the system. But if i run iptables -L
it doesn't show those iptables settings and map data still doesn't work. I even tried to run those iptables commands manually but it doesn't change anything.
Can anyone help me with this?
custom_enable_local_ota.sh does apply binary patches to files specific to gen2 v2008 files. It might be a good idea to have a proper version check before applying those patches to avoid breaking the modified firmware.
A Version check could be like the following piece of code:
version=$(cat ${IMG_DIR}/etc/os-release | grep 'ROBOROCK_VERSION' | cut -d'_' -f3)
if [ "$version" -eq 2008 ]; then
# do the patching
else
# wrong version, don't apply patches
fi
This can (should?) be also added to other plugins specific to stripped down firmware versions (gen2 v2008ff) like the dropbear install script.
As I only own a gen2, I can't say if this also works on gen1 or other vacuums as I don't know if there is a /etc/os-release file with the ROBOROCK_VERSION entry on those vacuums.
There is a new available beta firmware that will allow to test the functionalities of room navigation and others, similary the ones present on the new S60 model.
In: https://www.facebook.com/groups/1963580733664463/permalink/2876867562335771/
Could we easily determine the URL to download it?
Thanks.
With
Hypfer/Valetudo@9ab6916
deployment/etc/rc.local was removed from hypfer/valetudo
builder_vacuum.sh is aborted with .../Valetudo/deployment/etc/rc.local not found. Please download it.
Hi,
I flashed "vacuum_4018_valetudo_re_0_9_8.pkg" onto the Mi vacuum V1 and I cannot ssh into it with password "cleaner" and
sudo ssh [email protected]
(the IP is correct)
Have you may changed the PW or is it another user?
Thanks!
I´ve used vacuum_builder.sh to update my S5 roborock to v.0.6.1 and connected with ssh to the vacuum to change the password. I found a vacuum.txt with the information to run a script
RUN - /root/run.d/change_root_pass.sh
but found no .sh file in /root
Where can I find the sh file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.