How to fix sensors issues on Redmi 4X

How to Fix Gyro Sensor and Proximity on Redmi 4X

In this post you’ll find out working methods on how to check and fix issues with calibration and sensor on your Xiaomi Mi smartphone. Below we’ll cover methods for Xiaomi Redmi Note 4X Snapdragon (mido) and Redmi 4X (santoni) on how you can fix sensor, compass, gyroscope and accelerometer. The issue is usually related to the “persist” partition and “persist.img” file, which can’t be flashed or edited.

Solution for not working proximity, gyroscope and sensor on Mi Phones

How to fix sensors issues on Redmi 4X

After you’ve fixed the sensors and gyro isses, you can install recovery once again and then flash any ROM version for everyday use which you prefer the most.

Unlocked bootloader method:

Now let’s get started with the method:

  1. Download MIUI ROM for MiFlash tool and go to “images” folder, find “persist.img” file and copy to the folder with fastboot files.
  2. Turn off your device and boot into fastboot mode by pressing “Power” and “Volume Down” buttons at the same time, then connect your phone to PC via USB cable.
  3. Open the command window from “fastboot” folder by pressing the “Shift” key + right mouse button and selecting “Open command window here”.
  4. Now check if your device is connected by typing “fastboot devices” in command window. You should see device unique ID. If your phone isn’t recognized, then try to reinstall drivers on your PC.
  5. Now we’ll continue with required commands to fix the gyro and sensor issues. Type the following lines:
    fastboot erase persist
    fastboot flash persist persist.img
    fastboot reboot
  6. After the last command your phone should reboot and all sensors should work perfectly fine right now. But in case you’ve got “not allowed” message while trying to perform “erase” or “flash” commands, you can try to flash using the MiFlash tool and EDL mode, which is intended to be used with locked bootloader phones.

Locked bootloader method:

  1. Go to folder with fastboot files and file the “flash_all.bat”, use the “Notepad ++” application and open the “flash_all.bat” as a text file.
  2. Before the “fastboot reboot” line and another line: “fastboot %* flash persist %~dp0images\persist.img || @echo “Flash persist error” && exit /B 1″ (without quotes).
  3. Now delete all other lines except the first three, the one you’ve just pasted and the last two.
  4. Save changes and close the text editor.
  5. Go to “images” folder and find “rawprogram0.xml” file, then open it with Notepad ++.
  6. Find the “label=”persist”” line and and write “filename=”persist.img””.
  7. Delete all other lines except “data”.
  8. Save changes and close the text editor.
  9. Turn off your device and boot into fastboot mode by pressing “Power” and “Volume Down” buttons at the same time, then connect your phone to PC via USB cable.
  10. Open the command window from “fastboot” folder by pressing the “Shift” key + right mouse button and selecting “Open command window here”.
  11. Now type “fastboot oem edl” to boot your phone into EDL (download) mode.
  12. Open MiFlash tool and select the folder with fastboot files (ROM files should be also there).
  13. Press “refresh” button and you should see your device with “com” port (in case your phone isn’t recognized try to install QDLoader HS-USB Driver).
  14. Select “clean all” option.
  15. Press “flash” to start flashing, in the result you’ll see “success” message.
  16. Reboot your phone and gyroscope sensor should work flawlessly.

How to fix sensors and gyro issues on Redmi Note 4X Snapdragon

  1. Download and unpack “Flash_Persist” folder to “C:\” drive: Flash_Persist_v3.rar
  2. Download and install official MiFlashTool: MiFlashSetup_eng.msi
  3. Reboot your device in fastboot mode.
  4. Download EDL mode patch for Redmi Note 4X Snapdragon and unpack to “C:\edl”, then find “RedMi Note 4 & 4X EDL Mode.bat” and open it, then press “Enter” to start your device in EDL (download) mode.
  5. Open MiFlashTool and locate the folder with “Flash_Persist”.
  6. In MiFlashTool select the “flash_all.bat” file.
  7. Press “Refresh” to see your phone “COM” port and then press “Flash”.
  8. That’s it! After installation reboot your phone, sensors should be working fine.

How to use EDL mode patch for Redmi Note 4X Snapdragon (Mido)

Now there’s an easy way on how to boot Xiaomi Redmi Note 4X device into EDL (emergency download) mode without engineering cable or cutting the test-points. Simply download the patch below and check out short tutorial.

  • Enable “Developer options” and “USB Debugging” on your phone.
  • Turn off your device completely.
  • Reboot into fastboot mode by pressing “Power” and “Volume Down” buttons.
  • Connect your phone to PC.
  • Run “RedMi Note 4 & 4X EDL Mode.bat”.
  • Press “Enter” to continue.
  • Wait until your phone reboot into EDL mode.
  • Continue to flashing your phone with MiFlash or other tool.

Download EDL (Download mode) for RN4X