rumpeltux/viomi-rooting

Doesn't start valetudo?

Villaw opened this issue · 15 comments

Hello.
I have a Xiaomi robot STYTJ02YM, I tried to use the viomi rooting tool for viomi-v8 but it did not work, the button combination to establish an ADB connection with the robot does not work. After much testing I realized that the robot exposes the ADB connection right at the beginning before saying "turn on", like the STYJ02YM version, but after this "moment" it stops exposing. This was made possible by watch adb devices on the console.
I decided to root the robot with the tool for v7, and it seems to work and after finishing the installation I can have root access to the robot with adb Shell. It was even possible to repeat the process with the tool for v8 and everything worked.
So far so good, but now the robot does not start the original firmware, nor Valetudo. It just turns on and exposes adb.
I can see the robot in the dhcp list of my router with its ip, but nothing else. The adb connection is stable but the ssh connection is not working.
Adb sehll
cd /etc/rc.d
ln -s ../init.d/robotManager S90robotManager
It can reset my robot and start the original firmware, this causes it to lose root access.
How can I get my robot to start Valetudo? Is there something wrong with the installation? I need help.
Thanks.

Starting viomi rooting procedure. Please make sure of the following before starting:

  1. Your robot connects to your wifi when booted and your computer is connected to the same network.
  2. It is powered off
  3. You have a working micro-USB cable plugged into the robot and ready to plug into your computer.

Press [Enter] to continue

Checking if SSH is already configured and working
SSH not configured
We'll now try to connect to the ADB shell. Please connect the USB cable to your computer.
If you hear the Robot voice ('kaichi'), wait another two seconds and unplug and reconnect the cable.
If nothing happens try replugging the USB cable. This may take 10 or more attempts.
[100%] /bin/adb_shell
adb_shell: 1 file pushed. 0.0 MB/s (58 bytes in 0.030s)
Shell fixed...
rm: can't remove '/etc/rc.d/S90robotManager': No such file or directory
Please replug the USB cable again. Do not unplug once you hear the sound.
shell_is_ready
Shell is present.
Waiting a bit to allow the robot to connect to wifi.............
Robot IP is
--2021-12-06 23:23:21-- https://itooktheredpill.irgendwo.org/static/2020/dropbear_2015.71-2_sunxi.ipk
Resolviendo itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)... 37.187.99.185, 2001:41d0🅰️23b9::1
Conectando con itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)[37.187.99.185]:443... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 81893 (80K) [application/octet-stream]
Guardando como: “dropbear_2015.71-2_sunxi.ipk”

dropbear_2015.71-2_ 100%[===================>] 79,97K --.-KB/s en 0,07s

2021-12-06 23:23:23 (1,15 MB/s) - “dropbear_2015.71-2_sunxi.ipk” guardado [81893/81893]

dropbear_2015.71-2_sunxi.ipk: La suma coincide
dropbear_2015.71-2_sunxi.ipk: 1 file pushed. 1.7 MB/s (81893 bytes in 0.047s)
Installing dropbear (2015.71-2) to root...
Configuring dropbear.
Collected errors:

valetudo 100%[===================>] 30,79M 9,76MB/s en 3,3s

2021-12-06 23:23:38 (9,33 MB/s) - “valetudo” guardado [32291086/32291086]

valetudo: La suma coincide
/root/.ssh/config line 2: Missing argument.
lost connection
/root/.ssh/config line 2: Missing argument.
/root/.ssh/config line 2: Missing argument.
/root/.ssh/config line 2: Missing argument.
Robot is restarting, you should be able to reach Valetudo at http:// once restarted

Sin título

Thanks for the report. Looks like the script failed to exit after checking ssh prerequisites which should be fixed with d3b43c4.

You likely also missed this prerequisites:

the robot is already connected to your wifi (if you don't want to use the xiaomi app to do this, you can do this with python-miio)

So, make sure that the robot is connected to wifi, then retry with the new version of the script.

Hi, thank you for you answer.
I tried using the new script but it didn't work either. My linux knowledge is not very good, sorry for this.
The robot still does not start valetudo.
I hope your help
Thanks a lot

Starting viomi rooting procedure. Please make sure of the following before starting:

  1. Your robot connects to your wifi when booted and your computer is connected to the same network.
  2. It is powered off
  3. You have a working micro-USB cable plugged into the robot and ready to plug into your computer.

Press [Enter] to continue

Checking if SSH is already configured and working
SSH not configured
We'll now try to connect to the ADB shell. Please connect the USB cable to your computer.
If you hear the Robot voice ('kaichi'), wait another two seconds and unplug and reconnect the cable.
If nothing happens try replugging the USB cable. This may take 10 or more attempts.

[100%] /bin/adb_shell
adb_shell: 1 file pushed. 0.0 MB/s (58 bytes in 0.011s)
Shell fixed...

Please replug the USB cable again. Do not unplug once you hear the sound.
shell_is_ready
Shell is present.
Waiting a bit to allow the robot to connect to wifi.............
Robot IP is 192.168.1.19
--2021-12-10 23:52:18-- https://itooktheredpill.irgendwo.org/static/2020/dropbear_2015.71-2_sunxi.ipk
Resolviendo itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)... 37.187.99.185, 2001:41d0🅰️23b9::1
Conectando con itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)[37.187.99.185]:443... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 81893 (80K) [application/octet-stream]
Guardando como: “dropbear_2015.71-2_sunxi.ipk”

dropbear_2015.71-2_ 100%[===================>] 79,97K --.-KB/s en 0,07s

2021-12-10 23:52:19 (1,12 MB/s) - “dropbear_2015.71-2_sunxi.ipk” guardado [81893/81893]

dropbear_2015.71-2_sunxi.ipk: La suma coincide
dropbear_2015.71-2_sunxi.ipk: 1 file pushed. 1.6 MB/s (81893 bytes in 0.048s)
Installing dropbear (2015.71-2) to root...
Configuring dropbear.
Collected errors:

valetudo 100%[===================>] 30,79M 8,85MB/s en 3,5s

2021-12-10 23:52:36 (8,84 MB/s) - “valetudo” guardado [32291086/32291086]

valetudo: La suma coincide
/root/.ssh/config line 2: Missing argument.
lost connection
/root/.ssh/config line 2: Missing argument.
/root/.ssh/config line 2: Missing argument.
/root/.ssh/config line 2: Missing argument.
Robot is restarting, you should be able to reach Valetudo at http:// once restarted

I think your /root/.ssh/config may be messed up from previous attempts. Try editing it and put in the ip manually.
Or just remove it alltogether, in which case the script should try to reinstall ssh.

Thanks again. How do I remove it completely?

rm /root/.ssh/config

Sorry for my insistence but I can't connect with valetudo
After removing ssh config this is my situation

Starting viomi rooting procedure. Please make sure of the following before starting:

  1. Your robot connects to your wifi when booted and your computer is connected to the same network.
  2. It is powered off
  3. You have a working micro-USB cable plugged into the robot and ready to plug into your computer.

Press [Enter] to continue

Checking if SSH is already configured and working
SSH not configured
We'll now try to connect to the ADB shell for new viomi-v8 models (experimental).

  • Long press the power key for at least 10 seconds to power off the device
  • Keep USB connected to the robot, but not to the PC
  • Press the "Home" key and do not release it.
  • Connect the USB to the PC
  • Click power key for about 10-11 times
  • Release both keys
  • Robot should boot into FEL mode, and start the ADB.
    The robot confirms by saying "device connected", "setup completed".
    If it says "turning on", try again.
    Press ENTER once ADB setup is completed.^C
    root@david-SATELLITE-U500:/viomi-rooting# rm /root/.ssh/config
    root@david-SATELLITE-U500:
    /viomi-rooting# NEW_V8=1 ./viomi-root.sh
    /tmp/viomi-root ~/viomi-rooting
    Starting viomi rooting procedure. Please make sure of the following before starting:
  1. Your robot connects to your wifi when booted and your computer is connected to the same network.
  2. It is powered off
  3. You have a working micro-USB cable plugged into the robot and ready to plug into your computer.

Press [Enter] to continue

Checking if SSH is already configured and working
SSH not configured
We'll now try to connect to the ADB shell for new viomi-v8 models (experimental).

  • Long press the power key for at least 10 seconds to power off the device
  • Keep USB connected to the robot, but not to the PC
  • Press the "Home" key and do not release it.
  • Connect the USB to the PC
  • Click power key for about 10-11 times
  • Release both keys
  • Robot should boot into FEL mode, and start the ADB.
    The robot confirms by saying "device connected", "setup completed".
    If it says "turning on", try again.
    Press ENTER once ADB setup is completed.
    adb_shell: 1 file pushed. 0.0 MB/s (58 bytes in 0.036s)
    Shell fixed...
    shell_is_ready
    Shell is present.
    Waiting a bit to allow the robot to connect to wifi.............
    Robot IP is 192.168.1.122
    --2022-01-29 23:48:40-- https://itooktheredpill.irgendwo.org/static/2020/dropbear_2015.71-2_sunxi.ipk
    Resolviendo itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)... 37.187.99.185, 2001:41d0🅰️23b9::1
    Conectando con itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)[37.187.99.185]:443... conectado.
    Petición HTTP enviada, esperando respuesta... 200 OK
    Longitud: 81893 (80K) [application/octet-stream]
    Guardando como: “dropbear_2015.71-2_sunxi.ipk”

dropbear_2015.71-2_sunxi.ip 100%[==========================================>] 79,97K --.-KB/s en 0,07s

2022-01-29 23:48:40 (1,09 MB/s) - “dropbear_2015.71-2_sunxi.ipk” guardado [81893/81893]

dropbear_2015.71-2_sunxi.ipk: La suma coincide
dropbear_2015.71-2_sunxi.ipk: 1 file pushed. 1.5 MB/s (81893 bytes in 0.052s)
Installing dropbear (2015.71-2) to root...
Configuring dropbear.
Collected errors:

valetudo 100%[==========================================>] 30,79M 6,94MB/s en 5,2s

2022-01-29 23:49:04 (5,87 MB/s) - “valetudo” guardado [32291086/32291086]

valetudo: La suma coincide
load pubkey "/root/.ssh/id_rsa": invalid format
root@192.168.1.122: Permission denied (publickey).
lost connection
load pubkey "/root/.ssh/id_rsa": invalid format
root@192.168.1.122: Permission denied (publickey).
Pseudo-terminal will not be allocated because stdin is not a terminal.
load pubkey "/root/.ssh/id_rsa": invalid format
root@192.168.1.122: Permission denied (publickey).
Robot is restarting, you should be able to reach Valetudo at http://192.168.1.122 once restarted

Thanks again

Have you tried the workaround in #42?

Hi, should I add this line (PubkeyAcceptedKeyTypes=ssh-rsa) in my /root/.ssh/config file?
Captura de pantalla de 2022-02-05 23-57-44
Thanks!

I still can't install valetudo. Is the config file correct? thanks for your help

Hello again. After leaving for a while I decided to buy a STYJ02YM motherboard.
I still can't start valetudo :(

error: no devices/emulators found
error: no devices/emulators found
error: no devices/emulators found
rm: can't remove '/etc/rc.d/S90robotManager': No such file or directory
Please replug the USB cable again. Do not unplug once you hear the sound.
shell_is_ready
Shell is present.
Waiting a bit to allow the robot to connect to wifi.............
Robot IP is 192.168.1.233
--2022-04-28 22:19:05-- https://itooktheredpill.irgendwo.org/static/2020/dropbear_201 5.71-2_sunxi.ipk
Resolving itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)... 37.187.99.185 , 2001:41d0🅰️23b9::1
Connecting to itooktheredpill.irgendwo.org (itooktheredpill.irgendwo.org)|37.187.99.18 5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 81893 (80K) [application/octet-stream]
Saving to: ‘dropbear_2015.71-2_sunxi.ipk’

dropbear_2015.71-2_su 100%[=======================>] 79.97K --.-KB/s in 0.1s

2022-04-28 22:19:05 (814 KB/s) - ‘dropbear_2015.71-2_sunxi.ipk’ saved [81893/81893]

dropbear_2015.71-2_sunxi.ipk: OK
dropbear_2015.71-2_sunxi.ipk: 1 file pushed. 1.8 MB/s (81893 bytes in 0.044s)
Installing dropbear (2015.71-2) to root...
Configuring dropbear.
/root/.ssh/id_rsa.pub: 1 file pushed. 0.2 MB/s (1876 bytes in 0.011s)
Setting local ssh alias vacuum to root@192.168.1.233.
You can use 'ssh vacuum' to connect to the robot from now on.
Waiting 5 seconds for ssh server dropbear to start
Please change the root password now. The default one is typically "@3i#sc$RD%xm^2S&".
ssh: connect to host 192.168.1.233 port 22: Connection refused
SSH was installed.
ssh: connect to host 192.168.1.233 port 22: Connection refused
Restoring robot services.
ssh: connect to host 192.168.1.233 port 22: Connection refused
Your device is now rooted.
ssh: connect to host 192.168.1.233 port 22: Connection refused
ssh: connect to host 192.168.1.233 port 22: Connection refused
Would you like to install Valetudo (open-source cloudless vacuum robot UI)? (y/n) y--2 022-04-28 22:19:22-- https://github.com/Hypfer/Valetudo/releases/download/2021.03.0/v aletudo-armv7
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be /140675080/9ed36f00-85ba-11eb-9916-94f76cd3d381?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz -Credential=AKIAIWNJYAX4CSVEH53A%2F20220428%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date =20220428T211923Z&X-Amz-Expires=300&X-Amz-Signature=8488c6f8aa5b05b97119aec0fa2f90cc16 34d3ce07c00dc072f29b97cea9e1a0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=14 0675080&response-content-disposition=attachment%3B%20filename%3Dvaletudo-armv7&respons e-content-type=application%2Foctet-stream [following]
--2022-04-28 22:19:23-- https://objects.githubusercontent.com/github-production-relea se-asset-2e65be/140675080/9ed36f00-85ba-11eb-9916-94f76cd3d381?X-Amz-Algorithm=AWS4-HM AC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220428%2Fus-east-1%2Fs3%2Faws4_req uest&X-Amz-Date=20220428T211923Z&X-Amz-Expires=300&X-Amz-Signature=8488c6f8aa5b05b9711 9aec0fa2f90cc1634d3ce07c00dc072f29b97cea9e1a0&X-Amz-SignedHeaders=host&actor_id=0&key_ id=0&repo_id=140675080&response-content-disposition=attachment%3B%20filename%3Dvaletud o-armv7&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110 .133, 185.199.111.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.11 0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32291086 (31M) [application/octet-stream]
Saving to: ‘valetudo’

valetudo 100%[=======================>] 30.79M 8.28MB/s in 4.2s

2022-04-28 22:19:27 (7.42 MB/s) - ‘valetudo’ saved [32291086/32291086]

valetudo: OK
ssh: connect to host 192.168.1.233 port 22: Connection refused
lost connection
ssh: connect to host 192.168.1.233 port 22: Connection refused
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh: connect to host 192.168.1.233 port 22: Connection refused
Robot is restarting, you should be able to reach Valetudo at http://192.168.1.233 once restarted

Any idea what can happen with the ssh connection?
I am using a raspberry pi with putty on windows
Thank you for your patience and I look forward to your response.
Thank you