How to disable proximity sensor in rooted phone? - Nexus 5X Q&A, Help & Troubleshooting

So it appears that my proximity sensor is faulty because of which it always thinks there is something close to it. Due to this issue, whenever I make a phone call the screen is always off as the proximity sensor thinks my ear is close to the phone, even when I remove the phone from my face.
This is quite annoying obviously and I was wondering if I can somehow disable the sensor. I rooted the phone with the hope of doing so. I am guessing I can delete/rename an appropriate file in the "sys" folder or add something to the build.prop to disable the proximity sensor. Can someone tell me what needs to be changed?

Use an app for disabling/mocking sensor reading, e.g. this one. I'm using it on Nexus 5, which after some time stops reading data from proximity and light sensors. Unfortunately, for this one you have to install Xposed too.
Maybe somebody will come up with an app, which will work without Xposed.

przemcio510 said:
Use an app for disabling/mocking sensor reading, e.g. this one. I'm using it on Nexus 5, which after some time stops reading data from proximity and light sensors. Unfortunately, for this one you have to install Xposed too.
Maybe somebody will come up with an app, which will work without Xposed.
Click to expand...
Click to collapse
I know I could do it with Xposed but Xposed does not work for Nougat. I need a solution for Android 7.1.1.

Related

[Q] Proximity sensor problem(?)- can flashing a ROM solve it?

Hi,
I've searched high and wide for a solution (other than sending it back to Motofailure repair) and am failing at finding one so far. So I'm hoping I can get some help from here.
So, this is the situation: I make a call, screen instantly turns dark and will only light up again when I press on the area where the light (&) proximity sensor is.
I've already tried the following.
1.) Done a factory reset (3x) - with mem card, with reformatted mem card, w/o mem card.
2.) Clearing the dust on the earpiece hole using an air duster.
3.) There were times that I worked properly after I've uninstalled apps but the issue came about again after a couple of tries.
So, now I'm thinking that I might want to root my Defy to set things right. I'm quite familiar with RSD Lite as I've used it before on my RAZR2 V8.
A bit of background: I bought my Defy on pre-order so this is one of the earlier models. I had the earpiece problem and sent it to Motofailure repair and the whole process took a month (32 days to be exact - long story. I'm avoiding having to send this PoS back. They updated the software when I got it back.
As far as I can recall, I didn't had this problem before the earpiece problem. And I'm thinking it might be a software problem hence I'm now looking at a solution by rooting and flashing the ROM with an original one.
I have no way of finding out (as far as I know) whether this is a hardware problem (hence hesitating to have it sent back to Motofailure repair).
What I've also observed is that when there is direct bright light, it works normally but when its dim, then the problem appears.
I don't have any screen protectors, just so you know.
Can anyone advise me on what to do?
During a call proximity sensor is activated to turn off the screen at the moment it detects proximity and asumes you are using the phone against your hear, so it turns off screen to save energy.
I think you might have some app installed in your phone, using and reversing the sensor status so it detects proximity when there isnt, and viceversa
You might want to try removing apps using that sensor and see if problem gets solved, there is also an app in the masket called sanity; which makes extensive use of proximity sensor for vaqrious things, and have an option to reverse proximity sensor, you might want to try it and see if problem gets fixed.
You might try this things: remove apps using proximity sensor, test phone. Deactivate in pocket detection; test phone, and install sainity, test phone, install a new rom?
If speaker is bigger than original one, or there was an assembly error, light/proximity sensor won't fit into right place.
I've seen such reports and you can't do anything unless you open up thing and check the problem, but you haven't seen the right assembly so you may not know the right place.
Are you using any screen protector? I know some screen protectors cause this problem.
Edit: Nevermind, I see that you're not using any.
how to calibrate the proximity sensor?
My new defy 's proximity sensor seems cannot work correctly,when i making a call ,the screen shut off immediately,and the screen could not light on by any key,but when i touch the proximity sensor with my finger,the screen may be light on!
so i download a app to test the proximity sensor which name's"Android sensor data",this app fingue out the state of proximity sensor,"near" or "far",sometimes I just passing my finger over the proximity sensor, the reading will show 'near' and then remain 'near' even when my finger is moved away!
Can anyone else help me to calibrate the proximity sensor?google told me some android phone can do this ,such as htc, zte etc.
goole tell me android phone have some standard testcode,such as *#*#4636#*#* can show the phone statue,it works correstly in Defy,*#*#0588#*#* test the proximity sensor ,but it doesn't work in defy!!!
I don't think this issue could be solved trough software tweaks. Chances are this is a hardware problem. Maybe you should contact the Motorola support.
try disabling in-pocket detection
have the same problem. it started 2 days ago. Im using CM7. It just turns dark and wont wake up unless someone else is calling me. Just got it tested, and when i cover the sensor with my finger it says 0cm distance for long time.
I've tried data wipe and similar, but nothing helped so far.
EDIT: I've just tried wiping the place where proximity sensor is with some soft cloth and alcohol and for the time being, it works. O.O
Could Wipe Dalvik help?

Proximity sensor drivers

Hi everybody! I'm experiencing an issue with the proximity sensor of my Galaxy Note 2 i317. I think it is screwed up because during calls screen goes off either if the phone is far away from any objects. I don't have a screen protector, so the problem is not there. I was looking for a way to disable the sensor once and for all, so I installed Hardware Disabler from play store and searched for the drivers. The problem is that I can't find it among the list. I know the drivers should be the one from Capella Microsystems, CM36651 but there is nothing like that among the list. I also checked "/" in the parameters settings but nothing. I know I can disable the sensor on samsung stock ROMS via the call settings, but it doesn't solve the problem with VOIP apps like Viber, or Skype or any other like it. But the real matter is that I wish to install a CM10.1 ROM, and that option is missing there so that problem persists in normal calls too.
Now, my questions are :
1) Am I doing something wrong?
2) is it possible that the sensor is screwed up because the drivers are missing somehow? And is there a way to fix it in this case?
3) Are there other ways to disable it?
4)Is there an option in CM10.1 or other AOSP ROMS to disable the sensor during normal calls at least?
Thanks for the help!!
Dialer call settings allow you to toggle the sensor to stay on or off. ..
When combined with the general proximity setting for the phone to stay on while looking at the screen. ..
The device should stay awake ...
Try turning both settings on....
If the device still sleeps. ..your device may have a problem. .
But do not load an AOSP build until you are sure the device functions normally. ..as CM does not contain the constant wake option under general settings. ..g
gregsarg said:
Dialer call settings allow you to toggle the sensor to stay on or off. ..
When combined with the general proximity setting for the phone to stay on while looking at the screen. ..
The device should stay awake ...
Try turning both settings on....
If the device still sleeps. ..your device may have a problem. .
But do not load an AOSP build until you are sure the device functions normally. ..as CM does not contain the constant wake option under general settings. ..g
Click to expand...
Click to collapse
Thanks for your help! Yes I'm using it like you said, on stock ROM. But I wished to know if there is a way to do something like that on any AOSP ROM out there, or to completely disable the sensor.
giulytheboy said:
2) is it possible that the sensor is screwed up because the drivers are missing somehow? And is there a way to fix it in this case?
3) Are there other ways to disable it?
Click to expand...
Click to collapse
Hey there, I have a similar problem due to a cracked glass, but I figured out a little hack to solve it and disable the sensor.
2) The driver files aren't missing; I'm pretty sure that Hardware Disabler just doesn't know where to look. The driver files are located in:
/sys/devices/virtual/sensors/proximity_sensor/
Since Hardware Disabler can't look there, that option is useless.
Do this at your own risk, BTW.
3) You'll need a hex editor app to do this. Open the file named "prox_thresh" (I use ES file explorer) and select your hex editor to edit the file. You'll see a lot of 0's, but you'll need to edit the first line only. Change
31 32 0a
to
30 0a
The rest of the line is just 00.
This seems to work, although I'm pretty sure it's only temporary because I can't get the app to save prox_thresh due to a weird permission error. Maybe you can figure that out.
I'm not sure if deleting the driver folder would work, but I'm not so desperate to try that yet.
Let me know if that helps!
Sent from my SGH-I317 using xda app-developers app
Possible simple fix
I had the same problem. Sometimes the proximity sensor is working well but covered with dirt from the inside.
I gently inserted a guitar pick between the glass and the sensor (light pressure so it will open a crack) and cleaned the glass a little from the inside.
I tested it before and after with an app called proximity finder. it really fixed the problem.

Disabling Proximity Sensor for cracked screen S4?

I've pulled up several threads on this issue but I dont think many fit my situation.
The proximity sensor is not broken or dirty. I just have a cracked screen interfering with the sensor.
I do not see any options in latest dialer to disable this functionality
The guides I have found to edit the build.prop file have not worked. 'gsm.proximity.enable=false'. Is this device specific? I havent gotten it to work, but it could be user error.
Is there any way to just disable the damn proximity sensor? I cant stand not being able to hang up on calls, especially when the operator on the other end wont hang up or I'm leaving a voicemail. I usually have to yank the battery.
I'm dying for options here and havent pulled up anything.
jaredmac11 said:
I've pulled up several threads on this issue but I dont think many fit my situation.
The proximity sensor is not broken or dirty. I just have a cracked screen interfering with the sensor.
I do not see any options in latest dialer to disable this functionality
The guides I have found to edit the build.prop file have not worked. 'gsm.proximity.enable=false'. Is this device specific? I havent gotten it to work, but it could be user error.
Is there any way to just disable the damn proximity sensor? I cant stand not being able to hang up on calls, especially when the operator on the other end wont hang up or I'm leaving a voicemail. I usually have to yank the battery.
I'm dying for options here and havent pulled up anything.
Click to expand...
Click to collapse
If you are rooted and have xposed installed there are a few xposed modules that have the option for that, I don't recall what they are though sorry
Sent from my SGH-M919 using XDA Free mobile app

Marshmallow Sensor Problem

Hi. I'm on the latest build, 223 with root. Any time I get a phone call, when something is on the call sensor, the screen goes black and never turns on till the call is over. Sometimes I have to restart it. Also when listening to sounds in WhatsApp, the same sensor problem happens. I bought my device in Europe. Is there anything I can do to fix it?
No, I have this problem too.
You can only disable the sensor in the settings of asus call app
Deleted
holymoz said:
No, I have this problem too.
You can only disable the sensor in the settings of asus call app
Click to expand...
Click to collapse
It works on calls but doesn't affect WhatsApp.
BerkeKan said:
It works on calls but doesn't affect WhatsApp.
Click to expand...
Click to collapse
whatsapp doesn't have the option to disable the sensor.
there is an xposed module that disable completely the sensor but it needs bootloader unlock, root and xposed.
holymoz said:
whatsapp doesn't have the option to disable the sensor.
there is an xposed module that disable completely the sensor but it needs bootloader unlock, root and xposed.
Click to expand...
Click to collapse
If it is the module you're talking about, I am using it. I removed it but WhatsApp still use it.
Ss
BerkeKan said:
Ss
Click to expand...
Click to collapse
yes is it, strange that not work, I used it in the past and it worked, used the app sensor box to test the sensor and was disabled.
Yes, I faced this problem in Marshmallow. I was hoping they fixed it in 223 but based on your post it looks like its not yet fixed.
Recently my touch broke and I replaced by LCD+Touch and now proximity is not working on Lollipop also. It is always stuck at 'near'. Cleaning did not help.
I deleted 'android.hardware.sensor.proximity.xml' but it did not help. I badly need a way to disable proximity sensor completely for all apps (WhatsApp, Jio4GVoice, Phone etc.).
holymoz said:
yes is it, strange that not work, I used it in the past and it worked, used the app sensor box to test the sensor and was disabled.
Click to expand...
Click to collapse
Actually, I figured out it was my bad not get it to work. I have disabled the sensor again, tap the disc icon and the sensor was disabled completely for all apps.
wizwin said:
Yes, I faced this problem in Marshmallow. I was hoping they fixed it in 223 but based on your post it looks like its not yet fixed.
Recently my touch broke and I replaced by LCD+Touch and now proximity is not working on Lollipop also. It is always stuck at 'near'. Cleaning did not help.
I deleted 'android.hardware.sensor.proximity.xml' but it did not help. I badly need a way to disable proximity sensor completely for all apps (WhatsApp, Jio4GVoice, Phone etc.).
Click to expand...
Click to collapse
Root and Install Sensor Disable via Xposed. Set proximity sensor to far always. i.e. Mock sensor values (5 cms)
This is the workaround I use and it is better than having a black screen when I make or receive a call.
Works for all apps.

Disable proximity sensor

Hi,
My girlfriend's Nexus proximity senor seems to be broken and her screen is black all the time when she's calling someone.
Is there an easy way (root or not, I don't care) to easily disable the sensor all the time or in Caller app ?
She's on latest stock Oreo 8.1.
Thank you
Experiencing this as well. From what I have read, it is an issue with 8.1 specifically and the 5X.
Google haven't really acknowledged the problem yet, which sucks.
Related reddit thread
For calls, pressing the power button twice seems to bring the screen back for use again - doing this too quickly starts the camera, if you have that enabled.
This probably won't help for other use cases, like whatsapp.
I can understand that it's a bug for WhatsApp (she has that bug too), but for the dialer too ?
I don't experience such issues. My prox sensor is working like it should. Though I have a friend who has some minor problems with it, but he has a glass screen protector on top of it. Mine has a cutout for the sensors
Sebacestmoi said:
Hi,
My girlfriend's Nexus proximity senor seems to be broken and her screen is black all the time when she's calling someone.
Is there an easy way (root or not, I don't care) to easily disable the sensor all the time or in Caller app ?
She's on latest stock Oreo 8.1.
Thank you
Click to expand...
Click to collapse
My old original Nexus 5 had this problem and I got around it with an Xposed Module called Disable Proximity Sensor. That module has since evolved to something called Sensor Disabler (Link: https://forum.xda-developers.com/xposed/modules/mod-disable-proximity-t2798887). It doesn't say that it has been tested on the Nexus 5x, but it might still work. I am not sure how compatible it is with the new Oreo version of Xposed. Installing Xposed might be a bit overkill, but if it fixes the problem, it might be worth it.
I know how frustrating and annoying a busted proximity sensor can be, so I hope you can find a solution.

Categories

Resources