getevent获取input上报事件

1.指定某个设备:adb shell getevent -v /dev/input/event0
eg:
D:\Program Files (x86)\PowerCmd>adb shell getevent -v /dev/input/event1

bus: 0018
vendor 0001
product 0001
version 0100
name: “proximity”
location: “proximity”
id: “”
version: 1.0.1
0003 0019 00000000
0000 0000 00000000
0003 0019 00000001
0000 0000 00000000

2.list上报事件:adb shell getevent -l

D:\Program Files (x86)\PowerCmd>adb shell getevent -l
add device 1: /dev/input/event6
name: “mtk-tpd-kpd”
add device 2: /dev/input/event5
name: “mtk-tpd”
add device 3: /dev/input/event4
name: “m_acc_input”
add device 4: /dev/input/event3
name: “m_alsps_input”
add device 5: /dev/input/event2
name: “hwmdata”
add device 6: /dev/input/event0
name: “ACCDET”
add device 7: /dev/input/event1
name: “mtk-kpd”
/dev/input/event5: EV_ABS ABS_MT_TRACKING_ID 00000000
/dev/input/event5: EV_KEY BTN_TOUCH DOWN
/dev/input/event5: EV_ABS ABS_MT_TOUCH_MAJOR 00000001
/dev/input/event5: EV_ABS ABS_MT_POSITION_X 000000e5
/dev/input/event5: EV_ABS ABS_MT_POSITION_Y 000002d7
/dev/input/event5: EV_SYN SYN_MT_REPORT 00000000
/dev/input/event5: EV_SYN SYN_REPORT 00000000
/dev/input/event5: EV_ABS ABS_MT_TRACKING_ID 00000000
/dev/input/event5: EV_ABS ABS_MT_TOUCH_MAJOR 00000001
/dev/input/event5: EV_ABS ABS_MT_POSITION_X 000000e5
/dev/input/event5: EV_ABS ABS_MT_POSITION_Y 000002d7
/dev/input/event5: EV_SYN SYN_MT_REPORT 00000000
/dev/input/event5: EV_SYN SYN_REPORT 00000000
/dev/input/event5: EV_ABS ABS_MT_TRACKING_ID 00000000

你可能感兴趣的:(Android)