-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the new persistent map format #44
Comments
nvmap attached in new rr.gz format |
Some findings: The static encryption key ( That's what I have found so far, but it would be cool if someone else can independently confirm this. |
Here's another update. The encrypted
This is presumably so that Xiaomi can later decrypt the key using their RSA private key, which will then enable them to decrypt the gzip archive. Some possible workarounds:
Options 2, and 3 would break the compatibility with the Xiaomi cloud servers, and so they are best used with dummycloud enabled. Option 1 could theoretically still work, but can be easily detected by Xiaomi. I tried experimenting with Option 1 for a bit, but was unsuccessful. So I decided to just disable encryption, since I do not care about the Xiaomi cloud because my vacuum is not allowed to connect to the internet anyway. Turns out this is the simplest option. I updated my gen2 vacuum to 001780 and patched The patched rrlogd for v001780 is attached here. It should be copied to the vacuum and moved to Here are the hex patches used:
|
@JohnRev can you patch a rrlog (of course i will privide it) for gen2? i would try this and see how the new persistant pams work out...by the way - what's the setting needed to enable the map storage feature? |
This is gen2. I should have clarified. |
gr8. i'll download 1780 and get myself to work. i guess we should e carefull and stop the automatic update mechanism - xiaomi will most probably close some doors and we might remain stuck with some default stuff... |
My vacuum has never connected to the internet, so I'm not too worried about the automatic updates. |
i was connected to the internet (i got the gadget exactly when it came on the market). now i am on dummycloud and ccrypt is removed (just an empty file). my firewall is also plugging all holes so i should be safe. have you tried to enable the map storage feature? and if yes how did you do it? |
No, sorry, I haven't looked into the map storage feature. Tho if you do figure out how to enable it, let me know! |
@JohnRev i updated the beast and used your patched rrlogd but i keep getting error 500 from the webserver... |
@leonardpitzu, you will have to compile Valetudo with the updated regex from #40 (comment) |
@JohnRev Already done that - I get the correct path to the files and I am trying correctly to open them. That’s where I got with the debugging. I user the rrlogd you provided. Added some more logging to figure out what’s wrong... |
Interesting. It works fine for me. How does your |
Oh, and did you reboot your vacuum to make sure it uses the patched rrlogd? |
@JohnRev How did you go about patching rrlogd? |
@JohnRev i've done some more debugging (i know linux quite well but i'm 250km away from the vacuum so debugging is a bit more tricky :) ). anyway here's what i found (again, using fw 1780 on gen 2, your patched rrlogd and a patched/modified version of valetudo):
and here it stops with the error:
Previousely the log was being encrypted with the standard symmetric key which we all know. So the webserver was decryptiong it using the key, unpacking it and do the rest of it's thing. |
@leonardpitzu :Just to confirm, did you make sure the running rrlogd process is the patched one? Simply replacing the file won't do it. |
@JohnRev copied the patched rrlogd and rebooted the thing... i'm doing some more testing to see what's going on... |
Oh! I think I attached the wrong rrlogd. In the one you're using right now, the first 512 bytes are the encrypted key and the rest of the file is the (unencrypted) gzip. So if you do something like |
@dugite-code: I disassembled |
@JohnRev i looked at the attached rrlogd and it's not the patched one. I patched it and am testing it now. will report back |
Thanks! I am waiting. Sorry for attaching the wrong |
@JohnRev sudo "you deserve a beer!" it's working! |
Awesome!! And thanks for being willing to testing it 😄 I discovered there's some 500 errors still showing up after some time, but these are strictly related to the code logic of how the Glad it's working, and hope this helps others too! |
@leonardpitzu, I have a question for you. |
@JohnRev mine also has Alzheimer and generates a new map. This is a "feature" i would guess unless we figure out what the "save map" button actually does. If we can set the same flag, by hand, we can keep the map between reboots. I read somewhere that the setting is some new file in /mnt/data/rockrobo. The file has to contain the value 1 in order to enable the map storage feature. Yet i can't seem to find that post nowhere so i am stuck right now... |
I just updated to 1780 and still get 500 errors with valetudo 0.9. Is it just me? |
Did you patch rrlogd? |
I did when building the firmware but will try again today. Maybe I did something wrong there. |
|
Here is what I did: sudo ./dustcloud/devices/xiaomi.vacuum/firmwarebuilder/imagebuilder.sh -k id_ed25519.pub -f v11_001780.pkg --disable-xiaomi --patch-rrlogd
Scriptpath: ./dustcloud/devices/xiaomi.vacuum/firmwarebuilder
.../dc/imagebuilder.sh
compatible readlink found!
Generate SSH Host Keys if necessary
decrypt soundfile
ccrypt: .../dc/english.pkg: Kennwort passt nicht -- unverändert
unpack soundfile
decrypt firmware
ccrypt: .../dc/v11_001780.pkg: Kennwort passt nicht -- unverändert
unpack firmware
patch ssh host keys
disable SSH firewall rule
integrate SSH authorized_keys
reconfiguring network traffic to xiaomi
pack new firmware
encrypt firmware
2ef9c67f1a7d9b6a9ea292837e4bbf2a output/v11_001780.pkg I don't read anything from the rrlogd patch. |
I don't see that it patches rrlogd so is the git branch up to date and do you have bspatch installed? |
I was missing the bsdiff package. I got this now:
After pushing the firmware to to vacuum I still get the error 500. How do you add valetudo while building? |
Did you start a new cleanup? Since you were running an unpatched rrlogd it might be that the data it's trying to display is still encrypted. The removed encryption only applies to new cleanups. |
In addition to what @Hypfer pointed out, it seems that your rrlogd patch didn't work? |
Other things stored in |
I don't know if this belongs here, but I also get a 500 error when charging. When roborock (gen1, version 3514 rooted) is running, map is generated just fine. So does mine also need a patched rrlogd? |
I'm having the same problem as Fietspomp86, during cleaning the generated map can be viewed without any difficulties, as soon as the robo has finished cleaning, the map vanishes and the above html error 500 or with "../latest" error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt) is displayed. |
It is possible that on the gen1 firmware version, rrlogd has a new encryption method. However someone needs to reverse engineer it to see what actually is going on. |
@Fietspomp86 rrlogd for gen1 will need to be patched too, but none have been published yet. @ralf-ms are you also using gen1 with 3514 firmware? |
yes, correct: gen1 / 3514 |
Ok allright, what do I need to do then? I'm fairly ok with linux so I can try to patch it with some instructions. |
Try the attached rrlogd, if you want. I haven't tested it myself as I don't have a gen1 vacuum. |
Ok, I've copied the rrlogd and rebooted. Apparently that removed Valetudo which is strange. Installed Valetudo again and started vacuum to test. Now it's turning off and on every 10 seconds. EDIT: Strange enough it has resetted itself to old firmware I guess, speaking Chinese and disconnected from WiFi. |
I am guessing the "patched" rrlogd failed and ended up crashing the robot, which then went into recovery mode... maybe? |
After transfering the rrlogd to the robot, did you make sure you gave it execution permissions? |
The patched rrlogd is working. I've just tried a cleaning session and could retrieve the map after the finished session. |
No problem! |
Can we please not use this issue or any issue at all for basic tech support. This is not a forum but rather a place to gather information and use said information to implement the feature mentioned in the title. |
Quite possible I forgot that.... I'll retry it when it's back online. |
Oh ffs. |
@Hypfer: This thread should probably be closed. As you pointed out, the conversation has gotten out of hand. There is another issue created for the newer features that come with the persistent maps #72 |
No description provided.
The text was updated successfully, but these errors were encountered: