Docs: Converting CTS manual to pages, adding ToCs and images

Bug: 11989760, 20099623
Change-Id: I9f62bc8793ed108a28b0b5244d8a86548ef07e4a
diff --git a/src/compatibility/compatibility_toc.cs b/src/compatibility/compatibility_toc.cs
index 6d4b69e..c0115e9 100644
--- a/src/compatibility/compatibility_toc.cs
+++ b/src/compatibility/compatibility_toc.cs
@@ -24,9 +24,21 @@
     </div>
     <ul>
       <li><a href="<?cs var:toroot ?>compatibility/overview.html">Overview</a></li>
-      <li><a href="<?cs var:toroot ?>compatibility/cts-intro.html">Compatibility Test Suite</a></li>
-      <li><a href="<?cs var:toroot ?>compatibility/cts-development.html">CTS Development</a></li>
       <li><a href="<?cs var:toroot ?>compatibility/android-cdd.pdf">Compatibility Definition Document (CDD)</a></li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>compatibility/cts/index.html">
+            <span class="en">Compatibility Test Suite</span>
+          </a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>compatibility/cts/setup.html">Set up CTS</a></li>
+          <li><a href="<?cs var:toroot ?>compatibility/cts/run.html">Run CTS</a></li>
+          <li><a href="<?cs var:toroot ?>compatibility/cts/verifier.html">Run CTS Verifier</a></li>
+          <li><a href="<?cs var:toroot ?>compatibility/cts/interpret.html">Interpret Results</a></li>
+          <li><a href="<?cs var:toroot ?>compatibility/cts/development.html">Develop CTS</a></li>
+        </ul>
+      </li>
       <li><a href="<?cs var:toroot ?>compatibility/downloads.html">Downloads</a></li>
       <li><a href="<?cs var:toroot ?>compatibility/contact-us.html">Contact Us</a></li>
     </ul>
diff --git a/src/compatibility/cts-intro.jd b/src/compatibility/cts-intro.jd
deleted file mode 100644
index d9dcc99..0000000
--- a/src/compatibility/cts-intro.jd
+++ /dev/null
@@ -1,166 +0,0 @@
-page.title=Compatibility Test Suite
-@jd:body
-
-<!--
-    Copyright 2014 The Android Open Source Project     
-
-    Licensed under the Apache License, Version 2.0 (the "License");    
-    you may not use this file except in compliance with the License.   
-    You may obtain a copy of the License at    
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software    
-    distributed under the License is distributed on an "AS IS" BASIS,    
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   
-    See the License for the specific language governing permissions and    
-    limitations under the License.   
--->
-
-<h2 id="how-does-the-cts-work">How does the CTS work?</h2>
-
-<div class="figure" style="width:383px">
-  <img src="{@docRoot}images/cts-0.png" alt="CTS flow" height="340px" id="figure1" />
-  <p class="img-caption">
-    <strong>Figure 1.</strong> How to use CTS
-  </p>
-</div>
-
-<p>The CTS is an automated testing harness that includes two major software components:</p>
-<ul>
-<li>
-<p>The CTS test harness runs on your desktop machine and manages test execution.</p>
-</li>
-<li>
-<p>Individual test cases are executed on attached mobile devices or on an
-emulator. The test cases are written in Java as JUnit tests and packaged as
-Android .apk files to run on the actual device target.</p>
-</li>
-</ul>
-<h2 id="workflow">Workflow</h2>
-<p>This section summarizes CTS setup. Please refer to the <a href="android-cts-manual.pdf">
-CTS User Manual</a> for detailed instructions.</p>
-<ol>
-<li>
-<p><a href="downloads.html">Download</a> the CTS and CTS media files.</p>
-</li>
-<li>
-<p>Attach at least one device (or emulator) to your machine.</p>
-</li>
-<li>
-<p>For CTS versions 2.1 R2 through 4.2 R4, set up your device (or emulator) to run the accessibility tests:</p>
-<ol>
-<li>
-<code>adb install -r android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk</code>
-</li>
-<li>
-<p>On the device, enable Settings &gt; Accessibility &gt; Accessibility &gt; Delegating Accessibility Service</p>
-</li>
-</ol>
-</li>
-<li>
-<p>For CTS 2.3 R4 and beyond, set up your device to run the device administration tests:</p>
-<ol>
-<li>
-<code>adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk</code>
-</li>
-<li>
-<p>On the device, enable the two <code>android.deviceadmin.cts.CtsDeviceAdminReceiver*</code> device
-administrators under Settings &gt; Location &amp; security &gt; Select device administrators</p>
-<p><strong>Note</strong>: Make sure the <code>android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver</code>
-stays disabled in the same menu.</p>
-</li>
-</ol>
-</li>
-<li>
-<p>For CTS 2.3 R12 and beyond, the CTS media files must be copied to the device's external storage. Check section 4.2 of the latest CTS manual for further details on copying these files:</p>
-<ol>
-<li>
-<p>Unzip the CTS Media zip file.</p>
-</li>
-<li>
-<p>Run the following command. If no resolution is specified, the default maximum resolution of
-480x360 is assumed:</p>
-<code>copy_media.sh [720x480|1280x720|1920x1080|all] [-s serial]</code>
-</li>
-</ol>
-</li>
-<li>
-<p>Launch the CTS. The CTS test harness loads the test plan onto the attached devices. For each test in the test harness:</p>
-<ul>
-<li>
-<p>The test harness pushes an .apk file to each device, executes the test through instrumentation, and records test results.</p>
-</li>
-<li>
-<p>The test harness removes the .apk file from each device.</p>
-</li>
-</ul>
-</li>
-<li>
-<p>Once all the tests are executed, view the test results in your browser and
-use them to adjust your design. You can continue to run the CTS throughout your development process.</p>
-</li>
-</ol>
-<h2 id="types-of-test-cases">Types of test cases</h2>
-<p>The CTS includes the following types of test cases:</p>
-<ul>
-<li>
-<p><em>Unit tests</em> test atomic units of code within the Android platform; e.g. a single class, such as java.util.HashMap.</p>
-</li>
-<li>
-<p><em>Functional tests</em> test a combination of APIs together in a higher-level use-case.</p>
-</li>
-<li>
-<p><em>Reference application tests</em> instrument a complete sample application
-to exercise a full set of APIs and Android runtime services.</p>
-</li>
-</ul>
-<p>Future versions of the CTS will include the following types of test cases:</p>
-<ul>
-<li>
-<p><em>Robustness tests</em> test the durability of the system under stress.</p>
-</li>
-<li>
-<p><em>Performance tests</em> test the performance of the system against defined benchmarks, for example rendering frames per second.</p>
-</li>
-</ul>
-<h2 id="areas-covered">Areas Covered</h2>
-<p>The unit test cases cover the following areas to ensure compatibility:</p>
-<table>
-<thead>
-<tr>
-<th>Area</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>Signature tests</td>
-<td>For each Android release, there are XML files describing the signatures of all public APIs contained in the release. The CTS contains a utility to check those API signatures against the APIs available on the device. The results from signature checking are recorded in the test result XML file.</td>
-</tr>
-<tr>
-<td>Platform API Tests</td>
-<td>Test the platform (core libraries and Android Application Framework) APIs as documented in the SDK <a href="https://developer.android.com/reference/classes.html">Class Index</a> to ensure API correctness, including correct class, attribute and method signatures, correct method behavior, and negative tests to ensure expected behavior for incorrect parameter handling.</td>
-</tr>
-<tr>
-<td>Dalvik VM Tests</td>
-<td>The tests focus on testing the Dalvik Executable Format.</td>
-</tr>
-<tr>
-<td>Platform Data Model</td>
-<td>The CTS tests the core platform data model as exposed to application developers through content providers, as documented in the SDK <a href="https://developer.android.com/reference/android/provider/package-summary.html">android.provider</a> package: contacts, browser, settings, etc.</td>
-</tr>
-<tr>
-<td>Platform Intents</td>
-<td>The CTS tests the core platform intents, as documented in the SDK <a href="https://developer.android.com/guide/appendix/g-app-intents.html">Available Intents</a>.</td>
-</tr>
-<tr>
-<td>Platform Permissions</td>
-<td>The CTS tests the core platform permissions, as documented in the SDK <a href="https://developer.android.com/reference/android/Manifest.permission.html">Available Permissions</a>.</td>
-</tr>
-<tr>
-<td>Platform Resources</td>
-<td>The CTS tests for correct handling of the core platform resource types, as documented in the SDK <a href="https://developer.android.com/guide/topics/resources/available-resources.html">Available Resource Types</a>. This includes tests for: simple values, drawables, nine-patch, animations, layouts, styles and themes, and loading alternate resources.</td>
-</tr>
-</tbody>
-</table>
diff --git a/src/compatibility/cts-development.jd b/src/compatibility/cts/development.jd
similarity index 68%
rename from src/compatibility/cts-development.jd
rename to src/compatibility/cts/development.jd
index 4631aca..8494be4 100644
--- a/src/compatibility/cts-development.jd
+++ b/src/compatibility/cts/development.jd
@@ -2,27 +2,37 @@
 @jd:body
 
 <!--
-    Copyright 2013 The Android Open Source Project     
+    Copyright 2015 The Android Open Source Project
 
-    Licensed under the Apache License, Version 2.0 (the "License");    
-    you may not use this file except in compliance with the License.   
-    You may obtain a copy of the License at    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
 
         http://www.apache.org/licenses/LICENSE-2.0
 
-    Unless required by applicable law or agreed to in writing, software    
-    distributed under the License is distributed on an "AS IS" BASIS,    
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   
-    See the License for the specific language governing permissions and    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
     limitations under the License.   
 -->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
 
-<h2 id="initializing-your-repo-client">Initializing Your Repo Client</h2>
+<h2 id="initializing-your-repo-client">Initializing your Repo client</h2>
 <p>Follow the <a href="{@docRoot}source/downloading.html">instructions</a>
-to get and build the Android source code but specify <code>-b android-4.3_r1</code>
-when issuing the <code>repo init</code> command. This assures that your CTS
-changes will be included in the next CTS release and beyond.</p>
-<h2 id="setting-up-eclipse">Setting Up Eclipse</h2>
+to get and build the Android source code but specify a particular CTS branch
+name, for example<code>-b android-5.0_r2</code>, when issuing the <code>repo
+init</code> command. This assures your CTS changes will be included in the
+next CTS release and beyond.</p>
+
+<h2 id="setting-up-eclipse">Setting up Eclipse</h2>
+
 <p>Follow the <a href="{@docRoot}source/using-eclipse.html">instructions</a>
 to setup Eclipse but execute the following command to generate the
 <code>.classpath</code> file rather than copying the one from the development
@@ -31,23 +41,32 @@
 ./cts/development/ide/eclipse/genclasspath.sh &gt; .classpath
 chmod u+w .classpath
 </code></pre>
+
 <p>This <code>.classpath</code> file will contain both the Android framework
 packages and the CTS packages.</p>
-<h2 id="building-and-running-cts">Building and Running CTS</h2>
+
+<h2 id="building-and-running-cts">Building and running CTS</h2>
+
 <p>Execute the following commands to build CTS and start the interactive
 CTS console:</p>
-<pre><code>cd /path/to/android/root
-make cts
+<p class="note"><strong>Note:</strong> You may supply one of these other values 
+for <code>TARGET_PRODUCT</code> to build for different architectures:
+<code>aosp_x86_64</code> or <code>aosp_mips</code></p>
+<pre><code>cd <em>/path/to/android/root</em>
+make cts -j32 TARGET_PRODUCT=aosp_arm64
 cts-tradefed
 </code></pre>
+
 <p>At the cts-tf console, enter e.g.:</p>
 <pre><code>run cts --plan CTS
 </code></pre>
-<h2 id="writing-cts-tests">Writing CTS Tests</h2>
+
+<h2 id="writing-cts-tests">Writing CTS tests</h2>
+
 <p>CTS tests use JUnit and the Android testing APIs. Review the 
-<a href="https://developer.android.com/guide/topics/testing/testing_android.html">Testing and Instrumentation</a>
+<a href="https://developer.android.com/tools/testing/testing_android.html">Testing and Instrumentation</a>
 tutorial while perusing the existing tests under the
-<code>cts/tests/tests</code> directory. You will see that CTS tests mostly follow the same
+<code>cts/tests</code> directory. You will see that CTS tests mostly follow the same
 conventions used in other Android tests.</p>
 <p>Since CTS runs across many production devices, the tests must follow
 these rules:</p>
@@ -57,13 +76,16 @@
 <li>Avoid relying upon particular view layouts or depend on the dimensions of assets that may not be on some device.</li>
 <li>Don't rely upon root privileges.</li>
 </ul>
-<h3 id="test-naming-and-location">Test Naming and Location</h3>
+
+<h3 id="test-naming-and-location">Test naming and location</h3>
+
 <p>Most CTS test cases target a specific class in the Android API. These tests
 have Java package names with a <code>cts</code> suffix and class
 names with the <code>Test</code> suffix. Each test case consists of
 multiple tests, where each test usually exercises a particular API method of
 the API class being tested. These tests are arranged in a directory structure
 where tests are grouped into different categories like "widgets" and "views."</p>
+
 <p>For example, the CTS test for <code>android.widget.TextView</code> is
 <code>android.widget.cts.TextViewTest</code> found under the
 <code>cts/tests/tests/widget/src/android/widget/cts</code> directory with its
@@ -72,6 +94,7 @@
 that exercises the "setText" method and a test named "testSetSingleLine" that
 calls the <code>setSingleLine</code> method. Each of those tests have <code>@TestTargetNew</code>
 annotations indicating what they cover.</p>
+
 <p>Some CTS tests do not directly correspond to an API class but are placed in
 the most related package possible. For instance, the CTS test,
 <code>android.net.cts.ListeningPortsTest</code>, is in the <code>android.net.cts</code>, because it
@@ -79,31 +102,21 @@
 You can also create a new test package if necessary. For example, there is an
 "android.security" test package for tests related to security. Thus, use your
 best judgement when adding new tests and refer to other tests as examples.</p>
+
 <p>Finally, a lot of tests are annotated with @TestTargets and @TestTargetNew.
 These are no longer necessary so do not annotate new tests with these.</p>
-<h3 id="new-test-packages">New Test Packages</h3>
+<h3 id="new-test-packages">New sample packages</h3>
 <p>When adding new tests, there may not be an existing directory to place your
 test. In that case, refer to the example under <code>cts/tests/tests/example</code> and
 create a new directory. Furthermore, make sure to add your new package's
 module name from its <code>Android.mk</code> to <code>CTS_COVERAGE_TEST_CASE_LIST</code> in
 <code>cts/CtsTestCaseList.mk</code>. This Makefile is used by <code>build/core/tasks/cts.mk</code>
 to glue all the tests together to create the final CTS package.</p>
-<h3 id="test-stubs-and-utilities">Test Stubs and Utilities</h3>
-<p>Some tests use additional infrastructure like separate activities
-and various utilities to perform tests. These are located under the
-<code>cts/tests/src</code> directory. These stubs aren't separated into separate test
-APKs like the tests, so the <code>cts/tests/src</code> directory does not have additional
-top level directories like "widget" or "view." Follow the same principle of
-putting new classes into a package with a name that correlates to the purpose
-of your new class. For instance, a stub activity used for testing OpenGL like
-<code>GLSurfaceViewStubActivity</code> belongs in the <code>android.opengl.cts</code> package under
-the <code>cts/tests/src/android/opengl</code> directory.</p>
-<h2 id="other-tasks">Other Tasks</h2>
-<p>Besides adding new tests there are other ways to contribute to CTS:</p>
-<ul>
-<li>Fix or remove tests annotated with BrokenTest and KnownFailure.</li>
-</ul>
-<h2 id="submitting-your-changes">Submitting Your Changes</h2>
-<p>Follow the <a href="{@docRoot}source/submit-patches.html">Android Contributors' Workflow</a>
+
+<h2 id="Fix-remove-tests">Fix or remove tests</h2>
+<p>Besides adding new tests there are other ways to contribute to CTS: Fix or
+remove tests annotated with "BrokenTest" or "KnownFailure."</p>
+<h2 id="submitting-your-changes">Submitting your changes</h2>
+<p>Follow the <a href="{@docRoot}source/submit-patches.html">Submitting Patches workflow</a>
 to contribute changes to CTS. A reviewer
 will be assigned to your change, and your change should be reviewed shortly!</p>
diff --git a/src/compatibility/cts/images/camera-printed-target.png b/src/compatibility/cts/images/camera-printed-target.png
new file mode 100644
index 0000000..590dbf9
--- /dev/null
+++ b/src/compatibility/cts/images/camera-printed-target.png
Binary files differ
diff --git a/src/images/cts-0.png b/src/compatibility/cts/images/cts-0.png
similarity index 100%
rename from src/images/cts-0.png
rename to src/compatibility/cts/images/cts-0.png
Binary files differ
diff --git a/src/compatibility/cts/images/cts-test-report.png b/src/compatibility/cts/images/cts-test-report.png
new file mode 100644
index 0000000..892daef
--- /dev/null
+++ b/src/compatibility/cts/images/cts-test-report.png
Binary files differ
diff --git a/src/compatibility/cts/images/cts-test-summary.png b/src/compatibility/cts/images/cts-test-summary.png
new file mode 100644
index 0000000..ff35afc
--- /dev/null
+++ b/src/compatibility/cts/images/cts-test-summary.png
Binary files differ
diff --git a/src/compatibility/cts/images/cts-verifier-icon.png b/src/compatibility/cts/images/cts-verifier-icon.png
new file mode 100644
index 0000000..52f07f3
--- /dev/null
+++ b/src/compatibility/cts/images/cts-verifier-icon.png
Binary files differ
diff --git a/src/compatibility/cts/images/cts-verifier-menu.png b/src/compatibility/cts/images/cts-verifier-menu.png
new file mode 100644
index 0000000..f0ab680
--- /dev/null
+++ b/src/compatibility/cts/images/cts-verifier-menu.png
Binary files differ
diff --git a/src/compatibility/cts/images/path-saved-report.png b/src/compatibility/cts/images/path-saved-report.png
new file mode 100644
index 0000000..5269c2a
--- /dev/null
+++ b/src/compatibility/cts/images/path-saved-report.png
Binary files differ
diff --git a/src/compatibility/cts/images/screen-lock-test.png b/src/compatibility/cts/images/screen-lock-test.png
new file mode 100644
index 0000000..3ffb96e
--- /dev/null
+++ b/src/compatibility/cts/images/screen-lock-test.png
Binary files differ
diff --git a/src/compatibility/cts/images/verifier-save-icon.png b/src/compatibility/cts/images/verifier-save-icon.png
new file mode 100644
index 0000000..f04478d
--- /dev/null
+++ b/src/compatibility/cts/images/verifier-save-icon.png
Binary files differ
diff --git a/src/compatibility/cts/images/video-verifier.png b/src/compatibility/cts/images/video-verifier.png
new file mode 100644
index 0000000..72f62fe
--- /dev/null
+++ b/src/compatibility/cts/images/video-verifier.png
Binary files differ
diff --git a/src/compatibility/cts/index.jd b/src/compatibility/cts/index.jd
new file mode 100644
index 0000000..7b154e5
--- /dev/null
+++ b/src/compatibility/cts/index.jd
@@ -0,0 +1,124 @@
+page.title=Compatibility Test Suite
+@jd:body
+
+<!--
+    Copyright 2015 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
+
+<h2 id="how-does-the-cts-work">How does the CTS work?</h2>
+
+<p>The CTS is an automated testing harness that includes two major software components:</p>
+<ul>
+<li>
+<p>The CTS tradefed test harness runs on your desktop machine and manages test execution.</p>
+</li>
+<li>
+<p>Individual test cases are executed on the Device Under Test (DUT). The test
+cases are written in Java as JUnit tests and packaged as
+Android .apk files to run on the actual device target.</p>
+</li>
+</ul>
+
+<p>The CTS Verifier is a tool for manual testing and includes the following software components:</p>
+<ul>
+<li>
+<p>The CTS verifier app that is executed on the DUT and collects the results.<p>
+</li>
+<li>
+<p>The executable(s) or script(s) that are executed on the desktop machine to
+provide data or additional control for some test cases in the CTS Verifier
+app.</p>
+</li>
+</ul>
+
+<h2 id="workflow">Workflow</h2>
+
+<div class="figure" style="width:383px">
+  <img src="images/cts-0.png" alt="CTS flow" height="340px" id="figure1" />
+  <p class="img-caption">
+    <strong>Figure 1.</strong> How to use CTS
+  </p>
+</div>
+
+<p>This diagram summarizes CTS workflow. Please refer to the subpages of this
+section starting with <a href="setup.html">Setup</a> for detailed
+instructions.</p>
+
+<h2 id="types-of-test-cases">Types of test cases</h2>
+<p>The CTS includes the following types of test cases:</p>
+<ul>
+<li>
+<p><em>Unit tests</em> test atomic units of code within the Android platform; e.g. a single class, such as java.util.HashMap.</p>
+</li>
+<li>
+<p><em>Functional tests</em> test a combination of APIs together in a higher-level use-case.</p>
+</li>
+</ul>
+<p>Future versions of the CTS will include the following types of test cases:</p>
+<ul>
+<li>
+<p><em>Robustness tests</em> test the durability of the system under stress.</p>
+</li>
+<li>
+<p><em>Performance tests</em> test the performance of the system against defined benchmarks, for example rendering frames per second.</p>
+</li>
+</ul>
+<h2 id="areas-covered">Areas covered</h2>
+<p>The unit test cases cover the following areas to ensure compatibility:</p>
+<table>
+<thead>
+<tr>
+<th>Area</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Signature tests</td>
+<td>For each Android release, there are XML files describing the signatures of all public APIs contained in the release. The CTS contains a utility to check those API signatures against the APIs available on the device. The results from signature checking are recorded in the test result XML file.</td>
+</tr>
+<tr>
+<td>Platform API Tests</td>
+<td>Test the platform (core libraries and Android Application Framework) APIs as documented in the SDK <a href="https://developer.android.com/reference/classes.html">Class Index</a> to ensure API correctness, including correct class, attribute and method signatures, correct method behavior, and negative tests to ensure expected behavior for incorrect parameter handling.</td>
+</tr>
+<tr>
+<td>Dalvik Tests</td>
+<td>The tests focus on testing the Dalvik Executable Format.</td>
+</tr>
+<tr>
+<td>Platform Data Model</td>
+<td>The CTS tests the core platform data model as exposed to application developers through content providers, as documented in the SDK <a href="https://developer.android.com/reference/android/provider/package-summary.html">android.provider</a> package: contacts, browser, settings, etc.</td>
+</tr>
+<tr>
+<td>Platform Intents</td>
+<td>The CTS tests the core platform intents, as documented in the SDK <a href="https://developer.android.com/guide/appendix/g-app-intents.html">Available Intents</a>.</td>
+</tr>
+<tr>
+<td>Platform Permissions</td>
+<td>The CTS tests the core platform permissions, as documented in the SDK <a href="https://developer.android.com/reference/android/Manifest.permission.html">Available Permissions</a>.</td>
+</tr>
+<tr>
+<td>Platform Resources</td>
+<td>The CTS tests for correct handling of the core platform resource types, as documented in the SDK <a href="https://developer.android.com/guide/topics/resources/available-resources.html">Available Resource Types</a>. This includes tests for: simple values, drawables, nine-patch, animations, layouts, styles and themes, and loading alternate resources.</td>
+</tr>
+</tbody>
+</table>
diff --git a/src/compatibility/cts/interpret.jd b/src/compatibility/cts/interpret.jd
new file mode 100644
index 0000000..20ee843
--- /dev/null
+++ b/src/compatibility/cts/interpret.jd
@@ -0,0 +1,65 @@
+page.title=Interpreting CTS results
+@jd:body
+
+<!--
+    Copyright 2015 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<p>The CTS test results are placed in the file:</p>
+<pre>
+$CTS_ROOT/android-cts/repository/results/&lt;start_time>.zip
+</pre>
+
+<p>If you have built the CTS yourself, <em>$CTS_ROOT</em> will resemble the
+path <em>out/host/linux-x86/cts</em> but differ by platform. This reflects the
+path where you have uncompressed the prebuilt official CTS <a
+href="downloads.html">downloaded</a> from this site.</p>
+
+<p>Inside the zip, the testResult.xml file contains the actual results—open
+this file in any web browser (HTML5 compatible browser recommended) to view the
+test results. It will resemble the following screenshots.</p>
+
+<img src="images/cts-test-summary.png" alt="CTS test summary" id="figure1" />
+<p class="img-caption">
+  <strong>Figure 1.</strong> CTS test summary
+</p>
+
+<p>The Device Information section provides details about the device, firmware
+(make, model, firmware build, platform), and device hardware (screen
+resolution, keypad, screen type).  To access device information, click the link
+above Test Summary.</p>
+
+<p>The <em>Test Summary</em> section provides executed test plan details, like
+the CTS plan name and execution start and end times. It also presents an
+aggregate summary of the number of tests that passed, failed, timed out, or
+could not be executed.</p>
+<p>The next section also provides a summary of tests passed per package.</p>
+
+<img src="images/cts-test-report.png" alt="CTS detailed test report" id="figure2" />
+<p class="img-caption">
+  <strong>Figure 2.</strong> CTS test report
+</p>
+
+<p>This is followed by details of the the actual tests that were executed. The
+report lists the test package, test suite, test case, and the executed tests.
+It shows the result of the test execution—pass, fail, timed out, or not
+executed. In the event of a test failure details are provided to help diagnose
+the cause.</p>
+
+<p>Further, the stack trace of the failure is available in the XML file but is
+not included in the report to ensure brevity—viewing the XML file with a text
+editor should provide details of the test failure (search for the
+<em>&lt;Test&gt;</em> tag corresponding to the failed test and look within it
+for the <em>&lt;StackTrace&gt;</em> tag).</p>
diff --git a/src/compatibility/cts/run.jd b/src/compatibility/cts/run.jd
new file mode 100644
index 0000000..ba44a3e
--- /dev/null
+++ b/src/compatibility/cts/run.jd
@@ -0,0 +1,179 @@
+page.title=Running CTS tests
+@jd:body
+
+<!--
+    Copyright 2015 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
+
+<h2 id=cts_tradefed>Using the CTS tradefed</h2>
+<p>See the <a
+href="{@docRoot}devices/tech/test_infra/tradefed/index.html">Trade Federation
+Overview</a> for an explanation of the Trade Federation (tradefed or TF for
+short) continuous test framework.</p>
+
+<p>To run a test plan:</p>
+<ol>
+  <li>Connect at least one device.
+  <li>Press the <strong>home</strong> button to set the device to the home screen at the start of CTS.
+  <li>While a device is running tests, it must not be used for any other tasks
+    and must be kept in a stationary position (to avoid triggering sensor activity)
+    with the cameras pointing at an object that could be focused.
+  <li>Do not press any keys on the device while the CTS is running. Pressing keys
+    or touching the screen of a test device will interfere with the running tests
+    and may lead to test failures.
+  <li>Launch the CTS console by running the <em>cts-tradefed</em> script from
+    the folder where the CTS package has been unzipped, e.g.
+    <code>$ ./android-cts/tools/cts-tradefed</code>
+  <li>You may start the default test plan (containing all of the test packages) by
+    appending: <code>run cts --plan CTS</code> This will kick off all the CTS tests required for compatibility.
+    Enter <code>list plans</code> to see a list of test plans in the repository.
+    Enter <code>list packages</code> to see a list of test packages in the repository.
+    See the CTS command
+    reference or type help for a complete list of supported commands.
+  <li>Alternately, you may run the CTS plan of your choosing from the command line
+    using: <code>cts-tradefed run cts --plan
+      <plan_name>
+      </code>
+  <li>View test progress and results reported on the console.
+  <li>If your device is Android 5.0 or later and declares support for an ARM and a
+    x86 ABI, you should run both the ARM and x86 CTS packages.
+</ol>
+<h2 id=selecting_cts_plans>Selecting CTS plans</h2>
+<p>The following test plans are available:</p>
+<ul>
+  <li><em>CTS</em>—all tests required for compatibility. </li>
+  <li><em>Signature</em>—the signature verification of all public APIs </li>
+  <li><em>Android</em>—tests for the Android APIs </li>
+  <li><em>Java</em>—tests for the Java core library </li>
+  <li><em>VM</em>—tests for ART or Dalvik </li>
+  <li><em>Performance</em>—performance tests for your implementation </li>
+</ul>
+<p>These can be executed with the <code>run cts</code> command.</p>
+<h2 id=cts_reference>CTS Console command reference</h2>
+<table>
+  <tbody>
+    <tr>
+      <th>Host</th>
+      <th> </th>
+    </tr>
+    <tr>
+      <td><code>help</code></td>
+      <td>Display a summary of the most commonly used commands</td>
+    </tr>
+    <tr>
+      <td><code>help all</code></td>
+      <td>Display the complete list of available commands</td>
+    </tr>
+    <tr>
+      <td><code>exit</code></td>
+      <td>Gracefully exit the CTS console. Console will close when all currently running tests are finished</td>
+    </tr>
+    <tr>
+      <th>Run</th>
+      <th> </th>
+    </tr>
+    <tr>
+      <td><code>run cts</code></td>
+      <td>Run the specified tests and displays progress information. One of --plan, --package, --class or --continue-session-id needs to be specified
+        <p>The CTS console can accept other commands while tests are in progress </p>
+        <p>If no devices are connected, the CTS desktop machine (or host) will wait for a device to be connected before starting tests </p>
+        <p>If more than one device is connected, the CTS host will choose a device automatically</p></td>
+    </tr>
+    <tr>
+      <td><code>--plan &lt;test_plan_name&gt;</code></td>
+      <td>Run the specified test plan</td>
+    </tr>
+    <tr>
+      <td><code>-- package/-p &lt;test_package_name&gt;  [--package/-p &lt;test_package2&gt;...]</code></td>
+      <td>Run the specified test packages</td>
+    </tr>
+    <tr>
+      <td><code>--class/-c &lt;class_name&gt; [--method/-m &lt;test_method_name&gt;</code></td>
+      <td>Run the specified test class and/or method</td>
+    </tr>
+    <tr>
+      <td><code>--continue-session-id</code></td>
+      <td>Run all not executed tests from previous CTS session; the sessions testResult.xml will be updated with the new results</td>
+    </tr>
+    <tr>
+      <td><code>--shards &lt;number_of_shards&gt;</code></td>
+      <td>Shard a CTS run into given number of independent chunks, to run on multiple devices in parallel</td>
+    </tr>
+    <tr>
+      <td><code>--serial/-s &lt;deviceID&gt;</code></td>
+      <td>Run CTS on the specific device</td>
+    </tr>
+    <tr>
+      <td><code>-t &lt;class_name&gt;#&lt;test_method_name&gt;</code></td>
+      <td>Run a specific test method</td>
+    </tr>
+    <tr>
+      <td><code>--abi 32|64</code></td>
+      <td>On 64-bit devices, run the test against only the 32-bit or 64-bit ABI</td>
+    </tr>
+    <tr>
+      <th>List</th>
+      <th> </th>
+    </tr>
+    <tr>
+      <td><code>list packages</code></td>
+      <td>List all available test packages in the repository</td>
+    </tr>
+    <tr>
+      <td><code>list plans</code></td>
+      <td>List all available test plans in the repository</td>
+    </tr>
+    <tr>
+      <td><code>list invocations</code></td>
+      <td>List 'run' commands currently being executed on devices</td>
+    </tr>
+    <tr>
+      <td><code>list commands</code></td>
+      <td>List all 'run' commands currently in the queue waiting to be assigned to devices</td>
+    </tr>
+    <tr>
+      <td><code>list results</code></td>
+      <td>List CTS results currently stored in repository</td>
+    </tr>
+    <tr>
+      <td><code>list devices</code></td>
+      <td>List currently connected devices and their state
+        <p> </p>
+        <p>'Available' devices are functioning, idle devices, available for running tests</p>
+        <p> </p>
+        <p>'Unavailable' devices are devices visible via adb, but are not responding to adb commands and won't be allocated for tests</p>
+        <p> </p>
+        <p>'Allocated' devices are devices currently running tests</td>
+    </tr>
+    <tr>
+      <th>Add</th>
+      <th> </th>
+    </tr>
+    <tr>
+      <td><code>add derivedplan --plan &lt;plan_name&gt;<br>
+        --result/-r<br>
+        [pass | fail | timeout | notExecuted]<br>
+        [--session/-s &lt;session_id&gt;]</code></td>
+      <td>Create a plan derived from given result session; use this option to rerun reports and validate test issues</td>
+    </tr>
+  </tbody>
+</table>
diff --git a/src/compatibility/cts/setup.jd b/src/compatibility/cts/setup.jd
new file mode 100644
index 0000000..dc93278
--- /dev/null
+++ b/src/compatibility/cts/setup.jd
@@ -0,0 +1,177 @@
+page.title=Setting up CTS
+@jd:body
+
+<!--
+    Copyright 2015 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
+
+<h2 id=desktop_setup>Desktop machine setup</h2>
+<h3 id=adb>Android Debug Bridge (ADB)</h3>
+<p>Before running the CTS, make sure you have a recent version of Android Debug
+Bridge (adb) installed and the <code>adb</code> location added to the system
+path of your machine.</p>
+
+<p>To install ADB, download the <a
+href="http://developer.android.com/sdk/index.html#Other">Android SDK Tools</a>
+package for your operating system, open it, and follow the instructions in the
+included README file. For troubleshooting information, see <a
+href="http://developer.android.com/sdk/installing/index.html?pkg=tools">Installing
+the Stand-alone SDK Tools</a>.</p>
+
+<p>Ensure <code>adb</code> is in your system path. The following command
+assumes you've opened the package archive in your home directory:</p>
+<hr>
+<pre>
+export PATH=$PATH:$HOME/android-sdk-linux/platform-tools
+</pre>
+
+<p class="note"><strong>Note:</strong> Please ensure your starting path and
+directory name are correct.</p>
+
+<h3 id=JDK>Java Development Kit (JDK)</h3>
+<p>You need to install the proper version of the <a
+href="{@docRoot}source/initializing.html#installing-the-jdk">Java Development Kit (JDK)</a>:</p>
+
+<ul>
+  <li>CTS 5.0 and later: Java 7
+  <li>CTS 4.4 and earlier: Java 6
+</ul>
+
+<h3 id=CTS_files>CTS files</h3>
+
+<p><a href="{@docRoot}compatibility/downloads.html">Download</a> and open the CTS
+packages matching your devices' Android version and all the Application Binary
+Interfaces (ABIs) your devices support.</p>
+
+<p>Download and open the latest version of the <a
+href="{@docRoot}compatibility/downloads.html#cts-media-files">CTS Media
+Files</a>.</p>
+
+<h3 id=system_detect>Device detection</h3>
+<p>Follow the step to <a
+href="http://developer.android.com/tools/device.html#setting-up">set up your
+system to detect your device</a>, such as creating a <code>udev</code> rules
+file for Ubuntu Linux.</p>
+
+<h2 id=device_setup>Android device setup</h2>
+
+<h3 id=user_builds>User builds</h3>
+<p>To prevent test timeouts and other failures, your device should be running a
+<strong>user build (Android 4.0 and later)</strong> from <a
+href="{@docRoot}source/build-numbers.html">Codenames, Tags, and Build
+Numbers</a> of source.android.com.<br>
+<p class="note"><strong>Note:</strong> CTS should be executed on consumer
+(user build) devices only.</p>
+</ol>
+
+<h3 id=storage_requirements>Storage requirements</h3>
+<p>The CTS media stress tests require video clips to be on external storage
+(<code>/sdcard</code>). Most of the clips are from <a
+href="https://peach.blender.org/">Big Buck Bunny</a> which is copyrighted by
+the Blender Foundation under the <a
+href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license.</a></p>
+<p>The required space depends on the maximum video playback resolution supported
+  by the device (See section 5 in the compatibility definition document for the
+  platform version of the required resolutions.) Note that the video playback
+  capabilities of the device under test will be checked via the <code>android.media.CamcorderProfile</code> APIs for earlier versions of Android and the <code>android.media.MediaCodecInfo.CodecCapabilities</code> APIs from Android 5.0.</p>
+<p>Here are the storage requirements by maximum video playback resolution:</p>
+<ul>
+  <li>480x360: 98MB
+  <li>720x480: 193MB
+  <li>1280x720: 606MB
+  <li>1920x1080: 1863MB
+</ul>
+
+<h3 id=screen_storage>Screen and storage</h3>
+<ol>
+<li>Any device that does not have an embedded screen needs to be connected to a screen.</li>
+<li>If the device has a memory card slot, plug in an empty SD card. <em>Use an
+SD card that supports Ultra High Speed (UHS) Bus with SDHC or SDXC capacity or
+one with at least speed class 10 or higher to ensure it can pass the CTS.</em>
+<p class="warning"><strong>Warning:</strong> CTS may modify/erase data on the SD card plugged into the device.</p>
+</li>
+<li>If the device has SIM card slots, plug in an activated SIM card to each slot.</li>
+</li>
+</ol>
+
+<h2 id=config_device>Android device configuration</h2>
+<ol>
+  <li>Factory data reset the device: <strong>Settings > Backup &amp; reset > Factory data reset</strong>
+    <p class="warning"><strong>Warning:</strong> This will erase all user data from the device.</em></p>
+  <li>Set your device’s language to English (<strong>United States</strong>) from: <strong>Settings > Language
+    & input > Language</strong>
+  <li>Turn on the location setting if there is a GPS or Wi-Fi / Cellular network
+    feature on the device: <strong>Settings &gt; Location</strong>
+  <li>Connect to a Wi-Fi network  that supports IPv6 and has an
+    internet connection: <strong>Settings > Wi-Fi</strong>
+    <p class="note"><strong>Note:</strong> If you don’t have access to a native IPv6 network, an IPv6 carrier network,
+      or a VPN to pass some tests depending on IPv6, you may instead use a Wi-Fi
+      access point and an IPv6 tunnel. See Wikipedia <a href="http://en.wikipedia.org/wiki/List_of_IPv6_tunnel_brokers">list of IPv6 tunnel brokers</a>.</p>
+  <li>Make sure no lock pattern or password is set on the device: <strong>Settings > Security > Screen
+    lock = 'None'</strong>
+  <li>Enable <strong>USB debugging</strong> on your device: <strong>Settings &gt; Developer options &gt; USB debugging</strong>.
+       <p class="note"><strong>Note:</strong> On Android 4.2 and later, <strong>Developer
+        options</strong> is hidden by default. To make them available, go
+        to <strong>Settings &gt; About phone</strong> and tap <strong>Build number</strong>
+        seven times. Return to the previous screen to find <strong>Developer
+        options</strong>. See <a
+        href="http://developer.android.com/tools/device.html#developer-device-options">Enabling
+        On-device Developer Options</a> for additional details.</p>
+  <li>Select: <strong>Settings > Developer options > Stay Awake</strong>
+  <li>Select: <strong>Settings > Developer options > Allow mock locations</strong>
+  <li>Launch the browser and dismiss any startup/setup screen.
+  <li>Connect the desktop machine that will be used to test the device with a USB cable
+    <p class="note"><strong>Note:</strong> When you connect a device running Android 4.2.2 or later
+    to your computer, the system shows a dialog asking whether to accept an RSA key that allows
+    debugging through this computer. Select <em>Allow USB debugging</em>.</p>
+  <li> Install and configure helper apps on the device.
+<p class="note"><strong>Note:</strong> For CTS versions 2.1 R2 through 4.2 R4</em>, set up your device (or emulator)
+to run the accessibility tests with:<br>
+<code>adb install -r android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk</code><br>
+On the device, enable: <strong>Settings > Accessibility > Accessibility >
+Delegating Accessibility Service</strong></p>
+<p class="note"><strong>Note:</strong> For CTS 2.3 R4 and beyond on devices that declare the
+<code>android.software.device_admin feature</code>, set up your device to run
+the device administration tests with:<br>
+<code>adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk</code><br>
+On the device, enable only the two
+<code>android.deviceadmin.cts.CtsDeviceAdminReceiver*</code> device
+administrators under: <strong>Settings > Security > Select device
+administrators</strong>. Make sure the
+<code>android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver</code> and any
+other preloaded device administrators stay disabled in the same menu.</p>
+<li>Copy the CTS media files to the device as follows:
+<p class="note"><strong>Note:</strong> For CTS 2.3 R12 and beyond, if the
+device supports video codecs, the CTS media files must be copied to the
+device.</p>
+<ul>
+  <li>Navigate (cd) to the path the media files are downloaded and unzipped to.
+  <li>Change the file permissions: <code>chmod u+x copy_media.sh</code>
+  <li>Run <code>copy_media.sh</code>:
+    <ul>
+      <li>To copy clips up to a resolution of 720x480, run: <code>./copy_media.sh 720x480</code>
+      <li>If you are not sure about the maximum resolution, try <code>./copy_media.sh all</code> so that all files are copied.
+      <li>If there are multiple devices under adb, add the -s (serial) option to the end.
+        For example, to copy up to 720x480 to the device with serial 1234567, run: <code>./copy_media.sh 720x480 -s 1234567</code>
+    </ul>
+</ul>
+</ol>
diff --git a/src/compatibility/cts/verifier.jd b/src/compatibility/cts/verifier.jd
new file mode 100644
index 0000000..25e0a54
--- /dev/null
+++ b/src/compatibility/cts/verifier.jd
@@ -0,0 +1,203 @@
+page.title=Using CTS Verifier
+@jd:body
+
+<!--
+    Copyright 2015 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
+
+<p>The Android Compatibility Test Suite Verifier (CTS Verifier) is a supplement to
+  the Compatibility Test Suite (CTS). While CTS checks those APIs and functions
+  that can be automated, CTS Verifier provides tests for those APIs and functions
+  that cannot be tested on a stationary device without manual input, like audio
+  quality, touchscreen, accelerometer, camera, etc.</p>
+<h2 id=test_preparation>Test preparation</h2>
+<p>The device must have verified Android API compatibility by successfully passing
+  the Compatibility Test Suite.</p>
+<h3 id=hardware_requirements>Hardware requirements</h3>
+<ul>
+  <li> A Linux computer with USB 2.0 compatible port
+  <li> A second Android device with a known compatible Bluetooth, Wi-Fi direct, and
+    NFC Host Card Emulation (HCE) implementation
+</ul>
+<h3 id=setup>Setup</h3>
+<ul>
+  <li>Install the <a href="http://developer.android.com/sdk/index.html">Android
+SDK</a> on the Linux computer <li>Download the appropriate <a
+href="{@docRoot}compatibility/downloads.html">CTS Verifier.apk</a> for the
+version of Android under test.
+  <li>Install CTS Verifier.apk to the <em>Device Under Test</em> (DUT). <br>
+    <code>adb install -r CtsVerifier.apk</code>
+  <li>Ensure that the device has its system data and time set correctly.
+</ul>
+<h2 id=cts_test_procedure>CTS Verifier test procedure</h2>
+<ol>
+  <li>After the CTS Verifier.apk has been installed, launch the CTS Verifier
+    application:
+
+<img src="images/cts-verifier-icon.png" alt="CTS Verifier icon in launcher" id="figure1" />
+<p class="img-caption">
+  <strong>Figure 1.</strong> CTS Verifier icon
+</p>
+
+  <li>Once opened, the CTS Verifier displays a list of all test sets available for
+    manual verification:
+
+<img src="images/cts-verifier-menu.png" alt="CTS Verifier menu of tests" id="figure2" />
+<p class="img-caption">
+  <strong>Figure 2.</strong> CTS Verifier menu of tests
+</p>
+
+  <li>Each test contains a set of common elements (in some tests, Pass/Fail is
+    determined automatically):
+    <ul>
+      <li><em>Info</em>—a set of instructions to run the test. This will appear as a popup the first
+        time each test is opened or whenever the <strong>Info</strong> button (?) is pressed.
+      <li><em>Pass</em>—If the DUT meets the test requirements per the instructions from Info, press
+        the <strong>Pass</strong> button (✓).
+      <li><em>Fail</em>—If the DUT does not meet the test requirements per the instructions from Info,
+        press the <strong>Fail</strong> button (!).
+    </ul>
+
+<img src="images/video-verifier.png" alt="Streaming video quality verifier" id="figure3" />
+<p class="img-caption">
+  <strong>Figure 3.</strong> Video quality verifier
+</p>
+
+</ol>
+
+<h2 id=specific_test_requirements>Specific test requirements</h2>
+<h3 id=usb_accessory>USB Accessory</h3>
+<p>In order to run the USB Accessory test, you need a Linux computer to run the
+  USB desktop machine (host) program.</p>
+<ol>
+  <li>Connect the DUT to a computer.
+  <li>Execute the cts-usb-accessory program on the computer found in the CTS Verifier
+    package.
+  <li>A popup message will appear on the DUT. Select <strong>OK</strong> and go into the USB Accessory Test in the CTS Verifier application.
+<br>
+<img src="images/screen-lock-test.png" alt="CTS Verifier screen lock test" id="figure4" />
+<p class="img-caption">
+  <strong>Figure 4.</strong> Screen lock test
+</p>
+
+  <li>Output similar to below will appear on the computer’s console. 
+</ol>
+<pre>
+out/host/linux-x86/cts-verifier/android-cts-verifier$ <strong>./cts-usb-accessory</strong>
+CTS USB Accessory Tester
+Found possible Android device (413c:2106) - attempting to switch to accessory
+mode...
+Failed to read protocol version
+Found Android device in accessory mode (18d1:2d01)...
+[RECV] Message from Android device #0
+[SENT] Message from Android accessory #0
+[RECV] Message from Android device #1
+[SENT] Message from Android accessory #1
+[RECV] Message from Android device #2
+[SENT] Message from Android accessory #2
+[RECV] Message from Android device #3
+[SENT] Message from Android accessory #3
+[RECV] Message from Android device #4
+[SENT] Message from Android accessory #4
+[RECV] Message from Android device #5
+[SENT] Message from Android accessory #5
+[RECV] Message from Android device #6
+[SENT] Message from Android accessory #6
+[RECV] Message from Android device #7
+[SENT] Message from Android accessory #7
+[RECV] Message from Android device #8
+[SENT] Message from Android accessory #8
+[RECV] Message from Android device #9
+[SENT] Message from Android accessory #9
+[RECV] Message from Android device #10
+[SENT] Message from Android accessory #10
+</pre>
+<h3 id=camera_field_of_view_calibration>Camera field of view calibration</h3>
+<p>This field of view calibration procedure is designed to be a quick way to
+  determine the device field of view with moderate accuracy.
+<p><strong>Setup</strong> - Print the <a
+href="{@docRoot}compatibility/calibration-pattern.pdf">calibration-pattern.pdf</a>
+target file and mount it on a rigid backing. Print on 11” x 17” or A3. Orient
+the camera device and the printed target as shown in the diagram below:</p>
+
+<img src="images/camera-printed-target.png" alt="Camera printed target" id="figure5" />
+<p class="img-caption">
+  <strong>Figure 5.</strong> Camera printed target
+</p>
+
+<p><strong>Setting the target width</strong> - Measure the distance between the
+solid lines on the target pattern in centimeters to account for printing
+inaccuracies (~38 cm).</p>
+<ol>
+  <li>Start the calibration application.
+  <li>Press the setup button and select “Marker distance” to enter the distance.
+  <li>Measure and enter the distance to the target pattern (~100 cm).
+  <li>Press the back button to return to the calibration preview.
+</ol>
+<p><strong>Calibration process</strong> - Verify that the device and target are
+placed as shown in the figure and the correct distances have been entered into
+the setup dialog.The preview will display the image with a vertical line
+overlaid onto it. This line should align with the center line of the target
+pattern. The transparent grid can be used with the other vertical lines to
+ensure that the optical axis is orthogonal to the target.</p>
+<ol>
+  <li>Select an image resolution to test from the selector at the bottom left.
+  <li>Tap the screen to take a photo and enter the calibration mode (described
+    below).
+  <li>Hit the back button and repeat for all supported image resolutions.
+</ol>
+<p><strong>Calibration test (per resolution)</strong> In the calibration mode, the photo will be displayed with two vertical lines
+  overlaid onto the image.These lines should align with the vertical lines on the target pattern within a
+  few pixels. If they do not, then the reported field of view for that mode is
+  inaccurate (assuming the setup is correct).Adjust the slider at the bottom of the screen until the overlay aligns with the
+  target pattern as closely as possible. The displayed field of view will be a
+  close approximation to the correct value when the overlay and the target
+  pattern image are aligned. The reported field of view should be within +/-1
+  degree of the calibration value.</p>
+<h2 id=exporting_test_reports>Exporting test reports</h2>
+<ol>
+  <li>After all tests are completed, tap the <strong>Save (disk)</strong> icon.
+<br>
+<img src="images/verifier-save-icon.png" alt="CTS Verifier Save icon" id="figure6" />
+<p class="img-caption">
+  <strong>Figure 6.</strong> CTS Verifier Save icon
+</p>
+
+  <li>A path to the saved report will be displayed in pop-up (e.g.
+<code>/mnt/sdcard/ctsVerifierReports/ctsVerifierReport-date-time.zip</code>).
+Record the path.
+<br>
+<img src="images/path-saved-report.png" alt="CTS Verifier path to saved report " id="figure7" />
+<p class="img-caption">
+  <strong>Figure 7.</strong> CTS Verifier path to saved report
+</p>
+
+  <li>Connect the device via USB to a computer with the SDK installed.
+  <li>From the computer’s SDK installation, run <code>adb pull
+    <CTS Verifier report path>
+    </code> to download the report from the device.
+    <ul>
+  <li>To download all reports run : <code>adb pull /mnt/sdcard/ctsVerifierReports/ .</code>
+  <li>The name of the reports are time-stamped based on the DUT’s system time.
+  <li>To clear results after they have been selected, select <strong>Menu > Clear</strong>. This will
+    clear the Pass/Fail results.
+</ol>
diff --git a/src/compatibility/images/compat-ecosystem.png b/src/compatibility/images/compat-ecosystem.png
new file mode 100644
index 0000000..29a9d15
--- /dev/null
+++ b/src/compatibility/images/compat-ecosystem.png
Binary files differ
diff --git a/src/compatibility/index.jd b/src/compatibility/index.jd
index b3c375a..95a39dc 100644
--- a/src/compatibility/index.jd
+++ b/src/compatibility/index.jd
@@ -16,6 +16,13 @@
     See the License for the specific language governing permissions and    
     limitations under the License.   
 -->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
 
 <p>Android's purpose is to establish an open platform for developers to build innovative apps.
 The Android Compatibility program defines the technical details of the Android platform and provides
@@ -25,6 +32,14 @@
 </p>
 
 <h2 id="why-build-compatible-android-devices">Why build compatible Android devices?</h2>
+
+<div class="figure">
+  <img src="images/compat-ecosystem.png" alt="Compatibility ecosystem" id="figure1" />
+  <p class="img-caption">
+    <strong>Figure 1.</strong> How the Android ecosystem thrives with device compatibility
+  </p>
+</div>
+
 <h3 id="users-want-a-customizable-device">Users want a customizable device.</h3>
 <p>A mobile phone is a highly personal, always-on, always-present gateway to
 the Internet. We haven't met a user yet who didn't want to customize it by
@@ -73,6 +88,6 @@
 licensing Google’s proprietary suite of apps that run on top of Android -
 Google Mobile Services (GMS, which include Google Play, YouTube, Google Maps,
 Gmail, and more). Google Mobile Services is not part of the Android Open Source
-Project and is available only through a license with Google. Please visit the
-‘contact’ us section for more information on how to inquire about a GMS
-license.</p>
+Project and is available only through a license with Google. Please visit
+<a href="contact-us.html">Contact Us</a> for more information on how to inquire
+about a GMS license.</p>
diff --git a/src/compatibility/overview.jd b/src/compatibility/overview.jd
index ac0fb9f..aa0fccb 100644
--- a/src/compatibility/overview.jd
+++ b/src/compatibility/overview.jd
@@ -16,10 +16,17 @@
     See the License for the specific language governing permissions and    
     limitations under the License.   
 -->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
 
 <p>The Android compatibility program makes it easy for mobile device
 manufacturers to develop compatible Android devices.</p>
-<h1 id="program-goals">Program goals</h1>
+<h2 id="program-goals">Program goals</h2>
 <p>The Android compatibility program works for the benefit of the entire
 Android community, including users, developers, and device manufacturers.</p>
 <p>Each group depends on the others. Users want a wide selection of devices
@@ -79,7 +86,7 @@
 the source code tree, there is a separate CTS and CDD for each version as
 well. The CDD, CTS, and source code are -- along with your hardware and your
 software customizations -- everything you need to create a compatible device.</p>
-<h1 id="compatibility-definition-document-cdd">Compatibility Definition Document</h1>
+<h2 id="compatibility-definition-document-cdd">Compatibility Definition Document</h2>
 <p>For each release of the Android platform, a detailed CDD will be provided. The CDD represents the "policy"
 aspect of Android compatibility.</p>
 <p>No test suite, including CTS, can truly be comprehensive. For instance, the
@@ -99,9 +106,9 @@
 start by checking out the source code for that version, and then read the
 corresponding CDD and stay within its guidelines. For additional details,
 simply examine <a href="/compatibility/android-cdd.pdf">the latest CDD</a>.</p>
-<h1 id="compatibility-test-suite-cts">Compatibility Test Suite</h1>
-<p>The CTS is a free, commercial-grade test suite, available for
-<a href="downloads.html">download</a>.
+<h2 id="compatibility-test-suite-cts">Compatibility Test Suite</h2>
+<p>The <a href="cts/index.html">CTS</a> is a free, commercial-grade test suite,
+available for <a href="downloads.html">download</a>.
 The CTS represents the "mechanism" of compatibility.</p>
 <p>The CTS runs on a desktop machine and executes test cases directly on
 attached devices or an emulator. The CTS is a set of unit tests designed to be
@@ -109,11 +116,11 @@
 the engineers building a device. Its intent is to reveal incompatibilities
 early on, and ensure that the software remains compatible throughout the
 development process.</p>
-<h1 id="compatibility-test-suite-verifier-cts-verifier">Compatibility Test Suite Verifier (CTS Verifier)</h1>
+<h2 id="compatibility-test-suite-verifier-cts-verifier">Compatibility Test Suite Verifier (CTS Verifier)</h2>
 <p>The Compatibility Test Suite Verifier (CTS Verifier) is a supplement to the
 CTS available for <a href="downloads.html">download</a>.
 CTS Verifier provides tests for APIs and functions that cannot be tested on a
 stationary device without manual input (e.g. audio quality, accelerometer, etc).</p>
-<p>For details on the CTS, consult the <a href="cts-intro.html">CTS introduction</a>.</p>
+<p>For details on the CTS, consult the <a href="cts/index.html">CTS introduction</a>.</p>