Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,192 Members 38,281 Now Online
XDA Developers Android and Mobile Development Forum

[SOLVED] How to disable Nexus 4 proximity sensor?

Tip us?
 
megamacx
Old
(Last edited by megamacx; 13th December 2013 at 10:41 PM.)
#1  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
Talking [SOLVED] How to disable Nexus 4 proximity sensor?

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?
 
megamacx
Old
#2  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
Bump... Anyone has a suggestion?

Sent from my Nexus 4 using xda app-developers app
 
XDA_Bam
Old
#3  
XDA_Bam's Avatar
Recognized Developer
Thanks Meter 826
Posts: 412
Join Date: Mar 2011
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?

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
Old
#4  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
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
Old
(Last edited by lopezk38; 7th December 2013 at 11:44 PM.)
#5  
Senior Member
Thanks Meter 82
Posts: 288
Join Date: Apr 2013
Location: San Diego
Quote:
Originally Posted by megamacx View Post
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.
PHONES: iPhone 3GS (Retired, Jailbroken, iDroid, overclocked to 800MHz) -> Motorola Atrix 4G (Shattered, CM10, Faux kernel @ 1.45 ghz overclocked) -> Google/LG Nexus 4 16GB (Backup Phone, L Preview) -> Google/LG Nexus 5 32GB (Primary Phone, L Preview)

TABLETS: Sony Tablet S (Retired, rooted 4.0.3), Surface Pro 2 128GB (Current, W8.1)
 
megamacx
Old
(Last edited by megamacx; 8th December 2013 at 04:24 PM.) Reason: UPDATE
#6  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
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
 
megamacx
Old
#7  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
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
Old
#8  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
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
Old
#9  
Junior Member - OP
Thanks Meter 7
Posts: 26
Join Date: Jun 2012
Guys.. Any thoughts on this?

Sent from my Nexus 4 using xda app-developers app
 
XDA_Bam
Old
#10  
XDA_Bam's Avatar
Recognized Developer
Thanks Meter 826
Posts: 412
Join Date: Mar 2011
Did you untick the box 'Sensors', so that the phone app can't access them anymore? And this didn't help?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes