To identify the information about the input device connected to Android platform, we can use “getevent” as below,
Get List of All Input Devices
$ adb shell getevent -lp | grep "add device"
The output of this might look like as below,
add device 1: /dev/input/event8
add device 2: /dev/input/event7
add device 3: /dev/input/event1
Now, from this if we want to get more detailed information for event1, we can use below command which will give use detailed information about what kind of device it is, its name and all.
$ adb shell getevent -il /dev/input/event1
add device 5: /dev/input/event1
bus: 0018
vendor 0000
product 0000
version 0000
name: "fts_ts"
location: ""
id: ""
version: 1.0.1
events:
KEY (0001): KEY_W KEY_E KEY_U KEY_O
KEY_S KEY_L KEY_Z KEY_C
KEY_V KEY_M KEY_UP KEY_LEFT
KEY_RIGHT KEY_DOWN KEY_WAKEUP BTN_TOUCH
ABS (0003): ABS_MT_SLOT : value 0, min 0, max 9, fuzz 0, flat 0, resolution 0
ABS_MT_TOUCH_MAJOR : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
ABS_MT_POSITION_X : value 0, min 0, max 1080, fuzz 0, flat 0, resolution 0
ABS_MT_POSITION_Y : value 0, min 0, max 2160, fuzz 0, flat 0, resolution 0
ABS_MT_TRACKING_ID : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
input props:
INPUT_PROP_DIRECT
As we can see from the events ( ABS_MT_POSITION_X and ABS_MT_POSITION_Y ) supported and input property (INPUT_PROP_DIRECT), above is a multitouch touchscreen.
We can also get the more detailed information about input devices using below command,
$ adb shell dumpsys input