Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,995 Members 49,729 Now Online
XDA Developers Android and Mobile Development Forum

(Tip) Disable proximity sensor

Tip us?
 
adamnickster
Old
#41  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: Jan 2011
Thank you vert much guys
 
stelioskal
Old
(Last edited by stelioskal; 19th April 2012 at 03:30 PM.)
#42  
stelioskal's Avatar
Member
Thanks Meter 5
Posts: 61
Join Date: Nov 2010
Location: Athens
Quote:
Originally Posted by gjergjisel View Post
do you use adb push to put the file there or how do u put the file in data\local
the directory is : root--->data--->local ???????????

thank you all
i finally have my phone back
Samsung Galaxy SIII
GT-I9300
android 4.3
kernel: 3.0.31-2191747
Rom: Omega v52 -XXXUGMK6H
 
cyrusalmighty
Old
#43  
cyrusalmighty's Avatar
Senior Member
Thanks Meter 146
Posts: 810
Join Date: May 2009
Location: Hartford

 
DONATE TO ME
Talking userinit.sh FIX!!!!

Quote:
Originally Posted by UksusoFF View Post
tomween1, fmac,
try put this file (unzip first!) to /data/local/ it must be work in CM7 or maybe lower...
You are the greatest!!! I replaced my broken screen a while back but always had the problem with the damn proximity sensor. I am using Evervolve's Rom(Evervolv-Intus-1.2.0a2-liberty) which is based off CM7 (I believe), and I downloaded and extracted the "userinit.sh" and put into the folder you stated. I tried creating the file within root explorer(free app), but I decided to use the provided file. Now I do not have any problems with the backlight in dialer. Thank you again. I actually dont use this HTC Aria, but I was giving it to a friend (to introduce him to the wonderful world of Android), so I wanted to have it all tweaked and in good condition for him. It is s-off'ed & rooted as well. This was an annoying bug for this phone, so if you ever are dealing with any sony Xperia phones and are in those forums with a problem I hope to be able to return the favor.
 
King-2012
Old
#44  
Junior Member
Thanks Meter 5
Posts: 9
Join Date: Apr 2012
Angry Ultimate Solution

OK people thanks to UksusoFF 's help and my own Linux background i was able to have my phone fixed and running. No more screen going offs & phone locks!!

I see that many of you had asked for a step by step process on working with the command line for disabling the proximity censor right?

Well here it goes folks , the complete step by step:

1 - You have to be ROOT to complete this task so ROOT your phone (There are many links on google on HowTo ROOT your phone so do it!!!)
2- Open the Emulator on your phone.
3- Type su - and make sure that $ sign changes to # meaning you are the ROOT User now and can make serious changes to your device's system.

4- Insert the following commands in the Emulator

# cd /data/local
# touch userinit.sh
# echo "#!/system/bin/sh" > userinit.sh
# echo "#" >> userinit.sh
# echo "chmod 0000 /dev/cm3602" >> userinit.sh
# echo "chmod 000 /dev/cm3602" >> userinit.sh
# chmod 777 userinit.sh

5- Now verify that the file exists
# cat userinit.sh (You should see the information inserted above appearing).

6- Restart your phone

If you have done it right , your phone should be fine now. Starting now You will be in charge of turning on/off your screen instead of the proximity censor.

Hope it works for ya

Cheers!
The Following 5 Users Say Thank You to King-2012 For This Useful Post: [ Click to Expand ]
 
cyrusalmighty
Old
#45  
cyrusalmighty's Avatar
Senior Member
Thanks Meter 146
Posts: 810
Join Date: May 2009
Location: Hartford

 
DONATE TO ME
@ King-2012....Thanks for another method. With this method you have posted (using emulator) can we now disable the proximity sensor on any Rom instead of just cyanogen or cyanogen based (I.e. Evervolve)??

Sent from my ICS KA twizz-elve


XXXXXXXXXXXXXXX

Devices: AT&T Samsung Galaxy S4(Root)4.4 SS-Chaos 2.3.0
Minix Neo X7 4.2.2(Root)-Android TV Box
AT&T Sony Xperia Play(Root)4.1 Super JB

You know you wanna Root it, Cmonnn.
 
King-2012
Old
(Last edited by King-2012; 1st May 2012 at 09:15 PM.)
#46  
Junior Member
Thanks Meter 5
Posts: 9
Join Date: Apr 2012
I'm not sure if it would work on other ROMS or other phones. I haven't tried it on other ROMS or Phones so i rather not make any comments since I'm not 100% sure. But, if they are using Cyanogenmod 7 or 7.1 then you might be able to achieve the same goal by inserting the above commands. I myself have a mytouch4G and so was forced to figure it out in order to fix my phone .

Cheers
 
denova
Old
#47  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Aug 2012
Default additional info for droid a855

I am running Cyanogenmod 7.2 and the device file for the proximity sensor on my Motorola Droid A855 is /dev/sfh7743 instead of cm3602. The device file name is the same as the name of the proximity sensor identified by Android Sensor Box, so this may be a good way to identify your sensor's device file if you are having trouble finding it. Also, I only had to add chmod 0000 /dev/sfh7743 to my userinit.sh (The second chmod 000 was not necessary). Thanks for the guide!
 
9eye
Old
#48  
Junior Member
Thanks Meter 2
Posts: 17
Join Date: Jul 2012
good tip, thanks
 
hasnainh
Old
#49  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Feb 2014
Unhappy proximity sensor problem

Quote:
Originally Posted by King-2012 View Post
OK people thanks to UksusoFF 's help and my own Linux background i was able to have my phone fixed and running. No more screen going offs & phone locks!!

I see that many of you had asked for a step by step process on working with the command line for disabling the proximity censor right?

Well here it goes folks , the complete step by step:

1 - You have to be ROOT to complete this task so ROOT your phone (There are many links on google on HowTo ROOT your phone so do it!!!)
2- Open the Emulator on your phone.
3- Type su - and make sure that $ sign changes to # meaning you are the ROOT User now and can make serious changes to your device's system.

4- Insert the following commands in the Emulator

# cd /data/local
# touch userinit.sh
# echo "#!/system/bin/sh" > userinit.sh
# echo "#" >> userinit.sh
# echo "chmod 0000 /dev/cm3602" >> userinit.sh
# echo "chmod 000 /dev/cm3602" >> userinit.sh
# chmod 777 userinit.sh

5- Now verify that the file exists
# cat userinit.sh (You should see the information inserted above appearing).

6- Restart your phone

If you have done it right , your phone should be fine now. Starting now You will be in charge of turning on/off your screen instead of the proximity censor.

Hope it works for ya

Cheers!
thanks i have the same problem i do your method but nothing happen i still faceing the same problem please help me
Model number: nexuhd2
Android version: 2.3.7
Baseband version: 15.39.50.07u_2.10.50.26
Kernel version: 2.6.32.15_tytung_gb_r16tytung@ubuntu #292
Build number: GWK74 (NexusHD2-Gingerbread V3.3a)
 
Nitishpai20
Old
#50  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: May 2014
Location: Navi Mumbai
Quote:
Originally Posted by King-2012 View Post
OK people thanks to UksusoFF 's help and my own Linux background i was able to have my phone fixed and running. No more screen going offs & phone locks!!

I see that many of you had asked for a step by step process on working with the command line for disabling the proximity censor right?

Well here it goes folks , the complete step by step:

1 - You have to be ROOT to complete this task so ROOT your phone (There are many links on google on HowTo ROOT your phone so do it!!!)
2- Open the Emulator on your phone.
3- Type su - and make sure that $ sign changes to # meaning you are the ROOT User now and can make serious changes to your device's system.

4- Insert the following commands in the Emulator

# cd /data/local
# touch userinit.sh
# echo "#!/system/bin/sh" > userinit.sh
# echo "#" >> userinit.sh
# echo "chmod 0000 /dev/cm3602" >> userinit.sh
# echo "chmod 000 /dev/cm3602" >> userinit.sh
# chmod 777 userinit.sh

5- Now verify that the file exists
# cat userinit.sh (You should see the information inserted above appearing).

6- Restart your phone

If you have done it right , your phone should be fine now. Starting now You will be in charge of turning on/off your screen instead of the proximity censor.

Hope it works for ya

Cheers!
Hey there! I was just curious if these commands would work on my phone? I'm using a lg p700 slimkat 4.4.2. It would be a big help to me!! I'm kind of stuck with this problem for months now!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes