Calibration of the accelerometer on Xiaomi: fix sensor errors in 5 minutes

The accelerometer in Xiaomi smartphones is responsible for determining the position of the device in space, the turns of the screen, the pedometer and even the correct functioning of some games. Over time, this sensor can begin to โ€œlieโ€: the screen spontaneously turns, games do not respond to tilts, and fitness trackers show the wrong number of steps.

In this article, you will find step-by-step instructions for calibrating the accelerometer on all modern Xiaomi models (including the Redmi Note 12, POCO X5, Mi 13 and others), as well as how to check the performance of the sensor and what to do if the calibration did not help, we will analyze both standard methods through system settings and hidden engineering menus โ€“ without having to install third-party applications.

Signs of malfunction of the accelerometer: when calibration is needed

Before you start setting up, it is important to make sure that the problem is indeed related to the accelerometer.

  • ๐Ÿ“ฑ The screen spontaneously turns into portrait/album mode without physically turning the phone.
  • ๐ŸŽฎ In games, for example, PUBG Mobile or Asphalt 9) tilt control is incorrect or delayed.
  • ๐Ÿšถโ€โ™‚๏ธ Fitness applications (Mi Fitness, Google Fit) show unrealistic steps (e.g. 10,000 per hour of sitting).
  • ๐Ÿ”„ Turn sensor in settings is turned off, but the screen still rotates.
  • ๐Ÿ“‰ In sensor tests (via ##6484###), the accelerometer shows zero values or chaotic jumps.

If you see at least 2-3 signs from the list, the probability of failure of the accelerometer is 90%.

  1. Are there any third-party applications to block screen rotation (e.g., Rotation Control) installed?
  2. Is there a Do Not Disturb or Charge Saving mode that can limit the sensors?
  3. Is the phone physically damaged (falls or moisture often disable the accelerometer).

โš ๏ธ Warning: If the problem persists after calibration, and the accelerometer values in the engineering menu (#6484###) do not change when the phone is tilted, the sensor is physically damaged and needs to be replaced.

Method 1: Calibration through the engineering menu (without root)

The most reliable method, which works on all Xiaomi models (including Redmi 10C, POCO F4, Mi 11 Lite), does not require superuser rights or third-party applications, only a standard set of commands.

Instructions:

  1. Open the Phone app and type the combination: ##6484## Some firmware may require you to type: ##4636###
  2. You will be taken to the engineering menu. Select Sensor Test (or Sensors on Russian firmware).
  3. Find the Accelerometer Sensor and tap it.
  4. The screen will show three graphs or digital values (X, Y, Z). Place the phone on a flat horizontal surface (such as a table) and press Calibration.
  5. Wait until the process is complete (usually 10-20 seconds).

After restarting, check the sensor:

  • ๐Ÿ”„ The screen turns should be smooth.
  • ๐ŸŽฏ In games, the control of the slope will be more accurate.
  • ๐Ÿ“Š In the sensor test (#6484###), the values of X and Y should be close to 0 and Z should be close to 9.81 (free fall acceleration).

Close all background applications

Put your phone on a flat surface

Check the battery power (minimum 30%)

Shut down. VPN/Proxy (can block engineering menu)-->

Method 2: Calibration with the Mi Sensor Test application

If the engineering menu is not available (for example, on custom firmware), use the official Mi Sensor Test application, which Xiaomi is developing for sensor diagnostics. It is pre-installed on most devices, but you can download it from Google Play if necessary.

Step-by-step:

  1. Open the Mi Sensor Test (find through the application search).
  2. Go to the Accelerometer tab.
  3. Put your phone on the table with the screen up and press Calibrate.
  4. Wait 15-30 seconds for the app to collect data. Don't touch the phone at this point!
  5. After completion, press Save and restart the device.

Advantages of this method:

  • โœ… It works on all firmware (including custom LineageOS or Pixel Experience).
  • โœ… Interface in Russian.
  • โœ… Shows detailed diagnostics of all sensors (gyroscope, compass, barometer).

โš ๏ธ Note: If the Calibrate button is inactive in the Mi Sensor Test, your phone model does not support software calibration.

Method 3: Manual calibration via ADB (for advanced users)

This method requires connecting the phone to a computer and using ADB (Android Debug Bridge) and is suitable if standard methods have not worked, but is not recommended for beginners - the wrong commands can disrupt the system.

What you need:

  • ๐Ÿ–ฅ๏ธ A computer with installed Xiaomi drivers and ADB.
  • ๐Ÿ”Œ USB-cable (preferably original).
  • ๐Ÿ“ฑ Included debugging by USB (Settings โ†’ The phone. โ†’ Version. MIUI โ†’ 7 times to tap according to the version โ†’ return to additional settings โ†’ For developers โ†’ Debugging by USB).

Instructions:

  1. Connect the phone to your PC and open the command line (Win + R โ†’ enter cmd).
  2. Enter the command to check the connection: Adb devices must display the serial number of your device.
  3. Calibrate the accelerometer: adb shell settings put system accelerometer_calibration 1,0,0,0,1,0,0,0,1 This command resets the calibration matrix to factory values.
  4. Reboot your phone: adb reboot

If the problem persists after the reboot, try an alternative command to reset all sensors:

adb shell pm clear com.miui.sensor
What if the ADB canโ€™t see the device?
1. Make sure that the debugging is enabled by USB and access is allowed from this computer (you'll see a request on your phone). 2 Try another one. USB-cable (cheap cables often don't transmit data). 3. Install Mi drivers PC Suite from Xiaomi official website. 4. Reboot phone and PC.

Checking the calibration results: tests and diagnostics

After calibration, you need to make sure that the accelerometer is working correctly. Here are 3 ways to check:

Method of verificationWhat do you do?Normal values
Engineering menuEnter ##6484## โ†’ Sensor Test โ†’ AccelerometerX: ~0, Y: ~0, Z: ~9.81 (in horizontal position)
Mi Sensor TestOpen the application โ†’ tab AccelerometerThe charts are smooth, no jumps.
Physics Toolbox AppendixInstall from Google Play โ†’ Open the Accelerometer tabValues change smoothly when tilted
Tinder control gameRun Asphalt 9 or Racing in Car 2The machine responds to tilts without delay

If after calibration the values in the tests are still chaotic or more than 20% different from the norm, this may indicate:

  • ๐Ÿ”ง Hardware malfunction (requires replacement of sensor).
  • ๐Ÿ“ฑ Firmware problems (try updating) MIUI last-minute).
  • ๐Ÿงฒ The influence of magnetic fields (remove magnets, speakers, chargers from the phone).

Engineering menu (#6484##)

Mi Sensor Test Application

ADB teams

Nothing worked, sensor's broken.-->

Frequent calibration errors and how to avoid them

Many users face problems due to improper actions during calibration.-5 mistakes and their solutions:

  • ๐Ÿ“ต Sizing on uneven surface โ†’ Put your phone on a glass table or use the level (Bubble Level app).
  • ๐Ÿ”‹ Low battery charge โ†’ Charge your phone to at least 50% or the process may be interrupted.
  • ๐Ÿ“ถ Active background applications โ†’ Close all programs through Settings โ†’ Annexes โ†’ Launched.
  • ๐Ÿ”„ Interruption of the process โ†’ Do not touch the phone or lock the screen during calibration.
  • ๐Ÿ“ฒ Use of cover โ†’ Remove the cover and protective glass โ€“ they can put pressure on the body.

Another common problem is that the calibration is reset after rebooting, and it's because:

  • ๐Ÿ“ Damaged system files (will help reset to factory settings).
  • ๐Ÿ”„ Circuit (install official firmware) MIUI via Mi Flash Tool).
  • ๐Ÿ› ๏ธ Incorrect access rights (give permissions to Mi Sensor Test application manually).

๐Ÿ’ก

If after calibration the screen stopped turning completely, check the settings โ†’ Screen โ†’ Autoturn. it may have accidentally switched off.

Alternative solutions if calibration does not help

If all calibration methods have been tried, but the accelerometer still doesnโ€™t work properly, consider the following options:

  1. Update to firmware: Go to Settings โ†’ About Phone โ†’ Update system and install the latest version of MIUI. New updates often fix sensor errors.
  2. Reset to factory settings: This is a radical method, but it helps 60% of the time. Save data before reset: Settings โ†’ About phone โ†’ Backup and Reset โ†’ Reset.
  3. Sensor replacement: If the accelerometer is physically damaged (for example, after a fall), it can be replaced at a service center. The cost of repair for Xiaomi is from 1,500 to 3,000 rubles, depending on the model.
  4. Use of external sensor: For games, you can connect a gamepad or Bluetooth joystick (for example, Xiaomi Game Controller).

If you decide to replace the sensor yourself, consider:

  • ๐Ÿ”ง For Xiaomi, the accelerometer is usually soldered into the motherboard. Replacing it requires a soldering station and experience.
  • ๐Ÿ›’ You can buy the original sensor on AliExpress (search the phone model). + ยซaccelerometer sensorยป).
  • โš ๏ธ Incorrect replacement can result in loss of warranty and other malfunctions.

๐Ÿ’ก

Before replacing the sensor, check the phone for hidden damage (such as a bloated battery or contact oxidation) โ€“ these can also cause accelerometer failures.

FAQ: Answers to Frequent Questions

Can you calibrate an accelerometer without an engineering menu?
Yes, use the Mi Sensor Test app (Method 2) or the Physics Toolbox Sensor Suite from Google Play. These programs also support calibration, but may require additional permissions.
Why did the screen stop turning after calibration?
The autorotation function has probably turned off. Check: Settings โ†’ Screen โ†’ Autorotation. If the tick is still ticking but the screen is not rotating, recalibrate or reset the sensor settings via ADB.
How often should I calibrate the accelerometer?
Normally, calibration is required 1 time in 6-12 months, more often it may be necessary after: Strong hits or falls of the phone, firmware updates, battery or screen replacements (internal components may shift).
Does the calibration work on POCO and Black Shark?
Yes, all the techniques in this article are suitable for POCO and Black Shark, as they use the same Xiaomi platform, except for the Black Shark models with custom JoyUI firmware, where additional resolution may be required for the engineering menu.
Can a magnetic case affect an accelerometer?
Yes, strong magnets (such as those in Smart Cover cases) can temporarily knock down the sensor readings, and if you notice a failure after you install the case, remove it and recalibrate the accelerometer.