Related
Script to flash via CWM to fix fix perms has been done by minotauri (sorry if miss spelled will fix when on a computer) he deserves credit for the edify:
To Run Fix Perms While in Recovery Flash this file each and every time you need it run [for now]:
http://goo.gl/hrL7E
The Next Script is one you can flash via CWM and it will replace the file ROM Manager uses so this will remain between restarts and you can use it via ROM Manager or Script Manager anytime you want!:
Thank Minotauri again for another beautiful Edify!
http://goo.gl/qPpC3
Flash via CWM and it well work for that flash just flash anytime you need to run it via recovery until I see about permanently copying it over existing script or still can run manually with this guide if you choose [scroll down below the additional update on how to fix the script to run using ROM Manager while in OS!].
I posted this in a couple ROM threads and was asked to throw it out here as folks from different ROMs are all affected. I can only speak for TMobile Galaxy S2 as that is what I own, drive and work on...
I will be cleaning up the post a bit when I get time just want it posted so others can use the information add it really seems to help clean up small issues (even some report fixing multiple FCs after running fix perms this way!)
NEWEST UPDATE 2012.04.19
OK FIX FOR RUNNING FIX PERMS INSIDE OS VIA ROM MANAGER
If you adjust first line in script to #!/system/xbin/sh viola ROM Manager does not freeze [finally]
I did this with Ghost Commander [don't forget settings> check auto root] and long press fix_permissions and choose edit tapping it will have GC try to execute it.
I also moved down to set variables piece and placed 1s instead of 0s next to mount system, mount data, and remove (as in REMOVE stale data ) [should be all caps in /data/data/com.koushidutta.rommanger/files/fix_permissions
I am still working on finding a way of making those changes permanent in /sbin under recovery boots
Fix Permissions Work Around ICS
Run Fix Permissions via ADB Shell with Phone in Recovery
I have taken the time to document what should be a complete guide to running fix permissions while the phone is in the Recovery menu using adb.
I am posting the quick steps right after this, but if you scroll below that this is an extended step-by-step guide.
Code:
Running Fix Permissions
On Phone: go in to Mounts and Storage Menu from Main Menu and choose to mount /data and /system
On Computer: type adb shell
This should give you a ~# prompt
Now type "sh /sbin/fix_permissions -l -r" [without quotes]
and now you should see a bunch of text scroll by and then it will say fix permissions completed blah when done.
that's it type exit and hit enter about 3x [one will change ~# to ~$ then it will drop back to C:\blah and then one more time will close that window as well
Supplies [Phone, USB Cable and Android SDK (http://developer.android.com/sdk/index.html)
Follow the link to install Android SDK [they have directions on site]
first time installing adb? [Skip otherwise]
To Add ADB to your computers path [to run it from any directory]
Windows:
Open Command Prompt [Click Start, Click Run, Type in cmd and hit Enter [XP]]
Open Command Prompt [Click Start, type cmd in whitebox and hit Enter [Vista and 7]]
type set PATH=%PATH%;C:\android-sdk\platform-tools [or wherever you put android sdk just add platform-tools to the end [it is a hidden folder]
Linux [OSX should be same]:
PATH=$PATH:/home/user/android-sdk/platform-tools [or adjust for where you saved it]
export PATH
Now That You Have ADB and path set, time for good stuff
Opening a Command Processor
Open a Command Prompt [Windows] or Terminal [Linux or OSX]
Windows: Click Start, Click Run, Type cmd and hit enter [XP]
Click Start, type in to Whitebox cmd and hit Enter [Vista and 7]
Linux: Hold alt and hit F2 on keyboard [should see a run box now]
Type in xfce4-terminal and hit Enter [or substitute your terminal command this is xubuntus]
Once a Black and White Screen Opens...
Gaining Elevated [Admin or Root Privileges]
Ok, some further testing shows me you should have root or admin access to command processor before running ADB.
In Windows
Type The Following in to the command prompt window already open...
runas /user:%computername%\administrator cmd
hit enter when done
[yes just like that including %computername% windows will fill it in with proper info copy/paste if needed right clicking in command window should paste text for you [if not right click on the icon in left hand corner of title bar choose properties and place checks in the quick edit and insert mode boxes under Options tab]
now it will ask for a password if you have not set one you need to go to control panel users and set a password on admin account before this will work
Once you enter the password and hit enter a second command window will open and will have Administrator in the title
Now You can continue on
In Linux
With Terminal window open type:
gksudo xfce4-terminal& [sub your terminal command if not using xubuntu]
once you hit enter it may take a second but you will get a password prompt enter in your password and a new terminal will open and it will have [email protected] in the title
Now you can continue on...
Checking USB Connection
type in adb devices and hit enter
[if you get a command not found you will have to use cd to move to directory with adb [ie cd c:\android-sdk\platform-tools]
If it comes back with ?????? as serial number it is not connecting correctly follow the next steps otherwise skip the next bit if you didnt get all ?
I get ?????, what gives?
This seems due to not running command prompt or terminal as administrator or root user [Windows / Linux Respectively]
You will need to do the following in order
Disconnect USB from phone
On Phone: In Advanced menu choose restart recovery
On Computer: type in adb kill-server and hit enter
Reconnect USB cable
Be Sure To Follow Section above labeled: Gaining Elevated [Admin or Root Privileges] and then continue on
On Computer: type adb devices and you should see a mix of letters and numbers
and that means we are good to go on
Running Fix Permissions
On Phone: go in to Mounts and Storage Menu from Main Menu and choose to mount /data and /system
On Computer: type adb shell
This should give you a ~# prompt
Now type "sh /sbin/fix_permissions -l -r" [without quotes]
and now you should see a bunch of text scroll by and then it will say fix permissions completed blah when done.
that's it type exit and hit enter about 3x [one will change ~# to ~$ then it will drop back to C:\blah and then one more time will close that window as well
Device: TMobile Samsung Galaxy S2 [SGH-T989]
ROM: Yaldak's Vanilla ICS RC2
Radio: Blaze ICS
Performance Mod: Supercharger v6 update 8
Client: Xparent Green TapaTalk [latest]
Known Issues:
-------
Issue: My computer does not connect when I use adb shell [or I get ????? when I use adb devices]
Resolution:
I have found that i have to connect my phone 2x to computer to get it to work correctly most of the time, do the following
Disconnect USB from phone
In advanced menu on phone choose Restart Recovery
on computer: adb kill-server
Reconnect USB cable
on computer: adb devices
and you should now see a mix of numbers and letters and not ????? and now adb shell should connect
Issue when I try sh fix_permissions it says it can not find the file
Resolution: This is normally caused when you have not mounted /system [via phone]
or you did not use sh /sbin/fix_permissions [or be sure to do cd /sbin before sh fix_permissions
Issue: I get UID Read-only variable error and fix permissions does not run
Resolution: This is normally caused by either not mounting /system [via phone]
or not using sh fix_permissions.
Issue: Some of my apps are listed as /data/blah and it says it can not find the file
Resolution: This is normally caused by not mounting /data [via phone]
Issue: CWM will not mount /system or /data saying it can not find or read them
Resolution: I have found CWM does not like to load mounts once they are encrypted. If you have encrypted your device /system and /data are affected, try unencrypting your phone and trying again.
(this is a good thing it shows third parties tools trying to get around booting OS to read data will not be able to get at the information in your phone)
Device: TMobile Samsung Galaxy S2 [SGH-T989]
ROM: Yaldak's Vanilla ICS RC2
Radio: Blaze ICS
Performance Mod: Supercharger v6 update 8
Client: Xparent Green TapaTalk [latest]
SEE This post for the current script
http://forum.xda-developers.com/showpost.php?p=25023284&postcount=22
Sent from my SAMSUNG-SGH-T989 using xda premium
Well judging by the title that you have there referred to running the script via recovery adb to begin with.
A lot of users don't realize if fix perms says complete in 2 secs it had a problem so I didn't know of that thread, but hope this will be a catch all for fix perms and not just for those who already tried via recovery and adb shell and got that specific error.
Thanks for looking out though
Device: TMobile Samsung Galaxy S2 [SGH-T989]
ROM: Yaldak's Vanilla ICS RC2
Radio: Blaze ICS
Performance Mod: Supercharger v6 update 8
Client: Xparent Green TapaTalk [latest]
jangst123 said:
This is already and has been in the Q & A section.... Not development, but I wish the developers would look at it and figure out why we have issue on ICS
http://forum.xda-developers.com/showthread.php?t=1595806[Q] Problem with Fix Permissions (line 64: UID readonly variable) [WORK AROUND FOUND]
Sent from my SAMSUNG-SGH-T989 using xda premium
Click to expand...
Click to collapse
I think posting this in Dev section is perfect sense. Also, thanks for the fix. This has stumped me for a while trying to figure out what to do.
When trying this, I get the message:
cat: can't open '/data/system/packages.xml': No such file or directory.
It says that twice and concludes with fix permissions ended at yada yada. I followed every command and instruction to the letter, what could be the issue?
Hey I got idea,, lets make another thread in the general section and Themes,,
Sorry don't think this belongs here, IMO
MOD,, please delete 1 of the threads,, or merge them or something,, no point in having 2
Not that I'm not happy a work around has been found!
Hopefully now the developers will figure out the source of the problem
would it be possible to bake this into a rom, or to create a CWMR zip file to make the needed changes?
Dougshell said:
would it be possible to bake this into a rom, or to create a CWMR zip file to make the needed changes?
Click to expand...
Click to collapse
+1 I'm completely stumped!
I can't get adb to even reconize the damn phone im on ravers remix to ics
peppersu812 said:
I can't get adb to even reconize the damn phone im on ravers remix to ics
Click to expand...
Click to collapse
turn on debugging
RaverX3X said:
turn on debugging
Click to expand...
Click to collapse
Raverx3x any idea why we are having this problem!?
Should we be running a different fix_permissions on ICS?
Also see..
http://forum.xda-developers.com/showthread.php?t=1595806
being that we seem to be determined to have this discussion in 2 different threads
l-levit said:
Hey I got idea,, lets make another thread in the general section and Themes,,
Sorry don't think this belongs here, IMO
MOD,, please delete 1 of the threads,, or merge them or something,, no point in having 2
Not that I'm not happy a work around has been found!
Hopefully now the developers will figure out the source of the problem
Click to expand...
Click to collapse
Or you could have devs talk here and keep users in QA so this doesn't get flooded with chatter.
Our should we delete all those ROM threads in Dev that exist in QA as well?
Device: TMobile Samsung Galaxy S2 [SGH-T989]
ROM: Yaldak's Vanilla ICS RC2
Radio: Blaze ICS
Performance Mod: Supercharger v6 update 8
Client: Xparent Green TapaTalk [latest]
OGWisdom said:
When trying this, I get the message:
cat: can't open '/data/system/packages.xml': No such file or directory.
It says that twice and concludes with fix permissions ended at yada yada. I followed every command and instruction to the letter, what could be the issue?
Click to expand...
Click to collapse
Did you forget to mount /data in mounts and storage (on phone) before running?
Did you encrypt your device? I have CWM fail to load mounts after encryption
Device: TMobile Samsung Galaxy S2 [SGH-T989]
ROM: Yaldak's Vanilla ICS RC2
Radio: Blaze ICS
Performance Mod: Supercharger v6 update 8
Client: Xparent Green TapaTalk [latest]
Oh and other thread just ganked my fix which is cool but I did this on my own not in response to anything so seeing as how I had to put in 2 hours of actual research, scratching my head, trying many different ways and seeing as how this is more of a process then simply loading a script I wanted to maintain it here until I can edit script or another Dev does making it cleaner and easier to manage and thus ready for more casual users found in QA threads.
Sheesh, sorry I figured this out maybe next time I won't pass on the info for fear of debating where it should be posted rather than the content and how to make it better going forward.
Device: TMobile Samsung Galaxy S2 [SGH-T989]
ROM: Yaldak's Vanilla ICS RC2
Radio: Blaze ICS
Performance Mod: Supercharger v6 update 8
Client: Xparent Green TapaTalk [latest]
u mad bro
Interesting,, the other thread was started 12th April 2012, 10:35 AM,
plus it looks like he quoted your original post from BlackEdition, and gave you credit,, before you even chose to make another thread in a section that is normally reserved for developers and their ROM's, scripts, or mods. All while u r over here bashing the other thread! Thanks for helping, but grow up and follow the rules
anyway make sure you are setting the path to adb
see http://forum.xda-developers.com/showthread.php?t=1161776 for more information
peppersu812 said:
I can't get adb to even reconize the damn phone im on ravers remix to ics
Click to expand...
Click to collapse
I have instructions on that issue on post.
Did you run adb devices and get ????? unknown device?
I had to run terminal as administrator, then I issued adb kill-server and reconnected phone and then did adb devices again and then it will say starting adb blah blah blah and then I got 6f7y88 [made up it should be a series of numbers and letters and no ?]
make sure adb devices gives you a valid response and not ????? I have found I almost always have to connect phone twice and at least do the above [with regular terminal I only used admin on first run but there in case it does make a difference].
So everytime I conect [or just about] I have to connect the phone
run adb devices get ????? and then
Disconnect USB
on phone in advanced menu choose restart recovery
on computer adb kill-server
Reconnect USB
Run adb devices and get a good serial number listed
I have to do actual work for a couple hours and then will be cleaning up main post on top and adding that bit in a place it get noticed more easily bear with me as I make my boss happy [he is wondering why things aren't getting done round here now ut-oh LoL] then I will clean up the information.
l-levit said:
u mad bro
Interesting,, the other thread was started 12th April 2012, 10:35 AM,
plus it looks like he quoted your original post from BlackEdition, and gave you credit,, before you even chose to make another thread in a section that is normally reserved for developers and their ROM's, scripts, or mods. All while u r over here bashing the other thread! Thanks for helping, but grow up and follow the rules
anyway make sure you are setting the path to adb
see http://forum.xda-developers.com/showthread.php?t=1161776 for more information
Click to expand...
Click to collapse
Um, actually I just noted they used my solution and said it was cool to do so, it appears you have an axe to grind with me and are just nit picking anything I say. I am sorry if yoyu do not feel my work is not to the same level as other folks, but since I put in work and this is more of a manual fix you have to work at rather than an easy to use script [yet], I did not want to post it in QA and all until I have something better for general release.
Also, I am not mad, just wondering why you would rather start silly arguments over placement of usable useful information rather than helping to make said information better and more stable for release to others.
Are you mad I figured this out and posted it before you or something as I have never talked with you and given you no reason to troll my threads?
When I do have a stable script [well at least semi stable for release to dev then more stable for QA]. The way I view QA is for general users questions and answers and since I was going to work on DEVELOPING a script that does work I was holding off on a QA thread, once I do get a script together I will be releasing it. In the meantime I was hoping to have more advanced users and devs dissect my process here and give me feedback towards a full script.
ALSO, by using sh /sbin/fix_permission OR doing cd /sbin and then fix_permissions you negate any need to do any path variable adjustments BUT if you rather then here is how...
when in adb shell before anything
PATH=$PATH:/sbin
export PATH
will then make it so you can just fix_permissions regardless of where you are in directory tree [but so will sh /sbin/fix_permissions so either way is up to you]
or if you are reffereing to adb on the computer
in Windows with command prompt open
set path=%path%;C:\android-sdk\platform-tools [or adjust for where you saved adb]
so if setting a batch program you could use the following to copy/paste [just adjust directories if you saved files differently]
The following is off the cuff until I begin writing the full script and automate things but it is a very basic start
Code:
@Echo Off
Set Path=%PATH%;C:\android-sdk\platform-tools
adb devices
Echo If you see ????? then restart recovery and reconnect the phone
Echo and run adb kill-server and re-run this batch script
pause
Echo when you hit any key this will start adb and put you in the shell you
Echo Will have to run fix_permissions -l -r manually
Echo Be sure to mount /storage /data via phone first
adb shell
or in Linux [OSX should be similiar if not the same]:
from terminal
PATH=$PATH:/home/user/android-sdk/platform-tools [or adjust for where you saved adb
export PATH
No it just bothers me when people ignore the rules and the Developers! Raver even told you were it belonged, and you chose to ignore Raver and the rules!
The fix will be to modify recovery for use with ICS on our devices or a modified fix-permishions script baked into the ROMS
RaverX3X said:
turn on debugging
Click to expand...
Click to collapse
I did bro just having trouble getting the cmd to recognize adb I have it downloaded I changed it still nothing don't know what the hell is wrong with it but IM fixing to improve on my golf swing on this damn vista desk top !
Sent from my SAMSUNG-SGH-T989 using xda premium
I found out that the proximity sensor on my Note II isn't working as it should. Whenever I am on call, the screen goes off, but doesn't lit up when I move the phone away from my ear. I've investigated and found that calibrating the proximity sensor could solve the problem.
I've searched around but haven't found the right steps to calibrate the proximity sensor on Note 2. The 'Phone Tester' app shows weird behavior of the sensor. It sometimes just keeps waiting for the data and sometimes shows 'Far' , 'Near' status correctly. But once I move my hand near the sensor and then move it away, the status remains 'Near'.
I'd really appreciate recalibration procedure & any other recommended fix.
I would like to know the solution too
Handwritten from my Note 2
I have same problem too
Sent from my GT-N7100 using xda app-developers app
CrazyEngineer said:
I found out that the proximity sensor on my Note II isn't working as it should. Whenever I am on call, the screen goes off, but doesn't lit up when I move the phone away from my ear. I've investigated and found that calibrating the proximity sensor could solve the problem.
I've searched around but haven't found the right steps to calibrate the proximity sensor on Note 2. The 'Phone Tester' app shows weird behavior of the sensor. It sometimes just keeps waiting for the data and sometimes shows 'Far' , 'Near' status correctly. But once I move my hand near the sensor and then move it away, the status remains 'Near'.
I'd really appreciate recalibration procedure & any other recommended fix.
Click to expand...
Click to collapse
I think from check list call *#0*#:laugh:
Did any of you figure out a fix to this issue?
To calibrate the proximity sensor you need to edit the build.prop, file. Quickest way I do this is by using Romtoolbox pro which has that option. Once in the build prop up editor you'll see the option to recalibrate the proximity sensor. You'll need root access.
Sent from the Rabbit Hole
bushako said:
To calibrate the proximity sensor you need to edit the build.prop, file. Quickest way I do this is by using Romtoolbox pro which has that option. Once in the build prop up editor you'll see the option to recalibrate the proximity sensor. You'll need root access.
Sent from the Rabbit Hole
Click to expand...
Click to collapse
Where exactly in the build.prop is this setting. I access it using root explorer and scanned through the entire file and saw nothing that would hint at the proximity sensor calibration.
rumy said:
Where exactly in the build.prop is this setting. I access it using root explorer and scanned through the entire file and saw nothing that would hint at the proximity sensor calibration.
Click to expand...
Click to collapse
Sent from the Rabbit Hole
bushako said:
Sent from the Rabbit Hole
Click to expand...
Click to collapse
I don't have that in my build.prop I am running ARHD9.0
What exactly does that do. Does it just delay the screen from going of when on your face? In that case I have already disabled the proximity sensor during calls.
I am starting to wonder if this is a hardware fault.
Can you try this? If you use and it does not work once removing it will restore your factory values.
http://db.tt/C7PJnQgt
Sent from my GT-N7100 using xda premium
It looks like the proximity threshold is set too low in the kernel and causes this to misbehave when the sensor gets a little dirty.
For example: If you open the diagnostic menu by dialing *#0*# and look under sensors if your ADC value for the sensor is anything over 12, the proximity sensor will register that something is close to the phone. That value can be temporarily adjusted by setting prox_thresh under /sys/devices/virtual/sensors/proximity_sensor to something higher (like 30).
Unfortunately, it looks like changing this value doesn't "stick" and the next time the sensor is accessed, something changes it back to the default of 12.
I'm guessing that the default value is set in the kernel at compile time. Maybe someone can talk of the kernel devs into tweaking the value.
anyone found a solution to this yet?
Hi, is rooting the phone the only way to get this working? So annoying... Maybe will just send this galaxy note 2 back for a refund, tried for a long time to get this fixed, I think it started after the last android update I thought they'd have done something about it by now...
On Samsung devices like i9100 (Galaxy S3) or N7100 (Note II) you can do the following if you have root permissions:
On Android Terminal App or adb shell do:
Code:
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
The zero resets the actual calibration offset.
The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).
Best for calibrate your sensor is to keep it dark, the glass have to be clean and the sensor free (so that the sensor doesn't measure anything).
The calibration offset is stored in efs, thats why you can make full wipe and use other ROMs without the need of recalibration.
You can check the running config by:
Code:
$ cat /sys/class/sensors/proximity_sensor/state
The first value is the calibration Offset, the second one is the sensor threshold (threshold is set at compile time).
Open *#0*# to see "sensors" and check if your proximity sensor is now working properly.
Because in Kernel code (copyright by Samsung) for the device driver is somthing like this autocalibration, i bet that there is a secret menue or code that does the calibration too. But until someone discovers this secret we have to have root permissions to do a proximity sensor calibration.
greaty said:
On Samsung devices like i9100 (Galaxy S3) or N7100 (Note II) you can do the following if you have root permissions:
On Android Terminal App or adb shell do:
Code:
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
The zero resets the actual calibration offset.
The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).
Best for calibrate your sensor is to keep it dark, the glass have to be clean and the sensor free (so that the sensor doesn't measure anything).
The calibration offset is stored in efs, thats why you can make full wipe and use other ROMs without the need of recalibration.
You can check the running config by:
Code:
$ cat /sys/class/sensors/proximity_sensor/state
The first value is the calibration Offset, the second one is the sensor threshold (threshold is set at compile time).
Open *#0*# to see "sensors" and check if your proximity sensor is now working properly.
Because in Kernel code (copyright by Samsung) for the device driver is somthing like this autocalibration, i bet that there is a secret menue or code that does the calibration too. But until someone discovers this secret we have to have root permissions to do a proximity sensor calibration.
Click to expand...
Click to collapse
Hey, I've been looking for a fix for prox sensor on my Note 2 ever since I installed Paranoid back in december/january, went back to stock and it was still broken. This fixed it!! So thank you I have just one issue, it seems to go back to being broken when I reboot the phone. Is there any way to prevent this? Also the *#0*# doesn't work for me and the cat command returns just a 0. Thanks.
EDIT: it might help to note that I'm running cyanogenmod 10.1 nightly now
EDIT2: I figured it out! I did a search for prox_cal and found one in /sys/devices/virtual/sensors/proximity_sensor with the values 18,9. i put those values in the empty /efs/prox_cal. It now works on boot.
marcmy said:
... it seems to go back to being broken when I reboot the phone. Is there any way to prevent this? Also the *#0*# doesn't work for me and the cat command returns just a 0. Thanks.
EDIT: it might help to note that I'm running cyanogenmod 10.1 nightly now
EDIT2: I figured it out! I did a search for prox_cal and found one in /sys/devices/virtual/sensors/proximity_sensor with the values 18,9. i put those values in the empty /efs/prox_cal. It now works on boot.
Click to expand...
Click to collapse
I described the sensor recalibration on Samsung rom or Samsung based roms. " *#0*# "is a "secret code" that starts a samsung test tool - only included in stock or stock rom based.
I have read from other users that "cat state" returns zero. I don't know exactly why. But it could be because:
1. that the sensor is powered down (on my phone the sensor never sleeps)
2. the calibration offset is too high
3. the calibration offset is optimal
To test the sensor is on and working you should read the value with finger put on. (there should be value around 127-calibration offset). I guess to do the calibration/sensor reading with display on and phone unlocked. Another user told me that it helped to start an app which reads the sensor values (so the sensor wake up).
But in your case proximity_sensor with the values 18,9 means that the sensor is already calibrated to 18 which can cause a zero at "cat state".
Note that the offset is read from file calibration file at boot time and from that on holded in ram. The RAM value can only be influenced by "/sys/class/sensors/proximity_sensor/prox_cal" or by calibration file (on boot). The auto calibration process not only try to create a /efs/prox_cal file but also changes the calibration value in ram at run time .
So if you try "echo 0 > /sys/class/sensors/proximity_sensor/prox_cal; echo 1 > /sys/class/sensors/proximity_sensor/prox_cal" -> "mmh auto calibration does not work there is no prox_cal file, i will try it manually" can be the wrong way because the calibration offset can be already changed to a calibrated value and so you wont get the correct blank value read out "state".
The other path in virtual filesystem to the sensor control you mentioned is also correct. I don't know which is the most common one.
But since both pathes are available in samsung stock i guess it should be " /sys/devices/virtual/sensors/proximity_sensor".
Be careful of putting in the calibration value manually. In Samsung stock rom the kernel which is reading the calibration value at boot time don't make a character conversion. So if you write the config file like this:
Code:
echo '18,9' > /efs/prox_cal
Ends Up with Calibration value of 49 because the kernel will read the first byte of file. This is a "1" which is the ASCII code for "0x31" which is 49 in decimal. That should work too but throw away half of the sensor sensivity.
If you would like to calibrate it manually you have to:
Code:
cd /sys/devices/virtual/sensors/proximity_sensor/
Read the blank value ( glass have to be clean and fingers away from sensor ).
Code:
$ cat state #finger on the sensor to test if the sensor is working properly
120
$ cat state #blank value
10
Read the actual configuration:
Code:
$ cat prox_cal
0,9
The first value is the "sensor offset" and the second one is "Cancelation Threshold" (threshold can not stored in calibration file)
So you calculate your calibration value: 0 (actual sensor offset) + 10 (blank value) = 10 (new offset) = 0x0a HEX. Make shure your efs partition is mounted writeable and then:
Code:
$ su
$ echo -en $'\x[B]0a[/B]' > /efs/prox_cal
$ sync
If the prox_cal is created first you should change the permisssions. Kernel sets 666 by default :
Code:
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
After reboot you can confirm the calibration
Code:
$ cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal
10,9
$ cat /sys/devices/virtual/sensors/proximity_sensor/state
0
If you have to calibrate to a lower sensor value and want to do it the "manual way" you have to reset the calibration or delete the calibration file and reboot. because state value = sensor value - offset . And if offset gets to big the state is alway zero.
greaty said:
On Android Terminal App or adb shell do:
Code:
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
The zero resets the actual calibration offset.
The one does an auto calibration (read sensor value, set offset to this sensor value, write calibration offset to "/efs/prox_cal" which is read while device is booting).
Click to expand...
Click to collapse
working great on my i9505 thanks !!!!
Hello, so I had a very similar experience in flashing Paranoid and then my sensor went bezerk. It seems to be just not turning on with the phone, but the front camera does work fine. I was able to get it working a few days ago by flashing the stock rom and kernel multiple times, but I decided to get bold and reflash the Neak kernel and poof, that was over. Not another few flashes would bring my sensor back. At this point I don't even know what to do.
Thought it might also be worthwhile to mention: the light sensor also does not work and when I looked through the files in the sys/class/sensors for both proximity and light sensors the runtime status is unsupported.
A full Odin restore should reset all these values and the whole thing should work right immediately as long as the sensor hardware hasn't gone bad, right?
Easy FIX!!!!!
I took a can of compressed air and blew it through the top earpiece grill a few times and Voila, it works great now!!
I actually used a Old perfume can which perfume was over and it was only pressing Gas OFF!! :good::good::good::good:
Finally Fixed My Sensor
greaty said:
I described the sensor recalibration on Samsung rom or Samsung based roms. " *#0*# "is a "secret code" that starts a samsung test tool - only included in stock or stock rom based.
I have read from other users that "cat state" returns zero. I don't know exactly why. But it could be because:
1. that the sensor is powered down (on my phone the sensor never sleeps)
2. the calibration offset is too high
3. the calibration offset is optimal
To test the sensor is on and working you should read the value with finger put on. (there should be value around 127-calibration offset). I guess to do the calibration/sensor reading with display on and phone unlocked. Another user told me that it helped to start an app which reads the sensor values (so the sensor wake up).
But in your case proximity_sensor with the values 18,9 means that the sensor is already calibrated to 18 which can cause a zero at "cat state".
Note that the offset is read from file calibration file at boot time and from that on holded in ram. The RAM value can only be influenced by "/sys/class/sensors/proximity_sensor/prox_cal" or by calibration file (on boot). The auto calibration process not only try to create a /efs/prox_cal file but also changes the calibration value in ram at run time .
So if you try "echo 0 > /sys/class/sensors/proximity_sensor/prox_cal; echo 1 > /sys/class/sensors/proximity_sensor/prox_cal" -> "mmh auto calibration does not work there is no prox_cal file, i will try it manually" can be the wrong way because the calibration offset can be already changed to a calibrated value and so you wont get the correct blank value read out "state".
The other path in virtual filesystem to the sensor control you mentioned is also correct. I don't know which is the most common one.
But since both pathes are available in samsung stock i guess it should be " /sys/devices/virtual/sensors/proximity_sensor".
Be careful of putting in the calibration value manually. In Samsung stock rom the kernel which is reading the calibration value at boot time don't make a character conversion. So if you write the config file like this:
Code:
echo '18,9' > /efs/prox_cal
Ends Up with Calibration value of 49 because the kernel will read the first byte of file. This is a "1" which is the ASCII code for "0x31" which is 49 in decimal. That should work too but throw away half of the sensor sensivity.
If you would like to calibrate it manually you have to:
Code:
cd /sys/devices/virtual/sensors/proximity_sensor/
Read the blank value ( glass have to be clean and fingers away from sensor ).
Code:
$ cat state #finger on the sensor to test if the sensor is working properly
120
$ cat state #blank value
10
Read the actual configuration:
Code:
$ cat prox_cal
0,9
The first value is the "sensor offset" and the second one is "Cancelation Threshold" (threshold can not stored in calibration file)
So you calculate your calibration value: 0 (actual sensor offset) + 10 (blank value) = 10 (new offset) = 0x0a HEX. Make shure your efs partition is mounted writeable and then:
Code:
$ su
$ echo -en $'\x[B]0a[/B]' > /efs/prox_cal
$ sync
If the prox_cal is created first you should change the permisssions. Kernel sets 666 by default :
Code:
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
After reboot you can confirm the calibration
Code:
$ cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal
10,9
$ cat /sys/devices/virtual/sensors/proximity_sensor/state
0
If you have to calibrate to a lower sensor value and want to do it the "manual way" you have to reset the calibration or delete the calibration file and reboot. because state value = sensor value - offset . And if offset gets to big the state is alway zero.
Click to expand...
Click to collapse
Finally, this fixed my problem. I don't know why, but the other solution worked one time while using a CM 10.2 nightly
Code:
$ su
$ echo 0 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/devices/virtual/sensors/proximity_sensor/prox_cal
But, when I upgraded to the latest nightly, this stopped working. It wouldn't work even if y restored my stock ROM backup using TWRP, I even flashed a stock image with odin and the sensor would still malfunction.
Today I followed this steps using the values returned for my phone and it finally worked! I did this.
Code:
$ cat state #finger on the sensor to test if the sensor is working properly
120
$ cat state #blank value
10
This returned 255 #finger on the sensor and 69 #blank value
and when I did
Code:
cat /sys/devices/virtual/sensors/proximity_sensor/prox_cal
this returned 47,60,45.....so my offset was 47. Ths sum of offset and #blank value was 47 + 69 = 116 that is equal to 74 in HEX.
so I did
Code:
$ echo -en $'\x74' > /efs/prox_cal
and then
Code:
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
After that I rebooted my phone from the terminal using que command
Code:
$ reboot
and that was it! Now my sensor is fixed and survives reboot. Thanks!
Hi! From a few months, since I started flashing new ROMs, my gnex became slower and very laggy. The real problem is that it is very slow even when flashing ROMs and other stuffs in recovery mode. I'm currently using CM10 with Franco kernel and ClockworkMod recovery. Changing kernel and wiping didn't solved anything. What could be the reason?
Try to download eMMC brickbug check, is an app that check if your memory chip is affected by a factory bug (since there's a series of chip afflicted), this bug slow down all the system and makes it very laggy. Try to take a shot, and if the result is that you are afflicted in the forum there's the solution!
No bug and no errors in memory test
1 - Backup all files on your SD card .dont include /android/ Directory.
2 - Flash Google Factory Image for 4.1.2
2.1 - Flash Latest TWRP
3 - Download "Forever Gone"
4 - Start it and let it run through your empty SD card (it'll overwrite it with 0s, it helped fix a problem on the nexus 7 and helped me with some SD card IO lags, And it removes all traces of what once was, so...)
5 - Download Rasbeanjelly 11-6 (the 4.1.2 version ) It's pure AOSP, Blazing fast and the standby drain is amazing (and notifications don't delay even when asleep )
6 - Download Trinity Kernel latest stable (Link http://goo.gl/jl1Ga )
7 - Flash the above and set up your ROM.
SECTION TWO
8 - Go to Google maps >> Location settings & turn everything off.
8.1 - If you still want location history use backitude instead of latitude
9 - Use one chat app instead of many (especially FB messenger it sucks battery big time, use IMO . It's the best, has file transfer, audio/video call, lovely interface and supports most networks even skype.
10 - Sign out of Google talk
11 - Turn off Google+ Sync
12 - Turn off Google Backup
13 - If you don't use it, Turn off Google now (i think it's nice actually).
14 - Install Betterbatterystats & BatteryMonitorWidget to keep watch of any batter hogs should they come along.
15 - Install Velis Auto Brightness
Trust me on this one with trinity & rasbeanjelly
Set the CPU to 1000thingy max/600 thingy minimum
I believe that when i get a quality phone for this kind of cash i shouldn't compromise functionality c: so i don't use battery saving apps, i need my data on and always, I get about 17 hours with ~3 hours screen time, Pm me if you need anything else ^_^
[Edit] Optional : Turn off screen touch sounds/Vibration, if you want to...
-----------------------------------------------------------------------------------
Silencing maps (preventing non user caused wakelocks)
1. Sign out and /or freeze latitude.
That's it!
Additional information:
-manual startup of maps will work anyhow, don't worry,
-navigation still works
-toggling gps on will show your current position on the map
Do you format partition cache and Dalvik cache before flashing ROM?If no then this is the problem you are facing..coz i've flashed 100's of ROMs but no problem yet!!
Wait wait wait (xD)..it's very slow even WHILE FLASHING anything (or making backups) in recovery mode (when there's the green android with the rotating blue frame inside). I can't see how changing ROM or changing settings inside the OS can solve the problem...I'm not an expert but I think it's a problem at a lower lever..like kernel, drivers, chips..something like that :silly:
..anyway..cause not an expert I tried the Trinity kernel and didn't make any difference..and I will try to use Forever Gone after I made a backup and restored to factory image..
This may and probably applies.
http://forum.xda-developers.com/showthread.php?t=1971852
Sent from my Galaxy Nexus using Tapatalk 2
tiny4579 said:
This may and probably applies.
http://forum.xda-developers.com/showthread.php?t=1971852
Click to expand...
Click to collapse
Ok I made a bench and I had horrible results. This night I'll try to fix this...
Restore all to stock and these are the results:
Seems that you have the same buggy eMMC chip of type V3U00M.
The phone might slowdown again after writing some data on it. You should add discard to your mount options.
Guide (filling the partition using dd and rm is optional for you)
I don't know how to run the code of the step 3: I tried to install Android Termina Emulator and run the commands here..."su" worked and the dialog box of SuperSU appeared asking me the permission, but when I wrote "mount -o remount,discard /data" nothing appened. Sorry men..I don't know what I'm doing
He says:
Type the following commands in a Terminal or preferably an adb shell:
Click to expand...
Click to collapse
and than
Therefore using adb would be better... Some users also reported a speedup when this is done in recovery mode (CWM/TWRP) via adb.
Click to expand...
Click to collapse
How can I do that? Like...reboot into recovery mode, connect the phone to the pc, move to the folder of adb.exe and run the command as "adb su" and "adb mount -o remount,discard /data" ? ...I don't think :silly:
nicari92 said:
I don't know how to run the code of the step 3: I tried to install Android Termina Emulator and run the commands here..."su" worked and the dialog box of SuperSU appeared asking me the permission, but when I wrote "mount -o remount,discard /data" nothing appened. Sorry men..I don't know what I'm doing
Click to expand...
Click to collapse
The command did add the discard option, but it is not showing any output
nicari92 said:
[...] How can I do that? Like...reboot into recovery mode, connect the phone to the pc, move to the folder of adb.exe and run the command as "adb su" and "adb mount -o remount,discard /data" ? ...I don't think :silly:
Click to expand...
Click to collapse
Nearly right: You have to open an adb shell (using the command adb shell) and then type the commands
Well, as you don't really know what you're doing, I think that it's not such a great idea to experiment with the command line in superuser mode...
You can get the same results doing the following:
Install Script Manager from Play Store.
Download the following text file to your internal memory: remount.sh
Browse to the script in Script Manager and add it to be run at boot (Open as... Script/Executable). Make sure you check both the Boot and Su options, then press Save and Run.
Now you should be done if you don't already experience huge slowdowns of your memory (0.4-0.5 MiB/s random write is OK)
If you HAVE slowdowns, install Forever Gone. Fill your sdcard (aka securely erase deleted files) and then free the filled space. Done.
Install and run LagFix (fstrim) from Play Store. Done.
---
FYI: The code in remount.sh is the following:
Code:
#!/system/bin/sh
mount -o remount,discard /data
mount -o remount,discard /cache
Ok thanks!
Do I have to relaunch the command (or recreate the script) every time I flash a new ROM?
nicari92 said:
Ok thanks!
Do I have to relaunch the command (or recreate the script) every time I flash a new ROM?
Click to expand...
Click to collapse
After a full wipe you have to re-install the app and configure the script again to make sure it is launched on every boot.
Install seeder v1.4 too.
Look for it in XDA(free) or the Play store(paid)
--------------------------------------------------
If I have helped you.... hit that sexy thanks button. ^_^
AW: [Q] Very slow and laggy Nexus
I don't think that waiting for the random source is the problem here...
The thread I linked has an app that can run the trim command which should help io.
Sent from my Galaxy Nexus using Tapatalk 2
Direct Link
You can use it instead of dd&rm / Forever Gone. The tool does this job better and is faster, I would say it's the preferred method now.
Doesn't permanently solve the problem, though (unless you run it periodically) ...
So maybe the best is using the discard init script plus this app once.
once you have run the remount script why do you need the lagfree app?
ph4zrd said:
The command did add the discard option, but it is not showing any output
Nearly right: You have to open an adb shell (using the command adb shell) and then type the commands
Well, as you don't really know what you're doing, I think that it's not such a great idea to experiment with the command line in superuser mode...
You can get the same results doing the following:
Install Script Manager from Play Store.
Download the following text file to your internal memory: remount.sh
Browse to the script in Script Manager and add it to be run at boot (Open as... Script/Executable). Make sure you check both the Boot and Su options, then press Save and Run.
Now you should be done if you don't already experience huge slowdowns of your memory (0.4-0.5 MiB/s random write is OK)
If you HAVE slowdowns, install Forever Gone. Fill your sdcard (aka securely erase deleted files) and then free the filled space. Done.
Install and run LagFix (fstrim) from Play Store. Done.
---
FYI: The code in remount.sh is the following:
Code:
#!/system/bin/sh
mount -o remount,discard /data
mount -o remount,discard /cache
Click to expand...
Click to collapse
Thanks a million... Works like a charm.
EDIT: Skip to the bottom EDIT for the short version..
Preamble: I searched for a fix to this recently and over the past 10 months and haven't seen any real solutions to this. Most people have probably experienced this issue at some time flashing roms, especially those people running gapps-free Android :highfive: such as myself. A band-aid for fixing this is running gapps' SetupWizard and/or CM's CMAccounts, I started adding CMAccounts.apk to /system/app some months ago to fix this. I was never satisfied with this workaround though since it doesn't narrow down the actual problem, and I really like sticking to the AOSP experience, open-source, no Stasi-esque permissions, and without the need to taint my installation just to set it up (setupwizard does a lot more than you might think).
Using some additional skills I didn't have 6 months ago, I finally isolated the issue to the SQL database /data/data/com.android.providers.settings/databases/settings.db, table global, value name device_provisioned. It is set to "0" by default which leads to all these ridiculous problems, and setting it to "1" + a reboot fixes all of these problems for me. Setting it back to "0" + reboot breaks everything again, back to "1" fixes, provision.apk present or removed.. I searched for (sqlite3 dump | grep) lots of other provision and setup value differences... tested this a lot.
!!!BACKUP /data/data/com.android.providers.settings/databases/settings.db before attempting this. Use 'busybox cp -p /data/data/com.android.providers.settings/databases/settings.db Your_Backup_Location' to copy and keep correct permissions on it. I would do a nandroid backup maybe anyway. This should be harmless or very helpful, but it's a su'd command in depths of /data so ya never know.
A couple simple ways to get this set right since you can't reliably grep'n'sed here: Get a nice free sql-frontend app off fdroid or xda -very handy- and go to the settings.db file, 'global' table, and then find or add "device_provisioned" in the name column and "1" in the value column. Root Explorer has this built in I think. The better way though is to pull up the 'adb shell' terminal remotely or use a terminal emulator from the phone with free && adfree Jack Palevich's Terminal Emulator, Spartacus Rex' Terminal IDE (recommended ...for everything!), anything using a jni_exec java execute emulation command. Also Ghisler's Total commander file manager has a built-in command line for convenient executions (or cool shell-script shortcuts you can make --it was actually the first tasker).
# Enter each command line by line (after '>'):
Code:
>su
>$(which sqlite3) /data/data/com.android.providers.settings/databases/settings.db
>update global set value="1" where name="device_provisioned";
>.quit
>exit 0
# One-liner
Code:
su && $(which sqlite3) /data/data/com.android.providers.settings/databases/settings.db 'update global set value="1" where name="device_provisioned";'; exit 0
Then just reboot, enjoy that home softkey that takes you to your launcher home.. your notification bar that displays your notifications. lol such basic s***.
Hope this can help someone else out as much as it did me. You don't have to use gapps/setupwizard to fix it! I also want to make sure there isn't another rogue SQL.db value. (btw if you happen to read this and have a broken back softkey/button, your problem is likely the lib file /system/lib/jni_latinime.so. Thought I'd throw that out there.)
EDIT: Heres an update short version. I added another sqlite value that needs correcting in ROMs without gapps setup bla installed. Run these commands in terminal emulator or via adb. Just copy and paste, they need to be exact.
Check that the values on the right are "1" when you fire off:
Code:
su -c '"$(whence -p sqlite3)" /data/data/com.android.providers.settings/databases/settings.db '\''select * from global where name="device_provisioned"; select * from secure where name="user_setup_complete";'\'
Otherwise or just to be safe, fire off this wicked one liner(Warning: reboots when finished):
Code:
su -c '"$(whence -p sqlite3)" /data/data/com.android.providers.settings/databases/settings.db '\''update global set value="1" where name="device_provisioned"; update secure set value="1" where name="user_setup_complete";'\'' && sync && fsync /data; sleep 3; svc power reboot'
Done, 1-2 steps.
Great write up and worked perfectly. Any more tips tricks advice or links for non-gapps users?
namtombout said:
Great write up and worked perfectly. Any more tips tricks advice or links for non-gapps users?
Click to expand...
Click to collapse
Yeah man, glad it worked. Cheers to your cojones for trying it!
What I usually do for a no gapp solution is:
-grab the libjni_latinime lib from microgapps cause its needed for the aosp keyboard swipe usually
-use "gapps browser" for Google related stuff like gmaps.
-or use rmaps (this and gapps browser need the maps api, so you gotta pull the google maps framework jar or use the "no-gapps project" hack api /system/framework/*google*jar. Make sure to add the corresponding /etc/permissions/*google*xml files too)
-instead of gmail I use the standard email client of k9
-instead of play I use fdroid, aptoide sometimes, nextwap.net, or mobilism forums, or a lucky patcher cracked Google play. (careful with the non-fdroid ones)
Sorry bout this 6 month late reply, Jesus I gotta watch my posts more closely.
Proximity sensor on my phone doesn't work. Whenever I get a call or make a call, the screen goes black. Then after the call ends, the screen comes back.
Things I have done so far to solve the issue, but didn't work:
1. Blown air through earpiece.
2. Cleaned the proximity sensor by opening the phone.
3. When I dial *#*#7269#*#*, nothing happens.
4. Tried apps like, "Hardware Disabler", "Screebl", "Proximity Screen Off", etc.
5. There is no option like "proximity off", in settings.
How can I disable proximity sensor?
My Phone : Samsung Galaxy Grand Duos i9082 with Android 5.1.1 (with this ROM http://forum.xda-developers.com/gal...m-resurrection-remix-lollipop-v5-2-8-t3000749)
You doesn`t needed to disabled Proximity sensor
hammadfaisal007 said:
Proximity sensor on my phone doesn't work. Whenever I get a call or make a call, the screen goes black. Then after the call ends, the screen comes back. .
..........
Sorry this post reply look so messi ( I m cannot speak English better )
..........
Hello my brother ( im currently using i9082 CM 12.1 Android V 5.1.1 too )
That so easy brother
You doesn`t needed to disabled Proximity sensor on your devices
Just needed calibrating Proximity sensor value to make it working correctly without bugs when incoming a call / make a call
i Allways using this method & this method may be worked on other Samsung too. :highfive:
Firsty
Activated root access in your devices.
I sure you already know for activated ROOT access
Download
> Root Explorer
> Terminal emulator android.apk
NEXT :
Here the best manual guide for me
1) Open Root explorer
go to /sys/devices/virtual/sensors/proximity_sensor/
Open & look at files with name prox_cal
In my devices that showing
0, 12 { Note : Very Important }
Then
/sys/devices/virtual/sensors/proximity_sensor/
Open & look at files with name
state
In my devices that showing
0 { Note : Very Important too }
......................................................................................
In other devices that files will showing different number
......................................................................................
Next
you need to + that, but remember dont add " , "
0 + 12 = 12
0 & 12 has came from prox_cal files
After that, result 12 needed to convert fromm assci into hexadecimal
As the result that will showing
31 32
Oke You already to fix them in Terminal Emulator app
Terminal Emulator app in your devices
.....::::::::Lastly::::::::.....
1} type
su
{ENTER}
(make sure your work has gained root access)
then
2} type
echo -en $ '\x{(PLACE HERE YOUR HEXADECIMAL VALUE'> /efs/prox_cal
So as the result it will be apear like this
echo -en $ '\x31 32' > /efs/prox_cal
{ENTER}
3} type
chown system:system /efs/prox_cal
{ENTER}
4}type
chmod 644 /efs/prox_cal
{ENTER}
5}type
sync
{ENTER}
& reboot devices normally
Finish you has been fixed problem when incoming calls / when make a call in your devices :good: :highfive: :fingers-crossed:
Click to expand...
Click to collapse
You can try with the stock rom
Hadi_K.t(t_t)t said:
hammadfaisal007 said:
Proximity sensor on my phone doesn't work. Whenever I get a call or make a call, the screen goes black. Then after the call ends, the screen comes back. .
..........
Sorry this post reply look so messi ( I m cannot speak English better )
..........
Hello my brother ( im currently using i9082 CM 12.1 Android V 5.1.1 too )
That so easy brother
You doesn`t needed to disabled Proximity sensor on your devices
Just needed calibrating Proximity sensor value to make it working correctly without bugs when incoming a call / make a call
i Allways using this method & this method may be worked on other Samsung too. :highfive:
Firsty
Activated root access in your devices.
I sure you already know for activated ROOT access
Download
> Root Explorer
> Terminal emulator android.apk
NEXT :
Here the best manual guide for me
1) Open Root explorer
go to /sys/devices/virtual/sensors/proximity_sensor/
Open & look at files with name prox_cal
In my devices that showing
0, 12 { Note : Very Important }
Then
/sys/devices/virtual/sensors/proximity_sensor/
Open & look at files with name
state
In my devices that showing
0 { Note : Very Important too }
......................................................................................
In other devices that files will showing different number
......................................................................................
Next
you need to + that, but remember dont add " , "
0 + 12 = 12
0 & 12 has came from prox_cal files
After that, result 12 needed to convert fromm assci into hexadecimal
As the result that will showing
31 32
Oke You already to fix them in Terminal Emulator app
Terminal Emulator app in your devices
.....::::::::Lastly::::::::.....
1} type
su
{ENTER}
(make sure your work has gained root access)
then
2} type
echo -en $ '\x{(PLACE HERE YOUR HEXADECIMAL VALUE'> /efs/prox_cal
So as the result it will be apear like this
echo -en $ '\x31 32' > /efs/prox_cal
{ENTER}
3} type
chown system:system /efs/prox_cal
{ENTER}
4}type
chmod 644 /efs/prox_cal
{ENTER}
5}type
sync
{ENTER}
& reboot devices normally
Finish you has been fixed problem when incoming calls / when make a call in your devices :good: :highfive: :fingers-crossed:
Click to expand...
Click to collapse
It shows nothing in "/sys/devices/virtual/sensors/proximity_sensor/state". There is no value in it. What to do now? BTW thanks for your efforts.
P.S: In prox_cal, there is 0,12.
Click to expand...
Click to collapse
hammadfaisal007 said:
Proximity sensor on my phone doesn't work. Whenever I get a call or make a call, the screen goes black. Then after the call ends, the screen comes back.
Things I have done so far to solve the issue, but didn't work:
1. Blown air through earpiece.
2. Cleaned the proximity sensor by opening the phone.
3. When I dial *#*#7269#*#*, nothing happens.
4. Tried apps like, "Hardware Disabler", "Screebl", "Proximity Screen Off", etc.
5. There is no option like "proximity off", in settings.
How can I disable proximity sensor?
My Phone : Samsung Galaxy Grand Duos i9082 with Android 5.1.1 (with this ROM http://forum.xda-developers.com/gal...m-resurrection-remix-lollipop-v5-2-8-t3000749)
Click to expand...
Click to collapse
Dude I have also the same problem after installing the cm12.1 in my samsung galaxy grand duos and my phone is f**ked up. I also need the solution. I cant access the state folder.It says root explorer was unable to read this file
Please give us the solution
P.S.:- prox_cal is 0,65535
Thanks Hadi_K.t(t_t)t it's work for me
open root access
Hadi_K.t(t_t)t said:
hammadfaisal007 said:
Proximity sensor on my phone doesn't work. Whenever I get a call or make a call, the screen goes black. Then after the call ends, the screen comes back. .
..........
Sorry this post reply look so messi ( I m cannot speak English better )
..........
Hello my brother ( im currently using i9082 CM 12.1 Android V 5.1.1 too )
That so easy brother
You doesn`t needed to disabled Proximity sensor on your devices
Just needed calibrating Proximity sensor value to make it working correctly without bugs when incoming a call / make a call
i Allways using this method & this method may be worked on other Samsung too. :highfive:
Firsty
Activated root access in your devices.
I sure you already know for activated ROOT access
Download
> Root Explorer
> Terminal emulator android.apk
NEXT :
Here the best manual guide for me
1) Open Root explorer
go to /sys/devices/virtual/sensors/proximity_sensor/
Open & look at files with name prox_cal
In my devices that showing
0, 12 { Note : Very Important }
Then
/sys/devices/virtual/sensors/proximity_sensor/
Open & look at files with name
state
In my devices that showing
0 { Note : Very Important too }
......................................................................................
In other devices that files will showing different number
......................................................................................
Next
you need to + that, but remember dont add " , "
0 + 12 = 12
0 & 12 has came from prox_cal files
After that, result 12 needed to convert fromm assci into hexadecimal
As the result that will showing
31 32
Oke You already to fix them in Terminal Emulator app
Terminal Emulator app in your devices
.....::::::::Lastly::::::::.....
1} type
su
{ENTER}
(make sure your work has gained root access)
then
2} type
echo -en $ '\x{(PLACE HERE YOUR HEXADECIMAL VALUE'> /efs/prox_cal
So as the result it will be apear like this
echo -en $ '\x31 32' > /efs/prox_cal
{ENTER}
3} type
chown system:system /efs/prox_cal
{ENTER}
4}type
chmod 644 /efs/prox_cal
{ENTER}
5}type
sync
{SM-G530H ENTER}
& reboot devices normally
Finish you has been fixed problem when incoming calls / when make a call in your devices :good: :highfive: :fingers-crossed:
Click to expand...
Click to collapse
samsung galaxy grand prime
Sent from my SM-G530H using XDA Free mobile app
---------- Post added at 09:13 AM ---------- Previous post was at 09:06 AM ----------
sanket katoch said:
Dude I have also the same problem after installing the cm12.1 in my samsung galaxy grand duos and my phone is f**ked up. I also need the solution. I cant access the state folder.It says root explorer was unable to read this file
Please give us the solution
P.S.:- prox_cal is 0,65535
Click to expand...
Click to collapse
Sent from my SM-G530H using XDA Free mobile app
Click to expand...
Click to collapse