3,299
社区成员




我们需要先下载can工具的源码:
git clone https://gitcode.com/linux-can/can-utils.git
将这部分源码放到Android系统代码里, 以QCS8250为例子:
cd LINUX/android/
source build/envsetup.sh ; lunch kona-userdebug
cd LINUX/android/system/core/
git clone https://github.com/linux-can/can-utils.git
cd can-utils
mm
我们可以得到binary: cansend 和 candump, 然后将这两个bin放到系统中,进行测试
adb push cansend /data/
adb push candump /data/
adb shell chmod 777 /data/cansend
adb shell chmod 777 /data/candump
使用命令进行测试
接收命令:
candump can0
发送命令:
cansend can1 123#112233445566