How to Calibrate a Compass on Xiaomi Mi 9: The Complete Guide

The Xiaomi Mi 9, released in 2019, is still a powerful device, but over time, software failures can disrupt embedded sensors. Compass calibration is a critical process for those who actively use city navigation or travel through unfamiliar terrain. Without the right magnetic sensor setup, maps can show the wrong direction, leading to lost time and disorientation.

Problems with orientation in the terrain often arise due to the impact of external magnetic fields or software conflict after updating the operating system. Owners of the Mi 9 may notice that the blue direction arrow in Google Maps or Yandex.Navigator begins to rotate randomly or points in the opposite direction. The built-in magnetometer in the Xiaomi Mi 9 requires periodic manual calibration, as software autocorrection does not always cope with severe interference.

In this article, we will take a look at all the methods available to restore navigation modules to work correctly, learn how to use hidden engineering menus, third-party utilities and physical techniques to eliminate errors, and follow the instructions will help you return the accuracy of determining the cardinal points in a few minutes.

Diagnostics of sensor problems on Xiaomi Mi 9

Before you start taking action, you need to make sure that the problem lies in the software failure, not in the physical damage of the module. Modern smartphones, including the flagship Xiaomi Mi 9, are equipped with a complex system of sensors that can conflict with each other. The first sign of malfunction is the constant request of the cards to β€œcalibrate the compass” even after performing standard actions.

Often, users are faced with a situation where GPS determines the location accurately, but the direction of travel is incorrect, a classic symptom of desynchronization of data between the satellite module and the magnetic sensor. The Hall sensor, responsible for the magnetic field, can receive distorted data due to accumulated cache or background processes.

For the initial check, you can use a built-in engineering tester that allows you to assess the current state of all modules of the device, which will help to eliminate the likelihood of hardware failure that could occur after a fall or moisture.

  • πŸ“ Open the Phone app and dial ##6484## to log in to the menu CIT.
  • πŸ“ Find the item "Compass" or "Sensor" in the list to check the response of the magnetometer.
  • πŸ“ Note the values: if they do not change when you turn the phone, the sensor can be blocked by the system.
  • πŸ“ Check if the flight mode is on, which sometimes blocks the coordinate update.

⚠️ Note: If the compass test shows a critical error or values are completely absent in the engineering menu, there may be physical damage to the plume or the sensor itself, which requires contacting the service.

πŸ“Š Have you been in the wrong direction on the navigator?
Yeah, all the time.
Sometimes.
No, it's working.
I don't use navigation.

Preparation of the device before calibration

The effectiveness of the procedure depends on the conditions in which it is carried out. the Earth's magnetic field is quite weak, and any foreign sources of radiation can knock down the accuracy of the Xiaomi Mi 9. The ideal place for work will be an open space away from high-voltage lines, large metal structures and working electronics.

The accumulated debris in the geo-service cache can prevent the correct recording of new calibration data, and it is recommended to close all background applications that actively use geolocation to free up processor resources for system processes.

It is important to ensure a stable battery level, as at low voltage, the system can limit the operation of energy-intensive GPS modules. Make sure that the device has the latest available MIUI shell update, as new versions often contain corrections to sensor drivers.

  • πŸ”‹ Charge the Xiaomi Mi 9 to at least 50% for stable operation of modules.
  • πŸ”‹ Remove the cover if it contains metal elements or magnetic latches.
  • πŸ”‹ Get away from computers, microwaves and speakers at least 1-2 square.
  • πŸ”‹ Reboot the device to reset temporary errors in the driver operation.

πŸ’‘

Framed metallic glass can shield the signal and distort the magnetic field, and for accurate calibration, it is better to temporarily remove the shield.

Calibration through Google Maps and Third Party Apps

The most affordable and safe way to get your navigation back accurate is to use standard Android tools. The Google Maps app has a built-in algorithm that automatically starts when you find a large error in your direction, a method that is suitable for most users who do not want to go into technical settings.

To start the process, open the map app and click on a blue dot that indicates your location. If the system detects an anomaly, a menu will appear suggesting that you calibrate the compass. You will be asked to perform a series of movements with your phone in space that resemble drawing the number eight in the air. The accelerometer and gyroscope in conjunction with the magnetometer will record these movements and adjust the direction vectors.

If the standard method doesn’t work, you can use specialized utilities from the Play Market, such as GPS Status & Toolbox or Compass Calibration, which provide more detailed control over sensors and allow you to reset A-GPS (Assisted GPS) data, which often solves the problem of long satellite searches and wrong azimuth.

The sequence of actions in Google Maps:


1. Open the Google Maps app.




2.Push the blue location circle.




3. Select the item "Calibrate the compass".




4. perform movements with the phone, following the animation on the screen.

⚠️ Warning: Do not calibrate while driving or driving. Traffic creates strong magnetic interference that will lead to incorrect adjustment results.

β˜‘οΈ Checklist of successful calibration

Done: 0 / 4

Using the CIT engineering menu on Xiaomi

Xiaomi smartphone owners have a unique advantage: access to the factory’s Customer Integration Test (CIT) diagnostic menu, which is designed for engineers and allows each component of the device to be tested separately from the main operating system, eliminating the impact of third-party software. For the Mi 9, this is the deepest level of interaction with hardware.

You can find a separate compass test on the CIT menu that shows raw data from the sensor in real time, which allows you to visually assess whether the sensor is responding to changes in the position of the phone. If the graph in the test is frozen or shows chaotic jumps without the device moving, this may indicate the need to reset the sensor data through the Recovery menu.

However, be careful: changing unknown parameters in the engineering menu can lead to unstable system operation.It is recommended to use this section only for diagnostics and standard calibration, without changing factory coefficients if you do not have the appropriate knowledge. MIUI strictly controls access to these functions for user safety.

ParameterDescriptionNormal value.
Magnetometer XData on the X-axisChanges when tilted.
Magnetometer YData on the Y-axisChanges when you turn.
Magnetometer ZData on the Z-axisReacting to the coup
StatusSensor statusPass / OK
What to do if the CIT test does not start?
If the ##6484## code doesn't work, you may have a global firmware version with a modified dialer installed. Try downloading the QuickShortcutMaker app from the Play Market, search for CIT or Test and run the related activity.

Resetting geolocation data and permission settings

Sometimes the problem is not the sensor itself, but the accumulated cache errors of geolocation services. Android stores data on nearby towers and Wi-Fi networks to speed up position determination, and this dataset can become corrupt over time. Clearing this data causes the phone to re-query the relevant information from satellites.

To do the reset, you need to go to your application settings and find the Google Play Services system service, which requires clearing your cache and data, which will not cause you to lose personal information, but reset your location settings, and after this procedure, the phone can re-detect your location with high accuracy for several minutes.

It is also important to check the permissions for navigation applications, if the maps do not have access to the exact location or motion sensors, they will not be able to display the direction correctly. In MIUI, privacy settings can be quite strict, so it is worthwhile to manually recheck the access rights for Yandex.Navigator or Google Maps.

  • πŸ›  Go to Settings. β†’ Annexes β†’ All applications.
  • πŸ›  Find Google Play Services and select Clean" β†’ "Clear all data".
  • πŸ›  In the permissions menu, make sure that access to the geo-position is in the "Always" or "When using" mode".
  • πŸ›  Enable high accuracy mode in location settings.

πŸ’‘

Google Play data cleanup is a safe and effective procedure that solves 80% of the navigation errors without the need for flashing.

Hardware causes of failures and physical impact

The physical factors affecting the Xiaomi Mi 9 are also not to be discounted. The magnetometer is a sensitive element that can demagnetize or gain residual magnetization from close contact with powerful field sources. Smartphone speakers, wireless charging, and even some types of car holders can act as such sources.

There is a technique of "demagnetization" using an application that generates an alternating magnetic field through a vibrator motor, but on modern smartphones with fixed batteries, it does not always work effectively. A more effective way is to exclude contact with magnets for several days, so that the natural field of the Earth restores the orientation of the domains in the sensor.

If the phone was hit, the plume connecting the board to the sensor module could be damaged. In the Mi 9, many sensors are soldered on the main board or are on a flexible button/charging plume, in which case the software calibration will be meaningless, and it will require the intervention of specialists from the service center to replace the component.

⚠️ Warning: Using powerful neodymium magnets to "calibrate" the phone is strictly prohibited.You can permanently damage the Hall sensor or demagnetize other components of the device.

Frequently Asked Questions (FAQ)

Why is the compass on Xiaomi Mi 9 lying after the MIUI update?
After updating the MIUI firmware, calibration factors may be lost or driver conflicts may occur. It is recommended to perform a full calibration through Google Maps and clear the geo-service cache. In rare cases, a factory reset helps.
Does the protective glass affect the compass?
Ordinary glass or plastic doesn't affect the magnetic field, but if you have a case with a metal frame or a magnetic clasp, you have to remove it, and the metal elements distort the magnetic field lines, which leads to errors in the magnetometer readings.
How often should I calibrate a compass on a smartphone?
No special frequency. Calibration is required only when there are obvious navigation errors or after a strong magnetic influence. Modern smartphones, including the Xiaomi Mi 9, have an automatic correction function that works in the background.
Can I calibrate a compass without the internet?
Yes, the magnetic field sensor itself works autonomously, but to link the direction to the map (north-south) and download current A-GPS data, it is advisable to have an active Internet connection at least at the time the procedure begins.