Xiaomi Mi 4 is a flagship phone from Xiaomi with high-end specs. Furthermore it is installed MIUI ROM exclusivity makes the device more attractive. However, in order to exploit the full potential as well as optimize the device, many users have conducted install custom ROM for their device. Moreover, with outstanding development support from the CyanogenMod community, the device has had many versions ROM CyanogenMod different for Xiaomi Mi 4 with its own capabilities.
However, many users reported the error that senors . sensor does not work on custom ROMs. In this post xaiandroid shares with you how to fix it Senors for the sensor to work on the custom ROM. To do so, you need to replace the existing image file on the system with the new one. Note the new file shared in the Download section.
After you proceed then senors . sensor will work again. But before doing this, you need to back up all data before proceeding.
- Download | Persist image file (File: persistnew.img)
- Download | Terminal Emulator for Android (Android app, opens in Google Play Store)
How to fix Senors error on Xiaomi Mi 4
- Make sure you have root access on your device.
- Download Terminal Emulator for Android and grant root access when asked.
- You also need to download persistnew.img from the download section.
- Put the persistnew.img file in a safe place on your device’s storage.
- Open a terminal emulator and enter the following command:
dd if=/dev/block/mmcblk0p22 of=/sdcard/persist.img
- When successful, you will receive a persist.img file on your device’s storage.
- Copy and and place the files in a safe place. Create multiple backups just in case if you ever want to restore the files.
- Now place the persistnew.img file where the image file still exists. For example, on sdcard or internal storage
- Now open the terminal emulator application again and enter the following command:
dd if=/sdcard/persistnew.img of=/dev/block/mmcblk0p22
- Reboot the system.
In case you want to restore previously existing files, you proceed to do the same and replace the existing file files. Now test your sensor with any sensor testing app like Sensor Box.