adb root //获取root权限
adb shell busybox mount –o rw,remount /misc //挂载misc分区
adb push xxx.ko /misc/modules //push进小机
adb shell sync //确保写到flash中
adb shell rmmod xxx //卸载原驱动
adb shell insmod /misc/modules/xxx.ko //重新加载驱动
如果嫌这样输入命令太慢了,可以写一个windows下的批处理脚本。
adbauto.bat :内容如下:
@echo off
echo %1
adb root
abd shell busybox mount -o rw,remount /misc
adb push %1.ko /misc/modules
adb shell sync
adb shell rmmod %1
adb shell insmod /misc/modules/%1.ko
用法: adbauto.bat test
假设驱动名叫test。