1. Noun explanation
CTS, Compatibility Test Suite compatibility test. Google CTS test
2. Environmental preparation
1. Install adb, configure environment variables
Download adb from the Internet and put it in the usr/local/ directory
2. Put aapt in the same directory as adb
Java uses aapt tool to parse apk information necessary tool
sudo apt-get install aapt
Configure aapt effective document sudo gedit /etc/profile, add export PATH=$PATH:/usr/local/aapt.
Put aapt under the code /out under /usr/local/, sudo chmod +x aapt
3. Install jdk1.9+, configure environment variables
sudo apt install openjdk-9-jdk
4. Download the cts toolkit and unzip it.
Android official website download
5. Do not lock the screen in the phone settings, and ensure that there are fluorescent lights in the test environment
3. Test steps
1. Connect the mobile phone to the computer, adb devices must display the device
×××@ubuntu:/Code/×××$ adb devices
List of devices attached
???????????? no permissions×××@ubuntu:/Code/×××$ adb kill-server
×××@ubuntu:/Code/×××$ sudo adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
×××@ubuntu:/Code/×××$ adb devices
List of devices attached
017×××ec0401 device
2. Enter the test environment
×××@ubuntu:~/android-cts/tools$ ./cts-tradefed
==================
Notice:
We collect anonymous usage statistics in accordance with our Content Licenses (https://source.android.com/setup/start/licenses), Contributor License Agreement (https://opensource.google.com/docs/cla/), Privacy Policy (https://policies.google.com/privacy) and Terms of Service (https://policies.google.com/terms).
==================
Android Compatibility Test Suite 11_r1 (6654162)
Use "help" or "help all" to get more information on running commands.
08-31 18:05:37 I/DeviceManager: Detected new device 017×××ec0401
cts-tf >
3. Full test
run cts -m CtsCameraTestCases
The full test is in android-cts/testcases/CtsCameraTestCases.
4. Continue to test all failed items
run retry -s [serial] --retey sessionId Re-run the failed case in the previous task. This sessionid is displayed by executing l r, the number in the first column. serial
lr //List the results of historical tests
cts-tf > l r
Session Pass Fail Modules Complete Result Directory Test Plan Device serial(s) Build ID Product
0 0 0 0 of 3 2020.08.18_14.00.30 cts [0123456789ABCDEF] RP1A.200621.001 merlin
1 0 0 0 of 3 2020.08.18_14.03.59 cts [0123456789ABCDEF] RP1A.200621.001 merlin
2 0 0 0 of 3 2020.08.18_14.09.20 cts [0123456789ABCDEF] RP1A.200621.001 merlin
3 1307 400 0 of 3 2020.08.18_14.15.00 cts [0123456789ABCDEF] RP1A.200621.001 merlin
4 1033 674 0 of 3 2020.08.20_14.06.50 cts [016×××610401] RP1A.200621.001 merlinrun retry --retry 4 //4是session
Enter help to view the command line, help + command ==> view the introduction of specific commands
4. View failed items
After the CTS test, there will be a result, the specific directory android-cts/results/2020.08.27_17.44.10/ test_result.html
This will introduce the specific failure of the CTS test and the cause of the error. At this time, specific analysis is needed to solve the bug. Probably analyze the platform problem or eliminate the driver problem, you can mention the case on MTK or Qualcomm official website
5. Just rice
If you find it useful, thank Lao Tie, please support a wave