The compass in Xiaomi smartphones is not just an auxiliary tool for orientation on the ground. GPS-navigation, tracking applications (such as Google Maps or Yandex.Maps), and augmented reality features, which many users find when the compass arrow starts to jump, show the wrong direction or refuse to work at all. Most often, the problem is solved by simple calibration, but few people know how to do it correctly.
In this article, weβll look at all the ways that compasses can be calibrated on Xiaomi, Redmi, and POCO devices, from standard MIUI tools to hidden engineering menus, why compasses can fail, how to check their accuracy without additional applications, and what to do if calibration doesnβt work, and weβll also uncover some hidden MIUI features that arenβt mentioned in the official instructions.
Why is Xiaomiβs compass lying?
Before you start calibrating, it's important to understand what caused the malfunction. The compass in Xiaomi smartphones is based on a magnetic sensor (magnetometer) and data from the gyroscope / accelerometer. If even one of the components gives the wrong reading, the compass needle will "swim." Here are the main reasons:
- π§² Exposure to magnetic fields β metal cases, headphones, powerful speakers, or even magnets in a bag can knock down the sensor.
- π± Programmatic failures MIUI β After system updates or resets, the compass may require recalibration.
- π Battery discharge β at a charge level below 15%, sensors start saving energy, which affects accuracy.
- π Being in the "dead zone" - in some regions (for example, the Earth's magnetic field is too weak to work properly.
- π οΈ Physical damage β falls or bumps can displace the sensor inside the body.
Interesting fact: in smartphones Xiaomi with AMOLED-screens (e.g. Xiaomi) 13 Pro or Redmi K60) The magnetic sensor is often placed closer to the top of the body to minimize interference from the display. If you hold the phone in a horizontal position, the accuracy of the compass can fall on the surface. 20-30%.
β οΈ Warning: If a compass starts lying after a battery change or a motherboard repair, the problem may be a damaged sensor plume, in which case calibration won't help - a diagnosis is required at a service center.
How to check the compass without additional applications
Before you calibrate the compass, make sure it's actually giving the wrong reading. MIUI has a built-in sensor testing tool that's hidden from the general public.
- Open the Phone app and type in the combination: ##6484## (some models run ##4636###).
- In the menu that appears, select Sensor Test.
- Scroll down to the Magnetic field sensor and click on it.
- Turn the phone in space -- the X, Y, Z values should change smoothly, and if the numbers jump or freeze at zero, the sensor is faulty.
Alternatively, use a standard Compass app (if it's preinstalled in your firmware) and run it and compare it to a hand compass or a known landmark (e.g., the position of the sun at noon). 10-15Β°, calibration.
Method 1: Calibration of the compass through the MIUI engineering menu
The most reliable method is the use of a hidden engineering menu, which works on most Xiaomi, Redmi and POCO models, but requires caution: improper actions can bring down other sensor settings.
Instructions:
- Open the Phone app and enter the code ##36446337## (or #3644633## on older versions of MIUI).
- In the Engineering Mode menu, go to Sensors β Magnetic Sensor.
- Press Calibration and follow the instructions on the screen. You usually need to rotate the phone in space to describe the eight.
- After completion, restart the smartphone.
If the code doesnβt work, try an alternative:
adb shell am start -n com.android.engineeringmode/.qualcomm.EngineeringModeThis command must be entered via ADB (USB debugging). For more information about setting up ADB, see our instructions below.
β οΈ Note: On some models (e.g, POCO F5 Or the Redmi Note 12 Pro.+) The engineering menu can be blocked by the manufacturer, in which case use method 2 or 3.
Charge your phone to at least 50%
Remove metal objects within a radius of 1 meter
Enable flight mode (to avoid network interference)
Start calibration in the room without magnetic fields-->
Method 2: Calibration with GPS Status & Toolbox
If standard methods do not work, use a third-party application. GPS Status & Toolbox (available on Google Play) not only calibrates the compass, it also optimizes the work. GPS-module.
Step-by-step:
- Install and open the app. Provide all the permissions you request (geolocation, sensor access).
- Go to the Compass tab (Compass).
- Press Calibrate and follow the hints: slowly turn the phone on all axes, describing a sphere in the air.
- After calibration, check the accuracy by comparing the readings to the actual direction (for example, the sun or map).
The advantage of this method is that the application shows the level of interference (in the microteslas) and helps to find the source of the problem. Β΅T, near a strong magnet.
| Level of interference (Β΅T) | Accuracy assessment | Recommendations |
|---|---|---|
| 0β20 | β Great. | The compass is working correctly. |
| 20β50 | β οΈ Medium | Remove metal objects |
| 50β100 | β Bad. | Strong magnetic interference |
| 100+ | β οΈ Critical | Possible sensor malfunction |
π‘
If the compass still lies after calibration, try turning off the Charge Saving function in the MIUI settings. In this mode, the system limits the operation of the sensors to extend battery life.
Method 3: Reset sensor settings via MIUI (without root)
If the compass starts to crash after the firmware update, resetting sensor settings will help.This method does not require superuser rights and works on all Xiaomi models with MIUI 12 and later.
How to reset:
- Go to Settings β About Phone β MIUI version.
- Click 7-10 times on the string with the firmware version until you get a message You became a developer!
- Return to the main settings menu and open Additional β for developers.
- Find the Reset sensor settings item and confirm the action.
Once rebooted, all sensors (including the compass, gyroscope, and accelerometer) will be recalibrated automatically, a method that is particularly effective if problems have started after custom firmware is installed or factory reset.
β οΈ Note: On some firmware (for example, MIUI Global Stable for Redmi Note 11) item "Reset sensor settings" may not be available. ADB-team:
adb shell cmd sensorservice --calibration clearMethod 4: Calibration through ADB (for power users)
If none of the previous methods worked, then manual calibration via ADB is left, which requires connecting the phone to a computer, but gives you maximum control over the process.
What you need:
- π₯οΈ A computer with installed Xiaomi drivers and ADB Tools.
- π USB-cable (preferably original).
- π± Included debugging by USB developer-setting.
Instructions:
- Connect your phone to your PC and open the command prompt (cmd in Windows or Terminal in macOS/Linux).
- Enter the command to check the connection: Adb devices must display the serial number of your device.
- Start calibration of the magnetic sensor: adb shell am start -a android.intent.action.CALIBRATE_MAGNETIC_FIELD
- Follow the instructions on the phone screen (usually you need to rotate the device in space).
To reset all sensors to factory settings, use:
adb shell cmd sensorservice --calibration resetWhat if the ADB canβt see the device?
Frequent calibration errors and how to avoid them
Many users make the same mistakes that make calibration ineffective, and here are the most common mistakes and ways to correct them:
- π΅ Calibration next to metal objects - even the keys in your pocket can distort readings. Solution: perform the procedure in an open space (for example, on the street).
- π Motions are too fast -- the sensor takes time to detect changes in the magnetic field. Solution: rotate the phone smoothly, lingering in each position on the phone. 2-3 seconds.
- π± Using a magnet case - many Xiaomi cases have magnetic fasteners that interfere with the sensor.Solution: remove the case before calibrating.
- π Low battery power - at levels below 20%, the system can artificially underestimate the accuracy of sensors. Solution: charge the phone to at least 50%.
- π Unstable signal GPS β compass uses data GPS Solution: before calibrating, geolocate and wait for the satellites to fix.
If the compass still doesn't work properly after a few attempts, the problem may be a hardware malfunction, such as the Xiaomi Mi 11 Ultra, which has a problem with detaching the magnetic sensor plume after falling, in which case only repairs at the service center will help.
π‘
Before calibrating, always check for MIUI updates. Newer firmware versions often fix sensor errors, and the problem can resolve itself.