Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use adb to simulate 3 long taps on a device?

Tags:

android

I'm trying to simulate 3 (simultaneous not consecutive) long taps on an android device using adb.

The most promising lead I found was here but I haven't been able to modify it so that I can use it.

Any thoughts on how to accomplish such feat?

Thanks.

like image 269
Iuli Avatar asked Apr 08 '15 08:04

Iuli


People also ask

What cool things can I do with adb?

ADB, Android Debug Bridge, is a command-line utility included with Google's Android SDK. ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more.

What is adb wait for device?

wait-for-device can be specified after adb to ensure that the command will run once the device is connected. -s can be used to send the commands to a specific device when multiple are connected.

What is adb pull command?

ADB push and ADB pull are solid file transfer techniques for your Android customization experience, even if there are easier ways to get files between your Android device and a PC.


1 Answers

I found a very simple work around to simulate long touches. Simulate a swipe at the same point.

input swipe <x1> <y1> <x2> <y2> [duration in milliseconds]

Where x1 == x2, and y1 == y2.

This will simulate a swipe but since the your starting point and your end point are the same, it will act as if it was a lng press

like image 118
EyuelDK Avatar answered Sep 19 '22 16:09

EyuelDK