1: drivers/input/touchscreen/usbtouchscreen.c
2:android 命令工具:
getevent 监控当前的事件,鼠标事件,按键事件,拖动滑动等;
getevent -p 显示设备功能;
-i 选项可以显示更多的信息比对,包括HID映射表和调试信息。
-l 选项使用文本标签的所有事件代码;
getevent -lp /dev/input/event1
getevent -lt /dev/input/event1显示实时事件;
cat /proc/bus/input/devices打印连接到android的输入设备;
- I line:这行包含身份信息,显示了 bus type是 3 (usb), vendor, product, version等信息。
- N line:这行包含了名字信息。
- P line:这行包含了物理设备信息。
- H line: 这行包含了与设备关联的 handler drivers。
- B line: 这些行包含了显示设备能力的一些位域 (bitfield)。
cat /dev/input/event3 打印触摸屏移动信息
cat /proc/bus/input/handlers
cat /dev/input/event2 打印鼠标移动信息
3: 打开eclipse 调试输出窗口:
window->open Perspective->Debug
4:dumpsys 用来给出手机中所有应用程序的信息,并且也会给出现在手机的状态。
dumpsys [Option]
meminfo 显示内存信息
cpuinfo 显示CPU信息
account 显示accounts信息
activity 显示所有的activities的信息
window 显示键盘,窗口和它们的关系
wifi 显示wifi信息
5: 修改 /system/usr/idc 读写权限
(1) mount 显示android系统挂载的文件系统的读写权限;(提示:首先在Android手机上面取得root权限;)
mount -w -o remount /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system
chmod 777 /system/sur/idc
(3) Remount system to Read Only
mount -r -o remount /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system
(我在adb push /home/tonsincs/Vendor_0416_Product_5030.idc /system/usr/idc/的时候;遇到 “/system"文件系统是只读的;添加不了!直接:adb shell;su;mount 从新挂载system文件系统可写;然后adb push;成功;提示:adb shell 后;su是为了取得root用户权限!不过android系统重启之后system文件系统又恢复到只读的权限了!);
6:validatekyemaps Android框架有一个小工具,称为validatekeymaps来验证输入设备配置文件,重点布局文件,关键字符映射文件和虚拟键定义文件的语法。
7:android 源码常用操作命令:
- croot: Changes directory to the top of the tree.- m: Makes from the top of the tree.
- mm: Builds all of the modules in the current directory.
- mmm: Builds all of the modules in the supplied directories.
- cgrep: Greps on all local C/C++ files.
- hgrep: Greps on all local C/C++ header files.
- jgrep: Greps on all local Java files.
- mkgrep: Greps on all local make files.
- rcgrep: Greps on all local .rc files.
- resgrep: Greps on all local res/*.xml files.
- shgrep: Greps on all local .sh files.
- godir: Go to the directory containing a file.
7: