How To Fix Accelerometer, Compass, Sensors Revert Issues On Custom ROM [ Android Origination, Proximity, Magnetic, Sensor Fix ]
After we flash a new custom ROM our android phone, tablet some sensors aren’t working or there’s a delay on respond. For instance if the magnetic sensor doesn’t work, as a result of that your compass app not work or it’s not giving the correct result. It’s a result of missing or corrupted sensor files. If we can replace a new working file into the require directories we can fix this issue.
This method you can use any android phone or tablet, but i can’t clearly mention it works each and every device. Use this guide as a basic and build your own sensor fix flashable zip.
This method we need to collect the official firmware sensors files, after that we use a flashable zip file using them and flash via recovery.
Alternatively you can push those files into the relevant directories using root browser and fix permission to rw–r– (0644). Easiest way to flash it suing recovery.
First download all the sensors working custom ROM or a stock firmware.
Extract downloaded ROM into your desktop.
Create a desktop folder and name it as “system”.
Now collect following folders contain sensor files in your stock or any other ROM and paste them with their folders to desktop “system folder” separate sub folders. eg: – system/lib/hw
“system/bin/” folder contain “sensorservice” and “akmd8975” files. “system/etc/” folder “sensors.conf” “system/etc/permissions” folder “android.hardware.sensor.accelerometer.xml” and “android.hardware.sensor.compass.xml” “system/lib/hw” folder contain files, that have “sensors” name. There can be several files or one file. (These files name change according to the device manufacture) ex:- sensors.semc.so
Now download this flashable zip file and open it using winzip, WinRar, 7Zip etc file compress tool. (Don’t extract it)
Add files that we collected, using above 2nd method to the downloaded zip file relevant folders. (In winzip click “Add Files” button). In this case you can copy all the folders in the desktop system folder into this zip file. (If you do it correctly). Now your zip file inside looks like following screenshot.
Move updated sensor fix files into your phone SD card or external memory.
Reboot into recovery.
When the recovery appears go to “Install zip from the sd card> Choose zip from sd card” and select the Fix_Sensor Android.zip file.