Recommended Posts

My G3 has developed a problem recently whereby the proximity sensor seems to have lost it's calibration settings. When in a call the screen will turn off when the phone is against my ear but then won't turn on again when I take the phone away again. I've cleaned the lens over the proximity sensor but this makes no difference.

I can calibrate it successfully in MobileUncleTools by going to 'Engineer Mode -> Engineer Mode (MTK) -> PSensor' and perform the calibration procedure. The proximity sensor will then work as expected until a reboot after which it is back to the same problem again. So I have to perform this recalibration after every reboot.

So what I would like to know, Firstly, is if anybody knows why the calibration in MobileUncleTools is not saved and does anybody know where the calibration settings should be saved to so that I can manually alter the settings. I have looked through all the system config files and I cannot find anything relevant.

Secondly, does anyone know of any other method of calibrating the sensor that would survive a reboot.

Share this post

Link to post

Share on other sites

wow! seems like there's an issue with the parts Jiayu's been using..their phones are degrading a few months into use..

I don't know if I could make that assumption. I have rooted the phone, installed CWM and loaded a couple of custom roms even though I am now back on the last official ICS release. So this may have been self inflicted. I really cannot say for sure.

It would be fine if the sensor calibration was saved because the phone works perfectly until it is rebooted. I can't help feeling this is a software issue and not hardware.

Actually, thinking about it, I do have a Nandroid backup of the original rom the phone was supplied with. So I may try restoring that and see if the proximity sensor works ok with that.

Edited June 14, 2013 by RussellS

Share this post

Link to post

Share on other sites

I have the same problem now using the MIUI rom and set the call end with power button. Its only an issue now for me when I need to do something with the phone while in a call. Started for me when I used a Lewa rom.

Share this post

Link to post

Share on other sites

I don't know if I could make that assumption. I have rooted the phone, installed CWM and loaded a couple of custom roms even though I am now back on the last official ICS release. So this may have been self inflicted. I really cannot say for sure.

It would be fine if the sensor calibration was saved because the phone works perfectly until it is rebooted. I can't help feeling this is a software issue and not hardware.

Actually, thinking about it, I do have a Nandroid backup of the original rom the phone was supplied with. So I may try restoring that and see if the proximity sensor works ok with that.

well to be fair to Jiayu, some issues may have been self-inflicted, but from what I've seen on the other forums, they've had a lot of issues even since the G2 days..

please try to roll back to your backup..format everything first so you won't have any "leftovers" from your previous ROMs..and please let us know how this goes..

Share this post

Link to post

Share on other sites

I have now restored various Nandroid backups goping right back to the original rom that the phone came with and the proximity sensor is uncalibrated the same on all of them. I can still calibrate it with MobileUncleTools on all the roms and it will work fine but none of them will survive a reboot.

So I can only think that the sensitivity of the proximity sensor has changed since the phone was new causing it to require a recalibration. It is just unfortunate that the calibration is not saved.

There must be a file in the system somewhere that stores the calibration information for the various sensors but I haven’t found it yet. I have left a message on the Jiayu Official Facebook page requesting information about calibrating the proximity sensor but I'm not holding out much hope for a useful reply.

In the meantime I'm still hunting for a file somewhere in the Android system that might contain the calibration data.

EDIT: I have also emailed the contact email address on the Jiayu website regarding this to see if I get any help that way. However, once again, I'm not holding my breath.

EDIT2: I have also emailed etotalk.com which is where I purchased the phone from.

Share this post

Link to post

Share on other sites

Sorry I didn't respond earlier but I've had a lot on and haven't been on Modaco for a while. In answer to your question, no I have had absolutely no response from Jiayu at all. I also emailed the developer of MobileUncleTools to see if he had a solution to the problem of the calibration not being saved, but I got no response from him either. The only response I did get was from Etotalk where I bought the phone from. They were more helpfull and emailed me a APK file to calibrate the proximity sensor. Unfortunately it didn't work though and only works wityh HTC phones.

So, I'm still in the same boat at the moment not being able to save the sensor calibration.

With respect to MobilerUncleTools, they have moved the PSensor calibration in later versions so it is no longer where I originally said it was.

Share this post

Link to post

Share on other sites

Hi sorry for the delay I'm running 2.9.5, but strangely when you install a Lewa ROM the last sub menu (other extras) disappears. Must be something to do with permissions. I have installed the original 4.1.2 beta firmware and the Mobile Uncle sub menu has returned, the Psensor problem has also gone! Stay away from Lewa ROMs for this handset I would recommend!!

Share this post

Link to post

Share on other sites

Hi sorry for the delay I'm running 2.9.5, but strangely when you install a Lewa ROM the last sub menu (other extras) disappears. Must be something to do with permissions. I have installed the original 4.1.2 beta firmware and the Mobile Uncle sub menu has returned, the Psensor problem has also gone! Stay away from Lewa ROMs for this handset I would recommend!!

That's strange, I'm on the 4.1.2 beta firmware and I've still got the proximity sensor problem.

Share this post

Link to post

Share on other sites

Hmm, I agree it is very strange. It's early days for me with this Rom as I never stuck with it for long the first time around! As a matter of interest have you tried the Roky v2.3 from the needrom website? I checked the original site for this room (russian) and he claims to have sorted the proximity problem in his room.

Share this post

Link to post

Share on other sites

Hmm, I agree it is very strange. It's early days for me with this Rom as I never stuck with it for long the first time around! As a matter of interest have you tried the Roky v2.3 from the needrom website? I checked the original site for this room (russian) and he claims to have sorted the proximity problem in his room.

yes I have tried the Rocky v2.3 rom from the Needrom site but it made no difference to the proximity sensor problem. The rom was very good except for the fact that the email, calendar and messaging apps were a horrible white text on a black background. This made those apps very difficult to read and looked horrid. Therefore I have reverted back to the official Jelly Bean beta rom. As I said though I still had to recalibrate the proximity sensor after each reboot.

So basically this fix can be applied to any ROM whether it be custom or stock and consists of a script which is run at at startup. The only criteria is that the ROM must be rooted. I'm afraid I can't offer any advice on this as I rooted mine a long time ago and I can't remember what method I used. However, if you check out the 'Jiayu G Series' forum on Modaco you will find advice regarding this.

If you are running a custom ROM which has init.d support then the script can be placed in the init.d folder and will automatically be run as the phone boots up. However, if you are running a stock rom as I am then it will not have init.d support and so the script will have to be run another way. What I have done is to use a free android app called SManager (link at bottom of post) which has the function of running scripts at boot time.

Create a file with the name '99proximity' and the following contents: (copy & paste from this box)

#!/system/bin/sh
echo 900 > /sys/bus/platform/drivers/als_ps/psthd

Copy this file onto the SD card in the phone. I suggest putting it in a folder called 'scripts' rather than just loose on the SD card.

I have also attached the script file to this post to save you creating it yourself.

...Open the scripts folder where you will see the script you created earlier:

...select the script which will bring up the following screen:

when you first enter this screen all the option buttons (Fav, Su, Boot, Net, Blth, Wlck & Ntfy) will be greyed out as they are not yet selected.

Press 'Su' and 'Boot' which will then show up as activated as in the screenshot. These options specify running the script as root at boot time.

Press save, exit SManager and then reboot the phone Hopefully when the phone has booted up the promity sensor will work properly.

This fix has been working on my phone for a few months now so I know it works. Hopefully this tutorial is complete but it is mainly from memory so I may have missed something. If you do have any problems post back here and I will do my best to help.

So basically this fix can be applied to any ROM whether it be custom or stock and consists of a script which is run at at startup. The only criteria is that the ROM must be rooted. I'm afraid I can't offer any advice on this as I rooted mine a long time ago and I can't remember what method I used. However, if you check out the 'Jiayu G Series' forum on Modaco you will find advice regarding this.

If you are running a custom ROM which has init.d support then the script can be placed in the init.d folder and will automatically be run as the phone boots up. However, if you are running a stock rom as I am then it will not have init.d support and so the script will have to be run another way. What I have done is to use a free android app called SManager (link at bottom of post) which has the function of running scripts at boot time.

Create a file with the name '99proximity' and the following contents: (copy & paste from this box)

#!/system/bin/sh
echo 900 > /sys/bus/platform/drivers/als_ps/psthd

Copy this file onto the SD card in the phone. I suggest putting it in a folder called 'scripts' rather than just loose on the SD card.

I have also attached the script file to this post to save you creating it yourself.

...Open the scripts folder where you will see the script you created earlier:

...select the script which will bring up the following screen:

when you first enter this screen all the option buttons (Fav, Su, Boot, Net, Blth, Wlck & Ntfy) will be greyed out as they are not yet selected.

Press 'Su' and 'Boot' which will then show up as activated as in the screenshot. These options specify running the script as root at boot time.

Press save, exit SManager and then reboot the phone Hopefully when the phone has booted up the promity sensor will work properly.

This fix has been working on my phone for a few months now so I know it works. Hopefully this tutorial is complete but it is mainly from memory so I may have missed something. If you do have any problems post back here and I will do my best to help.

Share this post

Link to post

Share on other sites

I have the same problem. I checked your way to solve the problem, but in tke last step, when i press "Run" button i get information "can't create /sys/bus/platform/drivers/als_ps/psthd: No such file or directory".

Share this post

Link to post

Share on other sites

Most likely, there is a dirt around the proximity sensor ( upper left corner ) or you may have put a new cover on the phone, put the phone in a zip bag or put a protection on the screen.

Or, something else happened as incorrect re calibration.

Or, I do not know. Proximity sensors are very difficult to deal with.

However, You can monitor the proximity sensor values in order to obtain more information whether your proximity sensor works or not and what may cause the problem as well as to virtually disable the proximity sensor when in calls, made and received and, also, to make the proximity sensor control the screen with the application Proximity Sensor and Screen. There is a good description how tom use the application inside the application.

Here is more information.

How to download and install :

Look for Version 2.0 or higher of Proximity Sensor and Screen by Steven Stanley Bayes.

The application does not require neither root access nor any third party frames nor products.

Here is more information how to download and install the application :

PLEASE, NOTE : MUST BE TYPED EXACTLY AS SHOWN, EXACTLY AT THE " APPS " TAB OF GOOGLE PLAY STORE, BECAUSE THE SEARCH ENGINE OF GOOGLE PLAY STORE IS VERY SENSITIVE.

Click on the displayed app with the same name and author to download and install. The application is also available in many other app stores and online which may or may not show after a general purpose search with google.com and a web browser but some forums where the links are posted may show.