Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable mouse pointer in android devices with adb commands

Tags:

android

adb

mouse

I am trying to enable mouse pointer in android device and control it's movement with adb commands without actually connecting mouse.

like image 912
Deepak Avatar asked Apr 02 '15 10:04

Deepak


1 Answers

This is a very valid question. Looks like the methods are limited, but I found some pretty promising info on this guys blog: PocketMagic article. He's a developer on Google Code, and I've used some of his stuff in the past. So, it looks like you can inject mouse pointer events kernel-level thru adb, by writing to /dev/input/eventXXX, with X being each input method attached to the device. He has created a library to interface with the kernel, and also an installable app that may solve all your needs. However, if you need a pure adb solution, you can probably inspect his code to figure out the process of determining which alias to write to and what his adb commands look like.

Good luck!

like image 130
Aaron Gillion Avatar answered Nov 19 '22 19:11

Aaron Gillion