The Android 11 version can use cts-tradefed in the window environment, and you can open the CTS console in the window environment for testing.
Since Android 12 and above versions do not have cts-tradefed scripts under windows to establish window environment tests, it is not easy to modify cts-tradefed scripts, and CTS tests after Android 12 need to be connected to the external network for operation, so the CTS environment is completely tested in the linux environment .
Or install the cts test package and use the am command to test. (late update)
1. Download the CTS installation package
Compatibility Test Suite downloads | Android Open Source Project Download the corresponding version test CTS package from Google's official website
2. Unzip in the linux environment and install the corresponding version of jdk
Unzip the test package to the linux environment, and execute android-cts/tools/./cts-tradefed while connected to the external network
It may appear that the JDK version needs to be updated (openJDK11), official website download or wget/apt install command, you can refer to Linux to install openJDK11 - Brief Book
Or JDK bin does not have permission or cts-tradefed does not have permission. In the corresponding path, execute chmod 777 .
3. Test camera cases under the CTS console
Under the cts-tradefed console, execute run cts -m CtsCameraTestCases to test all cts of the camera
Execute run retry -r id to test the repeated test failure case, and the id can be viewed through lr to view the current session id
4. View test results
After the test is executed, the results will be generated under android-cts/results. Check the corresponding web page file to see the fail and pass items in this test.