How to turn off the proximity sensor Xiaomi Mi 9: Deep setup

The problem of black screen during a conversation or, conversely, random clicking of the cheek when calling is a classic headache owners flagship Xiaomi Mi 9. Unlike budget models, where the sensor is located in a classic place above the display, the β€œnine” uses a complex system of ultrasonic sensor built directly into the screen.

You can turn off or reconfigure this module software without having to use complex soldering manipulations or completely flashing the device. However, before you start taking drastic measures, you need to clearly understand what causes the failure: software conflict, contamination of the screen area or hardware defect. In this article, we will discuss in detail all available diagnostic and problem solving methods, including hidden engineering menus that are usually not available to the average user.

Keep in mind that completely disabling the sensor will deprive you of the function of automatically turning off the screen during a conversation, which can lead to accidental taps. Therefore, on the Xiaomi Mi 9, the most effective solution is often not to completely disable, but to accurately calibrate through hidden system codes, which we will talk about below.

The reasons for the incorrect operation of the sensor on Xiaomi Mi 9

Understanding the nature of the failure is half the success of fixing it. In the case of the Mi 9, it is complicated by the use of ultrasonic technology, which does not require a physical hole in the display, but is extremely sensitive to software errors and physical barriers. Often users blame the MIUI "glitch" for everything, forgetting to check the elementary things, such as a protective glass or a case, which can overlap the bottom of the screen, where the touch module is located.

Another common cause is the accumulation of cache of system services or conflict after an operating system update. The algorithms of the sensor can be lost if the old configuration files from the previous version of the firmware are left in memory. In such cases, a simple reboot does not help, a deeper intervention in system settings or a reset of calibration data is required.

Hardware problems can also be ruled out, although they are less common on the Xiaomi Mi 9 than software. Hits, moisture or just natural wear of the plume can lead to the fact that the sensor will begin to give incorrect data about the distance to the object, in which case software methods can only give a temporary effect, and the only solution will be to contact the service center.

  • πŸ“± Protective films: Incorrectly pasted glass or film with thick edges can block the operation area of the ultrasonic sensor.
  • πŸ›‘οΈ Cases: Some models of cases with high sides physically interfere with the operation of the sensor located at the bottom of the display.
  • πŸ’Ύ System failure: Errors in the service android.sensor.proximity after a failed update MIUI.

⚠️ Warning: Before you start any manipulations, make sure that your device has the latest firmware stabilization installed. MIUI It can contain bugs that the developers have not yet managed to fix, which directly affects the operation of sensors.

It’s also important to note that in some cases, the problem may be in a specific call app. A standard Google or MIUI caller may conflict with sensor drivers. So if you’re using third-party apps to make calls, try temporarily going back to the standard solution to rule this out.

Diagnostics through CIT Engineering Menu

The first step in solving any problem with Xiaomi equipment should be professional diagnostics. In the shell of MIUI built a powerful tool called CIT (Customer Integration Test), which allows you to test each individual module of the smartphone. Xiaomi Mi 9 is especially relevant, because it allows you to see raw data from the proximity sensor in real time.

You don't need root rights to get into the diagnostic menu, you just have to open the standard Phone app and type in a service code, and once you type in a command, the system automatically redirects you to a hidden menu that has a complete list of all the components being tested, and we're interested in the sensor-related section, which is usually called the Proximity sensor or just the Sensor.

Inside the test, you'll see the current distance value. If you hold your hand to the bottom of the screen, the value should change (usually from 5.0 to 0.0 or vice versa, depending on the version of the driver), if there is no reaction or values "jump" without you, this is a direct signal that you need to calibrate or replace the module.

β˜‘οΈ Diagnostics CIT

Done: 0 / 5

If the test shows that the sensor is physically healthy but behaves unpredictably under normal conditions, then the problem lies in the software calibration, in which case, move to the next section, where we will discuss the process of resetting the sensor settings.

Calibration of the proximity sensor

Calibration is the process of "training" the system to correctly determine the distance to the object. For the Xiaomi Mi 9, this process is critical, since the ultrasonic sensor must know exactly the thresholds at which the screen should go out. Calibration failure is the most common reason why the phone does not respond to approach or, conversely, goes out in the hands.

Calibration is often done automatically when the phone is first turned on or after resetting, but can also be done manually through the same CIT engineering menu. In some versions of MIUI, a separate calibration utility is available that instructs the user Step-by-step when to close the sensor with your hand and when to remove it.

It's important to calibrate in a calm environment, avoiding sudden movements on the phone. Put the device on a flat surface, run the test and follow the instructions on the screen. The system will record new reference values that will be used by drivers to interpret sensor signals.

ParameterNormal value.Failure valueAction.
Distance (mm)0 - 50 (covered)Constant 0 or 100+Sizing
StatusNear / FarFrozen statusReboot.
Raw DataChanges smoothly.Abrupt jumpsSoftware testing

Once you have successfully calibrated, be sure to restart the device, which will allow the system to completely re-initiate the services responsible for the operation of the sensors and apply new settings, and if the problem persisted due to a software error, this step should eliminate it.

What to do if the calibration does not pass?
If the system writes a calibration error or the process freezes, try clearing the Settings and Phone app cache before you try again.

Using Hidden Codes to Reset

If standard calibration does not help, you can try a deeper reset of the sensor settings through special sensors. USSD-These commands allow you to reset the sensor configuration to factory values, ignoring the user changes that may have accumulated during the operation of the Xiaomi Mi 9.

One of the most effective codes for resetting sensor settings is ##64663## (which may be different in some regions), and in the menu that opens, you need to find the item associated with the proximity sensor and choose the option of resetting or recalibrating. Be careful not to confuse this with a full reset phone that will delete all your data.

There is also a debugging menu reset method, but it requires pre-enabled developer mode, which requires several clicks on the build number in the About Phone section, and once the developer mode is enabled, the menu will see "Debug over USB" as well as access to advanced logs where you can see the proximity driver errors.

  • πŸ”§ Reset code: Enter the combination ##64663## to enter the extended test menu.
  • πŸ“‰ Log Reset: Cleaning system logs can remove errors that block the sensor from working properly.
  • βš™οΈ Developer Mode: Allows you to see more detailed information about the status of sensors in real time.

Hidden code is a powerful tool, but it requires caution: Don't change the values of parameters you're not sure about. Your goal is to reset the sensor settings, not rewrite system constants, which can cause the entire device to malfunction.

πŸ“Š Have you solved the sensor problem?
Yeah, calibration.
Yeah, filming.
No, we need repairs.
I haven't tried it yet.

Disconnection through third-party applications

When system methods are exhausted, third-party apps from Google Play come to the rescue. They don't physically disable the sensor (which is impossible without superuser rights), but intercept its signals and ignore them in certain scenarios. For the Xiaomi Mi 9, this may be the only way to bypass the bug of a particular MIUI update.

A popular solution is Proximity Sensor Reset/Fix or similar, which requires special permissions through ADB (Android Debug Bridge) or root rights, and the essence of their work is to constantly monitor the state of the sensor and software "cheat" the system if the sensor reports an approach when the phone is near the ear.

And these applications often require you to run a command through a computer. You plug the phone into the computer. USB, Enable debugging and enter the command into the console ADB, It allows the application to change the system's security settings, and it allows the program to interfere with the system. android.permission.WRITE_SECURE_SETTINGS.

adb shell pm grant com.example.proxfix android.permission.WRITE_SECURE_SETTINGS

You know, using third-party software is always a risk, you trust a third-party developer to access the sensitive functions of your smartphone, and you can also consume extra battery power because they run in the background, constantly querying sensors.

⚠️ Warning: When installing sensor control applications, carefully read the permissions they request. Avoid programs with questionable reputations or those that require access to your contacts and other devices. SMS needlessly.

Hardware problems and their solution

If neither software calibration, resetting, nor third-party apps helped, the problem is likely hardware-related.In the Xiaomi Mi 9, the proximity sensor is integrated into the display module, and its damage often requires replacing the entire screen or complex repairs at the service center.

A common cause of hardware failure is the detachment of the sensor plume from the motherboard or the display itself, which can occur after the phone falls, or even just from the time and heat of the device, in which case the contact disappears, and the phone ceases to react to the approach of objects.

It's also worth checking the integrity of the bottom of the screen, and even a microscopic crack in the area of the ultrasonic sensor can disrupt its operation, and the ultrasonic wave can't pass through the damaged glass correctly, leading to constant operation or, conversely, ignoring obstacles.

  • πŸ”Œ Train waste: Requires disassembly of the phone and reconnecting the sensor connector.
  • πŸ’₯ Microcracks: Eye-invisible damage to glass at the bottom of the screen blocks ultrasound.
  • πŸ’§ Oxidation: Moisture can cause sensor contacts to corrosion, even if the screen itself is intact.

In the case of hardware failure, self-repair is only possible with experience and tools. Beginners should contact the professionals, since replacing the sensor with the Mi 9 is a jewelry job that requires removing the display and working with small components.

πŸ’‘

Before going to the service center, take a photo or video that shows the problem, which will help the master to understand the problem faster and perhaps save time on diagnosis.

Frequently Asked Questions (FAQ)

Can I completely disable the proximity sensor without Root rights?
It is impossible to completely disable the sensor at the system level without root rights, since it is a system component of Android. However, you can achieve the effect of disabling using interceptor applications or setting the "In your pocket" mode in the locking settings, which ignores the sensor under certain conditions.
Why did the MIUI update stop working?
MIUI updates often contain new hardware drivers. If a new firmware version has a bug in the ultrasonic sensor driver code, it can lead to incorrect work. Usually Xiaomi releases patches quickly, but sometimes only waiting for the next update or rolling back on the previous version helps.
Does the protective glass affect the sensor in the Xiaomi Mi 9?
Because the sensor in the Mi 9 is ultrasonic and is under the screen, any additional glass, especially with a thick adhesive layer or black bezels overlapping the bottom of the display, can jam the signal or create an echo that the system perceives as an obstacle.
What if the screen goes off when I just hold my phone in my hand?
This is a sign that the sensor is too sensitive or contaminated. Try to wipe the bottom of the screen thoroughly. If it doesn't work, calibrate it through the engineering menu. At the very least, you can try to reduce sensitivity through third-party apps if the phone model is supported.

πŸ’‘

The main thing in solving sensor problems on Xiaomi Mi 9 is a sequence of actions: from screen cleaning and calibration to resetting settings and, last of all, hardware repair.