1. 下载cts工具
https://source.android.com/compatibility/cts/downloads
或者make cts,
out/host/linux-x86/cts, cts-verifier
2. Setting up
https://source.android.com/compatibility/cts/setup
CTS tests require a Wi-Fi network that supports IPv6, can treat the DUT as an isolated client, and has an internet connection.
export PATH=$PATH:$HOME/android-sdk-linux/build-tools/version
put in .bashrc, run "source .bashrc"
or put in /etc/profile run "source /etc/profile"
Install the proper version of the Java Development Kit (JDK). For Android 7.0 and higher:
Download and open the latest version of the CTS media files.
First API level for Android 9 and higher
For devices launched with Android 9 or higher, set the ro.product.first_api_level
property to a valid value found on Codenames, Tags, and Build Numbers.
Note: On Android 4.2 and higher, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options. See Enabling On-device Developer Options for additional details.
https://source.android.com/compatibility/cts/run
./android-cts/tools/cts-tradefed
.verison
.help
.help run
.run cts --module/-m
.run cts --module/-m
test name can package/class/class#function or native binary name
logs and results are under android-cts
https://ressrc.com/2018/03/27/android-gms%E8%AE%A4%E8%AF%81-cts-gts-ctsv/
1、测试准备
1、根目录下安装CtsVerifier.apk、NotificationBot.apk
adb install -r CtsVerifier.apk
adb install -r NotificationBot.apk
2、设置里security-Device administrators开启cts verifier
3、打开手机上的CTS Verifier应用,根据提示测试每一项
2、保存查看结果
所有测试完成后,点击CTS Verifier测试工具右上角的保存按钮,会提示结果保存位置,连接电脑,将结果拷贝到电脑即可查看。