Created
October 31, 2012 01:43
-
-
Save dhylands/3984322 to your computer and use it in GitHub Desktop.
Script which unlocks the otoro (with the slider at the bottom)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
# | |
# Constants from include/linux/input.h | |
EV_SYN=0 | |
EV_ABS=3 | |
SYN_REPORT=0 | |
SYN_MT_REPORT=2 | |
ABS_MT_TOUCH_MAJOR=48 # 0x30 | |
ABS_MT_WIDTH_MAJOR=50 # 0x32 | |
ABS_MT_POSITION_X=53 # 0x35 | |
ABS_MT_POSITION_Y=54 # 0x36 | |
ABS_MT_TRACKING_ID=57 # 0x39 | |
ABS_MT_PRESSURE=58 # 0x3a | |
TOUCH_DEV=/dev/input/event0 | |
Sync() | |
{ | |
sendevent ${TOUCH_DEV} ${EV_SYN} ${SYN_MT_REPORT} 0 | |
sendevent ${TOUCH_DEV} ${EV_SYN} ${SYN_REPORT} 0 | |
} | |
Touch() | |
{ | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_TRACKING_ID} 0 # 0x39 | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_TOUCH_MAJOR} 44 # 0x30 | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_WIDTH_MAJOR} 5 # 0x32 | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_POSITION_X} $1 # 0x35 | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_POSITION_Y} $2 # 0x36 | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_PRESSURE} 44 # 0x3a | |
Sync | |
} | |
EndTouch() | |
{ | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_PRESSURE} 1 | |
sendevent ${TOUCH_DEV} ${EV_ABS} ${ABS_MT_TRACKING_ID} -1 | |
Sync | |
} | |
Touch 160 430 | |
Touch 180 430 | |
Touch 200 430 | |
Touch 220 430 | |
Touch 240 430 | |
Touch 260 430 | |
Touch 280 430 | |
Touch 300 430 | |
EndTouch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment