-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinit.espresso.variant.sh
More file actions
30 lines (24 loc) · 1003 Bytes
/
init.espresso.variant.sh
File metadata and controls
30 lines (24 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/system/bin/sh
# Copyright (c) 2016 OMAP4-AOSP
# Copyright (c) Ketut P. Kumajaya, Sept 2013
export PATH=/system/bin
DEVICE=/sys/board_properties/type
BB=/system/xbin/busybox
if [ -f "$DEVICE" ]
then
variant=`cat $DEVICE`
case "$variant" in
"espresso" | "espressowifi")
# set p31xx to portrait mode
setprop ro.sf.hwrotation 270
# set mms136 touchcreen driver orientation
echo 1 > /sys/devices/virtual/sec/tsp/pivot
# set accelerometer position
position=$($BB find /sys/devices/virtual/input/ -type f -name name | $BB xargs $BB grep '^accelerometer$' | $BB sed 's@name:accelerometer@position@')
echo -n 6 > $position
# set geomagnetic position
position=$($BB find /sys/devices/platform/omap/omap_i2c.4/i2c-4/4-002e/input/ -type f -name name | $BB xargs $BB grep '^geomagnetic$' | $BB sed 's@name:geomagnetic@position@')
echo -n 6 > $position
;;
esac
fi