How to flash the robot vacuum cleaner Xiaomi: official and custom software

Xiaomi’s robot vacuum cleaners are some of the most popular smart home devices, but even they require periodic software updates. The firmware can solve navigation problems, add new features, or even unlock hidden features. However, the wrong actions lead to the β€œbricking” of the device, loss of warranty or unstable operation.

In this article, we will analyze all methods of firmware - from official updates through the Mi Home app to manual installation of custom firmware through the ADB or SSH. You will learn which models support alternative software (for example, Valetudo or OpenMiHome), how to avoid errors when updating and what to do if the vacuum cleaner has ceased to respond to commands. STM32 Rockchip, as the process of their firmware is fundamentally different.

1.Why update the firmware of Xiaomi robot vacuum cleaner?

The manufacturer regularly releases updates to fix bugs, improve cleaning algorithms and add new features. for example, in the firmware for Xiaomi Mi Robot Vacuum-Mop 2 Pro version 3.5.8_0040 Support for cleaning areas with different intensity, and in DreameBot D9 β€” Optimized work with high-pile carpets.

But not all updates are useful. Sometimes new versions of the software:

  • πŸ”„ Remove useful features (e.g. manual control via app in older models).
  • 🐒 Slowing down due to additional license checks or cloud services.
  • πŸ”’ Block third-party firmware if the device is tied to a Mi Account.

Alternative firmware (e.g. Valetudo) RE) permit:

  • 🌐 Use a vacuum cleaner without Xiaomi cloud servers (full local work).
  • πŸ“± Manage through the application side (e.g. Home Assistant).
  • πŸ”§ Adjust hidden parameters such as fan speed or sensor sensitivity.

⚠️ Attention: Installing custom firmware voids warranty and can cause permanent damage if the model is not supported by developers.

πŸ“Š Which firmware do you prefer?
Official from Xiaomi
Castomium (Valetudo, OpenMiHome)
I'm not updating at all.
I don't know what to choose.

2. Which Xiaomi models support firmware?

Not all Xiaomi robot vacuum cleaners can be manually stitched, and here is a table that supports official and alternative firmware for popular models:

ModelOfficial updatesCustom firmwarePlatform chipNotes
Mi Robot Vacuum-Mop 2 Proβœ… Yes (via Mi Home)βœ… Valetudo RE, OpenMiHomeRockchip RK3308Requires unlocking the loader
DreameBot D9 / D10 Plusβœ… Yes.βœ… Valetudo (partially)STM32 + ESP32Firmware only through UART
Mi Robot Vacuum-Mop Pβœ… Yes.❌ No.STM32Closed firmware, no alternatives
Viomi V3βœ… Yes.βœ… Valetudo (experimental)Rockchip RK3326Requires rations of contacts for firmware
Mi Robot Vacuum 1S❌ No (obsolete model)βœ… OpenMiHome (Older version)STM32Risk of Loss of Laser Function

If your model is not in the table, check it on GitHub Valetudo or in the theme on the table. 4PDA. Devices on the base STM32 (For example, Mi Robot Vacuum 1) is flashed through ST-Link, and models with Rockchip are flashed through Fastboot or UART.

πŸ’‘

Before buying a custom firmware robot vacuum cleaner, check the motherboard version. D9 audited V1 and V2, And the firmware for one may not fit the other.

3. Firmware Preparation: Tools and Security

Regardless of the way you use the scaling, you will need:

  • πŸ’» Windows computer 10/11 or Linux (for the ADB/Fastboot).
  • πŸ”Œ USB-Type-C cable (original, for stable connection).
  • πŸ“± Mi Home (Last version) for official updates.
  • πŸ”§ Drivers: Rockchip Driver Assistant for Rockchip chips. ST-Link Utility for Rockchip chips STM32. ADB/Fastboot (It is part of Google’s Platform Tools).

For custom firmware additionally:

  • πŸ”“ Unlock the bootloader (for Rockchip via rkdeveloptool).
  • πŸ“„ Firmware file in.img or.bin format (download only from verified sources!).
  • πŸ”¨ Solding iron and wires (to connect to the UART board-board).

⚠️ Attention: Firmware through UART It requires opening the body and working with the soldering iron. TX/RX/GND If you're not sure about your skills, use official methods.

Before we start:

Backup your current firmware (if possible)|Charge the vacuum cleaner to 100%|Disable Two-Factor Authentication in Mi Account|Check the version of the current software in the device settings-->

Method 1: Officially Update via Mi Home

The safest method is to upgrade through a proprietary app, and it is suitable for most models, including the Mi Robot Vacuum-Mop 2 Pro, DreameBot, and the most popular model. D9 new devices.

Step-by-step:

  1. Open the Mi Home app and select your vacuum cleaner.
  2. Go to Settings β†’ About the device β†’ Update firmware.
  3. If a new version is available, click Update.
  4. Confirm the update and wait until the completion (the vacuum cleaner will restart automatically).

If the update does not appear:

  • πŸ“Ά Check the vacuum cleaner's connection to 2.4GHz Wi-Fi (5GHz not supported).
  • πŸ”„ Reboot the vacuum cleaner by holding the power button for 10 seconds.
  • πŸ“± Update the Mi Home app to the latest version.
  • 🌍 Change your region to China (sometimes updates appear earlier).

⚠️ Note: If the vacuum cleaner is linked to a Mi Account with two-factor authentication, disable it before upgrading. In rare cases, after firmware, the device may require re-entering the code, and SMS he won't come.

πŸ’‘

Official updates via Mi Home do not require unlocking the bootloader and retain a warranty, but may contain restrictions (e.g., Xiaomi cloud binding).

5. Method 2: Manual update through USB (Rockchip)

If the official update is not available or you want to install a specific version of the firmware, you can use the method through USB-OTG. This method works for models based on Rockchip (Mi Robot Vacuum-Mop 2 Pro, Viomi). V3 etc.).

Files required:

  • rkdeveloptool (a utility for working with Rockchip).
  • Firmware file in format update.img (You can download it from miwifi.com or 4PDA).

Instructions:

  1. Connect the vacuum cleaner to your computer via USB-Type-C (use the port on the device body, not the docking station!).
  2. Run rkdeveloptool in Maskrom mode (this may require closing contacts on the board).
  3. Enter the command to check the connection: rkdeveloptool ld If the device is detected, you will see DevNo=1.
  4. Download the firmware: rkdeveloptool wl 0x2000 update.img
  5. Wait until the finish (about 5-10 minutes) and restart the vacuum cleaner.

If the process is 100% frozen:

  • Turn off the cable and wait 30 seconds.
  • Repeat the loading command.
  • If the error is repeated, check the integrity of the file. update.img (his MD5-The hash must match the original).
What if the vacuum cleaner is not defined in rkdeveloptool?
1. Check that the cable supports data transmission (not all) USB-Charging cables are suitable). 2. Try another one. USB-port on the computer (better) USB Lock the contacts CLK and GND on the vacuum cleaner board (to transfer to Maskrom mode). 4. Install the Rockchip driver manually through the Device Manager.

6. Method 3: Installation of custom firmware (Valetudo)

Valetudo firmware allows you to control the vacuum cleaner without the Xiaomi cloud, but requires unlocking the loader and technical skills.This method is suitable for Mi Robot Vacuum-Mop 2 Pro, Viomi V3 and some of the Dreame models.

Step 1: Unlock the bootloader

  1. Connect the vacuum cleaner to your computer and put it into Fastboot mode (for Rockchip): adb reboot bootloader
  2. Unlock the bootloader command: fastboot flashing unlock (some models will require the entry of an unlock code, which can be obtained through the Xiaomi website).

Step 2: Installation of Valetudo

  1. Download the latest version of Valetudo from GitHub.
  2. Unpack the archive and launch the firmware script: flash.sh (Use it for Windows flash.bat).
  3. Wait for completion and connect to the vacuum cleaner via the Valetudo web interface at the address http://[IP-vacuum-cleaner].

Step 3: Setup

  • πŸ“‘ Enable local mode in Valetudo settings.
  • πŸ”‘ Generate a new token API Integration with Home Assistant.

⚠️ Note: After installing Valetudo, the vacuum cleaner will disconnect from Xiaomi servers. You will not be able to use the official Mi Home app, voice assistants (Alice, Google Assistant) and some functions that depend on the cloud (for example, remote control over the Internet).

πŸ’‘

If you don't connect to Wi-Fi after Valetudo's firmware, check your router settings. Some models don't work with encryption. WPA3 β€” switch over WPA2-PSK.

7. Method 4: Firmware through UART (for STM32)

Models on the base STM32 (Mi Robot Vacuum 1S, DreameBot D9 Early audits) are being conducted through UART-This method requires soldering and knowledge of the basics of electronics.

Tools required:

  • πŸ”§ soldering iron with a thin sting.
  • πŸ•ΈοΈ Wires "dad-mama" to connect to the board.
  • πŸ–₯️ USB-UART adapter (e.g, CP2102 or FT232RL).
  • πŸ“„ Firmware in.bin format (for STM32 use STM32CubeProgrammer).

Step-by-step:

  1. Disassemble the vacuum cleaner and find contacts UART on the motherboard (usually signed as TX, RX, GND).
  2. Connect the adapter to the contacts: TX (vacuumer) β†’ RX (adapter). RX (vacuumer) β†’ TX (adapter). GND β†’ GND.

STM32CubeProgrammer

Erase & Program

If the firmware fails:

  • πŸ”Œ Check the voltage on the contacts (should be) 3.3V).
  • πŸ”„ Try another one. UART-Adapter (some cheap models do not support the 3.3V).
  • πŸ“‘ Make sure that the data rate is the same (usually 115200).

8 What to do if the firmware failed?

If the vacuum cleaner doesn’t turn on, flashes red, or emits a constant beep, try the following steps:

1. Reset to factory settings

  • Hold the power button for 10-15 seconds until the beep.
  • For models with Rockchip, try the command: fastboot erase userdata

2. Repeated firmware in emergency mode

  • For Rockchip, use rkdeveloptool in Maskrom mode.
  • For STM32 β€” repeat the firmware through UART contact-check.

3. Contacting the service

  • If the vacuum cleaner does not respond to buttons and is not detected by the computer, the loader may be damaged.
  • In this case, you need to flash through the programmer (for example, ST-Link for STM32).

⚠️ WARNING: If the vacuum cleaner was purchased less than a year ago, don't try to repair it yourself - contact Xiaomi's authorized service center.Self-intervention voids the warranty even if you just opened the case.

πŸ’‘

In 90% of cases, the β€œbricked” vacuum cleaner can be restored through emergency modes (Maskrom or Maskrom). UART). The main thing is not to panic and follow the instructions for your model.

FAQ: Frequent questions about the firmware of robot vacuum cleaners Xiaomi

Can I roll back the firmware to the previous version?
Yes, but only if you have a backup (backup.img) For models with Rockchip, rollback is possible through rkdeveloptool, for example, for models with Rockchip. STM32 β€” through STM32CubeProgrammer. Please note that after a rollback, you may need to reset your settings.
Why doesn’t a vacuum cleaner build a map after Valetudo firmware?
This is a typical problem for models with laser sensors (LDS). Check: Does your model support Valetudo (some sensors require proprietary drivers) /dev/ttyLDS (Valetudo should have access to the device, the purity of the laser lens (after disassembling the vacuum cleaner, it could get garbage on it).
How to check the firmware version without the Mi Home app?
There are several ways: Press and hold the Home and Power button at the same time - the vacuum cleaner will voice the software version (it does not work on all models). ADB and execute the command: adb shell getprop ro.build.version.incremental For Valetudo, the version is displayed in the web interface in the System Information section.
Can I sew a Xiaomi vacuum cleaner through a MacOS?
Yes, but with limitations: ADB/Fastboot Use Homebrew (brew install android-platform-tools). rkdeveloptool requires a source utility (GitHub instruction). STM32CubeProgrammer It does not officially support MacOS, but runs via Wine or a virtual machine.We recommend using Linux (for example, Ubuntu in VirtualBox) for stability.
Where to download official firmware for Xiaomi?
Official firmware files can be found at the following resources: miwifi.com (unofficial archive). 4PDA (Model-specific topics. GitHub (firmware for integration with Home Assistant). ⚠️ Never download firmware from questionable sites – it may contain malicious code or be collected for another model!