Restoring Sensors & "Find my device" storage | Flashing Xiaomi Mi5 Stock ROM | EDL Mode persist.img

Restoring Sensors & "Find my device" storage | Flashing Xiaomi Mi5 Stock ROM | EDL Mode persist.img

** Through this video you will learn how to restore the Stock ROM on Xiaomi Mi5 & also restore the functionalities of the Sensors & "Find my Device" ** 3 years back I had rooted my Xiaomi Mi5 Phone & installed custom ROM. Unfortunately the Gyrosensor & few other sensors weren't working (screen auto-rotate & Photo rotation wouldn't work & MAC address of WiFi keeps changing) . After the issue with Custom ROM, I just restored to the Stock ROM only to find that the issue with the sensors continued and the Phone also threw an error "Find my Device storage corrupted. Your device is unsafe now". Due to the "Find my Device..." issue, I couldn't login to the Xiaomi Account under settings ("cannot connect right now, try again after some time") and hence couldn't unlock my Phone any more for flashing. However after researching quite a bit I learnt from xda-developers forum that the "flash_all.bat" & related scripts in the Stock ROM has the entry for "persist.img" missing and this is the file which restores the operations of all sensors (https://tinyurl.com/persist-flashing) and "Find my Device" Storage. I finally made changes to the scripts of the stock ROM, flashed my Mi5 phone in EDL mode and bingo....all my sensors are working fine, which doesn't work when you do the default flashing of ROM without modified flash scripts. While I solved the sensor issues for my phone, you can also try it out (at your own risk) on your Mi5 or some other similar phone with a similar issue. Do feel free to comment if you find this helpful. Video recorded by Baudhayan Lahiri using Oneplus 6T Mobile. #edl #persist.img #mi5