I am trying to write some automation script for the Android emulator I am using. The emulator does provide simulation of pinches with keyboard and trackpad, but I would like to do it through the Android console, so I recorded the pinch with getevent
, converted it to decimal and replay it with sendevent
. I do observed the pinch but when it is done, the touch is not released and this mess up the simulations later on. I observe that if BTN_TOUCH UP
event is send along with the pinch, it won't work. I cannot even do things like sh zoom-out.sh && sleep 1 && sh release.sh
(assuming that I have the scripts to zoom out and releasing the touch in these 2 files). The only thing that works is through calling sh zoom-out.sh
and then sh release.sh
on a new line, which is wried to me.
getevent -lc10 /dev/input/event
I see the button up event while in dev/input/event5, there isn't.getevent -lp /dev/input/event5
and I findKEY
as 1,BTN_TOUCH
as 257 or 258 depending on it starts at 0 or 1. However that doesn't help.