该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
得到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