CompatibilityTestSuite » History » Revision 6
Revision 5 (Loic Dachary, 11/13/2016 09:45 PM) → Revision 6/11 (Loic Dachary, 11/13/2016 09:50 PM)
Instructions to run and collect results of the android "Compatibility Test Suite":https://source.android.com/compatibility/cts/setup.html for "Replicant 4.2":https://redmine.replicant.us/projects/replicant/wiki/ReplicantStatus#Replicant-42
h1. Installation
* On a newly installed Ubuntu 14.04
* Install the dependencies
** apt-get update
** apt-get install -y android-tools-adb openjdk-6-jdk wget unzip
* Install the "pre-built CTS":https://source.android.com/compatibility/cts/downloads.html (or "build it from source":https://source.android.com/compatibility/cts/development.html#building-and-running-cts)
** wget https://dl.google.com/dl/android/cts/android-cts-4.2_r4-linux_x86-arm.zip ; unzip android-cts-4.2_r4-linux_x86-arm.zip
** wget https://dl.google.com/dl/android/cts/android-cts-verifier-4.2_r5-linux_x86-arm.zip ; unzip android-cts-verifier-4.2_r5-linux_x86-arm.zip
** wget https://dl.google.com/dl/android/cts/android-cts-media-1.2.zip ; unzip android-cts-media-1.2.zip
h1. Device preparation
* Connect the Replicant 4.2 device to USB and verify *adb* sees it
<pre>
# adb devices
List of devices attached
00090ad763a48f device
4df1066d14d15fbd device
</pre>
* Configure the device (adapted from https://source.android.com/compatibility/cts/setup.html#config_device, not including Wifi, GPS, bluetooth since they are not supported)
** Factory data reset the device: *Settings > Backup & reset > Factory data reset*
** Set your device's language to English (United States) from: *Settings > Language & input > Language*
** Make sure no lock pattern or password is set on the device: *Settings > Security > Screen lock > None*
** Make sure no PIN lock is set on the device: *Settings > Security > Set up SIM card lock > Lock SIM card > unset* (only shows if there is a SIM card in the phone)
** Enable developer options: go to *Settings > About phone* and tap Build number seven times.
** Enable USB debugging on your device: *Settings > Developer options > USB debugging*
** Select: *Settings > Developer options > Stay Awake > On*
** Select: *Settings > Developer options > Verify apps over USB > Off*
** Connect the desktop machine that will be used to test the device with a USB cable. The system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. Select Allow USB debugging.
** Install and configure helper apps on the device:
*** adb install -r android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk
*** On the device, enable: *Settings > Accessibility > Accessibility > Delegating Accessibility Service*
** Copy the CTS media files to the device as follows:
<pre>
# adb devices
List of devices attached
00090ad763a48f device
4df1066d14d15fbd device
# cd android-cts-media-1.2
# ./copy_media.sh all -s 00090ad763a48f
</pre>
h1. Running CTS
It runs in the background and takes about 8 hours. It will display results as they become available. See "the usage documentation":https://source.android.com/compatibility/cts/run.html#using-cts-v1 for more information.
<pre>
# ./android-cts/tools/cts-tradefed
cts-tf > run cts --plan CTS
</pre>
The test results are in *./android-cts/repository/results/* and the logs in *./android-cts/repository/logs/*