Is there a way to see all screen touch's from my Android device on my PC with adb? Like every time that I touch the screen, it will print me where I touched the screen.
Asked
Active
Viewed 1,356 times
-2
-
1What did you do to achieve this? Show your code/efforts here.StackOverflow is not a code writing service. If you have a problem with your code, please provide Minimal, Complete, and Verifiable example. – Shubham Verma Feb 14 '17 at 07:01
-
what I won't to get is the places's thet I touch in x,y like every time I touch the screen it will print me you touched on 350 670 – shlomy.b Feb 14 '17 at 14:01
-
Read about the /dev/input/event files on Android, it's a good place to start. – TDG Feb 14 '17 at 18:26
-
thank's for the answer but I already checkt it and I don't see ther a option to get the touch in x and y – shlomy.b Feb 14 '17 at 18:29
1 Answers
0
By using this code you can log your touch events
public class Sniffer extends Activity {
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
float x = event.getAxisValue(MotionEvent.AXIS_X);
float y = event.getAxisValue(MotionEvent.AXIS_Y);
Log.i("t...OUCH: ", x + " " + y);
return super.dispatchTouchEvent(event);
}
}
if you want in service refer here