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:
- Download Platform-tools (adb/fastboot): tools_26.0.0-windows.zip
- Download MiFlash Tool
Now let’s get started with the method:
- Download MIUI ROM for MiFlash tool and go to “images” folder, find “persist.img” file and copy to the folder with fastboot files.
- 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.
- Open the command window from “fastboot” folder by pressing the “Shift” key + right mouse button and selecting “Open command window here”.
- 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.
- 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
- 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:
- 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.
- Before the “fastboot reboot” line and another line: “fastboot %* flash persist %~dp0images\persist.img || @echo “Flash persist error” && exit /B 1″ (without quotes).
- Now delete all other lines except the first three, the one you’ve just pasted and the last two.
- Save changes and close the text editor.
- Go to “images” folder and find “rawprogram0.xml” file, then open it with Notepad ++.
- Find the “label=”persist”” line and and write “filename=”persist.img””.
- Delete all other lines except “data”.
- Save changes and close the text editor.
- 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.
- Open the command window from “fastboot” folder by pressing the “Shift” key + right mouse button and selecting “Open command window here”.
- Now type “fastboot oem edl” to boot your phone into EDL (download) mode.
- Open MiFlash tool and select the folder with fastboot files (ROM files should be also there).
- 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).
- Select “clean all” option.
- Press “flash” to start flashing, in the result you’ll see “success” message.
- Reboot your phone and gyroscope sensor should work flawlessly.
How to fix sensors and gyro issues on Redmi Note 4X Snapdragon
- Download and unpack “Flash_Persist” folder to “C:\” drive: Flash_Persist_v3.rar
- Download and install official MiFlashTool: MiFlashSetup_eng.msi
- Reboot your device in fastboot mode.
- 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.
- Open MiFlashTool and locate the folder with “Flash_Persist”.
- In MiFlashTool select the “flash_all.bat” file.
- Press “Refresh” to see your phone “COM” port and then press “Flash”.
- 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