18.4 Android 下原生Linux驱动测试

Posted DS小龙哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了18.4 Android 下原生Linux驱动测试相关的知识,希望对你有一定的参考价值。

18.4 Android 下原生Linux驱动测试

18.4.1 Android设备运行C语言程序

C语言源代码:

 1 #include <stdio.h>
 2 int main(int argc,char ** argv)
 3 {
 4     printf("hello world!\\n");
 5     return 0;
 6 }

编译C语言源码:编译的时候加上-static静态选项

root@xl:/test# arm-linux-gcc -static hello.c -o hello

传输编译好的文件到android设备:

root@xl:/# adb push /test/hello /
896 KB/s (607564 bytes in 0.661s)

运行测试:

以上是关于18.4 Android 下原生Linux驱动测试的主要内容,如果未能解决你的问题,请参考以下文章

星云精准测试对安卓底层驱动代码的测试案例分析

Linux下,为应用程序添加桌面图标(ubuntu18.4)

python3 接口测试数据驱动之操作 excel 文件

android应用程序访问linux驱动第一步:实现并测试Linux驱动

Android应用程序访问linux驱动第一步:实现并测试Linux驱动

android驱动开发好了,怎么调试