hello everybody, i have an s4 19505 with 4.4.3 rom (http://forum.xda-developers.com/showthread.php?t=2544474) in the rom´s description, it says that this rom hasn´t got any bugs, but when i call, my screen turns to black and i need lo lock and unlock the phone for hang up the call:crying:, I need help, is the calibration of the sensor? any .zip to fix this?
lot of thanks
Its for the proximity sensor. I dunno if you have this option in AOSP but in STOCK ROMs it's. You only have to check one option of the settings for solve that:
- Go to Settings -> My device -> Call -> Turn off screen during calls.
Look here
http://forum.xda-developers.com/showthread.php?t=2208440&page=2
or
in terminal or adb
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
reboot
Hello, I have tried this (echo 0 and echo 1).
I'm on CM 11 with a Zerolemon case.
It still doesn't work. When I am on Rom stock 4.2, it works fine.
The screen goes black on call If I push the "Home" buttons, proximity sensor works fine. And when I try to come back on the call window, it turn black (whatever the 4.4.x, I've tried today, this bug exists not only in CM11).
Any idea to help me ?
Thanks for all.
edit :
When I try (the 74 value is just the one working - don't know the right value in my case)
[email protected]:/ $ su
[email protected]:/ # echo -en $ '\x74' > /efs/prox_cal
[email protected]:/ # chown system:system /efs/prox_cal
[email protected]:/ # chmod 644 /efs/prox_cal
[email protected]:/ # sync
[email protected]:/ # reboot
Click to expand...
Click to collapse
When I do that, the proximity sensor works well when I push the home button during a call. But the screen is still black on the phone call.
Edit 2nd
I've tried this : http://forum.xda-developers.com/showthread.php?t=1626611 ... Problem always here !
Related
If you are using ADB Shell on a Windows machine and try to LS with busybox on your phone it will add color coding along with directory and file names.
To get rid of this you need only need to type [1] in the command prompt.
If you would like an LL type function added you can also put in [2].
[1] alias ls='ls --color=never'
[2] alias ll='ls -la --color=never'
Is there any way to get these aliases to stick?
The aliases go away every time I open a new ADB Shell. :\
##########edit1
I found that you can use PuTTYcyg to properly display the colors if you have Cygwin installed on your machine.
I just selected "Cygterm" for "Connection type" and put "adb shell" in "Command (use - for login shell)".
I would still like to have an alias for LL at least if we can figure out a way to get the aliases to stick.
Thanks!
##########edit2
In case people have no idea what I'm talking about.
Busybox LS output with color in Windows CMD:
Code:
# ls
ls
←[1;34mcache←[0m ←[1;36metc←[0m ←[1;34mroot←[0m
←[1;34mconfig←[0m ←[1;32minit←[0m ←[1;34msbin←[0m
←[1;36md←[0m ←[1;32minit.desirec.rc←[0m ←[1;34msdcard←[0m
←[1;34mdata←[0m ←[1;32minit.goldfish.rc←[0m ←[1;34msqlite_stmt_journals←[0m
←[0;0mdefault.prop←[0m ←[1;32minit.rc←[0m ←[1;34msys←[0m
←[1;34mdev←[0m ←[0;0mlogo.rle←[0m ←[1;34msystem←[0m
←[1;34memmc←[0m ←[1;34mproc←[0m
Busybox LS output without color in Windows CMD:
Code:
# ls --color=never
ls --color=never
cache etc root
config init sbin
d init.desirec.rc sdcard
data init.goldfish.rc sqlite_stmt_journals
default.prop init.rc sys
dev logo.rle system
emmc proc
And now color just looks like one of the weirdest words to me after looking at it for so long....
COLOR.
I got an LL going if anyone is interested. Basically using this guys instructions but making it for ll instead of dir.
1) Create a file named ll in /system/xbin
With this in it [NO COLOR]:
Code:
#!/system/xbin/sh
ll(){
ls -la --color=never [email protected]
}
ll [email protected]
OR
With this in it [COLOR]:
Code:
#!/system/xbin/sh
ll(){
ls -la [email protected]
}
ll [email protected]
2) Set file ownership/permissions
Get an ADB Shell:
Code:
cd /system/xbin
chown 0 ll
chmod 755 ll
The LL command will work immediately after setting ownership/permissions on the LL file. It's a workaround for now but works great.
Updated first post.
Not at all
The shortest way to do it is:
Code:
# alias ls="ls --color=never"
What I wonder is how to get rid of the annoying ECHO..
Long term fix?
Any better ways to fix this? I never used to have this problem, but all of a sudden, after messing with ADB over WiFi, now I do have this problem
http://forum.xda-developers.com/showthread.php?p=14564633
The alias only works for a single cmd session
update
ScottHW said:
Any better ways to fix this? I never used to have this problem, but all of a sudden, after messing with ADB over WiFi, now I do have this problem
Click to expand...
Click to collapse
Small update: I noticed that I actually only have the problems with ls -al when the phone is fully booted. When I use adb booted in Recovery (CWM) the file listings are fine.
It's possible that I have never used adb while the phone is fully booted before, and just assumed that the Recovery behavior was universal and when I got the funky behavior, it wasn't messing around with ADB, it was just because I didn't know what "normal" was.
Short term fix is still just to use an alias for ls
But you have to redo it every time you restart adb
The 4.0.3 ROM had a pleasant click when you touched the screen if you turned it on in sound settings. The 4.0.4 ROM sounds like water drops.
Thanks to: http://forum.xda-developers.com/showpost.php?p=27447853&postcount=1
Get those two files from that post and try this (assume you are rooted):
Code:
adb push TW_Touch.ogg /sdcard/TW_Touch.ogg
adb push S_HW_Touch.ogg /sdcard/S_HW_Touch.ogg
adb shell
su
mount -o remount,rw /system
cd /system/media/audio/ui
cp TW_Touch.ogg TW_Touch.ogg.original
cp S_HW_Touch.ogg S_HW_Touch.ogg.orginal
cp /sdcard/*_Touch.ogg . # really? You have more files named this?
rm /sdcard/*_Touch.ogg # ok then don't do this if you do!
exit
exit
Now turn touch sounds off and back on (or just on if they were already off).
Want to switch to Natural mode colors on your recently Cyanogenmoded phone ?
Tested on Galaxy Note 2 N-7100 CM10 but it should work any Android 4.1+ Samsung AMOLED phone.
Open a shell on your phone
HTML:
echo 2 > /sys/class/mdnie/mdnie/mode
echo 2 > /sys/class/mdnie/mdnie/scenario
You should have the right colors (Natural mode)
How to make it directly at boot :
HTML:
su
mount -o remount,rw / && mount -o remount,rw /system
echo "#!/system/bin/sh
echo 2 > /sys/class/mdnie/mdnie/mode
echo 2 > /sys/class/mdnie/mdnie/scenario
" > /etc/init.d/99color
chmod 755 /etc/init.d/99color
mount -o remount,ro / && mount -o remount,ro /system
Original source here :
mathieumeuh said:
Want to switch to Natural mode colors on your recently Cyanogenmoded phone ?
Tested on Galaxy Note 2 N-7100 CM10 but it should work any Android 4.1+ Samsung AMOLED phone.
Open a shell on your phone
HTML:
echo 2 > /sys/class/mdnie/mdnie/mode
echo 2 > /sys/class/mdnie/mdnie/scenario
You should have the right colors (Natural mode)
How to make it directly at boot :
HTML:
su
mount -o remount,rw /
mount -o remount,rw /system
echo "#!/system/bin/sh
echo 2 > /sys/class/mdnie/mdnie/mode
echo 2 > /sys/class/mdnie/mdnie/scenario
" > /etc/init.d/99color
chmod +x /etc/init.d/99color
mount -o remount,ro /
mount -o remount,ro /system
Original source here :
Click to expand...
Click to collapse
thanks a lot. i can use it on my 4.3 mokee rom and neak kernel
Sent from my GT-N7100 using xda premium
Awesome Tips... I didn't know that on Other than Sammy based rom can use color mode
THanks for this Valuable Information
I tried this on my cm-10.1.3 Samsung Galaxy 2 phone (android 4.2.2) and it wouldn't write. I opened up the files themselves with vim and tried, and got some errors:
After successfully getting superuser, it told me a swap file couldnt be recovered (i hadnt even opened the file before). Then after the changes and trying to write&quit, it said
Code:
"mod" E509: Cannot create backup file (add ! to override)
Press ENTER or type command to continue
So i did :wq! and then
Code:
"mode" E667: Fsync failed
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!
I quit. The file "mode" is still there, and the command "cat" reveals it still has one line, one character, being "0" (like it originally had).
There is also a GUI controller under System Settings > Advanced Settings under the "Color" heading, but changing anything doesnt seem to have an affect. I wonder if it's related to the "fsync" error.
I would upgrade to 10.2, but i just read that 10.2 has the system menu entry removed, so mdnie can only be controlled by command line. Lame.
gatchipatchi said:
I tried this on my cm-10.1.3 Samsung Galaxy 2 phone (android 4.2.2) and it wouldn't write. I opened up the files themselves with vim and tried, and got some errors:
After successfully getting superuser, it told me a swap file couldnt be recovered (i hadnt even opened the file before). Then after the changes and trying to write&quit, it said
Code:
"mod" E509: Cannot create backup file (add ! to override)
Press ENTER or type command to continue
So i did :wq! and then
Code:
"mode" E667: Fsync failed
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!
I quit. The file "mode" is still there, and the command "cat" reveals it still has one line, one character, being "0" (like it originally had).
There is also a GUI controller under System Settings > Advanced Settings under the "Color" heading, but changing anything doesnt seem to have an affect. I wonder if it's related to the "fsync" error.
I would upgrade to 10.2, but i just read that 10.2 has the system menu entry removed, so mdnie can only be controlled by command line. Lame.
Click to expand...
Click to collapse
Do not try to open this file, it's not really a file. Just push the value to it.
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, yout phone will Vibrate only when you put your finger on the sensors.
Manual method worked for me.
ENJOY.
NOTE: I am not a developer. i was just stuck with this problem for so long so now i found it from "mcelicalderon". who posted this method some where.
Thank you ! That worked for me too
Pleasure is all mine
Sent from my GT-I9505 using xda app-developers app
thanks
i've had this problem a long time now. it worked fine with stock rom but as soon as i changed it, it went wrong. unrooted it and back to stock and it worked again. Been looking all over for a solution. tried air blowing and other non working solutions. the *#0*# did not run on my phone either. but after follwing this guide it got fixed. but insted of typing the long cat command in terminal i used ES file explorer and navigated to the right files and opened them.
so thank you for this guide to fix this irretating problem
Hey guys,
Any of you have similar issue? Whenever calling / receiving a call the screen won't recover from blackscreen. Only way is to turn off the Proximity sensor in call settings. Sorry for posting here, couldn't post on dev forum (posts < 10).
Using the following setup:
Twrp (2.8.7.0-ks01lte)
cm-12.1-2015.10.19-UNOFFICIAL-temasek-ks01lte-V18.0.zip
arter97-kernel-i9506-9.0.zip
arter97-ks01ltexx-cm-patch-2.0.zip
pa_gapps-modular-pico-5.1-2015.04.18-signed.zip
flashed in this order.
Thank you for the help
Here r link
http://www.androidlegend.com/how-to-perform-proximity-sensor-calibration-on-any-samsung-phone/
Hello again,
Thank you for the replay The post didn't helped to solve the problem but found this instead:
http://forum.cyanogenmod.org/topic/81988-black-screen-during-call-jfltexx/page__st__20
First step - Doing the manual recalibration:
$ su
$ echo -en $'\x74' > /efs/prox_cal
$ chown system:system /efs/prox_cal
$ chmod 644 /efs/prox_cal
$ sync
Reboot your phone.
After rebooting, please test, this will make the proximity sensor work, however, it will only work in a very near distance.
(I was so happy it worked so stopped at this point)
Now, you should do this, to fix permanently with the default proximity distance:
Second step - Fix the proximity distance:
$ su
$ echo 0 > /sys/class/sensors/proximity_sensor/prox_cal
$ echo 1 > /sys/class/sensors/proximity_sensor/prox_cal
Reboot your phone.
Hope it helped for those who suffered with this problem.
Thank you again!