0

I need to simulate this scenario with adb, drag from a srouce point to a target point and keep pressed until an event happens.

how can I write the adb shell command? thanks in advance.

Yang Hui
  • 21
  • 1

1 Answers1

1

Several ways-

1. Use getevent and sendeventif coordinates wont change:-

Record your drag event with adb shell getevent and play with adb shell sendevent. Refrer this link.

2. Use uiautomator if drag co-ordinates are not constant

create a uiautomator jar which accepts your drag coordinates from command line and run via adb shell.

Community
  • 1
  • 1
Rilwan
  • 2,251
  • 2
  • 19
  • 28