资讯详情

Android 系统强制禁用距离传感器方法

Android 系统强制禁用距离传感器方法,以下两种方法是网络上流传的方法,仅适用于某些型号:

方法一:

通过修改系统文件,需要手机root过。首先RE文件管理器(或ES进入根目录/system找到文件夹build.prop文件,将该文件的所有权限都改为可读和可写,并用文本编辑器打开,查找文件中是否有以下两行代码

# try to disable proximity sensor in call by default

# gsm.proximity.enable=false

如果有,删除第二行的#,改为

# try to disable proximity sensor in call by default

gsm.proximity.enable=false

若文件中没有这两行代码,则在文件结束时手动添加一行,gsm.proximity.enable=false。修改后保存文件,将文件的权限改回原状态(rw- r-- r--)。重启手机(需要关闭快速启动),此时距离传感器已被迫关闭

自己的小米1 android 原生 4.1.2.亲测不可用。

方法二:

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?:cool:

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!!!)

操作前提:手机必须root !

2- Open the Emulator on your phone.

打开手机上的终端模拟器(如果没有,去市场搜索下载安装,或者使用cmd 终端 使用adb shell ,如果有电脑有配置adb环境的话)

3- Type suand make sure that$ sign changes to # meaning you are the ROOT User now and can make serious changes to your device's system.

输入 su ,获得管理员理员的权限时,你应该看到开头 $ 符号变成了 # 说明超级用户(即管理员)权限成功获取。

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

然后输入下一个指令进行检查userinit.sh文件是否成功创建,内容输入是否正确

# 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:rolleyes:

Cheers!:p

这种方法不能用于米一测试。

方法三:

搜索市场下载安装 HardWare Disabler,安装后打开应用程序,可以看到手机的所有硬件驱动代码和开关选项,找到 /sys/bus/i2c/drivers/isl29028 目录中的代号为0-0044驱动,检查disable之后就可以成功禁用距离传感器了。

因为前两种方法都在我的手机上not works,我们只能自己找出第三种方法,或者在不小心关掉了一个重要的驱动力,差点导致重刷的教训后才能实现。

目前只在自己的米一上尝试成功,其他型号还不得而知。

由于不同设备的驱动代码不同,所列代码仅供参考,具体手机具体分析。新手必须仔细选择,不确定的情况不乱,否则后果自负。

0b1331709591d260c1c78e86d0c51c18.png

标签: 12g传感器cd61传感器10015cd传感器sh50传感器

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台