How to turn off the proximity sensor on Xiaomi Mi 9: a complete guide with risks and alternatives

The proximity sensor in the Xiaomi Mi 9 is a small but critical element that automatically shuts down the screen during phone calls. When you hold your smartphone to your ear, the sensor registers the obstacle and extinguishes the display, preventing accidental pressing. However, users often face false positives: the screen goes out in your pocket, does not turn on after a call, or behaves unpredictably when using cases.

But before you deactivate the sensor, it's important to understand the consequences. Without it, the screen will remain active during calls, leading to accidental button pressing, speaker switching, or even ending the call. In addition, disabling through an engineering menu or ADB can disrupt the stability of the system, especially if you use informal firmware. In this article, we'll look at all the available ways, from safe to radical, as well as alternative solutions for those who are not willing to take risks.

πŸ“Š Why you want to turn off the proximity sensor on the Xiaomi Mi 9?
False positives during calls
The screen does not turn on after the conversation.
Uncomfortable to use with a cover
Just experimenting.
Another reason.

1. Method through standard Android settings (without root)

The safest method is to use the built-in MIUI features. Unfortunately, the Xiaomi Mi 9 does not have a direct option to disable the proximity sensor, but you can bypass the restriction through special features settings. This method does not require superuser rights and is suitable for most firmware versions.

Instructions:

  • πŸ“± Open the Settings. β†’ Special facilities.
  • πŸ” Scroll down and select Physical buttons (or System settings depending on version) MIUI).
  • πŸ› οΈ Find the option Autoturn screen or Sensors (in some firmware options hidden under Additional).
  • ❌ Turn off the approach sensor (if available) or Automatically turn off the screen during a call.

If your MIUI version doesn’t have a direct option, try an alternative path:

  1. During a phone call, swipe down the notification panel.
  2. Click on the icon "Loud Communication" or "Dynamic".
  3. In some firmware, this temporarily disables the sensor's response to obstacles.

⚠️ Warning: After being turned off by special features, the screen can remain active even when the phone is held to the ear, increasing the risk of accidentally completing a call or switching to speakerphone.

β˜‘οΈ Preparation before sensor shutdown

Done: 0 / 4

2. Disconnection via the engineering menu (code ##)

The Engineering Menu is a hidden section of the Xiaomi Mi 9 that allows you to test hardware components, including sensors. This method does not require root rights, but requires caution: incorrect settings can lead to malfunctions of the sensors.

Step-by-step:

  1. Open the Phone app and type the combination: ##6484## (some firmware can run ##4636## β†’ Hardware Testing β†’ Sensors).
  2. In the menu that opens, select Proximity Sensor.
  3. Click Disable or uncheck Enable.
  4. Restart the device to apply the changes.

If the combination doesn’t work, try the alternative code for Xiaomi:

##36446337##

After you enter, you will open the EngineerMode menu, where you will go to Hardware Testing β†’ Sensors β†’ Proximity.

CombinationAppointmentWorks on Mi 9?
##6484##Direct access to sensorsYes (on most firmware)
##4636##Testing of hardwarePartially (requires Sensors selection)
##36446337##MIUI Engineering MenuYes (may differ in global versions)
##2664##Touchscreen testNo (not applicable to the proximity sensor)

⚠️ Note: Changes to the engineering menu are not saved after resetting or updating the firmware. MIUI The sensor can be activated again after restarting.

πŸ’‘

If the engineering menu doesn't open, check if it's blocked by an antivirus or security app (e.g., Security from Xiaomi). temporarily turn off the protection and try again.

3. Disconnection via ADB (for power users)

If standard methods don’t work, you can use Android Debug Bridge (ADB), a debugging tool that allows you to manage system settings via a computer, which requires you to enable USB debugging and install ADB drivers.

Instructions:

  1. Turn on Developer Mode: Go to Settings β†’ About Phone. 7 times click on the MIUI Version until the notification appears You became a developer.

USB debugging

Settings β†’ Additional β†’ For Developers

Xiaomi Mi 9

adb shell settings put global proximity_sensor_enabled 0

Reset the device.

To return the sensor to working condition, use the command:

adb shell settings put global proximity_sensor_enabled 1

If the command fails, try an alternative method by changing the configuration file (requires root rights):

adb shell


su




echo "0" > /sys/class/sensors/proximity/enable

⚠️ Attention: Use ADB This can cause a loss of warranty if the device is in official service, and incorrect commands can cause system failures.

What if the ADB does not recognize the device?
1. Install the latest Xiaomi drivers from the official website. 2. Try another one USB-cable (preferably original). 3. Enable the Unlock option in the developer settings OEM. 4.Reboot the PC and phone.

4. Disable via build.prop editing (root only)

For users with superuser rights (root) available method of editing the system file build.prop. This method is the most radical and can lead to unstable operation of the device if you make errors.

Step-by-step:

  1. Install a file manager with root support (such as Root Explorer or Solid Explorer).
  2. Go to /system/build.prop.
  3. Create a backup of the file (copy it elsewhere).
  4. Open build.prop in the text editor and add the line at the end: persist.sys.proximity.disable=1
  5. Save the changes, set the rights 644 (rw-r-----).
  6. Reset the device.

⚠️ Attention: On some firmware MIUI (especially custom) disabling the proximity sensor may result in loss of Always-On Display functionality or gesture control.

7.How to check the operation of the proximity sensor on Xiaomi Mi 9

Before you turn off the sensor, make sure it's really the problem. Use built-in tools or third-party apps to diagnose.

Method 1: Through the Engineering Menu

  1. Enter the code ##6484##.
  2. Select Proximity Sensor.
  3. Put your hand to the top of the screen (where the sensor is located).
  4. If the values change from 5.0 cm to 0.0 cm, the sensor works correctly.

Method 2: CPU-Z or Sensor Box

  • Install the app from Google Play.
  • Open the Sensors tab.
  • Find Proximity and check for the reaction to the obstacle.

Method 3: Test call

  • Call another phone.
  • Hold the Xiaomi Mi 9 to your ear, and the screen should go out.
  • Take the phone away, the screen should turn on.
  • If there is no reaction or it is delayed, the sensor is faulty.
Sign.Possible causeDecision
The screen does not go out during the call.Sensor is disabled or faultyCheck the settings, test the sensor
The screen does not turn on after the conversation.Sensor or software getting stuckReboot the phone, calibrate the sensor
False positives in your pocketSensitivity of the sensor, caseReduce sensitivity or change the cover
The sensor is not responding at all.Hardware breakdownContact the service center.

FAQ: Frequent questions about shutting down the proximity sensor

❓ Can I turn off the proximity sensor without root?
Yes, through the engineering menu (#6484##) or ADB. However, these methods can reset once the system is updated. Complete shutdown without root is impossible at the kernel level.
❓ Why does the screen go out after the sensor is turned off?
There's probably another mechanism that works, like turning around auto-rotating or making a gesture to "push to the ear" in the call settings. Check the settings in Settings β†’ System β†’ Gestures.
❓ Will Face Unlock work after the sensor is turned off?
Yes, facial unlocking uses a front camera and an infrared projector, not a proximity sensor, but in rare cases, sensor conflicts can occur.
❓ How to return the sensor to working condition?
If you've turned it off through ADB Or build.prop, use reverse commands: adb shell settings put global proximity_sensor_enabled 1 or delete the line from build.prop. For the engineering menu, just reboot the phone.
❓ Can the sensor be turned off only for specific applications?
No, system sensors work globally, but some applications (like Tasker) allow you to emulate the sensor's disconnection for individual tasks through automation.