[SOLVED] How to disable Nexus 4 proximity sensor?

megamacx

Member
Jun 25, 2012
29
8
0
Guys,

My N4 proximity sensor failed after replacing the screen (or at least I realized until that moment). How can I disable the sensor?

I have read numerous pages online and haven't found how to disable it. People talk about an application called "hardware Disabler", which was last updated in 2011 and I am not sure if it works or not.

The best solution to the problem would be turning an option off in the phone dialer.. However my nexus 4 doesn't come with a phone app that would allow me to disable that sensor..

This being said, the issue is killing me when I have to use the phone. I know I can have the power button end a call, but that doesn't help me.. I need to be able to access the screen and keep the screen on.

My N4 is rooted..

Thoughts?
 
Last edited:

XDA_Bam

Inactive Recognized Developer
Mar 27, 2011
416
824
0
I don't quite understand the problem. Does the sensor always say "something is near" oder does it always signal "nothing there"? Which one is the case and what do you want it to do instead? :confused:

As a general idea: You could use Tasker or Llama to always turn on/off the screen when you start or end a call. Should be possible with either of them.:)
 

megamacx

Member
Jun 25, 2012
29
8
0
It always thinks that there always something near.. Therefore when a call is placed or received, the screen immediately goes off. If I try to press the power button, the screen flickers 1/2 second and goes off again. To end the call I have to wait until the other party hangs up or force to turn the phone off.

I do have tasker installed.. How can I configure it so it overrides the sensor? In that case, I need to also override the sensor when using Microsoft lync 2013, which also turns the screen off when I place a call.


Sent from my Nexus 4 using xda app-developers app
 

lopezk38

Senior Member
Apr 20, 2013
293
87
0
San Diego
It always thinks that there always something near.. Therefore when a call is placed or received, the screen immediately goes off. If I try to press the power button, the screen flickers 1/2 second and goes off again. To end the call I have to wait until the other party hangs up or force to turn the phone off.

I do have tasker installed.. How can I configure it so it overrides the sensor? In that case, I need to also override the sensor when using Microsoft lync 2013, which also turns the screen off when I place a call.


Sent from my Nexus 4 using xda app-developers app
Isn't there an app to fake sensor input to apps? It's meant for developing apps, but it could work if your case. I'll look for it
EDIT: Try using XPrivacy (Requires Xposed Framework) and sending empty sensor lists to the phone app.
 
Last edited:

megamacx

Member
Jun 25, 2012
29
8
0
I didn't know about the xposed framework.. that's pretty neat.

I installed the framework, installed xprivacy using the xposed installer.. But I an missing the last step. How do I send empty sensors to the phone dialer? Look at the screenshot to see where I am..



Thanks again



Sent from my Nexus 4 using xda app-developers app
 
Last edited:

megamacx

Member
Jun 25, 2012
29
8
0
UPDATE: I played with XPrivacy mode and I think is not helping. The getDefaultSensor gets updated (displaying the last time the sensor was accessed) when I try to make a call.. However the screen still goes off. I noticed that if I use a light torch and put it next to the sensor, the sensor reacts. I was able to confirm this with the Android Sensor Box app. If I am iin direct sunlight, it produces the same effect.

Is there any way to manually set the proximity sensor value to something? (Maybe XPrivacy sending a blank value is not working, but setting a specific value might). That would help while my new sensor arrives. I still don't know if that would solve the problem. I'll know next week.
 

megamacx

Member
Jun 25, 2012
29
8
0
UPDATE: I played with XPrivacy mode and I think is not helping. The getDefaultSensor gets updated (displaying the last time the sensor was accessed) when I try to make a call.. However the screen still goes off. I noticed that if I use a light torch and put it next to the sensor, the sensor reacts. I was able to confirm this with the Android Sensor Box app. If I am iin direct sunlight, it produces the same effect.

Is there any way to manually set the proximity sensor value to something? (Maybe XPrivacy sending a blank value is not working, but setting a specific value might). That would help while my new sensor arrives. I still don't know if that would solve the problem. I'll know next week.
 

XDA_Bam

Inactive Recognized Developer
Mar 27, 2011
416
824
0
Did you untick the box 'Sensors', so that the phone app can't access them anymore? And this didn't help?
 

sir_fz

Senior Member
Aug 28, 2009
104
10
0
I got my n4's screen replaced at LG and the same issue appeared. I tried testing it with the torch close to the sensor and it worked so I'm guessing the sensor isn't at fault but rather there's an alignment issue or something. I'm gonna report this tomorrow to LG hoping they'd fix it (they broke it after all)

Sent from my Nexus 4 using Tapatalk
 

megamacx

Member
Jun 25, 2012
29
8
0
As an update, the new sensor arrived today and I replaced it. Unfortunately I am at the exact same spot... Is working the exact same way that before...

Now I think I am running out of options.. It is really surprising how a sensor can cripple an entire phone, and android doesn't seem to cooperate either..

Thoughts?

Sent from my Nexus 4 using xda app-developers app
 

sir_fz

Senior Member
Aug 28, 2009
104
10
0
There's a fix in one of the youtube videos titled "proximity sensor fix after screen replacement" (something like that), have you tried that?

I'm taking my phone back to LG today hoping they'll fix it, will keep you updated.

Sent from my Nexus 4 using Tapatalk
 

sir_fz

Senior Member
Aug 28, 2009
104
10
0
Took it for repair, waited for around 40 minutes. They said they tried several sensors and it still didn't work, it might be a board issue... They're gonna call me once they figure out a solution (hoping there's no need for board replacement).

Sent from my GT-I9100G using Tapatalk
 

megamacx

Member
Jun 25, 2012
29
8
0
There's a fix in one of the youtube videos titled "proximity sensor fix after screen replacement" (something like that), have you tried that?

I'm taking my phone back to LG today hoping they'll fix it, will keep you updated.

Sent from my Nexus 4 using Tapatalk
Do you mean this video (https://www.youtube.com/watch?v=EX9oMrHb1_4)? This link is the first video that comes up in the list on YouTube, but not an exact match (and they use an iPhone).
 

sir_fz

Senior Member
Aug 28, 2009
104
10
0

megamacx

Member
Jun 25, 2012
29
8
0
UPDATE (12/13/2013): I finally was able to get the proximity sensor working. After going the next step and trying to understand why it wasn't working, I decided to manipulate the phone live (turned on) while I moved the proximity sensor on different positions.

By using Android Sensor Box AND holding the phone on one hand without screws but at the same time holding the main board with 2 fingers (and without the plastic black cover where the screws go, I was able to have Android Sensor Box open and the proximity test running while with the other hand I took the proximity sensor out of its place. This revealed that neither the new or the old sensor were bad (I tested both old and new and both were working as expected). The main problem was that for some reason, after seating the sensor in the screen, something was triggering the sensor to think there was something blocking it, thus causing the issue I have described above.

After some research on how to handle this, I read that a big culprit of this not working as expected could be the gap that was between the sensor and the screen (which in my case I can estimate close to 2mm). Therefore the suggestion was to craft something like a plastic or something that would fill the gap between the rubber cover of the sensor and the screen. When I realize the challenge of creating something made of rubber that would have the same tiny size of the rubber cover, I thought I wouldn't be able to create this.. However, after trying with a piece of rubber (I used a laptop's rubber foot), I took a knife and gave it the square shape it needed. The challenge next was to drill the 2 holes with that tiny space, but I was successful. After placing the home-made spacer between the screen and the sensor, and 2 or 3 little adjustments, I could confirm that the gap was the real culprit of this not working in the first place. In my previous tests, I actually peeled off the dark coating the screen came with in that area, and after today's test, I also know that while some suggest using a marker to darken the area where the sensors expose through the screen, this is actually not needed. I have it working right now. I tried to tighten all the screws as much as I could so this piece doesn't move out of place, but for know I can say I fixed this issue that made my life miserable for about 2 weeks.

Thanks Everyone!
 
Last edited:

sir_fz

Senior Member
Aug 28, 2009
104
10
0
Awesome glad you got it resolved. Thanks for sharing your solution :)

Question, why didn't you try to fill the gap with an adhesive sticker as done in the video I linked to above?

Sent from my GT-I9100G using Tapatalk
 

megamacx

Member
Jun 25, 2012
29
8
0
Awesome glad you got it resolved. Thanks for sharing your solution :)

Question, why didn't you try to fill the gap with an adhesive sticker as done in the video I linked to above?

Sent from my GT-I9100G using Tapatalk
In the video, the guy had the LCD and the screen separated, which allowed him an easier way to put the stickers in.. In my case I ordered the digitizer + LCD + metal frame, all in the same unit.. it was really difficult for me to try adding multiple stickers to fill the gap when the frame and everything is already in place. I took the smallest drill bit I could find and that's how I made the holes in the rubber piece. I think I could have done it better if I had a way to put like a black plastic instead (would have been easier than manipulate than rubber), but I wanted to get it done a.s.a.p. so since this worked, I didn't keep trying.
 
  • Like
Reactions: calin_ionesco