覆盖原目标机测试文件:
adb shell killall Test
adb push %~dp0Test /usr/bin
adb shell chmod 777 /usr/bin/Test
删除Windows当前输出目录,以及目标机远程输出目录
rd /s /q %~dp0test_file\output\
adb shell rm -r /tmp/output/*
目标机创建输出文件夹
adb push %~dp0test_file /tmp/
adb shell mkdir /tmp/output/
adb运行测试程序:
adb shell Test -w 0 -t 1
复制目标机输出至Windows本地:
adb pull /tmp/output/ %~dp0test_file\output\
完整脚本:
::adb push %~dp0../../sdk_lib/libs_hf/libsdk_encoder.so /usr/lib
adb shell killall encoderTest
adb push %~dp0encoderTest /usr/bin
adb shell chmod 777 /usr/bin/encoderTest
rd /s /q %~dp0test_file\output\
adb shell rm -r /tmp/output/*
adb push %~dp0test_file /tmp/
adb shell mkdir /tmp/output/
adb shell encoderTest -i /tmp/input/800x480x93_nv21.yuv -o /tmp/output/800x480x93_nv21 -p 1 -f 0 -w 0 -t 1
adb pull /tmp/output/ %~dp0test_file\output\
pause