I know, I can listen input devices from /dev/input/eventx
on Android/Linux. If you are superuser, you can also send events to the device through that.
I would like to send mouse events to my Android device as superuser. However, in order to do this, a mouse must be connected to the device via USB or bluetooth connection. Without it, I get error as Could not open /dev/input/event8, No such device
when execute this command on adb sendevent /dev/input/event8 xxxx xxxx xxxxxxxx
. In this case, the node was attempted to be created using the mknod /dev/input/event8 c 13 71
command.
The problem is solved when I connect a bluetooth or USB mouse to the device. The device is created automatically under /sys/devices/platform/tegra_uart.2/tty/ttyHS2/hci0
named hci0:11 also create input event /dev/input/event7 (major 13 minor 71)
. After that I can send events to that node and control Android mouse cursor. But I want to do this without connecting a mouse to the device.
Could anyone suggest how can I create a mouse input device (like when a mouse is connected) on my android device virtually?