How to permanently disable the proximity sensor on Xiaomi Mi 9A: a step-by-step guide

Why the proximity sensor on Xiaomi Mi 9A is hindering users

The proximity sensor in the Xiaomi Mi 9A is a small but important element that is responsible for turning off the screen during a phone conversation. In theory, it should prevent accidental pressing of the cheek or ear, but in practice, many owners face its incorrect operation: the screen goes off too early, does not turn back on or works for no reason, especially when using a smartphone in a horizontal position, listening to music through the speaker or during games.

The problem is compounded by the fact that standard MIUI settings (even in the latest versions 14) donโ€™t have an explicit switch to completely disable the sensor. The manufacturer assumes that the function should work perfectly, but in fact users are looking for workarounds. In this article, we will look at all the working methods โ€“ from simple settings to technical tricks with ADB and modification of system files.

Before you start shutting down, itโ€™s worth understanding that the proximity sensor on the Mi 9A is hardware-based (infrared sensor next to the front camera), so software shutdowns donโ€™t always give 100% results, but in 90% of cases, the methods below solve the problem.

Method 1: Disconnect via the engineering menu (without root)

The fastest and safest method is to use a hidden engineering menu, which does not require superuser rights and works on most MIUI firmware for the Xiaomi Mi 9A. Importantly, actions in the engineering menu can affect the stability of the system, so follow the instructions carefully.

To open the menu:

  1. Launch the Phone app.
  2. Enter the combination: ##6484### (or #4636## for the alternative menu).
  3. Select the Hardware Testing option โ†’ Sensor.
  4. Find the Proximity Sensor string and tap it.
  5. In the window that opens, select Disable or uncheck Enable.

If the combination doesn't work, try the alternative code: ##36446337## (for some regions). After you turn off the sensor, restart your smartphone - the changes will apply only after the reboot.

โš ๏ธ Note: Do not change other options in the engineering menu, especially those related to Modem or RF. This can lead to network loss or unstable operation. GPS.

Make a backup copy of the data

Battery charge > 50%

Remember the unlock code of the screen

Do not interrupt the process of settings-->

Method 2: Use of the ADB-Teams (for experienced users)

If the engineering menu is not available or does not work, you can turn off the sensor via Android Debug Bridge (ADB). This method requires connecting your smartphone to your computer, but it doesn't need root rights. MIUI 12/13/14.

Step-by-step:

  1. Download and install ADB Tools on PC.
  2. Turn on Mi 9A USB Debugging: Go to Settings โ†’ About Phone. tap on MIUI Version 7 times to activate Developer Mode. Return to Settings โ†’ Additional โ†’ For Developers. Activate USB Debugging.
adb shell settings put global proximity_sensor_disabled 1

Reset the device.

To get the sensor back to work, use the same command by replacing 1 with 0. This method does not work on some custom firmware, where the manufacturer has blocked the change of system parameters through ADB.

๐Ÿ’ก

If ADB does not recognize the device, update the drivers via the Mi Flash Tool or install Universal ADB Driver.

Method 3: Disconnect via call settings (partial solution)

If the sensor only interferes with conversations, you can limit its impact through standard settings, and this method doesn't shut down the sensor completely, but it reduces the number of false positives.

How to set up:

  1. Open the Phone app.
  2. Tap the three-point menu (โ‹ฎ) โ†’ Settings.
  3. Select Calls โ†’ Additional settings.
  4. Turn off the Automatic Screen Disconnect option (or Approximation Sensor, depending on the MIUI version).

This is a good way to keep the sensor functional but less aggressive, such as keeping the screen from going out 1 to 2 cm away from the ear.

Method of disconnectionRoot is required.DifficultyEfficiency
Engineering menuโŒ No.โญโญ90%
ADB-teamโŒ No.โญโญโญ95%
Call settingsโŒ No.โญ50%
Modification of build.propโœ… Yes.โญโญโญโญ100%

Method 4: Edit build.prop (with root only)

For users with obtained root-rights there is a radical method - editing the system file build.prop. This gives a guaranteed result, but requires caution: an error in the file can lead to bootloop (locked on the smartphone).

Instructions:

  1. Install a file manager with root support (such as Root Explorer or Solid Explorer).
  2. Go to /system/build.prop.
  3. Find ro.lge.proximity.delay= or add it to the end of the file.
  4. Set a value of 25 (delay in MS) or 0 to completely shut down.
  5. Save the file, set the rights 644 (rw-r--r---).
  6. Reset the device.

To diagnose hardware problems, use the sensor test via the AIDA64 or CPU-Z app. If the sensor doesnโ€™t respond at all (showing 5.0 cm when closing your hand), itโ€™s likely to be physically damaged.

In rare cases, flashing to a newer or older version of MIUI helps. For example, users note that the MIUI 12.5 sensor is more stable than on MIUI 14.

๐Ÿ’ก

If the proximity sensor stopped working after the MIUI update, try rolling back to the previous version via Fastboot.This often solves the problem without repair.

FAQ: Frequent questions about the proximity sensor on Xiaomi Mi 9A

Can you turn off the sensor only for specific applications (e.g. YouTube)?
No, the proximity sensor system settings are global, but you can use the Tasker app to automatically turn the sensor on/off via ADB when you run certain programs, which requires root or USB debugging enabled.
Why does the screen go off when the sensor is turned off?
It's probably not the proximity sensor that's working, but the power saving function. Check your phone settings โ†’ call settings โ†’ screen during a call. Some operators (such as MTS or Beeline) add their add-ons on top of the standard ones that can ignore the sensor's disconnection.
Is it safe to turn off the proximity sensor forever?
The only downside is that when you call, the screen won't lock automatically, which can lead to accidental taps, and if you make frequent calls, it's recommended to use headphones or a Bluetooth headset.
How to check if the proximity sensor is working on the Mi 9A?
Run the test: Dial ##6484##. Select Proximity Sensor. Close the sensor with your hand - the value should change from 5.0 cm to 0.0 cm. If the readings do not change, the sensor is defective.
Can I calibrate the sensor without root?
Yes, try Proximity Sensor Reset or calibrate through the engineering menu: Open ##6484##. Select Proximity Sensor. Press Calibrate (if available). Some firmwares have locked the calibration.