How to Calibrate Location on Xiaomi Android Smartphones: The Complete Guide

Why Xiaomiโ€™s smartphone is not correctly positioned?

Have you noticed that Google Maps shows your location with a 50-200-meter error, and the navigator in the car goes crazy on corners? Or do running apps capture a zigzag route instead of a flat line? The problem is not with the maps themselves, but with the wrong work. GPS-on Xiaomi devices (including Redmi models, POCO and Mi, this is most often related to:

- Uncalibrated compass (magnetic sensor), which is responsible for the orientation of the device in space;

Weak GPS signal due to outdated satellite database (AGPS)

- Software failures after updating MIUI or resetting settings;

Hardware restrictions (for example, a metal phone case or a case shields the signal).

In this article, weโ€™ll break down unique calibration methods for Xiaomi that arenโ€™t found in standard instructions, from hidden engineering menus to manually editing configuration files, and learn how to make your smartphone show coordinates to within 3-5 meters of an urban environment.

Calibration Preparation: What to Check Before Setup

Before you get into the settings, make sure that the problem is not the trivial stuff.

Is High Accuracy Mode enabled in Location Settings?

Is there access to mobile internet (to download AGPS data)?

Are energy saving modes turned off (e.g. Battery โ†’ Performance mode)?

Are you wearing magnets or metal inserts?

Is the firmware updated to the latest version? MIUI?-->

Pay special attention to the energy saving clause. Xiaomi can activate Location Optimization by default, which limits GPS in the background, to turn it off:

  1. Go to Settings โ†’ Applications โ†’ Application Management;
  2. Slip on the three points in the upper right corner and select Special Access.
  3. Click Battery Optimization and find it in the list of Google Play Services.
  4. Choose No Limits.

Regularly, especially in the city

Sometimes, usually after the updates.

It used to be, but it solved the problem.

Never noticed a mistake.-->

Method 1: Calibration of the compass using standard settings

The magnetic sensor (compass) is responsible for the correct orientation of the map and the accuracy of determining the direction of movement. If it is not calibrated, the compass needle in Google Maps will "jump", and the navigator will give out wrong clues in the corners.

  1. Open the Compass app (if not, install it from Google Play);
  2. Follow the instructions on the screen: usually rotate the phone in the air, describing the infinity sign (โˆž), and then tilt it at different angles.

If a standard compass doesnโ€™t help, use the hidden engineering menu:

  1. Open the phone app and enter the combination: ##6484###
  2. In the GPS Test menu, select Magnetometer Calibration.
  3. Repeat the movements according to the instructions (usually 3-5 circles on each axis are required).

๐Ÿ’ก

If after calibration the compass still works incorrectly, try to turn off the autoturn function in the display settings - sometimes it conflicts with the sensors.

Method 2: Resetting and Updating AGPS Data

AGPS (Assisted GPS) โ€” It's a technology that speeds up satellite search by downloading up-to-date data about their location over the Internet, and if that data is outdated, the smartphone will take a long time to catch a signal or locate with a large margin of error. AGPS Xiaomi:

  1. Install GPS Status & Toolbox from Google Play
  2. Open it and tap the Manage A-GPS state button.
  3. Press Reset, then Download;
  4. Wait until the data is downloaded (internet connection is required).

For advanced users, there is an alternative way to use ADB:

adb shell su


echo "1" > /data/agps_conf/agps_restart

What to do if the AGPS is not updated?
If, after the data are reset, AGPS do not load, check: 1. Date and time settings: must be enabled automatically (manually issued time blocks the update) AGPS). 2. DNS-Servers: Sometimes changing to Google helps DNS (8.8.8.8). 3. Firewall or VPN: They can block access to servers. AGPS (Turn them off while the update is done).

Method 3: Manually fix the GPS configuration file

On Xiaomi smartphones, the accuracy of GPS depends on the gps.conf file, which contains satellite connection settings for your region. If the file is corrupted or configured incorrectly, the phone will "lost" the signal.

  1. Install a file manager with access to the root folder (e.g. Root Explorer or FX File Explorer).
  2. Go to /system/etc/gps.conf.
  3. Make a backup copy of the file, then open it for editing;
  4. Find the lines: NTP_SERVER=... XTRA_SERVER_1=... XTRA_SERVER_2=... XTRA_SERVER_3=... Replace them with servers for your region (for example, for Russia): NTP_SERVER=ru.pool.ntp.org XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
  5. Save the file and restart the smartphone.

โš ๏ธ Note: Editing system files requires root rights. Without them, the changes will not last. If you do not have root access, skip this method or use Magisk to temporarily obtain rights.

Method 4: Using third-party applications to fine-tune

If standard methods didn't work, try specialized tools that allow you to test a GPS signal, calibrate sensors, and even emulate satellite data for verification.

AnnexFunctionsReference
GPS TestShows signal from all visible satellites, tests accuracy, saves logsGoogle Play
GPS Status & ToolboxCalibration of the compass, resetting AGPS, displaying coordinates in real timeGoogle Play
GPSTest (from Android GPS Test)Supports all satellite systems (GPS, GLONASS, BeiDou, Galileo), data exportGoogle Play
Fake GPS LocationEmulation of location for testing (requires the inclusion of Developer Mode)Google Play

For maximum accuracy, we recommend using GPS Test paired with GPS Status. First, reset the AGPS data to GPS Status, then check the signal in the GPS Test.

  • ๐Ÿ“ถ Number of satellites: optimal 8-12 (less than 5 means weak signal);
  • ๐ŸŽฏ Accuracy: The green circle around your position should be no more than 5-10 meters;
  • ๐Ÿ”„ Stability: If the signal disappears every 10 to 20 seconds, the hardware is a problem.

๐Ÿ’ก

If GPS accuracy has not improved after all the manipulations, check your phone for physical damage to the antenna (for example, after a fall or repair).

Method 5: Hardware inspections and alternative solutions

If the software methods do not work, the problem may lie in:

  • ๐Ÿ“ฑ Damaged antenna. GPS (often after replacing the display or back cover);
  • ๐Ÿ”‹ Faulty power module (GPS requires stable voltage);
  • ๐Ÿ›ก๏ธ Signal shielding (metal case, magnet case, metallization film).

For diagnosis:

  1. Try using a phone without a cover in an open space (for example, on a street without tall buildings).
  2. Check if the upper part of the case is warm (there is a GPS antenna) - overheating may indicate a short circuit;
  3. If possible, test another one. SIM-Map (sometimes mobile network issues affect the network) AGPS).

If you suspect a hardware malfunction but donโ€™t want to carry your phone to the service, try an external one. GPS-receiver (connects via Bluetooth) Popular models:

  • ๐Ÿ“ก Bad Elf GPS Pro+ (accuracy up to 2.5 m, supports GLONASS);
  • ๐Ÿ“ก Dual XGPS150A (Compatible with Xiaomi via Bluetooth LE);
  • ๐Ÿ“ก GlobalSat BU-353-S4 (Budget option for navigation in the car).

โš ๏ธ Attention: External GPS-Modules require additional applications (e.g. Bluetooth) GPS Provider) for data transfer to Google Maps or other navigators.

Frequent Mistakes and How to Avoid Them

When calibrating GPS on Xiaomi, users often make mistakes that only make things worse.

  1. Factory reset without backup: This removes not only GPS settings, but also AGPS data that you have to download again. Always backup through Settings โ†’ System โ†’ Backup;
  2. Use of utilities to โ€œaccelerate GPSโ€ from unverified sources: many such programs contain malicious code or corrupt system files
  3. Disabling Google services to save battery: Google Play Services is responsible for the operation of AGPS โ€“ its shutdown will lead to a long search for satellites;
  4. Calibration of the compass next to magnets or metal objects: this distorts the sensor data.

Another common problem is application conflict, like if you have:

  • ๐Ÿ”„ Two navigators at the same time (for example, Google Maps and Yandex.Navigator);
  • ๐Ÿ›ก๏ธ Ad-blocking apps (such as AdGuard) that can filter requests to servers AGPS;
  • ๐Ÿ“ก Location emulation programs (e.g., Fake) GPS), The ones that โ€œsubstituteโ€ real data.

To check for conflicts, run your phone in Safe Mode (press the power button โ†’ Safe Mode) and check the GPS. If everything is working normally in Safe Mode, one of the installed apps is to blame.

FAQ: Answers to Frequent Questions

Why did the MIUI GPS stop working?
Updates often reset gps.conf settings or conflict with module drivers. Try: Reset AGPS data via GPS Status; Remove the update (if the problem has recently appeared) through Settings โ†’ About Phone โ†’ System Update โ†’ Three Points โ†’ Select the service pack; Install custom recovery (such as TWRP) and flash the GPS module separately.
Can GPS be calibrated without the internet?
Yes, but the accuracy will be lower. Without the Internet, AGPS data will not be updated, so: Calibration of the compass will work; Satellite search will take up to 10-15 minutes (instead of 1-2 minutes with AGPS); Location accuracy will deteriorate to 20-50 meters. To speed up the process, use offline maps in Google Maps or OSMAnd.
How to check if it works GPS-module?
Use the code to test hardware components: Open the Phone app and type: ##4636## Go to the Testing โ†’ GPS tab; If satellites appear on the list (albeit with a weak signal), the module is serviceable. If the list is empty, there is a problem in the antenna or plume.
Does flashing help with custom firmware (like LineageOS)?
Sometimes, yes, stock firmware. MIUI It may contain bugs in drivers GPS, Especially on older models (Redmi Note) 4/5, Mi A1). Custom firmware (e.g. LineageOS, Pixel Experience) often uses Googleโ€™s universal drivers, which are more stable: ๐Ÿ”ง Requires an unlocked bootloader and root; ๐Ÿ“ต Mi Account and some camera features may stop working; โš ๏ธ The risk of โ€œbrickingโ€ the phone with the wrong firmware.
Why is GPS worse in the city than in the city?
This is a normal phenomenon associated with: ๐Ÿข Multiple reflection of signals from buildings (multipath); ๐Ÿ“ก Interference from Wi-Fi and cell towers; ๐Ÿš— Screening the signal in the car (metal body, tinted) To improve reception in the city: Turn on the navigator mode Only GPS + GLONASS (in Google Maps: Settings) โ†’ Navigation โ†’ Positioning mode; Use an external antenna (such as a magnetic one for a car); Keep your phone closer to the window (in the car) or raise your hand with your phone higher (when walking navigation).