一、下载CTS包
CTS包放入服务器ctstest文件夹,在linux下面解压
unzip ***
二、进入路径
cd ctstest/android-cts/tools
三、设置CTS运行环境
export PATH=/home/sophia/android/tools/build-tools/25.0.2/:$PATH
export PATH=/home/sophia/android/tools/platform-tools/:$PATH
注:提供tools的压缩包,包含build-tools and platform-tools,提前下载好放在/home/sophia/android/tools路径下
四、adb安装
服务器联网,sudo apt install adb
五、连接TYPE-C,查看设备
adb devices
> tools adb devices
List of devices attached
1b183998538fcadc device
出现no permissions的问题https://blog.youkuaiyun.com/wang_shuai_ww/article/details/52584021
注:adb root#这一步很重要
adb shell#进入mek_8q:/ #
ctrl+d#退出板子
六、跑case
./cts-tradefed
(1)./cts-tradefed run cts -m CtsCameraTestCases --skip-preconditions##跑所有的CtsCameraTestCases模式的case
(2)run cts -m xxxxx -t xxxxxx
./cts-tradefed run cts -m CtsCameraTestCases -t android.hardware.camera2.cts.ExtendedCameraCharacteristicsTest#testStaticBurstCharacteristics --skip-preconditions##跑单个的case