Direct Service on Xiaomi: a hidden tool for diagnosing and testing a smartphone

Why Xiaomi is hiding Direct Service from users

If youโ€™ve ever logged into the Xiaomiโ€™s engineering menu using code ##4636## or looked for ways to test the sensors, youโ€™ve probably come across a mention of Direct Service. This is a utility app that the manufacturer deliberately doesnโ€™t advertise โ€” itโ€™s not on the standard menu, and access to it often requires special commands or even root rights.

In fact, Direct Service is a powerful tool for hardware diagnostics, communication module testing, and system component debugging that is originally designed for service centers and developers. However, experienced users have learned to use it to independently check smartphones, from battery testing to sensor calibration. In this article, we will explain what lies behind this program, how to run it on different Xiaomi models (including Redmi, POCO and Black Shark), and the risks of using it.

It's important to understand that working with Direct Service requires caution. Some tests can cause failures if they are not performed correctly, and changing hidden parameters can lead to a loss of warranty. So before you dive into the details, answer yourself the question: do you really need these features, or are there enough standard tools like Settings โ†’ About Phone โ†’ Diagnostics?

๐Ÿ“Š Have you ever used the engineering menu on Xiaomi?
Yes, for diagnostics.
Yeah, out of curiosity.
No, I'm afraid to break my phone.
I don't know what that is.

What is Direct Service: A Technical Explanation

Direct Service is a low-level utility software integrated into Xiaomiโ€™s Android-based firmware that provides direct access to the phoneโ€™s hardware components, bypassing standard operating system constraints. Unlike custom applications that interact with hardware through intermediaries (drivers and APIs), Direct Service runs at the HAL (Hardware Abstraction Layer) level, which allows:

  • ๐Ÿ”ง Test modules โ€“ check the performance of the camera, microphone, speakers, accelerometer and other sensors without additional software.
  • ๐Ÿ“ก Network Diagnose โ€“ Analyze the Wi-Fi, Bluetooth, GPS and cellular signal (including parameters 4G/5G).
  • ๐Ÿ”‹ Power control โ€“ monitor battery voltage, charging current and temperature in real time.
  • ๐Ÿ› ๏ธ Calibrate sensorsโ€”set up a gyroscope, compass, and proximity sensor if they are not working properly.

Itโ€™s essentially an analogue of Engineer Mode on Mediatek or Qualcomm devices, but with enhanced capabilities for Xiaomi devices. For example, you can find options that arenโ€™t even in the standard engineering menu, such as tests for the NFC- chip or diagnostics for the UFS- drive (internal memory).

However, not all Direct Service features are documented, and some options may be missing descriptions or have cryptographic names (e.g., FTM for factory test mode), because the tool was developed for internal use by Xiaomi and its partners.

โš ๏ธ Warning: On some models (e.g., Xiaomi 12T Pro or Redmi Note 11 Pro+), Direct Service access is blocked at the firmware level.A startup attempt may result in a Permission Denied error or device reboot.

How to run Direct Service on Xiaomi: step-by-step instructions

The way Direct Service is opened depends on the smartphone model, the MIUI version, and even the firmware region, and we have collected current methods that work on most devices (tested on MIUI 14 and HyperOS).

Method 1: Using USSD code (for most models)

The easiest method is to enter the service code in the Phone application:

  1. Open the Phone app.
  2. Enter the combination: ##374253## (corresponding to ##DSEVC###).
  3. Press the call button.

If the code works, a menu will open with tabs like Hardware Testing, Network Testing, and others, and some devices (like POCO F5) may need to enter a password โ€” the default is 1234 or 0000.

Method 2: ADB (for advanced users)

If USSD- code is not working, try running Direct Service via ADB:

adb shell am start -n com.android.directservice/.DirectServiceActivity

For this:

Enable USB debugging in Settings โ†’ About Phone โ†’ MIUI version (click 7 times)

Connect your phone to your PC and confirm your trust in the device

Install ADB Tools (e.g. Google Platform Tools)

Execute the command above in the terminal

-->

If the command doesn't work, check if the com.android.directservice package is removed from your firmware, which is true for custom builds like LineageOS or Pixel Experience.

Method 3: Through an engineering menu (alternative)

On some devices (such as the Redmi 10C or Xiaomi 11 Lite NE), Direct Service features are duplicated in the standard engineering menu.

  1. Enter the phone code ##4636##.
  2. Select Testing or Hardware Info.
  3. Look for tabs with the names Direct Test or Service Menu.

โš ๏ธ Warning: On smartphones with Qualcomm Snapdragon processors (such as the Xiaomi 13 Pro), some Direct Service tests may require Diag Mode activation. This requires root rights or a special Qualcomm cable HS-USB.

Direct Service: What can be tested

The Direct Service interface varies by model, but most Xiaomi devices support the following key options:

CategoryFunctionsExample of use
Hardware testsChecking display (colors, touchscreen) Camera test (frontal / rear) Diagnostics of speakers and microphones Calibration of sensors (gyroscope, accelerometer)If the screen reacts to late touch, the touch screen test will show dead zones.
Network and communicationWi-Fi/4G/5G Signal Analysis Bluetooth and NFC GPS Test (number of satellites, accuracy)If the phone is not catching the network well, you can see the signal level in dBm and compare it with reference values.
Power and batteryVoltage and current monitoring Charging test (fast/wireless) Battery temperature checkIf the phone is discharged quickly, the test will show which component consumes the most power.
Systemic informationFirmware and kernel version Error Logs (logcat) Memory Test (RAM/UFS)Before selling the phone, you can check whether there was a firmware reflash to the unofficial version.

The Network Testing tab is especially useful for diagnosing Internet problems, for example, if Wi-Fi is unstable, you can see here:

  • ๐Ÿ“ถ Signal level in dBm (optimally: from -50 to -70).
  • ๐Ÿ”„ Speed of reconnection between access points (roaming).
  • ๐Ÿ“ก Channel and bandwidth (20/40/80 MHz).

๐Ÿ’ก

If you see Health: Poor in the battery test, it means that the battery capacity has dropped below 80% of the nominal, in which case replacement is recommended, even if the phone is holding a charge "normally".

Risks and Warnings: What Could Go Wrong

Despite its usefulness, Direct Service is not a tool for everyday use, and here are the main risks to be aware of:

  1. Loss of warranty: If you change hidden parameters (e.g. calibrate the illumination sensor with errors), the service center may refuse to repair under warranty, citing โ€œinterference with the firmwareโ€.
  2. Failures: Some tests (e.g., checking the UFS- drive) can cause the phone to freeze if performed during active memory operations.
  3. Blocking features: On HyperOS devices, improper use of Direct Service can activate Xiaomi Cloud protection by blocking access to certain settings.
  4. Data Leakage: Logcats may contain personal data (phone numbers, IMEI) that will be accessed when you connect to a PC.

You should be especially careful with:

  • ๐Ÿ”ง Sensor calibration. Wrong values can make a gyroscope or compass unusable.
  • ๐Ÿ“ถ Change network settings, for example, manually configuring Band Selection for 4G can cause communication to be lost.
  • ๐Ÿ”‹ Battery tests. If you interrupt the capacity check, the phone may not display the charge level correctly.
What if the phone stopped turning on after the test?
If the device does not respond to the power button, try: 1. Hold Power + Volume Up for 10-15 seconds for a forced reboot. 2. Connect to charging for 30 minutes - sometimes deep discharge protection works. 3. Use Fastboot mode (fastboot reboot command). If nothing helps, you will need to flash through the Mi Flash Tool (warranty will be lost).

Direct Service in different Xiaomi models: features and differences

Direct Service functionality depends on the hardware platform and the version of MIUI, and hereโ€™s how it differs on popular devices:

ModelProcessorFeatures of Direct ServiceIs USSD- code available?
Xiaomi 13/13 ProSnapdragon 8 Gen 2Extended 5G and UFS 3.1 tests, but require ADB to run.โŒ No (locking at firmware level)
Redmi Note 12 Pro+Mediatek Dimensity 1080Full access to camera tests (including OIS) and NFC.โœ… Yes (#374253##)
POCO F5Snapdragon 7+ Gen 2Simplified menu, but with a unique test LPDDR5- memory.โœ… Yes (requires password 1234)
Xiaomi Pad 6Snapdragon 870There is no battery test, but there is a stylus diagnosis.โŒ No, only through ADB)

On HyperOS devices (such as Xiaomi 14), some Direct Service features are moved to the standard Settings โ†’ About Phone โ†’ Diagnostics menu, but hidden options (such as the UFS test) still require access through ADB.

If youโ€™re not sure if your Direct Service model supports it, check it out through the command:

adb shell pm list packages | grep directservice

If com.android.directservice appears in the answer, then the application is installed, but can be hidden.

๐Ÿ’ก

On devices with Mediatek processors (e.g. Redmi 10A), Direct Service is often integrated into the standard engineering menu (#36446337###).

Direct Service Alternatives: When to Use Them

If Direct Service is unavailable or seems too complex, consider alternative diagnostic tools:

  • ๐Ÿ“ฑ MIUI Diagnostics (built into Settings โ†’ About Phone): Basic tests of display, camera and sensors without risk.
  • ๐Ÿ” AccuBattery (Play Market app): detailed battery monitoring with wear assessment.
  • ๐ŸŒ NetMonster: Cellular network and Wi-Fi analysis with signal visualization.
  • ๐Ÿ› ๏ธ CPU Throttling Test: Testing the performance and overheating of the processor.

The advantage of these tools is safety and simplicity. For example, AccuBattery does not require root rights and shows battery wear as a percentage, whereas in Direct Service this data is presented in raw form (volts, ampere).

However, the alternatives have limitations:

  • โŒ No access to low-level tests (e.g., checking UFS- drive).
  • โŒ You cannot calibrate sensors or change network settings.
  • โŒ There are no logcats.

If you just need to check the phone before selling, MIUI Diagnostics is enough. But if you need a deep diagnosis (for example, after a fall or moisture), Direct Service remains the best choice.

FAQ: Frequent questions about Direct Service on Xiaomi

Can I run Direct Service without root rights?
Yes, on most Xiaomi models, this is possible via the USSD- code ##374253## or ADB. However, some features (such as sensor calibration) may require extended rights.
Why does the battery test show the wrong percentage of charge?
This happens if you interrupt the battery capacity check, and to reset the data, you can use ADB: adb shell dumpsys battery reset, or use AccuBattery to recalibrate.
How to save logs from Direct Service for the service center?
Logs can be exported to a.txt file via ADB: adb shell cat /data/log/directservice_log.txt > C:\logs\xiaomi_logs.txt or use the MatLog application to record logcat in real time.
Is it safe to use Direct Service on newer models (Xiaomi 14, Redmi Note 13)?
On HyperOS devices, the risks are minimal unless you manually change the settings, but some tests (such as checking UFS) can fail if performed while writing data to a disk.
Can I unlock the bootloader through Direct Service?
No, Direct Service is not about unlocking the bootloader, and requires the official Mi Unlock Tool and Xiaomi account binding.