My Proximity Sensor woes - AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin

I had to flash back to GoldenEye 4.3 to get my dialer back! After I flashed ASOP (or any non touchwiz based ROMs) I had a bug where I couldn't turn my screen back on during a call...
It was extremely annoying but the ROM's that I were running were so good that I tolerated it. Well today I decided I couldn't let my phone not be a phone. I have this problem with
Kangakat 5 Stock Kernel
KangaKat 6 Stock Kernel AND Ktoonsez's kernel
CM11 with stock kernel
CM10.2 with stock kernel
Danvdh's ASOP 4.4.2 ROM with stock kernel
None of these work. Its still the same call bug.
I've tried proximity sensor recalibration. Didn't work. I've tried compressed air. Didn't work. Nothing has worked.
Finally I HAD to go back to debloated TW GoldenEye 4.3 which I am on right now, and it doesn't work. Proximity sensor is enabled in settings but when I pull my phone away from my head the screen doesn't turn on! However I can atleast access my dialer so atleast I can use my phone as a freaking phone!!!!
I typed *#0*# and went to the test area and went under sensor and my proximity sensor will have a value of 69 until something gets in its way and then quickly max out at 255...but I noticed also that the farther my finger goes the lower the number gets so it seems like its doing its job correctly. However the screen is always green and always vibrating. It never stops...
Guys. I can't stand 4.3 debloated. Once you've run KitKat you can't go back. Do you guys have ANY last ditch efforts on how I can fix this? Maybe even just disable the proximity sensor when I flash a ROM? I just hate Touchwiz. Been flashing 300MB ROM's and had to flash a 1.4GB ROM today which is just stupid...
please please help..

EpicMango said:
I've tried proximity sensor recalibration. Didn't work. I've tried compressed air. Didn't work. Nothing has worked.
Click to expand...
Click to collapse
Do you still have a warranty? Go back to stock and make a claim.

EpicMango said:
I had to flash back to GoldenEye 4.3 to get my dialer back! After I flashed ASOP (or any non touchwiz based ROMs) I had a bug where I couldn't turn my screen back on during a call...
It was extremely annoying but the ROM's that I were running were so good that I tolerated it. Well today I decided I couldn't let my phone not be a phone. I have this problem with
Kangakat 5 Stock Kernel
KangaKat 6 Stock Kernel AND Ktoonsez's kernel
CM11 with stock kernel
CM10.2 with stock kernel
Danvdh's ASOP 4.4.2 ROM with stock kernel
None of these work. Its still the same call bug.
I've tried proximity sensor recalibration. Didn't work. I've tried compressed air. Didn't work. Nothing has worked.
Finally I HAD to go back to debloated TW GoldenEye 4.3 which I am on right now, and it doesn't work. Proximity sensor is enabled in settings but when I pull my phone away from my head the screen doesn't turn on! However I can atleast access my dialer so atleast I can use my phone as a freaking phone!!!!
I typed *#0*# and went to the test area and went under sensor and my proximity sensor will have a value of 69 until something gets in its way and then quickly max out at 255...but I noticed also that the farther my finger goes the lower the number gets so it seems like its doing its job correctly. However the screen is always green and always vibrating. It never stops...
Guys. I can't stand 4.3 debloated. Once you've run KitKat you can't go back. Do you guys have ANY last ditch efforts on how I can fix this? Maybe even just disable the proximity sensor when I flash a ROM? I just hate Touchwiz. Been flashing 300MB ROM's and had to flash a 1.4GB ROM today which is just stupid...
please please help..
Click to expand...
Click to collapse
I had the same bug. Have you wiped? I ran kitkat, and after many bugs like the one you're describing, wifi disconnects and app errors I went back to 4.3 stock. Debloated, and run nova prime with kiatkat theme. Looks like kitkat, feels like kitkat, but I don't have any bugs.

I should've update this thread...I FOUND A SOLUTION! It basically forces a new value for the sensor to pick stuff up on!
I'm now back on optimized 4.4 KK with GravityBox and I hold the perfect phone in my hand ATM
Here is the solution
http://forum.xda-developers.com/showthread.php?t=2045569&page=4
Methods that worked for me.
Method 1.
Blow Air it will solve your prob hopefully.
Method 2.
go to samsung code *#0*#. then SENSORS and Read your Proximity sensor values.
<<< DECISION >>>>>
####Calibration isnot needed if ####
.
your phone doesnt vibrate in normal but does so when u physically put your finger on the Sensor.
#### Calibration needed if ####
.
your phone is vibrating in this menu no matter what, you put your finger on the sensor or not
Follow these steps
1. download Android Terminal from store
2. type these commands to calibrate automatically
$ su
# echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
# echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
Reboot and see if it works.go to *#0*# and check if it continuously vibrating or only does so when you put your finger on the SENSOR.
<<<< IF Continuously Vibrating Follow these steps>>>>
you need to manually put values in ur /efs/prox_cal.it Reads Hexadecimal value. so you have to convert your decimal values into HEX.
##### FIND YOUR Decimal Values and pushing them into /efs/prox_cal ######
Method : finding two values for calibration . offset + normal value.
##.. FINDING OFFSET ######
cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal
note down the values it returns.. mine is 5,64,100.. you only need the 1st value which is 5.
### FINDING NORMAL STATE ######
cat /sys/devices/virtual/sensors/proximity_sensor/state
note down the value if returns. mine is 64
now ADD OFFSET value + Normal Value
5 + 64 = 69
Convert in Hexadecimal which is 45.
<<<<<<<<<<< Pushing the value in /efs/prox_cal >>>>>>>>>>>>>>
# echo -en $ '\x45' > /efs/prox_cal
then
# chown system:system /efs/prox_cal
# chmod 644 /efs/prox_cal
# sync
# Reboot
All done. after that go to *#0*# then SENSORS and move your finger on the sensor, your phone will Vibrate only when you put your finger on the sensors.
Manual method worked for me.
ENJOY.
Click to expand...
Click to collapse
Those instructions will sound confusing to you, but if you read the entire thread and get an idea of what they are talking about then you'll understand! It worked for me! And I'm positive it will work for you to!!
It turned out that my proximity sensor was always on! If you type in *#0*# into the stock dialer you'll bring up diagnostics. Go to sensor. What should happen is when you wave your hand near the sensor the screen should turn green and vibrate. If you are always vibrating regardless (my situation) that means your proximity sensor is always on and you have to hard calibrate it.
I'm thinking of doing a full writeup for this so others can fix this issue! I have no problems now!!! So Happy to report this!

Related

How to fix magnetometer

I just fixed the magnetometer on my Vibrant, using advice found on another site. It took me a long time to find it, so I thought I should post it here to help other Vibrant users find it more easily. There is similar advice in forums for other Galaxy S variants, but nothing here.
About a week ago, I noticed that my phone was no longer sensing its position. The screen would not rotate, and the compass was not working. I ran the sensor test using the *#0*# code, and both the accelerometer and magnetic sensor were stuck on one reading regardless of phone position. Rebooting had no effect.
I found the following procedure on a different site. I would post the link to give proper credit, but I don't have sufficient forum privileges because this is my first post. It was on the dp.nonoo.hu blog.
Your Samsung Galaxy S phone’s compass is not working? Auto rotation is faulty? Check your hardware by dialing *#0*# – this is a factory test app for the phone.
If the compass is broken there too, here’s how you can fix it: delete /data/system/ms3c_yamaha.cfg, and if there’s a backup file, delete it too, then reboot.
If it won’t help, make sure the files are deleted and then run /system/bin/sensorcalibutil_yamaha from a root shell, follow the instructions and then reboot your phone.​
I deleted the file using RootExplorer and rebooted. The accelerometer and magnetic sensor were working perfectly.
Lol I fixed mine by simply flipping the phone a few times. Basically I first downloaded and installed the compass app from the market. Then in the app, I calibrate it normally (wave in a figure 8 pattern) a few times. It will still be pointing incorrectly so next all I do it flip the phone on it's vertical axis a few times then repeat with the horizontal axis. Then it will be correct. This always works for my phone, I do it every time after a factory reset since it uncalibrates the magnetometer every time. I've never had problems with the accelerometer though, only the magnetometer. It would always be out of whack no matter what until I figured out what to do.
Cheers Blue,
This fixed it for me.
I cannot find neither the .cfg fila and or the configuration app.
+1
These files do not exist in ICS AOKP on my Vibrant and my magnetometer still points in the wrong direction lol.
Trying everything I can find on the Internet.
Edit: Removing the battery does not work even after 15 minutes. However, flipping the phone end over end worked immediately. Seems strange that this is not mentioned by any of the Compass apps yet they tell you to draw figure 8's in the air which does nothing on my Vibrant. lol
Thanks to the individual who shared that tip.
same here, a few vertical and horizontal flips did the trick for me. (on ics passion)
Didn't find the "/data/system/ms3c_yamaha.cfg" on my GalaxyS running Slim ICS 3.2. Seems like ICS doesn't have this file. And some vertical/horizontal flips almost did the trick. Now the compass is moving, before it wasn't moving at all. It not showing very good direction like it used to when I first purchased the device almost 15 months ago.
And one more question, does anyone know, what is the testing code for ICS? Because *#0*# isn't working on ICS. I used this code while on gingerbread and it worked before. I thought this code is universal, but now it seems like, its not.
blueguitarbob said:
I deleted the file using RootExplorer and rebooted. The accelerometer and magnetic sensor were working perfectly.
Click to expand...
Click to collapse
1. Doest it still work when the phone is:
- touched with a little magnet like in a standard vertical flip-case (with little magnet) or
- travelling by car/bus/train or
- plugged in headphones
In the one I had (I don't have it any more) while plugging in headphones, or travelling by car/bus/train, or putting it in an flip-case with a little magnet the arrow In Google Maps pointing the direction which a device is currently facing simply freezes. Compass app also freezes at the same time. The app called Android Sensor Box in the scale for magnetometer reaches its maximum level. While moving the little magnet, from mentioned before filp-case, around a phone the arrow travels with it. Move it away and it freezes. It simply won't move. While sticking S4 to the metal part of laptop table the arrow immediately points opposite direction. Only making 8s in the air helps but only for a bit. Neither S3 9305 nor S5 have this problem. Even when stuck with a magnet their arrows in GM works just fine.
2. Does deleting the file fixes the GM's arrow issue also?
Danstek said:
Lol I fixed mine by simply flipping the phone a few times. Basically I first downloaded and installed the compass app from the market. Then in the app, I calibrate it normally (wave in a figure 8 pattern) a few times. It will still be pointing incorrectly so next all I do it flip the phone on it's vertical axis a few times then repeat with the horizontal axis. Then it will be correct. This always works for my phone, I do it every time after a factory reset since it uncalibrates the magnetometer every time. I've never had problems with the accelerometer though, only the magnetometer. It would always be out of whack no matter what until I figured out what to do.
Click to expand...
Click to collapse
**** this worked

[Q] Proximity Sensor Calibration?

Question to the kernel or rom devs. Is there a way to change the threshold of the proximity sensor? I am asking because I had proximity sensor problems where my ADC value would be roughly around 46-50 at rest. I sent my phone into samsung to get it fixed and then the senor started working again as I was hovering around 16-18 at rest (they replaced the sensor) . Now after a few weeks later, I am noticing my adc value at rest is starting to slowly increase (the ADD in me keeps me checking ) and now it's at 32. I have an i337m rooted and running the latest stock TW rom (MG1 for Canadian models). I have a feeling in about another 3 weeks or so, I am going to have the same issue again.

Sensor not working anymore

Hi, anybody can help me, my yd201 proximity sensor not working, i did everything flashing all rom on the forum to try fix this but it still doesn't work. (from 4.+ to the latest MM) with all firmware. i just trying full unroot my phone on root apps then wanna clean system apps using twrp so am try deleting root forder from latest twrp to clean everything, now proximity sensor not working what ever i do rotate, calling, and the biggest problem is back screen is not working too,. download sensor test from the market is working too(device sensor hardware not support on this phone)
please help me what should I do.. if anyone knows where can buy motherboard for yotaphone please give me the link. tnks.
Dahlan abdullah said:
Hi, anybody can help me, my yd201 proximity sensor not working, i did everything flashing all rom on the forum to try fix this but it still doesn't work. (from 4.+ to the latest MM) with all firmware. i just trying full unroot my phone on root apps then wanna clean system apps using twrp so am try deleting root forder from latest twrp to clean everything, now proximity sensor not working what ever i do rotate, calling, and the biggest problem is back screen is not working too,. download sensor test from the market is working too(device sensor hardware not support on this phone)
please help me what should I do.. if anyone knows where can buy motherboard for yotaphone please give me the link. tnks.
Click to expand...
Click to collapse
Open the phone dialer and dial *#*#4636#*#* , if it doesn't work the first time try the code again and it should open the hidden testing menu, choose device test and you can manually test all the phones sensors to confirm if the proximity sensor is working or not. I had a s7 that did the same thing, the proximity sensor just quit working one day and I confirmed it wasn't working with this method. Good luck.
same result, not working too.
maybe problem is from hardware,
any idea on how to fix it, just something like using xposed or what?
Dahlan abdullah said:
same result, not working too.
maybe problem is from hardware,
any idea on how to fix it, just something like using xposed or what?
Click to expand...
Click to collapse
I just dealt with it, sometimes it would work and sometimes it wouldn't. There's an app on the play store that you can use for screen rotation, I ended up using that when I absolutely needed rotate the screen.
i dont care about rotation screen.. i just want the back screen working normally, if tap transfer button on color display it won't open it on epd screen when i rotate the phone..
I don't know if it happened the same with you, I own a YD206 so I am not sure how YD201 behaves, but there's a problem with proximity sensor that makes it working all the time, I have wrote a comment about it and will try to contact Yota about this, meanwhile it would be important for people that are not aware of this problem because is such a faint light to actually confirm if the same is happening to them, YD201 or YD206:
I discovered that I also have this problem, I was with the wrong radio, had to flash the Chinese radio and it suddenly appeared, this is what I have found I have an YD206, so I wonder how the YD201 behaves:
On YD206:
With wrong radio. radio (Russia xx versions) on YD206 , in KitKat or Lollipop ROMs the proximity sensor is OFF by default BUT, as soon you turn ON an app that uses it, it won't turn off again, it keeps blinking even if you force kill the app that started. However it will turn off if the screen is off, after 5 seconds after. Also it's important to acknowledge that 2G only with this radios fails. On Lollipop Wifi won't turn off automatically, just manually.
YD206 With the correct radio. radio S01_003_3034_CN1_M05 2G 3G (UMTS) and 4G (LTE) all work and with better reception, but as soon the screen is ON, the proximity sensor starts working, does not matter what app you have open, when you turn OFF the screen the proximity sensor will turn OFF in about 5 seconds. If you are using the EPD screen the proximity sensor will turn OFF faster than 5 seconds, but as soon you touch the EPD it will turn ON for 3 seconds or so. On Lollipop Wifi won't turn off automatically, just manually.
So the problem acts differently when you flash a different radio, I am not sure where's the bug comes from, but it seems there's also a bug with YotaRom. There's a Xposed module to disable proximity sensor in specific apps, I haven't tried that, I also would like to know how this behaves with the Marshmallow Beta.
(For the ones that are not aware of this problem, keep in mind that to see this problem you need to be on a dark place to see the very faint red light of the proximity sensor.)
Best regards,
This problem is also being discussed here: https://forum.xda-developers.com/yot...tive-t3520013/

Only gyroscope and accelerometer stopped working

My first time here posting, I'm sorry if it's duplicate or in the wrong place ... thanks
Good night people
I want to take advantage of the topic to report the same problem that the comrade had over there
Handset: galaxy s5 g900m
Rom: mashmalow
Date 2017-01-25
In the beginning I thought it was a hardware problem, but before sending for assistance, I can see that with some moves the accelerometer and the gyroscope come back to work for a few moments. First thing was to give hard reset, I realized that the accelerometer and the gyroscope worked, but the moment the screen goes into standby it stops working.
The second attitude was to lock the phone in safety mode, the accelerometer and the gyroscope worked, but the first standby it stops working ..
Third was to pass roms stock, customized CM MIUI, same situation occurred the accelerometer and the gyroscope worked, but the first standby it stops working.
I gave a few beats on the back of the phone, the same thing happened after restarting.
I deleted folder data / etc / sensor, the same thing happened but the first standby it stops working.
****But today I did something that made me sure that the problem is softwere, with the rooted stock rom I installed a custom kernel, phonix kernel, then the accelerometer and the gyroscope worked perfectly, it worked even after returning from the standby, for about 3hr The cell worked very well, but upon receiving a connection the accelerometer and the gyroscope stopped working and when using test sensors dialing * # 0 * # fixed values ​​where it says accelerometer and the gyroscope
Now I stopped messing with my cell phone.
I hope this information can help our team find a solution.
I downgraded to 5.0, and it did not solve...
This connection problem after the updates ...

Proximity and ambient light sensor stopped working!!!

I don´t know if it´s a coincidence or not, but I a few days after the update to Oxigen OS 3.6.1 I noticed that the proximity sensor and light sensor of my ONEPLUS 2 stopped working.
I used AndroSenor and Sensor box from the PlayStore, and both os them say thar the proximity and light sensors are missing.
I had a remote session with a ONEPLUS L2 specialist and they wiped my phone and reflashed the latest ROM (ver. 3.6.1), but the problem wasn´t solved..
I guess that, if the sensors don´t appear in the apps I mentioned maybe it´a a hardware problem, but I would like to hear more opinions.
If anyone has any suggestion to try to solve this problem before sending it to repair (out of warranty)??
flash persist.img from fastboot
backup all your info
in some cases it will help
hi there!
I seem to be having quite a similar problem, though, my sensors work, but stop responding after an unspecified period of time (can be anywhere between minutes and hours).
I tried flashing several roms (oreo, nougat) and yesterday i flashed Oreo Pixel Experience (just pure ROM+OP5 camera, no root no custom kernel just to rule out a few things) but the issue remains. Important to mention, i always clean flash.
The best way to describe the issue is: "sometimes the proximity and light sensor just stop working and i dont really know why" which is obviously causing a whole bunch of issues with auto brightness, making calls, picking up when someone calls etc.
The thing is, everything works after a reboot...but only for some time...then the sensors go "offline".
sometimes they work for a couple of hours, even a day...sometimes they die after half an hour or something. I have a feeling that i see them die faster when i have my phone in the pocket and leave it idle for a while, and when i use my phone often and dont really give the phone time to rest they live longer. It almost feels as if the phone goes to some deep sleep when idle for some time, disconnects the sensors, but doesnt turn them on again when woken up.
tried flashing the persist.img as advised just above, but it doesnt seem to have an effect.
anyone has any good idea?
thanks!
allright, being desperate from not being able to use my phone in a normal way i flashed OOS 3.6.1 from official zip files that can be downloaded from oneplus.net support section, using OP recovery and surprise surprise - sensors are working flawlessly! so im ruling out the HW problem. I think im going to stick to OOS for a while to monitor the sensors and eventually im going to try flashing oreo again.
ok, last update from my side: after two days on OOS where everything worked fine i flashed Pixel Oreo build and sensors continue working just fine! so, whoever is experiencing strange behavior of his sensors, i recommend the same approach.
Jackill said:
ok, last update from my side: after two days on OOS where everything worked fine i flashed Pixel Oreo build and sensors continue working just fine! so, whoever is experiencing strange behavior of his sensors, i recommend the same approach.
Click to expand...
Click to collapse
You still have working sensors?
I have exactly the same behavior as you mentioned in your first post. FRUSTRATING!
I've tried flash lineageos 15.1 ROM, no luck. New persist.img from official fastboot oos ROM but no luck either.
flaektrem said:
You still have working sensors?
I have exactly the same behavior as you mentioned in your first post. FRUSTRATING!
I've tried flash lineageos 15.1 ROM, no luck. New persist.img from official fastboot oos ROM but no luck either.
Click to expand...
Click to collapse
Hi! Yes, my sensors are still working just nicely.
Jackill said:
Hi! Yes, my sensors are still working just nicely.
Click to expand...
Click to collapse
So good for you ?
Before when your sensors struggled, did they also disappear from any sensor test app. Or did they just not work?
My prox sensor did not disappear but just hangs at 0 or 5cm if I check the value in any sensor app. And light turns 0 Lux also.
I've similar problem. Went completely stock as suggested but the problem persisted.
flaektrem said:
So good for you
Before when your sensors struggled, did they also disappear from any sensor test app. Or did they just not work?
My prox sensor did not disappear but just hangs at 0 or 5cm if I check the value in any sensor app. And light turns 0 Lux also.
Click to expand...
Click to collapse
Well mine didnt really "dissappear" either. They "froze" too. Lux froze at whatever value it measured the last however i am almost certain it was never exactly 0. Prox behaved the same as you describe: 0 or 5.
lazyfarmer said:
I've similar problem. Went completely stock as suggested but the problem persisted.
Click to expand...
Click to collapse
Interesting. I'm going to flash OOS recovery and latest OOS ROM later today and give it a try.
Jackill said:
Well mine didnt really "dissappear" either. They "froze" too. Lux froze at whatever value it measured the last however i am almost certain it was never exactly 0. Prox behaved the same as you describe: 0 or 5.
Click to expand...
Click to collapse
My lightsensor always freezes at 0 Lux. And when the prox freeze at 0 its impossible to quit a call. So f*cking frustrating so I have to fix this problem ASAP
I have the same problem with my LUX device, sometimes the sensors work randomly. When I reboot my phone the sensors stop working. The screen does not rotate, the most interesting thing is that it did flash the Moto camera mod and the rotation works perfectly with the camera, with the stock camera there is no rotation.
UPDATE:
I scheduled a remote session with Oneplus L2 Team and they performed a full factory reset of all partitions. No luck, problems still persist.
It must be a hardware problem.
In my case I sent the smartphone to them and they said it was a problem with the motherboard.

Categories

Resources