[SOLVED] Fix Sensors not working / Find My Device Corrupted Error

Search This thread

m.shyamsundar37

Senior Member
May 4, 2016
61
25
Fix for getting back your sensors and Find My Device Error
The Problem that i have faced..
I have unlocked my bootloader after updating my device to MIUI 11 , and flashed Paranoid Android Quartz Alpha 2 which was then based on android 10
By then my sensors are working fine. After i have flashed Xiaomi EU based on android 10 and due to some reasons i have flashed back to stock using Xiaomi Flash tool. I used to flash roms toooo often whenever i want to have to use some particular feature of that rom (That is what makes each rom unique Right!)
Suddenly on Xiaomi EU, i have noticed my gyroscope not working in PUBG also my compass stopped working , even proximity sensor failed.

Eventually i used to get an error toast showing "Find my device is corrupted your device is unsafe now"
Which i have ignored initially and realized that my persist partition got corrupted..
.
.
.
Then i have googled about my issue , referred a hell lot of threads, and came up with a working solution..
***Solution***​
Procedure :
1. Download the latest Fastboot rom of our device from here.
2.Extract the downloaded package and navigate to images folder.
3.There you can find the persist.img file of your device.
4.Copy the file to your internal storage.
5.Reboot your device to TWRP and goto advanced/terminal
6.On the interface, type the following command.
Code:
simg2img /sdcard/persist.img /sdcard/persist_EXT4.img
7.If your code returns error like "Invalid sparse file format at header magic" as in my case then continue with the second line of code
Code:
dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist
8.Else continue with this code
Code:
dd if=/sdcard/persist_EXT4.img of=/dev/block/bootdevice/by-name/persist
9.Simply reboot to system
10.Problem solved ,Happy Face, Back to josh......

NOTE: You may notice strange behaviour of the popup camera on the first boot. As in my case it automatically opens and closes even without operating it.
with an error message showing "Cannot close front camera" which will be automatically fixed by itself by pressing "Caliberate" button which pops after two to three camera hiccups.
 
Last edited:

EdselJuice

New member
Apr 8, 2020
1
0
It gives me an error writing the last line
"dd if=/sdcard/persist_EXT4.img of=/dev/block/bootdevice/by-name/persist"

throws me this result "No such file"
 

misaamane

Member
Jul 29, 2008
24
5
Thanks for the tutorial. I followed this because my gyroscope isn't working properly (it orientates in wrong directions, goes into portrait when holding phone landscape i.e.).
I still have issues with my gyroscope after following your tutorial, do you have another idea what I could do to fix this. My phone is a Mi Mix 3 5G.
Thanks in advance!
 

cyferc

Member
Mar 19, 2019
28
4
Can someone please share their persist.img from their device with working sensors? Someone who has not flashed a new persist.img before please? I flashed the persist from the latest fastboot ROM but all sensor calibration values are 0 and gyro calibration fails. So my gyro is still spinning.
 

AkkulaDz

Member
Jul 8, 2020
15
0
my proximity sensor and light sensor work a moment and stop again I have to restart the phone so that it works again
 

aakib3

Member
Jul 23, 2012
9
1
Moto Z Play
Redmi K20 Pro
i have been searching for this solution for past 17 days as my screen used to rotate only after boot ,but later rotation doesnt seem to work until i found this guide ,it works and works amazing
Thanks for the helpful guide
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Fix for getting back your sensors and Find My Device Error
    The Problem that i have faced..
    I have unlocked my bootloader after updating my device to MIUI 11 , and flashed Paranoid Android Quartz Alpha 2 which was then based on android 10
    By then my sensors are working fine. After i have flashed Xiaomi EU based on android 10 and due to some reasons i have flashed back to stock using Xiaomi Flash tool. I used to flash roms toooo often whenever i want to have to use some particular feature of that rom (That is what makes each rom unique Right!)
    Suddenly on Xiaomi EU, i have noticed my gyroscope not working in PUBG also my compass stopped working , even proximity sensor failed.

    Eventually i used to get an error toast showing "Find my device is corrupted your device is unsafe now"
    Which i have ignored initially and realized that my persist partition got corrupted..
    .
    .
    .
    Then i have googled about my issue , referred a hell lot of threads, and came up with a working solution..
    ***Solution***​
    Procedure :
    1. Download the latest Fastboot rom of our device from here.
    2.Extract the downloaded package and navigate to images folder.
    3.There you can find the persist.img file of your device.
    4.Copy the file to your internal storage.
    5.Reboot your device to TWRP and goto advanced/terminal
    6.On the interface, type the following command.
    Code:
    simg2img /sdcard/persist.img /sdcard/persist_EXT4.img
    7.If your code returns error like "Invalid sparse file format at header magic" as in my case then continue with the second line of code
    Code:
    dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist
    8.Else continue with this code
    Code:
    dd if=/sdcard/persist_EXT4.img of=/dev/block/bootdevice/by-name/persist
    9.Simply reboot to system
    10.Problem solved ,Happy Face, Back to josh......

    NOTE: You may notice strange behaviour of the popup camera on the first boot. As in my case it automatically opens and closes even without operating it.
    with an error message showing "Cannot close front camera" which will be automatically fixed by itself by pressing "Caliberate" button which pops after two to three camera hiccups.