0

I am running Pixel 6 pro on Android emulator from MacOS. And I have enabled USB developer mode in the virtual device. I tried to run adb shell input tag x y command:

adb  -s emulator-5556 shell input tap 25690 8496

it doesn't return any error but there is nothing happened on the virtual device. I wonder what I did wrong.

below is the version of adb:

> adb --version
Android Debug Bridge version 1.0.41
Version 34.0.4-10411341
Installed as /opt/homebrew/bin/adb
Running on Darwin 22.2.0 (arm64)

I use below command to get the x, y coordinator

> adb  -s emulator-5556 shell getevent -l
/dev/input/event1: EV_ABS       ABS_MT_POSITION_X    0000645A
/dev/input/event1: EV_ABS       ABS_MT_POSITION_Y    00002130
/dev/input/event1: EV_ABS       ABS_MT_PRESSURE      00000400
/dev/input/event1: EV_SYN       SYN_REPORT           00000000
/dev/input/event1: EV_ABS       ABS_MT_PRESSURE      00000000
/dev/input/event1: EV_ABS       ABS_MT_TRACKING_ID   ffffffff
/dev/input/event1: EV_SYN       SYN_REPORT           00000000

I take the value from ABS_MT_POSITION_X 0000645A ABS_MT_POSITION_Y 00002130 and convert it to decimal value.

Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
  • Isn't the number `25690` for x a bit high? Ty my understanding x and y are the pixel coordinate of the virtual tap you want to execute. Using your screen coordinates the screen would be a 218k screen (or even larger). – Robert Aug 16 '23 at 11:25
  • I am using this command to get x and y `adb -s emulator-5556 shell getevent -l`. I have put the output of this command in the post. – Joey Yi Zhao Aug 16 '23 at 23:26

0 Answers0