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
Related
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 !
can someone please help me
I'm trying to re-calibrate the proximity sensor according to the instructions in this thread for note 3 N9005 .
so as the instructions I'm trying the normal method
but don't know how to convert the values in Hexadecimal.
mine offset value is :
76,196,156
& the normal value is :
0
so how to add offset value + normal value ???!!!
because the normal value is : 0
so plz if anyone know about the process to guide me for that
thanks
plz someone reply .....!!!!
I need help
my note 3 proximity sensor is not working
& I bought it just 2 months ago
still waiting for someone to help me.
Ask in that thread .
alhaseeri said:
can someone please help me
I'm trying to re-calibrate the proximity sensor according to the instructions in this thread for note 3 N9005 .
so as the instructions I'm trying the normal method
but don't know how to convert the values in Hexadecimal.
mine offset value is :
76,196,156
& the normal value is :
0
so how to add offset value + normal value ???!!!
because the normal value is : 0
so plz if anyone know about the process to guide me for that
thanks
Click to expand...
Click to collapse
You can use windows calculator to convert decimal into Hex.
Just do the following, Already replied to your private message. Already converted your offset into hex for you. just type as it is.
su
# echo -en $ '\x4c' > /efs/prox_cal
# chown system:system /efs/prox_cal
# chmod 644 /efs/prox_cal
# sync
# Reboot
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!
Hello.
Presrequites:
Root permissions
USB cable for debugging
ADB (Android Debug-Bridge)
Preface - My overly dramatic story (feel free to skip; Unless you'd like a quick chuckle)
I couldn't help but notice that there are no tutorials explaining how to add audio to the bootanimation and shutdownanimation for the LG K7 (of any model)! I scoured the internet in search for it for myself. I had come back empty handed... Luckily though! Through perseverance and sweat and lots of coffee... I dug through the firmware ROM file and found a few gold nuggets.
During my journey, I stumbled upon a file (boot_resource.sh) located at: system/vendor/bin; This had me puzzled initially. It has multiple references (four, to be exact) to the same four attributes regarding the boot animation (and audio)! It clearly shows some directories that do not exist (on my rooted device at that)!!! I was intrigued. I was shocked. Could it be... This easy?! Jackpot! I found the gold pot at the end of the rainbow...!
I shuffled up to the... Latrine... In a sluggish manner: I asked my girlfriend to get me another cup of black liquid fuel (COFFEE)! I squinted and squirmed in excitement! I have finally located the holy grail of the sound.
Code:
USER_BOOTANIMATION_SOUND_FILE=/data/local/PowerOn.ogg
There was nothing there, except: /data/local/tmp! Nothing more than a plain, void directory with another empty folder (tmp). I hastily copied over the nearest locally stored *.ogg audio file I could find and pasted the default animation files into their and rebooted faster than one could run to the store for more milk!
Voila! I had done it...! I had my bootanimation with audio. A'lass...! Victory was mine!
The end.
To add a custom power-on animation and power-off animation (with sound):
Compile a *.zip file (compression: storage) with:
A text-file named "desc.txt" (EOF symbol at the end (preferably UNIX); Just press enter at the end)
A folder containing *.jpg or *.png images (my LG K7 does not load anything larger than 250KB); Sequentially numbered (000.png, 001.png, etc)
Name the *.zip file: "bootanimation.zip" for power-up animation ("shutdownanimation.zip" for power-down)
Name the power-on audio file "PowerOn.ogg"; It will only play once (the larger the file: The longer the load time)
Name the power-off audio file "PowerOff.ogg"; It also will only play once (synchronizing the image/sound is tough)
Copy the respective files to: /data/local/
Reboot your phone and laugh hysterically in amusement! :good:
Example of desc.txt:
Code:
480 854 30
p 0 0 SailorMoon
To further explain what these values are and why they are both necessary and important to understand:
Code:
480 = X resolution (width of the image)
854 = Y resolution (height of the image); 854 is the maximum I can load on my LG K7
30 = FPS (frames per second) that the images load at
p = A symbolic marker for Android to read; It signifies that this is the folder to load
0 = The quantity of loops of this particular folder of images (0 represents "infinitely")
0 = The delay of time before loading another folder of images
If you wished: You could download (or create your own!) five animations and load five folders and play them at 75FPS (5 folders of images * 30 frames (images) / 75FPS = '2 frames per second' (400ms an image)); It would flash by very fast, but it would also be a great way to sample large amounts of multiple boot animation sequences (with/without audio), without having to reboot and reload more animations a b'jillion times!
To elaborate on the suggestion above: We would create one desc.txt file for our 'bootanimation.zip' file.
Code:
480 854 75
p 1 0 SailorMoon
p 1 0 SailorMercury
p 1 0 SailorMars
p 1 0 SailorJupiter
p 1 0 SailorVenus
p 1 0 SailorNeptune
These examples are using 15-frame image sets (15 images per folder). Now all we have to do is place this desc.txt file and the respective folders/images into a (compression level: storage) *.zip file named: bootanimation.zip. Then we load it onto the phone and move it over to: /data/local/bootanimation.zip.
The alternative option is to over-write the carrier shipped bootanimation *.zip file located at: /system/media/bootanimation.zip; In the event of a 'factory reset': The default bootanimation should return. The gains in storage space are nominal by overwriting the prepackaged and shipped one (~2MB).
If you are running a Windows platform: Here are some easy and efficient batch file scripts to help speed everything up!
Insert your USB (ignore if you use an ADB root Wifi app on your phone)
Run the "newBootSequence.bat" file (copies files; Signs on ADB with su; Kills the server and reboots the phone after you exit the shell)
- newBootSequence.bat (lives at: C:\Android\)
Code:
adb devices
adb push C:\Android\bootanimation.zip /sdcard/
adb push C:\Android\shutdownanimation.zip /sdcard/
adb push C:\Android\PowerOn.ogg /sdcard/
adb push C:\Android\PowerOff.ogg /sdcard/
adb shell su
adb reboot
adb kill-server
adb wait-for-device
If you're like me and you despise repetitive tasks: I have yet another script file to ease development of testing out new animation sequences and audio files! This, however, is a bash script for your Android device.
- customBoot.sh (lives at: /sdcard/)
Code:
#!/sdcard/customBoot.sh
#
# Used for localized custom boot animation sequence *WITH* audio!
# Written by: ObliviousEnigma -- 2017/12/24 00:43
#
###############################################################################################
############# A little bit of extra information regarding boot animations / audio #############
###############################################################################################
# The LG K7 supports audio upon boot up; There are a few options for 'enabling' it.
# If the directory /data/local/ is populated (and has valid entries): It takes
# precedence over the default /system/media location (for loading images).
#
# If both entries are invalid or contain invalid data: Android pulls a default
# animated "Android" animation from some unknown location (I did not investigate).
#
# The only audio file format I've tested was: *.ogg (using a file converter).
# The file formats I've tested were: *.png and *.jpg;
#
# The internal format/filename/path do not matter (so long as they agree with: desc.txt).
# EG: Typically listed "part01" folder can be "Frozen Android"; It loads it just fine.
# Image names I did not play with /too/ much; I use IrfanView and name them: 000-999.
# bootanimation/shutdownanimation must be named respectively (stored-format *.zip).
#
# Format of: desc.txt within bootanimation/shutdownanimation should be:
# [X resolution] [Y resolution] [FPS]
# [1st folder of frames] [loop animation quantity] [delay in-between looping the next folder]
# [2nd folder of frames] [loop animation quantity] [delay in-between looping the next folder]
# [etc ...]
#
# EXAMPLE desc.txt:
# 480 854 30
# p 0 0 SailorNeptune0
# [EOF]
#
# Make sure you set the EOL (end of line) conversion to UNIX (safest bet)! Notepad++
#
# 480 = X (width) resolution in pixels
# 854 = Y (height) resolution in pixels
# 30 = FPS (frames per second) that the animation will play at
# p = "part" (symbol marker for the Android OS to read)
# 0 = Loop animation quantity (0 represents "infinite"; Useful if you only have 1 folder)
# 0 = Delay in-between loading folders of images (EG: SailorNeptune0, SailorNeptune1, etc)
# SailorNeptune0 = the folder name to load the images (*.png or *.jpg format) out of
#
# You could use a very high FPS (75FPS) to test multiple boot animations (5x = "15 FPS" per)
# The audio file (PowerOn.ogg) only appears to be played once; I am sure there's a setting
# To loop it multiple times; I do not know what it is for right now. Play at your own risk!
###############################################################################################
echo "\t**********\t**********\t**********\t**********\t**********\t**********"
echo "\t\tBash script by: ObliviousEnigma (XDA Developers)"
echo "\t\tINTENT: Customized boot-up/shut-down animations and audio for the LG K7 phones"
echo "\t**********\t**********\t**********\t**********\t**********\t**********"
# Prematurely terminate the script if the user is not currently logged in as: ROOT (0)
if [ "$USER" != "root" ]; then
echo "\t\tYou require ROOT permissions to execute this script!"
echo "\t\tScript location: $filePath"
echo "\t\tPlease re-run after you're logged in as root"
echo "\t\t\t***** Currently logged in as: \"$USER\" *****"
echo "\t**************************************************************"
echo ""
exit
fi
echo ""
echo ""
# I am not used to using BASH scripts; This is the best I could come up with.
# This will copy the output from the terminal (full filename; Relying on the wild-card ("glob")).
sPowerOn=$(ls PowerOn.*)
sPowerOff=$(ls PowerOff.*)
# Forcibly overwrite both animation files (power on and power off)
if [ -a "$filePath"/bootanimation.zip ]; then
mv -f -v "$filePath"/bootanimation.zip /data/local/bootanimation.zip
chown root:root /data/local/bootanimation.zip
chmod 775 /data/local/bootanimation.zip
else
echo "$filePath/bootanimation.zip\" -- NOT FOUND";
fi
if [ -a "$filePath"/shutdownanimation.zip ]; then
mv -f -v "$filePath"/shutdownanimation.zip /data/local/shutdownanimation.zip
chown root:root /data/local/shutdownanimation.zip
chmod 775 /data/local/shutdownanimation.zip
else
echo "$filePath/shutdownanimation.zip\" -- NOT FOUND";
fi
# Forcibly overwrite both audio files (KNOWN SUPPORTED FORMATS: ogg, mp3)
if [ -f "$filePath"/"$sPowerOn" ]; then
mv -f -v "$filePath"/"$sPowerOn" /data/local/"$sPowerOn"
chown root:root /data/local/"$sPowerOn"
chmod 775 /data/local/"$sPowerOn"
else
echo "$filePath/$sPowerOn\" -- NOT FOUND";
fi
if [ -f "$filePath/$sPowerOff" ]; then
mv -f -v "$filePath"/"$sPowerOff" /data/local/"$sPowerOff"
chown root:root /data/local/"$sPowerOff"
chmod 775 /data/local/"$sPowerOff"
else
echo "$filePath/$sPowerOff\" -- NOT FOUND";
fi
Fortunately: That is the end of everything for today.
I hope this helps someone! I know it surely made my day to FINALLY have audio for my LG K7!
Credit: @stelio_kontos - https://forum.xda-developers.com/t/guide-add-more-columns-to-the-oneplus-launcher.3659772/
They were saying in that thread that it was no longer working for them, but it does still work, at least on 8T. Not sure how long it will continue to work though. They were also talking about changing the number of columns, but I'm only concerned with changing the number of rows. There is a column entry in the path listed below, I just haven't tried it myself because five columns is what I want.
Root required.
Go to: /data/data/net.oneplus.launcher/shared_prefs/net.oneplus.launcher.prefs.xml
Adjust this value to your liking: <int name="workspace_rows" value="9" />
Find OnePlus Launcher app in Settings and force close. Wait a second or two, then go home. Viola!
So far it's stuck through reboots and updating the launcher from Playstore.
If you have trouble finding the data/data/net.oneplus.launcher folder due to Android 11 nonsense, you can copy the file or folder to your sdcard via terminal, edit it, then push it back. Below are the commands for that process.
Code:
C:\xxx\00_OnePlus8T>adb shell
OnePlus8T:/ $ su
OnePlus8T:/ # getenforce
Enforcing
OnePlus8T:/ # setenforce 0
OnePlus8T:/ # getenforce
Permissive
OnePlus8T:/ # cp -r /data/data/net.oneplus.launcher/shared_prefs /sdcard
OnePlus8T:/ # cp -r /sdcard/shared_prefs/net.oneplus.launcher.prefs.xml /data/data/net.oneplus.launcher/shared_prefs
OnePlus8T:/ # setenforce 1
OnePlus8T:/ # getenforce
Enforcing
OnePlus8T:/ # exit
OnePlus8T:/ $