Showing posts with label guide. Show all posts
Showing posts with label guide. Show all posts

Workaround for failed Als_ps calibration

Workaround for failed Als_ps calibration
If your Android phone keeps the screen off when taking it away from your hear, the proximity sensor doesn't do its job properly.
The following solution worked consistently for me.


I've seen this recently with Mediatek-based phones produced by Alps (Elephone, Ulefone, ...) and it seems that many other phones are affected by a bug with the proximity sensor.

The symptom:
After a time of normal operation (phone turns the screen off during a call and restores it once away from your face) , the proximity sensor suddenly stops working and the screen remains off.

The normal corrective operation is to go to Display setting, and run the "Proximity Sensor Calibration". In many cases, the calibration fails with an error like "als ps calibration failed"

In most cases, the proximity sensor hardware is fine but somehow, the calibration values gets messed up at some stage, obviously because a software bug.

Note: the solution below does not prevent the problem from re-occurring ut provides a temporary solution until Mediatek comes up with a real bug fix.

First think to do: Verify that the Proximity Sensor works
This can be done via the the Engineering mode.
The right code to dial varies within the models. The one below is for the MTK 6752 phones:
*#*#3646633#*#*



Once in  the Engineer Mode screen, go to Hardware Testing > Sensor > Light/Proximity Sensor > PS Calibration.

Although this different calibration screen would seem like a alternative to the main one, it didn't fix any problem back in Android. At least you can see the "PS" value changing is real time by waving your hand over it: that means the sensor is ok.

Now try this workaround:
The method below basically consist in ... doing the opposite of the on-screen instructions!

You may need to re-try a few times, but I now manage to have it working consistently within maximum 3 attempts.


First of all, go to the Proximity Sensor Calibration in the Display settings:



Step #1, "Retrieving effective parameters":
What the instructions say: "remove objects in front of distance sensor"
What you should do: Keep it well covered during that phase (while it counts from 1 to 3).
Covering and uncovering the screen a few times during that phase may also work.



Step #2, Calibrating...
What the instructions say: "place objects in  front of the distance sensor"
What you should do: Don't cover it.




If all goes well, the screen should show a countdown from 3 to 1, which indicates that the calibration process succeeded.


The last screen allows to test the brightness varying with proximity.
Further sensor tests can be done with apps like CPU X or Phone Tester.


The phone screen should now behave normally during phone calls...at least for a while...






Read More

Android calendar nightmare...

Android calendar nightmare...
A recent strange incident with my Android calendar synchronization almost drove me insane.

It appears to be a very popular issue that has many causes and solutions.




Here is my 2 cents with a solution that worked for me...
First, the symptoms of my situation:

Calendar sync stopped working, everything else still gets sync'ed

- The calendar stopped synchronizing any new entry and just showed the cached existing items up to a recent date.
- Any new item added on the phone would not be saved. Any new item added from a PC would not be sync'ed into the phone.
- "Calendar" had disappeared from the Sync list in the Android settings, all the other apps were still listed and working. 
- There was no calendar listed under my account in the Calendar settings
- Trying to add a calendar would bring a prompt for Sign-in a New or Existing Account which would consistently fail with the "couldn't sign in" error.

My working resolution (root needed):

- Removed the calendar.apk from system/app folder
- Restarted the phone
- In Settings>Accounts> Google>account name> Removed the account using the menu and added it again
- From Play, located the Calendar app from Google and installed it.
From this moment, the Calendar should be back in the Sync list
- (Optional but recommended) moved the new com.google.android.calendar.apk from /data/app to /system/app and restarted the phone.  This turns the new Calendar into a system app.

Remark:

This replaces the stock/AOSP calendar.apk with the much bigger (20MB vs 2.6MB) but nicer one from the Play Store. In my case, this was a necessary part of the solution because, doing the same procedure as above with this stock apk did not help at all.

One problem, many possible causes and solutions:

I can only speculate on the causes as this happened after no obvious configuration change or application installation. I suspect the stock calendar.apk (4.4.4-1227136) in my official Android 4.4.4 from THL to have some kind of bug.

Other people have resolved a similar problem by either updating/re-installing Google Play service, 
clearing the cache and data for Google Play Framework, disabling the 2-step authentication (not used in my case), removing the Google account and re-adding it, replacing the Calendar Sync Adapter apk, ...


Read More