android x86触摸失准,修复X98 air 3G 在android x86下的重力和触摸反向问题

博主分享了如何解决Android设备自动旋转和触摸屏反转的问题。通过在终端运行特定代码,创建并修改文件权限,然后运行校准应用,实现了触摸屏的正常操作。对于自动旋转,博主编辑了/etc/init.sh文件,添加了相关属性设置,以适应屏幕90度旋转时X、Y轴的调整。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

得到go ogle group 的大神帮忙,修复了2个问题。特意把回复贴在这里。有问题可以提问

Finally got both auto rotation and inverted touch screen work.

For inverted touch screen, I run some code in terminal before run the calibration app.

su

mkdir -p /data/misc/tscal

touch /data/misc/tscal/pointercal

chown 1000.1000 /data/misc/tscal /data/misc/tscal/*

chmod 775 /data/misc/tscal

chmod 664 /data/misc/tscal/pointercal

Then run calibration app, touch the five points and restart.

for auto rotation, edit /etc/init.sh

try going into init.sh and scroll down to init_hal_sensors function and after the last "fi" statement insert the following:

has_sensors=true

hal_sensors=iio

set_property ro.iio.accel.quirks no-trig #insert this line if screen is 90 degree rotation instead of 180, it exchanges Y and X axis

set_property ro.iio.accel.x.opt_scale -1 #Use one or more of them, depends on which axes are inverted.

set_property ro.iio.accel.y.opt_scale -1

set_property ro.iio.accel.z.opt_scale -1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值