5

I'm using adb Shell input to emulating touchscreen interaction,

Working on Windows 8 with adb command line service.

For one long touch (not tap!) I'm using this command:

adb shell input swipe x1 y1 x1 y1 t

How can I emulate simultaneous 2 long taps from command line?

Thanks!

Guy P
  • 1,395
  • 17
  • 33

2 Answers2

1

I've searched a bit and seems that the easiest way is not to find the proper commands (you've to emulate a real set of N events moving the 2 fingers around the screen to pinch), but you can instead try this: save a gesture (with X fingers) and then play it back from adb.

For details see this question, already well replied in the Saurabh Meshram answer:

Fire a pinch in/out command to Android phone using adb


EDIT:

you can try to understand what the events means (quite obscure at first glimpse), see: http://ktnr74.blogspot.pt/2013/06/emulating-touchscreen-interaction-with.html

Prak
  • 302
  • 1
  • 9
-2

try to use:

adb shell "input swipe x1 y1 x1 y1 t && input swipe x2 y2 x2 y2 t"

Laser
  • 6,652
  • 8
  • 54
  • 85
  • 2
    I've tried, not working as I want, it perform the first command and then the other, not simultaneously. – Guy P May 11 '15 at 20:58
  • 2
    I suggest to not delete this answer - it is useful to know, that something *does not* work. – peterh Oct 23 '20 at 17:25