确定底层驱动是否上报之前,先确定dev目录下相应的节点是否生成,然后是否getevent命令查看当前挂载的驱动设备.
例如:
C:\Documents and Settings\Administrator>adb shell
root@android:/ # getevent
getevent
add device 1: /dev/input/event4
name: "humidity"
add device 2: /dev/input/event3
name: "temperature"
add device 3: /dev/input/event2
name: "lightsensor-level"
add device 4: /dev/input/event0
name: "rk29-keypad"
add device 5: /dev/input/event1
name: "gslX680"
采用getevent命令可以查看底层驱动上报是否正常,getevent命令使用介绍如下:
Usage: getevent [-t] [-n] [-s switchmask] [-S] [-v [mask]] [-d] [-p] [-i] [-l] [
-q] [-c count] [-r] [device]-r: print rate events are received
例如:
C:\Documents and Settings\Administrator>adb shell
root@android:/ # getevent -lp /dev/input/event4
getevent -lp /dev/input/event4
add device 1: /dev/input/event4
name: "humidity"
events:
ABS (0003): ABS_GAS : value 10, min 0, max 65535, fuzz 0, flat
0, resolution 0
input props:
<none>
有如上信息输出,说明底层驱动可以正常上报参数了,需要注意的一点就是,不要在getevent命令之后立马使用getevent -lp device命令,最好建两个窗口操作