step1: 编译可执行文件
step2: 把可执行文件push到手机中
1) adb root
2) adb remount
3) adb push testbin system/bin 或者 adb push testbin vendor/bin
4) adb shell sync
5) adb reboot
step3: 运行bin文件
方法1: adb shell testbin -w -h -f outputfile.txt (注意此处-w -h -f都是命令行输入的参数,就是main函数中第二个参数的实参)
方法2: adb root
adb shell
cd /system/bin
testbin -w -h -f outputfile.txt