Xiaomi Approximation Sensor: Where to Find in Settings and How to Calibrate

The problem when the screen of the Xiaomi smartphone goes out during a conversation or, conversely, does not respond to the ear, is familiar to many owners. Most often, the cause of failures is not a hardware failure, but a software failure or incorrect operation of the sensor responsible for the distance to the user's face. Understanding that the proximity sensor Xiaomi is in the settings, allows you to quickly eliminate discomfort and restore normal operation of the device.

There's no single "Enable the sensor" button in Android and the MIUI or HyperOS shell, because it's always running at the hardware level, but there are hidden partitions, engineering menus and special applications that allow you to control the sensitivity of the sensor and conduct deep calibration, and these are the tools we're going to look at so you can diagnose the problem yourself.

The Chinese brand's smartphones today come with different types of sensors: classic infrared sensors and more modern virtual sensors that work through the screen. The type of device you have depends on the way you set up, some require you to activate a hidden function through an engineering menu, others require a fairly simple calibration, and then we'll look at all the ways you can control this important component.

Main settings menu and hidden functions

The first place you should look at is the standard settings menu, and although a direct switch for a proximity sensor is rare, there are related functions that affect how it works, such as In Your Pocket mode, which often uses the sensor's data to lock the screen.

To check the basics, go to Settings β†’ Lock screen. This may be the option β€œMode in your pocket” that you need to activate. If this feature is turned off, the phone may not respond to the placement in the bag, which indirectly indicates the sensor is working. Also worth checking the Settings β†’ Passwords and Security β†’ Privacy section, where sometimes the permissions for system services responsible for sensors are hidden.

πŸ’‘

If you don't find the switch in the regular menu, it doesn't mean it's broken. On many Xiaomi models, the sensor's control is either put on the engineering menu or performed automatically by the system.

It's important to understand that in the newer versions of the MIUI 12, 13, 14 and HyperOS shell, the company is gradually removing the ability to manually adjust sensitivity from the user interface, to prevent accidental failures by inexperienced users, so if standard switches are missing, it's necessary to move to more advanced diagnostic methods.

  • πŸ“± Check the "lock screen" section for the presence of a mode in your pocket.
  • πŸ” In the search for settings, type the word β€œpocket” or β€œapproach” for quick access.
  • βš™οΈ Make sure that the Advanced Settings section does not include features that block sensors.
  • πŸ›‘οΈ Check the access rights for the "Phone" application in the privacy section.

The absence of an explicit switch in the main menu is normal for most modern models, and the system seeks to minimize user interference with hardware components, but this does not prevent us from checking the module's health in other ways.

CIT Engineering Menu: Complete Diagnostics

The most effective tool for testing and tuning the sensor is the CIT (Cellular Identity Tool) engineering menu, which is a hidden part of the system designed to test all the hardware components of the device, and this is where you can see the real sensor readings and start calibrating it.

To enter the diagnostic menu, open the Phone app and type a special code. For most Xiaomi and Redmi devices, this is a combination of ##6484## or #4636##. Once you enter the code, you will open a list of tests. Find Proximity Sensor or Approximation Sensor. When you click on it, you will see a screen with two digital values: the current distance and the trigger threshold.

β˜‘οΈ Diagnosis in CIT menu

Done: 0 / 6

In the test, hold your palm to the top of the screen (where the speaker is located). If the sensor is working, the value on the screen will change from 5.0 (or 1) to 0.0 (or 0). If there is a reaction, but the phone screen does not go out when calls, then calibration is required. In the same menu, a Calibration button is often available, which you press when you close the sensor, and wait for the process to be completed.

⚠️ Warning: Don't change the thresholds manually in the engineering menu if you're not sure what you're doing. Incorrect calibration can cause the screen to go out in your pocket or not respond to an earlift.

The engineering menu is a powerful tool to separate a software failure from a physical failure, and if the sensor doesn't respond at all in the CIT test (the values don't change even when you close your hand), there's a high probability of hardware failure or contamination of the security glass in the sensor area.

Secret code for calibrating the sensor

There is an alternative and faster way to get straight into calibration mode, bypassing the long CIT menu. This method is especially useful if you need to quickly reset your sensor settings after changing the screen or protective glass.The code to access this mode may vary depending on the model, but the most versatile is ##64663###.

Once you enter the code, you'll see a simplified menu where you'll immediately have access to the proximity sensor test, and what you'll do is you close the top of the screen, press the calibration button, and wait a few seconds for the system to write down the new reference values, then you'll remove your hand and press the confirmation button again, and the successful completion of the operation is usually accompanied by a vibration or an audible signal.

What if the code doesn't work?
Some carriers or firmware modifications may block input USSD-In this case, try to enter the code through the Phone application, but do not press the call button. If this does not help, use the Engineering Mode application (installation required). APK) or ADB-commands to access settings.

It is important to note that some global firmware versions may have limited access to engineering code, and you can try to enter a command via ADB (Android Debug Bridge) from your computer if USB debugging is enabled. the adb shell am start -n com.miui.calibration/com.miui.calibration.CalibrationActivity command can run the desired partition directly.

  • πŸ”’ Use the code ##64663## for quick access to calibration.
  • πŸ–οΈ During calibration, close the area above the screen with your palm.
  • ⏳ Wait for the vibration response before removing your hand.
  • πŸ”„ Repeat the procedure. 2-3 time-consolidation.

If the problem persists after calibration, it may not be the settings, but the physical condition of the smartphone surface: Dirt, greasy spots or thick protective glass can distort the readings of the infrared sensor.

Settings of the virtual proximity sensor

Modern flagship models and devices with in-screen cutouts (bangs) often use virtual proximity sensor technology. These smartphones do not have a separate infrared window; instead, part of the display itself and AI algorithms are used.

To find this option, go to Settings β†’ Phone β†’ Incoming calls. This may be "Draw-up Sensor" or "Use Approximation Sensor." If you have custom theme or modified firmware installed, the path may be different. For Xiaomi owners with a virtual sensor, it is critical to use the original security glass, as thick films disrupt the technology.

πŸ“Š What type of proximity sensor do you have?
Infrared (separate window)
Virtual (under the screen)
I don't know/I'm not sure
I have a button phone.

Virtual sensors sometimes require additional activation through hidden developer settings, which requires 7 clicks on the build number in the About Phone section, then go to Advanced Settings β†’ Developers. There you should look for an option associated with Proximity Sensor or ULPS, but the availability of such items depends on the specific processor model.

The thing about virtual sensors is that they can be more sensitive to software conflicts. Installing third-party call management applications can override system settings, causing crashes, and in such cases, resetting the phone application settings through the application menu helps.

Table: Comparison of adjustment methods

To organize the information and choose the most appropriate way to solve your problem, check out the method comparison table, which will help you understand which tool to use depending on the symptoms of the malfunction.

MethodAccess.EfficiencyRisk of error
Main menuSafe.Low (pocket mode only)Absent.
CIT's Engineering MenuHidden (code)High (full diagnosis)Low.
Calibration codeHidden (code)Average (reset)Medium.
ADB teamDifficult (PC)Maximum (deep access)High-pitched

As you can see from the table, for most users, the best solution is to use the CIT engineering menu, which provides a balance between functionality and security, and ADB methods should only be used by experienced users who understand the risks of tampering with system files.

The choice of method also depends on whether you have recently changed the screen or the protective glass, after which calibration through CIT is a mandatory procedure that is often ignored in service centers, which leads to complaints of users about the "glutty" screen.

Management and testing applications

If the built-in MIUI tools don’t work well or seem too complicated, third-party apps from the Google Play Store come to the rescue, and there are many tools that allow you not only to test, but also to force the sensors to turn on or reconfigure.

One of the most popular tools is the Proximity Sensor Reset/Fix app, which automatically triggers the calibration process, eliminating the need for users to memorize codes, and the Phone Tester app, which shows detailed information about the status of all sensors in real time, plotting the change of values.

πŸ’‘

Third-party applications are a convenient way for beginners to access the system, but they require permission to access the system. Be careful when granting rights "over other windows."

Another useful tool is the Touch Screen Test, which is designed to test the touchscreen, but it also displays multi-touch and proximity sensor data, and it allows you to make sure that the screen responds to touch and locks correctly in one place, but remember that third-party apps can't fix the physical failure of the plume.

  • πŸ“² Proximity Sensor Reset – for automatic calibration in one click.
  • πŸ“Š Phone Tester – for detailed monitoring of sensor readings.
  • πŸ› οΈ Repair Toolkit – a set of tools for deep diagnostics of Android.
  • 🧹 Clean Master – sometimes helps to clean the cache of the system to restore the work of services.

Using third-party software is especially important when the system menu has been updated and the usual paths are gone, but always check the reviews and developer rating before installing it to avoid infecting the device with malware.

Frequent problems and their solution

Even after the right setup, users can experience recurrences of the problem, often because of trivial things like contamination of the top of the case, the use of poor-quality protective glass or the conflict of applications. A black screen during a conversation can be caused by the sensor "seeing" the edge of the glass or dirt.

If the screen goes out when you hold the phone on your outstretched arm, it's a sure sign that you need to calibrate or replace the protective film. In some cases, simply wiping the speaker area with an alcohol wipe helps, and it's also worth checking if the film is too high, overlapping the sensor.

⚠️ Note: If the calibration does not help and the sensor leads