CTS: Add host-side EDI
am: 4cc4075c19

Change-Id: Id313251b910108a9942286c83e3c525b8a56fa5f
diff --git a/apps/CameraITS/pymodules/its/objects.py b/apps/CameraITS/pymodules/its/objects.py
index ac384fb..b2a49aa 100644
--- a/apps/CameraITS/pymodules/its/objects.py
+++ b/apps/CameraITS/pymodules/its/objects.py
@@ -183,7 +183,8 @@
         ar = match_ar_size[0] / float(match_ar_size[1])
         out_sizes = [s for s in out_sizes if
                 abs(ar - s[0] / float(s[1])) <= AR_TOLERANCE]
-    out_sizes.sort(reverse=True)
+    out_sizes.sort(reverse=True, key=lambda s: s[0]) # 1st pass, sort by width
+    out_sizes.sort(reverse=True, key=lambda s: s[0]*s[1]) # sort by area
     return out_sizes
 
 def set_filter_off_or_fast_if_possible(props, req, available_modes, filter):
diff --git a/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py b/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py
index 39e3c38..8ff7f73 100644
--- a/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py
+++ b/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py
@@ -68,6 +68,7 @@
         # Todo: test for radial distortion enabled devices has not yet been
         # implemented
         its.caps.skip_unless(not its.caps.radial_distortion_correction(props))
+        its.caps.skip_unless(its.caps.read_3a(props))
         full_device = its.caps.full_or_better(props)
         limited_device = its.caps.limited(props)
         its.caps.skip_unless(full_device or limited_device)
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 83f99c5..b000441 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -132,8 +132,8 @@
                 <category android:name="android.cts.intent.category.MANUAL_TEST" />
             </intent-filter>
             <meta-data android:name="test_category" android:value="@string/test_category_device_admin" />
-            <meta-data android:name="test_excluded_features"
-                       android:value="android.hardware.type.television:android.software.leanback:android.hardware.type.watch" />
+            <meta-data android:name="test_required_features"
+                    android:value="android.software.device_admin" />
         </activity>
 
         <activity android:name=".backup.BackupTestActivity" android:label="@string/backup_test">
@@ -388,8 +388,8 @@
                 <category android:name="android.cts.intent.category.MANUAL_TEST" />
             </intent-filter>
             <meta-data android:name="test_category" android:value="@string/test_category_security" />
-            <meta-data android:name="test_excluded_features"
-                       android:value="android.hardware.type.television:android.software.leanback:android.hardware.type.watch" />
+            <meta-data android:name="test_required_features"
+                    android:value="android.software.device_admin" />
         </activity>
         <activity android:name=".security.LockConfirmBypassTest"
                 android:label="@string/lock_confirm_test_title"
@@ -399,8 +399,8 @@
                 <category android:name="android.cts.intent.category.MANUAL_TEST" />
             </intent-filter>
             <meta-data android:name="test_category" android:value="@string/test_category_security" />
-            <meta-data android:name="test_excluded_features"
-                       android:value="android.hardware.type.television:android.software.leanback:android.hardware.type.watch" />
+            <meta-data android:name="test_required_features"
+                    android:value="android.software.device_admin" />
         </activity>
 
         <activity android:name=".streamquality.StreamingVideoActivity"
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsService.java b/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsService.java
index 49525b7..6f54821 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsService.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsService.java
@@ -1161,12 +1161,13 @@
         } else {
             // No surface(s) specified at all.
             // Default: a single output surface which is full-res YUV.
-            Size sizes[] = ItsUtils.getYuvOutputSizes(mCameraCharacteristics);
+            Size maxYuvSize = ItsUtils.getMaxOutputSize(
+                    mCameraCharacteristics, ImageFormat.YUV_420_888);
             numSurfaces = backgroundRequest ? 2 : 1;
 
             outputSizes = new Size[numSurfaces];
             outputFormats = new int[numSurfaces];
-            outputSizes[0] = sizes[0];
+            outputSizes[0] = maxYuvSize;
             outputFormats[0] = ImageFormat.YUV_420_888;
             if (backgroundRequest) {
                 outputSizes[1] = new Size(640, 480);
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsUtils.java b/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsUtils.java
index 8763223..b0eaf35 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsUtils.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsUtils.java
@@ -153,10 +153,13 @@
         }
 
         Size maxSize = sizes[0];
+        int maxArea = maxSize.getWidth() * maxSize.getHeight();
         for (int i = 1; i < sizes.length; i++) {
-            if (sizes[i].getWidth() * sizes[i].getHeight() >
-                    maxSize.getWidth() * maxSize.getHeight()) {
+            int area = sizes[i].getWidth() * sizes[i].getHeight();
+            if (area > maxArea ||
+                    (area == maxArea && sizes[i].getWidth() > maxSize.getWidth())) {
                 maxSize = sizes[i];
+                maxArea = area;
             }
         }
 
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java
index 0728fb5..a6e5f98 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/screenpinning/ScreenPinningTestActivity.java
@@ -84,10 +84,6 @@
         } else {
             mTestIndex = 0;
         }
-        // Display any pre-existing text.
-        for (int i = 0; i < mTestIndex; i++) {
-            mTests[i].showText();
-        }
         mTests[mTestIndex].run();
     };
 
@@ -117,9 +113,6 @@
                 mTestIndex++;
                 if (mTestIndex < mTests.length) {
                     mTests[mTestIndex].run();
-                } else {
-                    mNextButton.setVisibility(View.GONE);
-                    findViewById(R.id.pass_button).setVisibility(View.VISIBLE);
                 }
             }
         });
@@ -222,9 +215,13 @@
     };
 
     private final Test mDone = new Test(R.string.screen_pinning_done) {
+        @Override
         protected void run() {
-            showText();
-            succeed();
+            super.run();
+            // On test completion, hide "next" button, and show "pass" button
+            // instead.
+            mNextButton.setVisibility(View.GONE);
+            findViewById(R.id.pass_button).setVisibility(View.VISIBLE);
         };
     };
 
diff --git a/common/device-side/preconditions/src/com/android/compatibility/common/preconditions/ScreenLockHelper.java b/common/device-side/preconditions/src/com/android/compatibility/common/preconditions/ScreenLockHelper.java
index 385f22f..d2380af 100644
--- a/common/device-side/preconditions/src/com/android/compatibility/common/preconditions/ScreenLockHelper.java
+++ b/common/device-side/preconditions/src/com/android/compatibility/common/preconditions/ScreenLockHelper.java
@@ -18,7 +18,6 @@
 
 import android.app.KeyguardManager;
 import android.content.Context;
-import android.os.Build;
 
 /**
  * ScreenLockHelper is used to check whether the device is protected by a locked screen.
@@ -30,9 +29,6 @@
      * is no way to programmatically distinguish between the two.
      */
     public static boolean isDeviceSecure(Context context) {
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
-            return true; // KeyguardManager.isDeviceSecure() added in M, skip this check
-        }
         KeyguardManager km = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
         return km.isDeviceSecure();
     }
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java
index 420f51f..8bc5fbe 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java
@@ -87,7 +87,9 @@
     private static final String SHARD_OPTION = "shards";
     public static final String SKIP_DEVICE_INFO_OPTION = "skip-device-info";
     public static final String SKIP_PRECONDITIONS_OPTION = "skip-preconditions";
+    public static final String PRIMARY_ABI_RUN = "primary-abi-only";
     public static final String DEVICE_TOKEN_OPTION = "device-token";
+    public static final String LOGCAT_ON_FAILURE_SIZE_OPTION = "logcat-on-failure-size";
     private static final String URL = "dynamic-config-url";
 
     /* API Key for compatibility test project, used for dynamic configuration */
@@ -164,9 +166,14 @@
             description = "Whether preconditions should be skipped")
     private boolean mSkipPreconditions = false;
 
+    @Option(name = PRIMARY_ABI_RUN,
+            description = "Whether to run tests with only the device primary abi. "
+                    + "This override the --abi option.")
+    private boolean mPrimaryAbiRun = false;
+
     @Option(name = DEVICE_TOKEN_OPTION,
             description = "Holds the devices' tokens, used when scheduling tests that have"
-                    + "prerequisits such as requiring a SIM card. Format is <serial>:<token>",
+                    + "prerequisites such as requiring a SIM card. Format is <serial>:<token>",
             importance = Importance.ALWAYS)
     private List<String> mDeviceTokens = new ArrayList<>();
 
@@ -179,6 +186,11 @@
             description = "Take a logcat snapshot on every test failure.")
     private boolean mLogcatOnFailure = false;
 
+    @Option(name = LOGCAT_ON_FAILURE_SIZE_OPTION,
+            description = "The max number of logcat data in bytes to capture when "
+            + "--logcat-on-failure is on. Should be an amount that can comfortably fit in memory.")
+    private int mMaxLogcatBytes = 500 * 1024; // 500K
+
     @Option(name = "screenshot-on-failure",
             description = "Take a screenshot on every test failure.")
     private boolean mScreenshotOnFailure = false;
@@ -309,7 +321,7 @@
             List<IModuleDef> modules = mModuleRepo.getModules(getDevice().getSerialNumber());
 
             listener = new FailureListener(listener, getDevice(), mBugReportOnFailure,
-                    mLogcatOnFailure, mScreenshotOnFailure, mRebootOnFailure);
+                    mLogcatOnFailure, mScreenshotOnFailure, mRebootOnFailure, mMaxLogcatBytes);
             int moduleCount = modules.size();
             CLog.logAndDisplay(LogLevel.INFO, "Starting %d module%s on %s", moduleCount,
                     (moduleCount > 1) ? "s" : "", mDevice.getSerialNumber());
@@ -360,7 +372,9 @@
                 }
 
                 // execute pre module execution checker
-                runPreModuleCheck(module.getName(), checkers, mDevice, listener);
+                if (checkers != null && !checkers.isEmpty()) {
+                    runPreModuleCheck(module.getName(), checkers, mDevice, listener);
+                }
                 try {
                     module.run(listener);
                 } catch (DeviceUnresponsiveException due) {
@@ -390,7 +404,9 @@
                             TimeUtil.formatElapsedTime(expected),
                             TimeUtil.formatElapsedTime(duration));
                 }
-                runPostModuleCheck(module.getName(), checkers, mDevice, listener);
+                if (checkers != null && !checkers.isEmpty()) {
+                    runPostModuleCheck(module.getName(), checkers, mDevice, listener);
+                }
             }
         } catch (FileNotFoundException fnfe) {
             throw new RuntimeException("Failed to initialize modules", fnfe);
@@ -406,6 +422,15 @@
     Set<IAbi> getAbis() throws DeviceNotAvailableException {
         Set<IAbi> abis = new HashSet<>();
         Set<String> archAbis = AbiUtils.getAbisForArch(SuiteInfo.TARGET_ARCH);
+        if (mPrimaryAbiRun) {
+            if (mAbiName == null) {
+                // Get the primary from the device and make it the --abi to run.
+                mAbiName = mDevice.getProperty("ro.product.cpu.abi").trim();
+            } else {
+                CLog.d("Option --%s supersedes the option --%s, using abi: %s", ABI_OPTION,
+                        PRIMARY_ABI_RUN, mAbiName);
+            }
+        }
         for (String abi : AbiFormatter.getSupportedAbis(mDevice, "")) {
             // Only test against ABIs supported by Compatibility, and if the
             // --abi option was given, it must match.
@@ -414,7 +439,7 @@
                 abis.add(new Abi(abi, AbiUtils.getBitness(abi)));
             }
         }
-        if (abis == null || abis.isEmpty()) {
+        if (abis.isEmpty()) {
             if (mAbiName == null) {
                 throw new IllegalArgumentException("Could not get device's ABIs");
             } else {
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/FailureListener.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/FailureListener.java
index 5d2cd38..cd0e54f 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/FailureListener.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/FailureListener.java
@@ -27,23 +27,38 @@
 
 public class FailureListener extends ResultForwarder {
 
-    private static final int MAX_LOGCAT_BYTES = 500 * 1024; // 500K
+    private static final int DEFAULT_MAX_LOGCAT_BYTES = 500 * 1024; // 500K
+    /* Arbitrary upper limit for mMaxLogcatBytes, per b/30720850 */
+    public static final int LOGCAT_BYTE_LIMIT = 20 * 1024 * 1024; // 20 MB
 
     private ITestDevice mDevice;
     private boolean mBugReportOnFailure;
     private boolean mLogcatOnFailure;
     private boolean mScreenshotOnFailure;
     private boolean mRebootOnFailure;
+    private int mMaxLogcatBytes;
 
     public FailureListener(ITestInvocationListener listener, ITestDevice device,
             boolean bugReportOnFailure, boolean logcatOnFailure, boolean screenshotOnFailure,
-            boolean rebootOnFailure) {
+            boolean rebootOnFailure, int maxLogcatBytes) {
         super(listener);
         mDevice = device;
         mBugReportOnFailure = bugReportOnFailure;
         mLogcatOnFailure = logcatOnFailure;
         mScreenshotOnFailure = screenshotOnFailure;
         mRebootOnFailure = rebootOnFailure;
+        if (maxLogcatBytes < 0 ) {
+            CLog.w("FailureListener could not set %s to '%d', using default value %d",
+                    CompatibilityTest.LOGCAT_ON_FAILURE_SIZE_OPTION, maxLogcatBytes,
+                    DEFAULT_MAX_LOGCAT_BYTES);
+            mMaxLogcatBytes = DEFAULT_MAX_LOGCAT_BYTES;
+        } else if (maxLogcatBytes > LOGCAT_BYTE_LIMIT) {
+            CLog.w("Value %d for %s exceeds limit %d, using limit value", maxLogcatBytes,
+                    CompatibilityTest.LOGCAT_ON_FAILURE_SIZE_OPTION, LOGCAT_BYTE_LIMIT);
+            mMaxLogcatBytes = LOGCAT_BYTE_LIMIT;
+        } else {
+            mMaxLogcatBytes = maxLogcatBytes;
+        }
     }
 
     /**
@@ -62,7 +77,7 @@
         if (mLogcatOnFailure) {
             // sleep 2s to ensure test failure stack trace makes it into logcat capture
             RunUtil.getDefault().sleep(2 * 1000);
-            InputStreamSource logSource = mDevice.getLogcat(MAX_LOGCAT_BYTES);
+            InputStreamSource logSource = mDevice.getLogcat(mMaxLogcatBytes);
             super.testLog(String.format("%s-logcat", test.toString()), LogDataType.LOGCAT,
                     logSource);
             logSource.cancel();
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java
index 6eb1c95..1ca394a 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/util/OptionHelper.java
@@ -103,11 +103,15 @@
         // get option/value substrings from the command-line string
         // N.B. tradefed rewrites some expressions from option="value a b" to "option=value a b"
         String quoteMatching = "(\"[^\"]+\")";
+        String nonSpacedHypen = "((?<!\\s)-(?!\\s))";
         Pattern cliPattern = Pattern.compile(
-            "((-[-\\w]+([ =]"                       // match -option=value or --option=value
-            + "(" + quoteMatching + "|[^-\"]+))?"   // allow -option "..." and -option x y z
+            // match -option=value or --option=value
+            "((-[-\\w]+([ =]"
+            // allow -option "...", -option x y z, and -option x:y:z
+            + "(" + quoteMatching + "|([\\w\\s:.]|"+ nonSpacedHypen + ")+))?"
             + "))|"
-            + quoteMatching                         // allow anything in direct quotes
+            // allow anything in direct quotes
+            + quoteMatching
         );
         Matcher matcher = cliPattern.matcher(commandString);
 
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java
index c6f563f..d8cafa0 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/util/OptionHelperTest.java
@@ -77,7 +77,7 @@
         List<String> validSubset = Arrays.asList("--" + TEST_CLASS, "fooclass",
             "-" + TEST_SUITE_SHORTNAME, "foosuite");
         List<String> allValidNames = Arrays.asList("--" + TEST_CLASS, "fooclass",
-            "-" + TEST_SUITE_SHORTNAME, "foosuite", "--" + TEST_NAME, "footest");
+            "-" + TEST_SUITE_SHORTNAME, "foosuite:foo-key:fooval", "--" + TEST_NAME, "footest");
 
         List<String> validQuoteSubset = Arrays.asList("-" + TEST_CLASS_SHORTNAME, fakeTestClass,
             "--" + TEST_NAME + "=" + fakeTestMethod, "--" + TEST_FILTER, fakeTestClass + " "
@@ -94,7 +94,7 @@
                 + " -s foosuite", this));
         assertEquals("Expected two long names and one short name", allValidNames,
             OptionHelper.getValidCliArgs("test --" + TEST_CLASS + " fooclass -b fake"
-                + " -s foosuite " + "--" + TEST_NAME + " footest", this));
+                + " -s foosuite:foo-key:fooval " + "--" + TEST_NAME + " footest", this));
         assertEquals("Expected matching arrays", validQuoteSubset,
             OptionHelper.getValidCliArgs(inputString, this));
     }
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
index 00acdf5..03c697e 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
@@ -25,9 +25,17 @@
 import com.android.tradefed.testtype.IAbi;
 import com.android.tradefed.testtype.IAbiReceiver;
 import com.android.tradefed.testtype.IBuildReceiver;
+import com.android.tradefed.util.RunUtil;
 
+import java.io.BufferedReader;
+import java.io.EOFException;
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Set of tests that verify various security checks involving multiple apps are
@@ -289,6 +297,24 @@
         }
     }
 
+    /**
+     * Tests that an arbitrary file cannot be installed using the 'cmd' command.
+     */
+    public void testAdbInstallFile() throws Exception {
+        final List<String> output = AdbOutputReader.getOutput(5000L, new String[] {
+                "adb",
+                "shell",
+                "cmd",
+                "package",
+                "install",
+                "-S",
+                "1024",
+                "/data/local/tmp/foo.apk",
+        });
+        assertEquals("Line count", 1, output.size());
+        assertEquals("Error text", "Error: APK content must be streamed", output.get(0));
+    }
+
     private void runDeviceTests(String packageName) throws DeviceNotAvailableException {
         Utils.runDeviceTests(getDevice(), packageName);
     }
@@ -297,4 +323,66 @@
             throws DeviceNotAvailableException {
         Utils.runDeviceTests(getDevice(), packageName, testClassName, testMethodName);
     }
+
+    /** Helper class to collect the output from a command. */
+    private static class AdbOutputReader {
+        public static List<String> getOutput(long timeout, String... command) throws Exception {
+            final Process adbProcess = RunUtil.getDefault().runCmdInBackground(command);
+            final InputStream in = adbProcess.getInputStream();
+            final List<String> lines = new ArrayList<>();
+            final Object threadLock = new Object();
+            final Thread t = new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    synchronized (threadLock) {
+                        readLines(in, lines);
+                        threadLock.notify();
+                    }
+                }
+            });
+            final long end = System.currentTimeMillis() + timeout;
+            synchronized (threadLock) {
+                t.start();
+                long now = System.currentTimeMillis();
+                while (now < end) {
+                    try {
+                        threadLock.wait(end - now);
+                    } catch (InterruptedException e) {
+                        now = System.currentTimeMillis();
+                        continue;
+                    }
+                    break;
+                }
+            }
+            adbProcess.destroy();
+            t.join();
+            return lines;
+        }
+
+        private static void readLines(InputStream in, List<String> lines) {
+            BufferedReader br = null;
+            try {
+                br = new BufferedReader(new InputStreamReader(in));
+                String line;
+                while ((line = readLineIgnoreException(br)) != null) {
+                    lines.add(line);
+                }
+            } catch (IOException ignore) {
+            } finally {
+                if (br != null) {
+                    try {
+                        br.close();
+                    } catch (IOException ignore) { }
+                }
+            }
+        }
+
+        private static String readLineIgnoreException(BufferedReader reader) throws IOException {
+            try {
+                return reader.readLine();
+            } catch (EOFException ignore) {
+                return null;
+            }
+        }
+    }
 }
diff --git a/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java b/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
index 9980327..70fc51a 100644
--- a/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
+++ b/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
@@ -610,6 +610,7 @@
             executeSilentShellCommand("cmd battery unplug");
             executeSilentShellCommand("settings put global low_power 1");
         } else {
+            executeSilentShellCommand("settings put global low_power 0");
             turnBatteryOn();
         }
     }
diff --git a/hostsidetests/theme/README b/hostsidetests/theme/README
index d585db3..b2ae8de 100644
--- a/hostsidetests/theme/README
+++ b/hostsidetests/theme/README
@@ -66,14 +66,32 @@
 
 III. Running theme tests
 
-1. Connect the device that you wish to test. Confirm that is is connected with:
+To obtain reliable results, theme tests should be run against the device's
+native density; however, many of the tests will also work in a scaled density.
+If you don't possess a device for a given density and would still like to run
+tests for that density, you can manually force scaling via:
 
-   adb devices
+  adb shell wm density <dpi>
 
-2. Run the theme tests using cts-tradefed:
+As of API 24, the results will NOT be 100% reliable due to scaling artifacts.
+To reset the device to its native density, run:
 
-   cts-tradefed run singleCommand cts --skip-device-info --skip-preconditions \
-       --skip-connectivity-check --module CtsThemeHostTestCases \
-       --test android.theme.cts.ThemeHostTest
+  adb shell wm density reset
 
-3. Wait for the tests to complete. This should take less than five minutes.
+Once the device is in the desired state, do the following:
+
+  1. Connect the device that you wish to test. Confirm that is is connected with:
+
+     adb devices
+
+  2. Run the theme tests using cts-tradefed:
+
+     cts-tradefed run singleCommand cts-dev --module CtsThemeHostTestCases \
+         --test android.theme.cts.ThemeHostTest
+
+  3. Wait for the tests to complete. This should take less than five minutes.
+
+If any tests failures are encountered, diff PNGs will be generated and collected
+in a ZIP file in the tmp directory. Look for the following test output:
+
+  I/ThemeHostTest: Wrote <N> failures to file: /tmp/failures<random-number>.zip
diff --git a/hostsidetests/theme/app/src/android/theme/app/ThemeTestUtils.java b/hostsidetests/theme/app/src/android/theme/app/ThemeTestUtils.java
index 4daca6c..e83d216 100644
--- a/hostsidetests/theme/app/src/android/theme/app/ThemeTestUtils.java
+++ b/hostsidetests/theme/app/src/android/theme/app/ThemeTestUtils.java
@@ -42,7 +42,7 @@
         }
 
         final ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(file));
-        final byte[] data = new byte[4096];
+        final byte[] data = new byte[8192];
         for (int i = 0; i < srcFiles.length; i++) {
             final FileInputStream fileIn = new FileInputStream(srcFiles[i]);
             final ZipEntry entry = new ZipEntry(srcFiles[i].getName());
diff --git a/hostsidetests/theme/assets/24/xxxhdpi.zip b/hostsidetests/theme/assets/24/xxxhdpi.zip
new file mode 100644
index 0000000..c058118
--- /dev/null
+++ b/hostsidetests/theme/assets/24/xxxhdpi.zip
Binary files differ
diff --git a/hostsidetests/theme/src/android/theme/cts/ComparisonTask.java b/hostsidetests/theme/src/android/theme/cts/ComparisonTask.java
index c7a5d7c..5f4a741 100755
--- a/hostsidetests/theme/src/android/theme/cts/ComparisonTask.java
+++ b/hostsidetests/theme/src/android/theme/cts/ComparisonTask.java
@@ -31,7 +31,7 @@
 /**
  * Compares the images generated by the device with the reference images.
  */
-public class ComparisonTask implements Callable<Boolean> {
+public class ComparisonTask implements Callable<File> {
     private static final String TAG = "ComparisonTask";
 
     private static final int IMAGE_THRESHOLD = 2;
@@ -44,25 +44,21 @@
         mActual = actual;
     }
 
-    public Boolean call() {
-        boolean success = false;
-
+    public File call() {
         try {
             final BufferedImage expected = ImageIO.read(mExpected);
             final BufferedImage actual = ImageIO.read(mActual);
-            if (compare(expected, actual, IMAGE_THRESHOLD)) {
-                success = true;
-            } else {
+            if (!compare(expected, actual, IMAGE_THRESHOLD)) {
                 final File diff = File.createTempFile("diff_" + mExpected.getName(), ".png");
                 createDiff(expected, actual, diff);
-                Log.logAndDisplay(LogLevel.INFO, TAG, "Diff created: " + diff.getPath());
+                return diff;
             }
         } catch (IOException e) {
             Log.logAndDisplay(LogLevel.ERROR, TAG, e.toString());
             e.printStackTrace();
         }
 
-        return success;
+        return null;
     }
 
     /**
diff --git a/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java b/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
index 519ad84..e04a10b 100644
--- a/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
+++ b/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
@@ -34,14 +34,19 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutorCompletionService;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
+import java.util.zip.ZipOutputStream;
 
 /**
  * Test to check non-modifiable themes have not been changed.
@@ -67,6 +72,9 @@
     private static final String DENSITY_PROP_DEVICE = "ro.sf.lcd_density";
     private static final String DENSITY_PROP_EMULATOR = "qemu.sf.lcd_density";
 
+    /** Shell command used to obtain current device density. */
+    private static final String WM_DENSITY = "wm density";
+
     /** Overall test timeout is 30 minutes. Should only take about 5. */
     private static final int TEST_RESULT_TIMEOUT = 30 * 60 * 1000;
 
@@ -84,7 +92,7 @@
 
     private ExecutorService mExecutionService;
 
-    private ExecutorCompletionService<Boolean> mCompletionService;
+    private ExecutorCompletionService<File> mCompletionService;
 
     @Override
     public void setAbi(IAbi abi) {
@@ -185,12 +193,24 @@
 
         final int numTasks = extractGeneratedImages(localZip, mReferences);
 
-        int failures = 0;
+        final List<File> failures = new ArrayList<>();
         for (int i = numTasks; i > 0; i--) {
-            failures += mCompletionService.take().get() ? 0 : 1;
+            final File comparison = mCompletionService.take().get();
+            if (comparison != null) {
+                failures.add(comparison);
+            }
         }
 
-        assertTrue(failures + " failures in theme test", failures == 0);
+        // Generate ZIP file from failure output.
+        final int failureCount = failures.size();
+        if (failureCount != 0) {
+            final File failuresZip = File.createTempFile("failures", ".zip");
+            compressFiles(failures, failuresZip, true);
+            Log.logAndDisplay(LogLevel.INFO, LOG_TAG,
+                    "Wrote " + failureCount+ " failures to file:" + failuresZip.getPath());
+        }
+
+        assertTrue(failureCount + " failures in theme test", failureCount == 0);
     }
 
     private int extractGeneratedImages(File localZip, Map<String, File> references)
@@ -198,7 +218,7 @@
         int numTasks = 0;
 
         // Extract generated images to temporary files.
-        final byte[] data = new byte[4096];
+        final byte[] data = new byte[8192];
         try (ZipInputStream zipInput = new ZipInputStream(new FileInputStream(localZip))) {
             ZipEntry entry;
             while ((entry = zipInput.getNextEntry()) != null) {
@@ -230,6 +250,40 @@
         return numTasks;
     }
 
+    /**
+     * Compresses a list of files to a ZIP file.
+     *
+     * @param files the files to compress
+     * @param outFile the output file
+     * @param remove {@code true} to remove files after compressing them or
+     *               {@code false} to leave them alone
+     */
+    public static void compressFiles(List<File> files, File outFile, boolean remove)
+            throws IOException {
+        final ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(outFile));
+        final byte[] data = new byte[4096];
+        for (File file : files) {
+            final FileInputStream fileIn = new FileInputStream(file);
+            final ZipEntry entry = new ZipEntry(file.getName());
+            zipOut.putNextEntry(entry);
+
+            int count;
+            while ((count = fileIn.read(data, 0, data.length)) != -1) {
+                zipOut.write(data, 0, count);
+                zipOut.flush();
+            }
+
+            zipOut.closeEntry();
+            fileIn.close();
+
+            if (remove) {
+                file.delete();
+            }
+        }
+
+        zipOut.close();
+    }
+
     private boolean generateDeviceImages() throws Exception {
         // Stop any existing instances.
         mDevice.executeShellCommand(STOP_CMD);
@@ -243,38 +297,61 @@
     }
 
     private static String getDensityBucketForDevice(ITestDevice device) {
+        final int density;
+        try {
+            density = getDensityForDevice(device);
+        } catch (DeviceNotAvailableException e) {
+            throw new RuntimeException("Failed to detect device density", e);
+        }
+
+        final String bucket;
+        switch (density) {
+            case 120:
+                bucket = "ldpi";
+                break;
+            case 160:
+                bucket = "mdpi";
+                break;
+            case 213:
+                bucket = "tvdpi";
+                break;
+            case 240:
+                bucket = "hdpi";
+                break;
+            case 320:
+                bucket = "xhdpi";
+                break;
+            case 480:
+                bucket = "xxhdpi";
+                break;
+            case 640:
+                bucket = "xxxhdpi";
+                break;
+            default:
+                bucket = density + "dpi";
+                break;
+        }
+
+        Log.logAndDisplay(LogLevel.INFO, LOG_TAG,
+                "Device density detected as " + density + " (" + bucket + ")");
+        return bucket;
+    }
+
+    private static int getDensityForDevice(ITestDevice device) throws DeviceNotAvailableException {
+        final String output = device.executeShellCommand(WM_DENSITY);
+        final Pattern p = Pattern.compile("Override density: (\\d+)");
+        final Matcher m = p.matcher(output);
+        if (m.find()) {
+            return Integer.parseInt(m.group(1));
+        }
+
         final String densityProp;
         if (device.getSerialNumber().startsWith("emulator-")) {
             densityProp = DENSITY_PROP_EMULATOR;
         } else {
             densityProp = DENSITY_PROP_DEVICE;
         }
-
-        final int density;
-        try {
-            density = Integer.parseInt(device.getProperty(densityProp));
-        } catch (DeviceNotAvailableException e) {
-            return "unknown";
-        }
-
-        switch (density) {
-            case 120:
-                return "ldpi";
-            case 160:
-                return "mdpi";
-            case 213:
-                return "tvdpi";
-            case 240:
-                return "hdpi";
-            case 320:
-                return "xhdpi";
-            case 480:
-                return "xxhdpi";
-            case 640:
-                return "xxxhdpi";
-            default:
-                return density + "dpi";
-        }
+        return Integer.parseInt(device.getProperty(densityProp));
     }
 
     private static boolean checkHardwareTypeSkipTest(String hardwareTypeString) {
diff --git a/tests/deviceadmin/uninstalltest/src/android/devicepolicy/cts/uiautomatertest/DeviceAdminUninstallTest.java b/tests/deviceadmin/uninstalltest/src/android/devicepolicy/cts/uiautomatertest/DeviceAdminUninstallTest.java
index d070cb0..a8e7cc1 100644
--- a/tests/deviceadmin/uninstalltest/src/android/devicepolicy/cts/uiautomatertest/DeviceAdminUninstallTest.java
+++ b/tests/deviceadmin/uninstalltest/src/android/devicepolicy/cts/uiautomatertest/DeviceAdminUninstallTest.java
@@ -37,7 +37,7 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.List;
-
+import java.util.regex.Pattern;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.runner.AndroidJUnit4;
 import android.support.test.filters.LargeTest;
@@ -58,13 +58,16 @@
     private static final String DEVICE_ADMIN_PACKAGE_NAME =
             "android.devicepolicy.cts.emptydeviceadmin";
     private static final String URI_PACKAGE_PREFIX = "package:";
+    private static final String UNINSTALL_BUTTON_TEXT_REGEX = "(?i)uninstall";
 
     private static final UiSelector DEACTIVATE_AND_UNINSTALL_BUTTON_SELECTOR = new UiSelector()
             .resourceId("com.android.settings:id/action_button");
+    // Changing the below two selectors to match the button based on text due to b/29960172
     private static final UiSelector UNINSTALL_BUTTON_SELECTOR = new UiSelector()
-            .resourceId("com.android.settings:id/left_button");
+            .clickable(true).textMatches(UNINSTALL_BUTTON_TEXT_REGEX);
     private static final BySelector UNINSTALL_BUTTON_BYSELECTOR = By
-            .res("com.android.settings", "left_button");
+            .clickable(true).text(Pattern.compile(UNINSTALL_BUTTON_TEXT_REGEX));
+
     private static final UiSelector OK_BUTTON_SELECTOR = new UiSelector()
             .resourceId("android:id/button1");
     private static final UiSelector SCROLL_VIEW_SELECTOR =
diff --git a/tests/dram/src/android/dram/cts/BandwidthTest.java b/tests/dram/src/android/dram/cts/BandwidthTest.java
index 1eb307b..fe7e248 100644
--- a/tests/dram/src/android/dram/cts/BandwidthTest.java
+++ b/tests/dram/src/android/dram/cts/BandwidthTest.java
@@ -36,8 +36,9 @@
 public class BandwidthTest extends CtsAndroidTestCase {
     private static final String TAG = BandwidthTest.class.getSimpleName();
     private static final String REPORT_LOG_NAME = "CtsDramTestCases";
-    private static final int MEMCPY_REPETITION = 10;
-    private static final int MEMSET_REPETITION = 30;
+    // data length is odd to prevent rare cases that all data are rejected.
+    private static final int MEMCPY_REPETITION = 11;
+    private static final int MEMSET_REPETITION = 31;
     private static final int REPEAT_IN_EACH_CALL = 100;
     private static final int KB = 1024;
     private static final int MB = 1024 * 1024;
diff --git a/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java b/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java
index 0a3165b..7b74ba7 100644
--- a/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java
+++ b/tests/tests/media/src/android/media/cts/DecodeAccuracyTest.java
@@ -20,6 +20,7 @@
 import android.annotation.TargetApi;
 import android.content.Context;
 import android.graphics.Bitmap;
+import android.util.Log;
 import android.view.View;
 
 @TargetApi(24)
@@ -32,6 +33,20 @@
     private static final int ALLOWED_GREATEST_PIXEL_DIFFERENCE = 90;
     private static final int OFFSET = 10;
 
+    private View videoView;
+    private VideoViewFactory videoViewFactory;
+
+    @Override
+    protected void tearDown() throws Exception {
+        if (videoView != null) {
+            getHelper().cleanUpView(videoView);
+        }
+        if (videoViewFactory != null) {
+            videoViewFactory.release();
+        }
+        super.tearDown();
+    }
+
     /* <------------- Tests Using H264 -------------> */
     public void testH264GLViewVideoDecode() throws Exception {
         runH264DecodeAccuracyTest(
@@ -136,24 +151,33 @@
 
     private void runDecodeAccuracyTest(
             VideoViewFactory videoViewFactory, VideoFormat videoFormat, int goldenResId) {
-        checkNotNull(videoViewFactory);
         checkNotNull(videoFormat);
-        View videoView = videoViewFactory.createView(getHelper().getContext());
-        // If view is intended and available to display.
-        if (videoView != null) {
-            getHelper().generateView(videoView);
+        this.videoViewFactory = checkNotNull(videoViewFactory);
+        this.videoView = videoViewFactory.createView(getHelper().getContext());
+        final int maxRetries = 3;
+        for (int retry = 1; retry <= maxRetries; retry++) {
+            // If view is intended and available to display.
+            if (videoView != null) {
+                getHelper().generateView(videoView);
+            }
+            try {
+                videoViewFactory.waitForViewIsAvailable();
+                break;
+            } catch (Exception exception) {
+                Log.e(TAG, exception.getMessage());
+                if (retry == maxRetries) {
+                    fail("Timeout waiting for a valid surface.");
+                } else {
+                    Log.w(TAG, "Try again...");
+                    bringActivityToFront();
+                }
+            }
         }
-        videoViewFactory.waitForViewIsAvailable();
         // In the case of SurfaceView, VideoViewSnapshot can only capture incoming frames,
         // so it needs to be created before start decoding.
         final VideoViewSnapshot videoViewSnapshot = videoViewFactory.getVideoViewSnapshot();
         decodeVideo(videoFormat, videoViewFactory);
         validateResult(videoFormat, videoViewSnapshot, goldenResId);
-
-        if (videoView != null) {
-            getHelper().cleanUpView(videoView);
-        }
-        videoViewFactory.release();
     }
 
     private void decodeVideo(VideoFormat videoFormat, VideoViewFactory videoViewFactory) {
diff --git a/tests/tests/media/src/android/media/cts/DecodeAccuracyTestActivity.java b/tests/tests/media/src/android/media/cts/DecodeAccuracyTestActivity.java
index da06844..8994c78 100644
--- a/tests/tests/media/src/android/media/cts/DecodeAccuracyTestActivity.java
+++ b/tests/tests/media/src/android/media/cts/DecodeAccuracyTestActivity.java
@@ -27,7 +27,13 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.test_runner_activity);
+    }
+
+    @Override
+    protected void onResume() {
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+        super.onResume();
     }
 
 }
diff --git a/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java b/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java
index 47029d6..fae1bb4 100644
--- a/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java
+++ b/tests/tests/media/src/android/media/cts/DecodeAccuracyTestBase.java
@@ -20,6 +20,7 @@
 import android.annotation.TargetApi;
 import android.app.Activity;
 import android.content.Context;
+import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
@@ -101,6 +102,12 @@
         super.tearDown();
     }
 
+    protected void bringActivityToFront() {
+        Intent intent = new Intent(mContext, DecodeAccuracyTestActivity.class);
+        intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+        mActivity.startActivity(intent);
+    }
+
     protected TestHelper getHelper() {
         return testHelper;
     }
@@ -165,6 +172,7 @@
          * This must be called before decodeFramesAndDisplay.
          */
         private boolean prepare(Surface surface, VideoFormat videoFormat) {
+            Log.i(TAG, "Preparing to decode the media file.");
             if (!setExtractorDataSource(videoFormat)) {
                 return false;
             }
@@ -181,6 +189,7 @@
         /* The function decode video frames and display in a surface. */
         private PlayerResult decodeFramesAndDisplay(
                 Surface surface, int numOfTotalFrames, long timeOutMs) {
+            Log.i(TAG, "Starting decoding.");
             checkNotNull(decoder);
             int numOfDecodedFrames = 0;
             long decodeStart = 0;
@@ -219,11 +228,12 @@
                         numOfDecodedFrames++;
                     }
                 } catch (IllegalStateException exception) {
-                    Log.e(TAG, "IllegalStateException in decodeFramesAndDisplay " + exception);
+                    Log.e(TAG, "IllegalStateException in decodeFramesAndDisplay", exception);
                     break;
                 }
             }
             long totalTime = SystemClock.elapsedRealtime() - decodeStart;
+            Log.i(TAG, "Finishing decoding.");
             return new PlayerResult(true, true, numOfTotalFrames == numOfDecodedFrames, totalTime);
         }
 
@@ -290,12 +300,12 @@
                 decoder.stop();
             } catch (IllegalStateException exception) {
                 // IllegalStateException happens when decoder fail to start.
-                Log.e(TAG, "IllegalStateException in decoder stop" + exception);
+                Log.e(TAG, "IllegalStateException in decoder stop", exception);
             } finally {
                 try {
                     decoder.release();
                 } catch (IllegalStateException exception) {
-                    Log.e(TAG, "IllegalStateException in decoder release" + exception);
+                    Log.e(TAG, "IllegalStateException in decoder release", exception);
                 }
             }
             decoder = null;
@@ -308,7 +318,7 @@
             try {
                 extractor.release();
             } catch (IllegalStateException exception) {
-                Log.e(TAG, "IllegalStateException in extractor release" + exception);
+                Log.e(TAG, "IllegalStateException in extractor release", exception);
             }
         }
 
@@ -521,7 +531,8 @@
 /* Factory for manipulating a {@link View}. */
 abstract class VideoViewFactory {
 
-    public final long VIEW_AVAILABLE_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(1);
+    public static final long VIEW_WAITTIME_MS = TimeUnit.SECONDS.toMillis(1);
+    public static final long DEFAULT_VIEW_AVAILABLE_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(3);
     public static final int VIEW_WIDTH = 480;
     public static final int VIEW_HEIGHT = 360;
 
@@ -533,12 +544,20 @@
 
     public abstract View createView(Context context);
 
-    public abstract void waitForViewIsAvailable();
+    public void waitForViewIsAvailable() throws Exception {
+        waitForViewIsAvailable(DEFAULT_VIEW_AVAILABLE_TIMEOUT_MS);
+    };
+
+    public abstract void waitForViewIsAvailable(long timeOutMs) throws Exception;
 
     public abstract Surface getSurface();
 
     public abstract VideoViewSnapshot getVideoViewSnapshot();
 
+    public boolean hasLooper() {
+        return Looper.myLooper() != null;
+    }
+
 }
 
 /* Factory for building a {@link TextureView}. */
@@ -555,6 +574,7 @@
 
     @Override
     public TextureView createView(Context context) {
+        Log.i(TAG, "Creating a " + NAME);
         textureView = DecodeAccuracyTestBase.checkNotNull(new TextureView(context));
         textureView.setSurfaceTextureListener(this);
         return textureView;
@@ -581,16 +601,22 @@
     }
 
     @Override
-    public void waitForViewIsAvailable() {
-        while (!textureView.isAvailable()) {
+    public void waitForViewIsAvailable(long timeOutMs) throws Exception {
+        final long start = SystemClock.elapsedRealtime();
+        while (SystemClock.elapsedRealtime() - start < timeOutMs && !textureView.isAvailable()) {
             synchronized (syncToken) {
                 try {
-                    syncToken.wait(VIEW_AVAILABLE_TIMEOUT_MS);
-                } catch (InterruptedException exception) {
-                    Log.e(TAG, "Taking too long to attach a TextureView to a window.", exception);
+                    syncToken.wait(VIEW_WAITTIME_MS);
+                } catch (InterruptedException e) {
+                    Log.e(TAG, "Exception occurred when attaching a TextureView to a window.", e);
+                    throw new InterruptedException(e.getMessage());
                 }
             }
         }
+        if (!textureView.isAvailable()) {
+            throw new InterruptedException("Taking too long to attach a TextureView to a window.");
+        }
+        Log.i(TAG, NAME + " is available.");
     }
 
     @Override
@@ -646,7 +672,10 @@
 
     @Override
     public View createView(Context context) {
-        Looper.prepare();
+        Log.i(TAG, "Creating a " + NAME);
+        if (!super.hasLooper()) {
+            Looper.prepare();
+        }
         surfaceView = new SurfaceView(context);
         surfaceHolder = surfaceView.getHolder();
         surfaceHolder.addCallback(this);
@@ -654,16 +683,22 @@
     }
 
     @Override
-    public void waitForViewIsAvailable() {
-        while (!getSurface().isValid()) {
+    public void waitForViewIsAvailable(long timeOutMs) throws Exception {
+        final long start = SystemClock.elapsedRealtime();
+        while (SystemClock.elapsedRealtime() - start < timeOutMs && !getSurface().isValid()) {
             synchronized (syncToken) {
                 try {
-                    syncToken.wait(VIEW_AVAILABLE_TIMEOUT_MS);
-                } catch (InterruptedException exception) {
-                    Log.e(TAG, "Taking too long to attach a SurfaceView to a window.", exception);
+                    syncToken.wait(VIEW_WAITTIME_MS);
+                } catch (InterruptedException e) {
+                    Log.e(TAG, "Exception occurred when attaching a SurfaceView to a window.", e);
+                    throw new InterruptedException(e.getMessage());
                 }
             }
         }
+        if (!getSurface().isValid()) {
+            throw new InterruptedException("Taking too long to attach a SurfaceView to a window.");
+        }
+        Log.i(TAG, NAME + " is available.");
     }
 
     @Override
@@ -722,6 +757,7 @@
 
     @Override
     public View createView(Context context) {
+        Log.i(TAG, "Creating a " + NAME);
         // Do all GL rendering in the GL thread.
         glSurfaceViewThread = new GLSurfaceViewThread();
         glSurfaceViewThread.start();
@@ -730,16 +766,25 @@
     }
 
     @Override
-    public void waitForViewIsAvailable() {
-        while (glSurfaceViewThread.getSurface() == null) {
+    public void waitForViewIsAvailable(long timeOutMs) throws Exception {
+        final long start = SystemClock.elapsedRealtime();
+        while (SystemClock.elapsedRealtime() - start < timeOutMs
+                && glSurfaceViewThread.getSurface() == null) {
             synchronized (surfaceSyncToken) {
                 try {
-                    surfaceSyncToken.wait(VIEW_AVAILABLE_TIMEOUT_MS);
-                } catch (InterruptedException exception) {
-                    Log.e(TAG, "Taking too long for the surface to become available.", exception);
+                    surfaceSyncToken.wait(VIEW_WAITTIME_MS);
+                } catch (InterruptedException e) {
+                    Log.e(TAG, "Exception occurred when waiting for the surface from"
+                            + " GLSurfaceView to become available.", e);
+                    throw new InterruptedException(e.getMessage());
                 }
             }
         }
+        if (glSurfaceViewThread.getSurface() == null) {
+            throw new InterruptedException("Taking too long for the surface from"
+                    + " GLSurfaceView to become available.");
+        }
+        Log.i(TAG, NAME + " is available.");
     }
 
     @Override
@@ -1144,8 +1189,8 @@
                         }
                         Thread.sleep(PIXELCOPY_REQUEST_SLEEP_MS);
                     }
-                } catch (InterruptedException ex) {
-                    Log.w(TAG, "Pixel Copy is stopped/interrupted before it finishes", ex);
+                } catch (InterruptedException e) {
+                    Log.w(TAG, "Pixel Copy is stopped/interrupted before it finishes.", e);
                 }
                 copyHelper.release();
             }
@@ -1191,8 +1236,13 @@
 
         public int request(SurfaceView source, Bitmap dest) {
             synchronized (this) {
-                PixelCopy.request(source, dest, this, handler);
-                return getResultLocked();
+                try {
+                    PixelCopy.request(source, dest, this, handler);
+                    return getResultLocked();
+                } catch (Exception e) {
+                    Log.e(TAG, "Exception occurred when copying a SurfaceView.", e);
+                    return -1;
+                }
             }
         }
 
@@ -1243,8 +1293,8 @@
     public synchronized void run() {
         try {
             waitForByteBuffer();
-        } catch (InterruptedException exception) {
-            Log.w(TAG, exception.getMessage());
+        } catch (InterruptedException e) {
+            Log.w(TAG, e.getMessage());
             Log.w(TAG, "ByteBuffer may contain incorrect pixels.");
         }
         // Get ByteBuffer anyway. Let the test fail if ByteBuffer contains incorrect pixels.
diff --git a/tests/tests/media/src/android/media/cts/DecoderTest.java b/tests/tests/media/src/android/media/cts/DecoderTest.java
index 0e61df6..db67d87 100755
--- a/tests/tests/media/src/android/media/cts/DecoderTest.java
+++ b/tests/tests/media/src/android/media/cts/DecoderTest.java
@@ -2742,6 +2742,32 @@
     }
 
     /**
+     * Returns true if there exists a codec supporting the given MIME type that meets the
+     * minimum specification for VR high performance requirements.
+     *
+     * The requirements are as follows:
+     *   - At least 243000 blocks per second (where blocks are defined as 16x16 -- note this
+     *   is equivalent to 1920x1080@30fps)
+     *   - Feature adaptive-playback present
+     */
+    private static boolean doesMimeTypeHaveMinimumSpecVrReadyCodec(String mimeType) {
+        List<CodecCapabilities> caps = getCodecCapabilitiesForMimeType(mimeType);
+        for (CodecCapabilities c : caps) {
+            if (!c.isFeatureSupported(CodecCapabilities.FEATURE_AdaptivePlayback)) {
+                continue;
+            }
+
+            if (!c.getVideoCapabilities().areSizeAndRateSupported(1920, 1080, 30.0)) {
+                continue;
+            }
+
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
      * Returns true if there exists a codec supporting the given MIME type that meets VR high
      * performance requirements.
      *
@@ -2772,69 +2798,6 @@
         return false;
     }
 
-    private class DecodeRunnable implements Runnable {
-        private int video;
-        private int frames;
-        private long durationMillis;
-
-        public DecodeRunnable(int video) {
-            this.video = video;
-            this.frames = 0;
-            this.durationMillis = 0;
-        }
-
-        @Override
-        public void run() {
-            long start = System.currentTimeMillis();
-            int actual = 0;
-            try {
-                actual = countFrames(this.video, RESET_MODE_NONE, -1, null);
-            } catch (Exception e) {
-                actual = -1;
-            }
-            long durationMillis = System.currentTimeMillis() - start;
-
-            synchronized (this) {
-                this.frames = actual;
-                this.durationMillis = durationMillis;
-            }
-        }
-
-        public synchronized int getFrames() {
-            return this.frames;
-        }
-
-        public synchronized double getMeasuredFps() {
-            return this.frames / (this.durationMillis / 1000.0);
-        }
-    }
-
-    private void decodeInParallel(int video, int frames, int fps, int parallel) throws Exception {
-        DecodeRunnable[] runnables = new DecodeRunnable[parallel];
-        Thread[] threads = new Thread[parallel];
-
-        for (int i = 0; i < parallel; ++i) {
-            runnables[i] = new DecodeRunnable(video);
-            threads[i] = new Thread(runnables[i]);
-            threads[i].start();
-        }
-
-        for (Thread t : threads) {
-            t.join();
-        }
-
-        for (DecodeRunnable dr : runnables) {
-            assertTrue("Expected to decode " + frames + " frames, found " + dr.getFrames(),
-                    frames == dr.getFrames());
-        }
-
-        for (DecodeRunnable dr : runnables) {
-            Log.d(TAG, "Decoded at " + dr.getMeasuredFps());
-            assertTrue("Expected to decode at " + fps + " fps, measured " + dr.getMeasuredFps(),
-                    fps < dr.getMeasuredFps());
-        }
-    }
-
     public void testVrHighPerformanceH264() throws Exception {
         if (!supportsVrHighPerformance()) {
             MediaUtils.skipTest(TAG, "FEATURE_VR_MODE_HIGH_PERFORMANCE not present");
@@ -2843,16 +2806,6 @@
 
         boolean h264IsReady = doesMimeTypeHaveVrReadyCodec(MediaFormat.MIMETYPE_VIDEO_AVC);
         assertTrue("Did not find a VR ready H.264 decoder", h264IsReady);
-
-        // Test throughput by decoding 1920x1080 @ 30fps x 4 instances.
-        decodeInParallel(
-                R.raw.bbb_s4_1920x1080_wide_mp4_h264_mp4_20mbps_30fps_aac_he_5ch_200kbps_44100hz,
-                150, 30, 4);
-
-        // Test throughput by decoding 1920x1080 @ 60fps x 2 instances.
-        decodeInParallel(
-                R.raw.bbb_s2_1920x1080_mp4_h264_mp42_20mbps_60fps_aac_he_v2_5ch_160kbps_48000hz,
-                300, 60, 2);
     }
 
     public void testVrHighPerformanceHEVC() throws Exception {
@@ -2861,17 +2814,14 @@
             return;
         }
 
+        // Test minimum mandatory requirements.
+        assertTrue(doesMimeTypeHaveMinimumSpecVrReadyCodec(MediaFormat.MIMETYPE_VIDEO_HEVC));
+
         boolean hevcIsReady = doesMimeTypeHaveVrReadyCodec(MediaFormat.MIMETYPE_VIDEO_HEVC);
         if (!hevcIsReady) {
-            MediaUtils.skipTest(TAG, "HEVC isn't required to be VR ready");
+            Log.d(TAG, "HEVC isn't required to be VR ready");
             return;
         }
-
-        // Test throughput by decoding 1920x1080 @ 30fps x 4 instances.
-        decodeInParallel(
-                // using the 60fps sample to save on apk size, but decoding only at 30fps @ 5Mbps
-                R.raw.bbb_s2_1920x1080_mp4_hevc_mp41_10mbps_60fps_aac_lc_6ch_384kbps_22050hz,
-                300, 30 /* fps */, 4);
     }
 
     public void testVrHighPerformanceVP9() throws Exception {
@@ -2880,17 +2830,14 @@
             return;
         }
 
+        // Test minimum mandatory requirements.
+        assertTrue(doesMimeTypeHaveMinimumSpecVrReadyCodec(MediaFormat.MIMETYPE_VIDEO_VP9));
+
         boolean vp9IsReady = doesMimeTypeHaveVrReadyCodec(MediaFormat.MIMETYPE_VIDEO_VP9);
         if (!vp9IsReady) {
-            MediaUtils.skipTest(TAG, "VP9 isn't required to be VR ready");
+            Log.d(TAG, "VP9 isn't required to be VR ready");
             return;
         }
-
-        // Test throughput by decoding 1920x1080 @ 30fps x 4 instances.
-        decodeInParallel(
-                // using the 60fps sample to save on apk size, but decoding only at 30fps @ 5Mbps
-                R.raw.bbb_s2_1920x1080_webm_vp9_0p41_10mbps_60fps_vorbis_6ch_384kbps_22050hz,
-                300, 30 /* fps */, 4);
     }
 
     private boolean supportsVrHighPerformance() {
diff --git a/tests/tests/os/jni/seccomp_sample_program.cpp b/tests/tests/os/jni/seccomp_sample_program.cpp
index 3bc7da4..cb15aff 100644
--- a/tests/tests/os/jni/seccomp_sample_program.cpp
+++ b/tests/tests/os/jni/seccomp_sample_program.cpp
@@ -34,271 +34,283 @@
   {0x35, 0, 10, 0x168},
   {0x35, 0, 5, 0x181},
   {0x35, 0, 2, 0xf0006},
-  {0x35, 0, 58, 0xffff0},
-  {0x35, 57, 55, 0xffff1},
-  {0x35, 0, 43, 0x182},
-  {0x35, 53, 55, 0xf0001},
+  {0x35, 0, 72, 0xffff0},
+  {0x35, 71, 67, 0xffff1},
+  {0x35, 0, 67, 0x182},
+  {0x35, 65, 69, 0xf0001},
   {0x35, 0, 2, 0x16f},
-  {0x35, 0, 53, 0x17e},
-  {0x35, 52, 39, 0x180},
-  {0x35, 38, 51, 0x16e},
+  {0x35, 0, 67, 0x17e},
+  {0x35, 66, 63, 0x180},
+  {0x35, 62, 65, 0x16e},
   {0x35, 0, 5, 0x15b},
   {0x35, 0, 2, 0x160},
-  {0x35, 0, 35, 0x161},
-  {0x35, 45, 47, 0x165},
-  {0x35, 0, 46, 0x15c},
-  {0x35, 45, 32, 0x15d},
+  {0x35, 0, 59, 0x161},
+  {0x35, 57, 61, 0x165},
+  {0x35, 0, 60, 0x15c},
+  {0x35, 59, 56, 0x15d},
   {0x35, 0, 2, 0x152},
-  {0x35, 0, 30, 0x153},
-  {0x35, 40, 42, 0x15a},
-  {0x35, 41, 39, 0x151},
+  {0x35, 0, 54, 0x153},
+  {0x35, 52, 56, 0x15a},
+  {0x35, 55, 51, 0x151},
   {0x35, 0, 10, 0x121},
   {0x35, 0, 5, 0x138},
   {0x35, 0, 2, 0x143},
-  {0x35, 0, 24, 0x147},
-  {0x35, 23, 34, 0x148},
-  {0x35, 0, 22, 0x139},
-  {0x35, 32, 34, 0x142},
+  {0x35, 0, 48, 0x147},
+  {0x35, 47, 46, 0x148},
+  {0x35, 0, 46, 0x139},
+  {0x35, 44, 48, 0x142},
   {0x35, 0, 2, 0x127},
-  {0x35, 0, 30, 0x12a},
-  {0x35, 31, 18, 0x135},
-  {0x35, 30, 28, 0x126},
+  {0x35, 0, 42, 0x12a},
+  {0x35, 45, 42, 0x135},
+  {0x35, 44, 40, 0x126},
   {0x35, 0, 4, 0x10e},
   {0x35, 0, 2, 0x119},
-  {0x35, 0, 14, 0x11e},
-  {0x35, 137, 26, 0x120},
-  {0x35, 23, 25, 0x118},
+  {0x35, 0, 38, 0x11e},
+  {0x35, 137, 40, 0x120},
+  {0x35, 35, 39, 0x118},
   {0x35, 0, 3, 0x10b},
-  {0x35, 0, 23, 0x10c},
-  {0x35, 9, 0, 0x10d},
-  {0x5, 0, 0, 0x110},
-  {0x35, 7, 20, 0x10a},
-  {0x35, 0, 25, 0xce},
-  {0x35, 0, 12, 0xee},
-  {0x35, 0, 6, 0xf9},
+  {0x35, 0, 37, 0x10c},
+  {0x35, 33, 0, 0x10d},
+  {0x5, 0, 0, 0x11c},
+  {0x35, 31, 34, 0x10a},
+  {0x35, 0, 22, 0xce},
+  {0x35, 0, 11, 0xee},
+  {0x35, 0, 5, 0xf9},
   {0x35, 0, 2, 0x100},
-  {0x35, 0, 13, 0x101},
-  {0x35, 129, 14, 0x107},
-  {0x35, 1, 0, 0xfa},
-  {0x5, 0, 0, 0x10d},
-  {0x35, 11, 9, 0xfd},
+  {0x35, 0, 25, 0x101},
+  {0x35, 129, 28, 0x107},
+  {0x35, 0, 24, 0xfa},
+  {0x35, 26, 22, 0xfd},
   {0x35, 0, 2, 0xf0},
-  {0x35, 0, 148, 0xf1},
-  {0x35, 6, 8, 0xf8},
-  {0x35, 7, 0, 0xef},
-  {0x5, 0, 0, 0x106},
-  {0x35, 0, 7, 0xda},
-  {0x35, 0, 3, 0xde},
-  {0x35, 0, 3, 0xe0},
-  {0x35, 2, 0, 0xe1},
-  {0x5, 0, 0, 0x103},
-  {0x35, 1, 0, 0xdc},
-  {0x5, 0, 0, 0x102},
-  {0x35, 209, 172, 0xdd},
+  {0x35, 0, 149, 0xf1},
+  {0x35, 19, 23, 0xf8},
+  {0x35, 22, 0, 0xef},
+  {0x5, 0, 0, 0x113},
+  {0x35, 0, 5, 0xda},
+  {0x35, 0, 2, 0xde},
+  {0x35, 0, 18, 0xe0},
+  {0x35, 17, 13, 0xe1},
+  {0x35, 0, 16, 0xdc},
+  {0x35, 224, 175, 0xdd},
   {0x35, 0, 2, 0xd2},
-  {0x35, 0, 253, 0xd3},
-  {0x35, 252, 253, 0xd4},
-  {0x35, 252, 251, 0xd1},
-  {0x35, 0, 10, 0xb9},
-  {0x35, 0, 5, 0xc1},
+  {0x35, 0, 10, 0xd3},
+  {0x35, 9, 8, 0xd4},
+  {0x35, 7, 8, 0xd1},
+  {0x35, 0, 13, 0xb9},
+  {0x35, 0, 7, 0xc1},
   {0x35, 0, 2, 0xc7},
-  {0x35, 0, 248, 0xcb},
-  {0x35, 247, 246, 0xcd},
-  {0x35, 0, 245, 0xc5},
-  {0x35, 244, 245, 0xc6},
-  {0x35, 0, 2, 0xbb},
-  {0x35, 0, 244, 0xbf},
-  {0x35, 162, 242, 0xc0},
-  {0x35, 241, 240, 0xba},
+  {0x35, 0, 3, 0xcb},
+  {0x35, 2, 3, 0xcd},
+  {0x35, 0, 2, 0xc5},
+  {0x35, 1, 0, 0xc6},
+  {0x5, 0, 0, 0x103},
+  {0x5, 0, 0, 0x101},
+  {0x35, 0, 3, 0xbb},
+  {0x35, 1, 0, 0xbf},
+  {0x5, 0, 0, 0x100},
+  {0x35, 162, 254, 0xc0},
+  {0x35, 253, 252, 0xba},
   {0x35, 0, 4, 0xb2},
   {0x35, 0, 2, 0xb5},
-  {0x35, 0, 239, 0xb6},
-  {0x35, 237, 236, 0xb8},
-  {0x35, 236, 237, 0xb4},
+  {0x35, 0, 251, 0xb6},
+  {0x35, 249, 248, 0xb8},
+  {0x35, 248, 249, 0xb4},
   {0x35, 0, 2, 0xad},
-  {0x35, 0, 234, 0xb0},
-  {0x35, 233, 234, 0xb1},
-  {0x35, 156, 232, 0xac},
+  {0x35, 0, 246, 0xb0},
+  {0x35, 245, 246, 0xb1},
+  {0x35, 156, 244, 0xac},
   {0x35, 0, 42, 0x52},
   {0x35, 0, 21, 0x7e},
   {0x35, 0, 10, 0x96},
   {0x35, 0, 5, 0xa4},
   {0x35, 0, 2, 0xa8},
-  {0x35, 0, 226, 0xa9},
-  {0x35, 224, 226, 0xaa},
-  {0x35, 0, 223, 0xa5},
-  {0x35, 224, 223, 0xa6},
+  {0x35, 0, 238, 0xa9},
+  {0x35, 236, 238, 0xaa},
+  {0x35, 0, 235, 0xa5},
+  {0x35, 236, 235, 0xa6},
   {0x35, 0, 2, 0x9e},
-  {0x35, 0, 221, 0x9f},
-  {0x35, 220, 221, 0xa2},
-  {0x35, 220, 219, 0x98},
+  {0x35, 0, 233, 0x9f},
+  {0x35, 232, 233, 0xa2},
+  {0x35, 232, 231, 0x98},
   {0x35, 0, 5, 0x8c},
   {0x35, 0, 2, 0x90},
-  {0x35, 0, 217, 0x91},
-  {0x35, 216, 215, 0x94},
-  {0x35, 0, 214, 0x8d},
-  {0x35, 213, 212, 0x8e},
+  {0x35, 0, 229, 0x91},
+  {0x35, 228, 227, 0x94},
+  {0x35, 0, 226, 0x8d},
+  {0x35, 225, 224, 0x8e},
   {0x35, 0, 2, 0x85},
-  {0x35, 0, 210, 0x86},
-  {0x35, 209, 211, 0x8a},
-  {0x35, 210, 209, 0x7f},
+  {0x35, 0, 222, 0x86},
+  {0x35, 221, 223, 0x8a},
+  {0x35, 222, 221, 0x7f},
   {0x35, 0, 10, 0x64},
   {0x35, 0, 5, 0x73},
   {0x35, 0, 2, 0x7a},
-  {0x35, 0, 205, 0x7b},
-  {0x35, 153, 205, 0x7d},
-  {0x35, 0, 204, 0x77},
-  {0x35, 203, 202, 0x79},
+  {0x35, 0, 217, 0x7b},
+  {0x35, 165, 217, 0x7d},
+  {0x35, 0, 216, 0x77},
+  {0x35, 215, 214, 0x79},
   {0x35, 0, 2, 0x6c},
-  {0x35, 0, 200, 0x6d},
-  {0x35, 199, 200, 0x72},
-  {0x35, 197, 199, 0x6a},
+  {0x35, 0, 212, 0x6d},
+  {0x35, 211, 212, 0x72},
+  {0x35, 209, 211, 0x6a},
   {0x35, 0, 4, 0x5b},
   {0x35, 0, 2, 0x60},
-  {0x35, 0, 195, 0x62},
-  {0x35, 193, 195, 0x63},
-  {0x35, 192, 193, 0x5c},
+  {0x35, 0, 207, 0x62},
+  {0x35, 205, 207, 0x63},
+  {0x35, 204, 205, 0x5c},
   {0x35, 0, 2, 0x54},
-  {0x35, 0, 192, 0x55},
-  {0x35, 191, 189, 0x57},
-  {0x35, 188, 190, 0x53},
+  {0x35, 0, 204, 0x55},
+  {0x35, 203, 201, 0x57},
+  {0x35, 200, 202, 0x53},
   {0x35, 0, 21, 0x2d},
   {0x35, 0, 10, 0x3e},
   {0x35, 0, 5, 0x46},
   {0x35, 0, 2, 0x4f},
-  {0x35, 0, 185, 0x50},
-  {0x35, 182, 183, 0x51},
-  {0x35, 0, 181, 0x48},
-  {0x35, 181, 182, 0x4e},
+  {0x35, 0, 197, 0x50},
+  {0x35, 194, 195, 0x51},
+  {0x35, 0, 193, 0x48},
+  {0x35, 193, 194, 0x4e},
   {0x35, 0, 2, 0x41},
-  {0x35, 0, 180, 0x43},
-  {0x35, 179, 178, 0x44},
-  {0x35, 177, 176, 0x3f},
+  {0x35, 0, 192, 0x43},
+  {0x35, 191, 190, 0x44},
+  {0x35, 189, 188, 0x3f},
   {0x35, 0, 5, 0x33},
   {0x35, 0, 2, 0x38},
-  {0x35, 0, 175, 0x3c},
-  {0x35, 174, 172, 0x3d},
-  {0x35, 0, 173, 0x36},
-  {0x35, 124, 171, 0x37},
+  {0x35, 0, 187, 0x3c},
+  {0x35, 186, 184, 0x3d},
+  {0x35, 0, 185, 0x36},
+  {0x35, 136, 183, 0x37},
   {0x35, 0, 2, 0x2f},
-  {0x35, 0, 169, 0x30},
-  {0x35, 168, 169, 0x31},
-  {0x35, 166, 167, 0x2e},
+  {0x35, 0, 181, 0x30},
+  {0x35, 180, 181, 0x31},
+  {0x35, 178, 179, 0x2e},
   {0x35, 0, 10, 0x17},
   {0x35, 0, 5, 0x21},
   {0x35, 0, 2, 0x26},
-  {0x35, 0, 162, 0x29},
-  {0x35, 163, 162, 0x2b},
-  {0x35, 0, 160, 0x22},
-  {0x35, 153, 161, 0x25},
+  {0x35, 0, 174, 0x29},
+  {0x35, 175, 174, 0x2b},
+  {0x35, 0, 172, 0x22},
+  {0x35, 165, 173, 0x25},
   {0x35, 0, 2, 0x19},
-  {0x35, 0, 159, 0x1d},
-  {0x35, 158, 157, 0x1e},
-  {0x35, 156, 155, 0x18},
+  {0x35, 0, 171, 0x1d},
+  {0x35, 170, 169, 0x1e},
+  {0x35, 168, 167, 0x18},
   {0x35, 0, 4, 0xd},
   {0x35, 0, 2, 0x11},
-  {0x35, 0, 154, 0x13},
-  {0x35, 153, 152, 0x15},
-  {0x35, 150, 152, 0xe},
+  {0x35, 0, 166, 0x13},
+  {0x35, 165, 164, 0x15},
+  {0x35, 162, 164, 0xe},
   {0x35, 0, 2, 0x3},
-  {0x35, 0, 149, 0x7},
-  {0x35, 147, 149, 0x8},
-  {0x35, 146, 147, 0x2},
+  {0x35, 0, 161, 0x7},
+  {0x35, 159, 161, 0x8},
+  {0x35, 158, 159, 0x2},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 152, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 155, 156, 0x1},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 148, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 151, 0, 0x1},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 144, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 147, 0, 0x6},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 140, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 143, 144, 0x1},
+  {0x15, 143, 0, 0x2},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 136, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 139, 0, 0x1},
+  {0x15, 139, 0, 0x0},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 132, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 135, 0, 0x6},
+  {0x15, 135, 0, 0x5},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 128, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 131, 0, 0x2},
-  {0x20, 0, 0, 0x14},
+  {0x15, 131, 132, 0x3},
+  {0x20, 0, 0, 0x1c},
   {0x15, 0, 124, 0x0},
-  {0x20, 0, 0, 0x10},
-  {0x15, 127, 0, 0x0},
-  {0x20, 0, 0, 0x14},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 127, 0xfffffe7f},
+  {0x20, 0, 0, 0x1c},
   {0x15, 0, 120, 0x0},
-  {0x20, 0, 0, 0x10},
-  {0x15, 123, 0, 0x5},
-  {0x20, 0, 0, 0x14},
-  {0x15, 0, 116, 0x0},
-  {0x20, 0, 0, 0x10},
-  {0x15, 119, 120, 0x3},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 0, 112, 0x0},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 115, 0xfffffe7f},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 0, 108, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 110, 0, 0x1},
+  {0x15, 122, 0, 0x1},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 103, 0x0},
+  {0x15, 0, 115, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 105, 0, 0x3},
+  {0x15, 117, 0, 0x3},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 98, 0x0},
+  {0x15, 0, 110, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 100, 0, 0x4},
+  {0x15, 112, 0, 0x4},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 93, 0x0},
+  {0x15, 0, 105, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 95, 0, 0x5},
+  {0x15, 107, 0, 0x5},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 88, 0x0},
+  {0x15, 0, 100, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 90, 0, 0x9},
+  {0x15, 102, 0, 0x9},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 83, 0x0},
+  {0x15, 0, 95, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 85, 0, 0xa},
+  {0x15, 97, 0, 0xa},
   {0x6, 0, 0, 0x30005},
   {0x20, 0, 0, 0x24},
-  {0x15, 0, 77, 0x0},
+  {0x15, 0, 89, 0x0},
   {0x20, 0, 0, 0x20},
-  {0x15, 80, 79, 0x4},
+  {0x15, 92, 91, 0x4},
   {0x20, 0, 0, 0x2c},
-  {0x15, 0, 73, 0x0},
+  {0x15, 0, 85, 0x0},
   {0x20, 0, 0, 0x28},
-  {0x45, 77, 76, 0xfffdb7cc},
+  {0x45, 89, 88, 0xfffdb7cc},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 81, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 84, 0, 0x10},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 77, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 80, 0, 0xf},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 73, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 76, 0, 0x3},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 69, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 72, 0, 0x10},
+  {0x15, 72, 0, 0x4},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 65, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 68, 0, 0xf},
+  {0x15, 68, 0, 0x53564d41},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 61, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 64, 0, 0x3},
+  {0x15, 64, 0, 0x59616d61},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 57, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 60, 0, 0x4},
+  {0x15, 60, 0, 0x29},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 53, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 56, 0, 0x53564d41},
+  {0x15, 56, 0, 0x2b},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 49, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 52, 0, 0x29},
+  {0x15, 52, 0, 0x7f},
   {0x6, 0, 0, 0x30004},
   {0x20, 0, 0, 0x24},
   {0x15, 0, 44, 0x0},
@@ -348,7 +360,7 @@
   {0x15, 1, 0, 0x0},
   {0x6, 0, 0, 0x30003},
   {0x20, 0, 0, 0x10},
-  {0x15, 2, 0, 0x2da4},
+  {0x15, 2, 0, 0xfc1},
   {0x6, 0, 0, 0x30002},
   {0x6, 0, 0, 0x50001},
   {0x6, 0, 0, 0x7fff0000},
@@ -366,175 +378,197 @@
   {0x35, 0, 6, 0xea},
   {0x35, 0, 3, 0x104},
   {0x35, 0, 1, 0x114},
-  {0x35, 86, 85, 0x116},
-  {0x35, 85, 81, 0x105},
-  {0x35, 0, 84, 0xf2},
-  {0x35, 83, 82, 0xf3},
+  {0x35, 95, 104, 0x116},
+  {0x35, 94, 104, 0x105},
+  {0x35, 0, 93, 0xf2},
+  {0x35, 92, 101, 0xf3},
   {0x35, 0, 2, 0xe4},
-  {0x35, 0, 77, 0xe6},
-  {0x35, 92, 80, 0xe9},
-  {0x35, 0, 79, 0xe2},
-  {0x35, 78, 97, 0xe3},
+  {0x35, 0, 100, 0xe6},
+  {0x35, 90, 89, 0xe9},
+  {0x35, 0, 88, 0xe2},
+  {0x35, 87, 98, 0xe3},
   {0x35, 0, 6, 0xd1},
   {0x35, 0, 3, 0xd9},
   {0x35, 0, 1, 0xdd},
-  {0x35, 100, 73, 0xde},
-  {0x35, 69, 73, 0xdc},
-  {0x35, 0, 68, 0xd5},
-  {0x35, 67, 71, 0xd6},
+  {0x35, 101, 92, 0xde},
+  {0x35, 92, 82, 0xdc},
+  {0x35, 0, 91, 0xd5},
+  {0x35, 90, 80, 0xd6},
   {0x35, 0, 2, 0xcc},
-  {0x35, 0, 69, 0xce},
-  {0x35, 68, 64, 0xd0},
-  {0x35, 0, 66, 0xc7},
-  {0x35, 65, 99, 0xc8},
+  {0x35, 0, 78, 0xce},
+  {0x35, 77, 87, 0xd0},
+  {0x35, 0, 85, 0xc7},
+  {0x35, 84, 100, 0xc8},
   {0x35, 0, 12, 0x9e},
   {0x35, 0, 6, 0xa6},
   {0x35, 0, 3, 0xa9},
   {0x35, 0, 1, 0xac},
-  {0x35, 61, 57, 0xb3},
-  {0x35, 60, 56, 0xaa},
-  {0x35, 0, 58, 0xa7},
-  {0x35, 58, 98, 0xa8},
+  {0x35, 70, 80, 0xb3},
+  {0x35, 69, 79, 0xaa},
+  {0x35, 0, 77, 0xa7},
+  {0x35, 67, 99, 0xa8},
   {0x35, 0, 2, 0xa1},
-  {0x35, 0, 56, 0xa3},
-  {0x35, 55, 51, 0xa4},
-  {0x35, 0, 50, 0x9f},
-  {0x35, 49, 52, 0xa0},
+  {0x35, 0, 65, 0xa3},
+  {0x35, 64, 74, 0xa4},
+  {0x35, 0, 73, 0x9f},
+  {0x35, 72, 71, 0xa0},
   {0x35, 0, 6, 0x94},
   {0x35, 0, 3, 0x97},
   {0x35, 0, 1, 0x9c},
-  {0x35, 49, 45, 0x9d},
-  {0x35, 48, 47, 0x99},
-  {0x35, 0, 43, 0x95},
-  {0x35, 42, 45, 0x96},
+  {0x35, 58, 68, 0x9d},
+  {0x35, 57, 66, 0x99},
+  {0x35, 0, 66, 0x95},
+  {0x35, 65, 64, 0x96},
   {0x35, 0, 2, 0x8b},
-  {0x35, 0, 40, 0x8e},
-  {0x35, 42, 43, 0x8f},
-  {0x35, 0, 42, 0x89},
-  {0x35, 41, 37, 0x8a},
+  {0x35, 0, 63, 0x8e},
+  {0x35, 61, 52, 0x8f},
+  {0x35, 0, 51, 0x89},
+  {0x35, 50, 60, 0x8a},
   {0x35, 0, 25, 0x4e},
   {0x35, 0, 12, 0x65},
   {0x35, 0, 6, 0x80},
   {0x35, 0, 3, 0x83},
   {0x35, 0, 1, 0x85},
-  {0x35, 31, 35, 0x86},
-  {0x35, 30, 117, 0x84},
-  {0x35, 0, 29, 0x81},
-  {0x35, 122, 115, 0x82},
+  {0x35, 54, 44, 0x86},
+  {0x35, 53, 139, 0x84},
+  {0x35, 0, 52, 0x81},
+  {0x35, 144, 137, 0x82},
   {0x35, 0, 2, 0x72},
-  {0x35, 0, 30, 0x7c},
-  {0x35, 29, 25, 0x7d},
-  {0x35, 0, 24, 0x66},
-  {0x35, 118, 27, 0x71},
+  {0x35, 0, 39, 0x7c},
+  {0x35, 38, 48, 0x7d},
+  {0x35, 0, 47, 0x66},
+  {0x35, 140, 36, 0x71},
   {0x35, 0, 6, 0x5b},
   {0x35, 0, 3, 0x61},
   {0x35, 0, 1, 0x63},
-  {0x35, 23, 22, 0x64},
-  {0x35, 155, 22, 0x62},
-  {0x35, 0, 20, 0x5c},
-  {0x35, 16, 20, 0x5d},
+  {0x35, 32, 41, 0x64},
+  {0x35, 177, 31, 0x62},
+  {0x35, 0, 39, 0x5c},
+  {0x35, 39, 29, 0x5d},
   {0x35, 0, 2, 0x58},
-  {0x35, 0, 17, 0x59},
-  {0x35, 13, 17, 0x5a},
-  {0x35, 0, 15, 0x4f},
-  {0x35, 15, 11, 0x51},
-  {0x35, 0, 15, 0x2c},
+  {0x35, 0, 36, 0x59},
+  {0x35, 36, 26, 0x5a},
+  {0x35, 0, 34, 0x4f},
+  {0x35, 24, 34, 0x51},
+  {0x35, 0, 12, 0x2c},
   {0x35, 0, 6, 0x3b},
   {0x35, 0, 3, 0x3e},
   {0x35, 0, 1, 0x48},
-  {0x35, 10, 6, 0x4a},
-  {0x35, 9, 5, 0x44},
-  {0x35, 0, 4, 0x3c},
-  {0x35, 6, 7, 0x3d},
-  {0x35, 0, 3, 0x34},
-  {0x35, 0, 4, 0x38},
-  {0x35, 4, 0, 0x3a},
-  {0x5, 0, 0, 0x104},
-  {0x35, 0, 2, 0x2d},
-  {0x35, 1, 0, 0x33},
-  {0x5, 0, 0, 0x102},
-  {0x5, 0, 0, 0x102},
+  {0x35, 19, 29, 0x4a},
+  {0x35, 18, 28, 0x44},
+  {0x35, 0, 27, 0x3c},
+  {0x35, 25, 16, 0x3d},
+  {0x35, 0, 2, 0x34},
+  {0x35, 0, 23, 0x38},
+  {0x35, 13, 23, 0x3a},
+  {0x35, 0, 12, 0x2d},
+  {0x35, 11, 20, 0x33},
   {0x35, 0, 5, 0x1d},
   {0x35, 0, 2, 0x21},
-  {0x35, 0, 254, 0x27},
-  {0x35, 253, 254, 0x2b},
-  {0x35, 0, 251, 0x1e},
-  {0x35, 250, 252, 0x20},
+  {0x35, 0, 17, 0x27},
+  {0x35, 16, 7, 0x2b},
+  {0x35, 0, 16, 0x1e},
+  {0x35, 15, 5, 0x20},
   {0x35, 0, 2, 0x14},
-  {0x35, 0, 248, 0x19},
-  {0x35, 249, 179, 0x1a},
-  {0x35, 0, 248, 0x11},
-  {0x35, 247, 246, 0x13},
+  {0x35, 0, 13, 0x19},
+  {0x35, 2, 204, 0x1a},
+  {0x35, 0, 1, 0x11},
+  {0x35, 0, 9, 0x13},
+  {0x5, 0, 0, 0x10f},
+  {0x20, 0, 0, 0x24},
+  {0x15, 4, 0, 0x0},
+  {0x15, 0, 2, 0xffffffff},
+  {0x20, 0, 0, 0x20},
+  {0x45, 1, 0, 0x80000000},
+  {0x5, 0, 0, 0x100},
+  {0x20, 0, 0, 0x20},
+  {0x15, 1, 0, 0x4},
+  {0x5, 0, 0, 0x105},
+  {0x5, 0, 0, 0x103},
   {0x20, 0, 0, 0x24},
   {0x15, 3, 0, 0x0},
-  {0x15, 0, 235, 0xffffffff},
+  {0x15, 0, 249, 0xffffffff},
   {0x20, 0, 0, 0x20},
-  {0x45, 0, 233, 0x80000000},
+  {0x45, 0, 247, 0x80000000},
   {0x20, 0, 0, 0x20},
-  {0x15, 238, 239, 0x4},
-  {0x20, 0, 0, 0x24},
-  {0x15, 3, 0, 0x0},
-  {0x15, 0, 228, 0xffffffff},
-  {0x20, 0, 0, 0x20},
-  {0x45, 0, 226, 0x80000000},
-  {0x20, 0, 0, 0x20},
-  {0x45, 233, 231, 0xfffffff8},
+  {0x45, 254, 252, 0xfffffff8},
   {0x20, 0, 0, 0x2c},
   {0x15, 3, 0, 0x0},
+  {0x15, 0, 242, 0xffffffff},
+  {0x20, 0, 0, 0x28},
+  {0x45, 0, 240, 0x80000000},
+  {0x20, 0, 0, 0x28},
+  {0x45, 247, 245, 0xfffdb7cc},
+  {0x20, 0, 0, 0x14},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 235, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 0, 233, 0x80000000},
+  {0x20, 0, 0, 0x10},
+  {0x15, 238, 240, 0x1},
+  {0x20, 0, 0, 0x14},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 228, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 0, 226, 0x80000000},
+  {0x20, 0, 0, 0x10},
+  {0x15, 231, 0, 0x10},
+  {0x20, 0, 0, 0x14},
+  {0x15, 3, 0, 0x0},
   {0x15, 0, 221, 0xffffffff},
-  {0x20, 0, 0, 0x28},
+  {0x20, 0, 0, 0x10},
   {0x45, 0, 219, 0x80000000},
-  {0x20, 0, 0, 0x28},
-  {0x45, 226, 224, 0xfffdb7cc},
+  {0x20, 0, 0, 0x10},
+  {0x15, 224, 0, 0xf},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 214, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 212, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 217, 219, 0x1},
+  {0x15, 217, 0, 0x3},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 207, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 205, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 210, 0, 0x10},
+  {0x15, 210, 0, 0x4},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 200, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 198, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 203, 0, 0xf},
+  {0x15, 203, 0, 0x53564d41},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 193, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 191, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 196, 0, 0x3},
+  {0x15, 196, 0, 0x59616d61},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 186, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 184, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 189, 0, 0x4},
+  {0x15, 189, 0, 0x29},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 179, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 177, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 182, 0, 0x53564d41},
+  {0x15, 182, 0, 0x2b},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 172, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 170, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 175, 0, 0x29},
+  {0x15, 175, 0, 0x7f},
   {0x6, 0, 0, 0x30005},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
@@ -542,7 +576,7 @@
   {0x20, 0, 0, 0x10},
   {0x45, 0, 162, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 167, 0, 0x1393},
+  {0x15, 167, 0, 0x111a},
   {0x6, 0, 0, 0x30004},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
@@ -722,262 +756,275 @@
   {0x20, 0, 0, 0x0},
   {0x45, 0, 1, 0x40000000},
   {0x6, 0, 0, 0x30006},
-  {0x35, 0, 87, 0x94},
-  {0x35, 0, 43, 0xdd},
+  {0x35, 0, 85, 0x94},
+  {0x35, 0, 44, 0xdd},
   {0x35, 0, 20, 0x11c},
   {0x35, 0, 10, 0x13f},
   {0x35, 0, 5, 0x149},
   {0x35, 0, 2, 0x163},
-  {0x35, 0, 79, 0x164},
-  {0x35, 78, 73, 0x165},
-  {0x35, 0, 78, 0x14c},
-  {0x35, 71, 76, 0x161},
+  {0x35, 0, 92, 0x164},
+  {0x35, 91, 90, 0x165},
+  {0x35, 0, 92, 0x14c},
+  {0x35, 88, 89, 0x161},
   {0x35, 0, 2, 0x141},
-  {0x35, 0, 74, 0x144},
-  {0x35, 73, 68, 0x145},
-  {0x35, 67, 73, 0x140},
+  {0x35, 0, 87, 0x144},
+  {0x35, 86, 85, 0x145},
+  {0x35, 84, 87, 0x140},
   {0x35, 0, 4, 0x12d},
   {0x35, 0, 2, 0x136},
-  {0x35, 0, 69, 0x137},
-  {0x35, 68, 63, 0x138},
-  {0x35, 68, 62, 0x134},
+  {0x35, 0, 82, 0x137},
+  {0x35, 81, 80, 0x138},
+  {0x35, 82, 79, 0x134},
   {0x35, 0, 2, 0x127},
-  {0x35, 0, 66, 0x128},
-  {0x35, 65, 59, 0x12c},
-  {0x35, 63, 64, 0x11d},
+  {0x35, 0, 80, 0x128},
+  {0x35, 79, 76, 0x12c},
+  {0x35, 76, 78, 0x11d},
   {0x35, 0, 11, 0xfe},
   {0x35, 0, 6, 0x10a},
   {0x35, 0, 3, 0x10e},
   {0x35, 1, 0, 0x10f},
-  {0x5, 0, 0, 0x135},
-  {0x35, 57, 52, 0x110},
-  {0x35, 0, 56, 0x10c},
-  {0x35, 55, 50, 0x10d},
+  {0x5, 0, 0, 0x142},
+  {0x35, 70, 69, 0x110},
+  {0x35, 0, 69, 0x10c},
+  {0x35, 68, 67, 0x10d},
   {0x35, 0, 2, 0x102},
-  {0x35, 0, 54, 0x103},
-  {0x35, 135, 52, 0x109},
-  {0x35, 51, 52, 0x101},
+  {0x35, 0, 68, 0x103},
+  {0x35, 136, 65, 0x109},
+  {0x35, 64, 66, 0x101},
   {0x35, 0, 4, 0xef},
   {0x35, 0, 2, 0xf1},
-  {0x35, 0, 48, 0xfc},
-  {0x35, 42, 48, 0xfd},
-  {0x35, 153, 46, 0xf0},
+  {0x35, 0, 61, 0xfc},
+  {0x35, 59, 62, 0xfd},
+  {0x35, 154, 59, 0xf0},
   {0x35, 0, 3, 0xe0},
-  {0x35, 0, 45, 0xe1},
-  {0x35, 0, 43, 0xee},
-  {0x5, 0, 0, 0x12a},
-  {0x35, 41, 252, 0xde},
+  {0x35, 0, 59, 0xe1},
+  {0x35, 0, 56, 0xee},
+  {0x5, 0, 0, 0x137},
+  {0x35, 54, 0, 0xde},
+  {0x5, 0, 0, 0x108},
   {0x35, 0, 20, 0xb6},
   {0x35, 0, 10, 0xc7},
   {0x35, 0, 5, 0xd2},
   {0x35, 0, 2, 0xd9},
-  {0x35, 0, 36, 0xdb},
-  {0x35, 30, 177, 0xdc},
-  {0x35, 0, 29, 0xd3},
-  {0x35, 28, 34, 0xd4},
+  {0x35, 0, 48, 0xdb},
+  {0x35, 46, 177, 0xdc},
+  {0x35, 0, 45, 0xd3},
+  {0x35, 44, 47, 0xd4},
   {0x35, 0, 2, 0xcd},
-  {0x35, 0, 32, 0xce},
-  {0x35, 31, 25, 0xd1},
-  {0x35, 24, 30, 0xcb},
+  {0x35, 0, 45, 0xce},
+  {0x35, 44, 41, 0xd1},
+  {0x35, 40, 43, 0xcb},
   {0x35, 0, 4, 0xbf},
   {0x35, 0, 2, 0xc1},
-  {0x35, 0, 21, 0xc5},
-  {0x35, 20, 26, 0xc6},
-  {0x35, 231, 25, 0xc0},
+  {0x35, 0, 37, 0xc5},
+  {0x35, 36, 39, 0xc6},
+  {0x35, 243, 38, 0xc0},
   {0x35, 0, 2, 0xb9},
-  {0x35, 0, 17, 0xba},
-  {0x35, 21, 22, 0xbb},
-  {0x35, 21, 15, 0xb8},
+  {0x35, 0, 33, 0xba},
+  {0x35, 33, 35, 0xbb},
+  {0x35, 34, 31, 0xb8},
   {0x35, 0, 9, 0xa9},
   {0x35, 0, 4, 0xb0},
   {0x35, 0, 2, 0xb2},
-  {0x35, 0, 16, 0xb4},
-  {0x35, 15, 16, 0xb5},
-  {0x35, 15, 14, 0xb1},
+  {0x35, 0, 28, 0xb4},
+  {0x35, 27, 29, 0xb5},
+  {0x35, 28, 26, 0xb1},
   {0x35, 0, 2, 0xab},
-  {0x35, 0, 13, 0xac},
-  {0x35, 12, 157, 0xad},
-  {0x35, 5, 10, 0xaa},
-  {0x35, 0, 5, 0xa2},
+  {0x35, 0, 26, 0xac},
+  {0x35, 25, 157, 0xad},
+  {0x35, 21, 22, 0xaa},
+  {0x35, 0, 4, 0xa2},
   {0x35, 0, 2, 0xa5},
-  {0x35, 0, 8, 0xa6},
-  {0x35, 7, 6, 0xa8},
-  {0x35, 0, 6, 0xa4},
-  {0x5, 0, 0, 0x105},
+  {0x35, 0, 21, 0xa6},
+  {0x35, 20, 18, 0xa8},
+  {0x35, 16, 19, 0xa4},
   {0x35, 0, 2, 0x98},
-  {0x35, 0, 2, 0x9e},
-  {0x35, 1, 2, 0x9f},
-  {0x35, 1, 0, 0x96},
-  {0x5, 0, 0, 0x102},
-  {0x5, 0, 0, 0x100},
-  {0x35, 0, 40, 0x4f},
-  {0x35, 0, 20, 0x6e},
-  {0x35, 0, 10, 0x7d},
+  {0x35, 0, 15, 0x9e},
+  {0x35, 14, 16, 0x9f},
+  {0x35, 15, 13, 0x96},
+  {0x35, 0, 43, 0x4f},
+  {0x35, 0, 23, 0x6e},
+  {0x35, 0, 13, 0x7d},
   {0x35, 0, 5, 0x8a},
   {0x35, 0, 2, 0x8e},
-  {0x35, 0, 250, 0x90},
-  {0x35, 249, 250, 0x91},
-  {0x35, 0, 247, 0x8c},
-  {0x35, 246, 247, 0x8d},
-  {0x35, 0, 2, 0x7f},
-  {0x35, 0, 246, 0x85},
-  {0x35, 245, 243, 0x86},
-  {0x35, 243, 156, 0x7e},
+  {0x35, 0, 9, 0x90},
+  {0x35, 8, 6, 0x91},
+  {0x35, 0, 4, 0x8c},
+  {0x35, 3, 6, 0x8d},
+  {0x35, 0, 4, 0x7f},
+  {0x35, 0, 2, 0x85},
+  {0x35, 1, 0, 0x86},
+  {0x5, 0, 0, 0x101},
+  {0x5, 0, 0, 0x102},
+  {0x35, 0, 169, 0x7e},
+  {0x5, 0, 0, 0xff},
   {0x35, 0, 4, 0x76},
   {0x35, 0, 2, 0x79},
-  {0x35, 0, 241, 0x7a},
-  {0x35, 240, 239, 0x7c},
-  {0x35, 238, 239, 0x77},
+  {0x35, 0, 253, 0x7a},
+  {0x35, 252, 251, 0x7c},
+  {0x35, 250, 251, 0x77},
   {0x35, 0, 2, 0x72},
-  {0x35, 0, 236, 0x73},
-  {0x35, 234, 236, 0x75},
-  {0x35, 235, 233, 0x6f},
+  {0x35, 0, 248, 0x73},
+  {0x35, 246, 248, 0x75},
+  {0x35, 247, 245, 0x6f},
   {0x35, 0, 9, 0x60},
   {0x35, 0, 4, 0x66},
   {0x35, 0, 2, 0x6a},
-  {0x35, 0, 229, 0x6c},
-  {0x35, 230, 229, 0x6d},
-  {0x35, 229, 145, 0x67},
+  {0x35, 0, 241, 0x6c},
+  {0x35, 242, 241, 0x6d},
+  {0x35, 241, 157, 0x67},
   {0x35, 0, 2, 0x63},
-  {0x35, 0, 225, 0x64},
-  {0x35, 224, 226, 0x65},
-  {0x35, 225, 224, 0x62},
+  {0x35, 0, 237, 0x64},
+  {0x35, 236, 238, 0x65},
+  {0x35, 237, 236, 0x62},
   {0x35, 0, 4, 0x57},
   {0x35, 0, 2, 0x5a},
-  {0x35, 0, 170, 0x5b},
-  {0x35, 219, 220, 0x5c},
-  {0x35, 218, 220, 0x59},
+  {0x35, 0, 182, 0x5b},
+  {0x35, 231, 232, 0x5c},
+  {0x35, 230, 232, 0x59},
   {0x35, 0, 2, 0x51},
-  {0x35, 0, 216, 0x52},
-  {0x35, 215, 216, 0x53},
-  {0x35, 215, 216, 0x50},
+  {0x35, 0, 228, 0x52},
+  {0x35, 227, 228, 0x53},
+  {0x35, 227, 228, 0x50},
   {0x35, 0, 20, 0x29},
   {0x35, 0, 10, 0x38},
   {0x35, 0, 5, 0x41},
   {0x35, 0, 2, 0x46},
-  {0x35, 0, 209, 0x48},
-  {0x35, 209, 210, 0x4e},
-  {0x35, 0, 209, 0x43},
-  {0x35, 208, 207, 0x44},
+  {0x35, 0, 221, 0x48},
+  {0x35, 221, 222, 0x4e},
+  {0x35, 0, 221, 0x43},
+  {0x35, 220, 219, 0x44},
   {0x35, 0, 2, 0x3d},
-  {0x35, 0, 206, 0x3e},
-  {0x35, 204, 203, 0x3f},
-  {0x35, 202, 204, 0x3c},
+  {0x35, 0, 218, 0x3e},
+  {0x35, 216, 215, 0x3f},
+  {0x35, 214, 216, 0x3c},
   {0x35, 0, 4, 0x30},
   {0x35, 0, 2, 0x33},
-  {0x35, 0, 201, 0x36},
-  {0x35, 152, 199, 0x37},
-  {0x35, 198, 199, 0x31},
+  {0x35, 0, 213, 0x36},
+  {0x35, 164, 211, 0x37},
+  {0x35, 210, 211, 0x31},
   {0x35, 0, 2, 0x2d},
-  {0x35, 0, 196, 0x2e},
-  {0x35, 195, 194, 0x2f},
-  {0x35, 195, 194, 0x2b},
+  {0x35, 0, 208, 0x2e},
+  {0x35, 207, 206, 0x2f},
+  {0x35, 207, 206, 0x2b},
   {0x35, 0, 9, 0x17},
   {0x35, 0, 4, 0x1f},
   {0x35, 0, 2, 0x22},
-  {0x35, 0, 191, 0x25},
-  {0x35, 188, 182, 0x26},
-  {0x35, 187, 189, 0x21},
+  {0x35, 0, 203, 0x25},
+  {0x35, 200, 194, 0x26},
+  {0x35, 199, 201, 0x21},
   {0x35, 0, 2, 0x19},
-  {0x35, 0, 187, 0x1d},
-  {0x35, 184, 185, 0x1e},
-  {0x35, 184, 183, 0x18},
+  {0x35, 0, 199, 0x1d},
+  {0x35, 196, 197, 0x1e},
+  {0x35, 196, 195, 0x18},
   {0x35, 0, 4, 0xe},
   {0x35, 0, 2, 0x12},
-  {0x35, 0, 180, 0x13},
-  {0x35, 181, 180, 0x15},
-  {0x35, 180, 178, 0x11},
+  {0x35, 0, 192, 0x13},
+  {0x35, 193, 192, 0x15},
+  {0x35, 192, 190, 0x11},
   {0x35, 0, 2, 0x3},
-  {0x35, 0, 177, 0x8},
-  {0x35, 176, 175, 0xd},
-  {0x35, 174, 175, 0x2},
+  {0x35, 0, 189, 0x8},
+  {0x35, 188, 187, 0xd},
+  {0x35, 186, 187, 0x2},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 180, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 183, 0, 0x1},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 176, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 179, 0, 0x6},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 172, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 175, 0, 0x2},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 168, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 171, 0, 0x1},
+  {0x15, 171, 0, 0x0},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 164, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 167, 0, 0x6},
+  {0x15, 167, 0, 0x5},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 160, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 163, 0, 0x2},
-  {0x20, 0, 0, 0x14},
+  {0x15, 163, 164, 0x3},
+  {0x20, 0, 0, 0x1c},
   {0x15, 0, 156, 0x0},
-  {0x20, 0, 0, 0x10},
-  {0x15, 159, 0, 0x0},
-  {0x20, 0, 0, 0x14},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 159, 0xfffffe7f},
+  {0x20, 0, 0, 0x1c},
   {0x15, 0, 152, 0x0},
-  {0x20, 0, 0, 0x10},
-  {0x15, 155, 0, 0x5},
-  {0x20, 0, 0, 0x14},
-  {0x15, 0, 148, 0x0},
-  {0x20, 0, 0, 0x10},
-  {0x15, 151, 152, 0x3},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 0, 144, 0x0},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 147, 0xfffffe7f},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 0, 140, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 142, 0, 0x1},
+  {0x15, 154, 0, 0x1},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 135, 0x0},
+  {0x15, 0, 147, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 137, 0, 0x3},
+  {0x15, 149, 0, 0x3},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 130, 0x0},
+  {0x15, 0, 142, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 132, 0, 0x4},
+  {0x15, 144, 0, 0x4},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 125, 0x0},
+  {0x15, 0, 137, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 127, 0, 0x5},
+  {0x15, 139, 0, 0x5},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 120, 0x0},
+  {0x15, 0, 132, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 122, 0, 0x9},
+  {0x15, 134, 0, 0x9},
   {0x20, 0, 0, 0x1c},
-  {0x15, 0, 115, 0x0},
+  {0x15, 0, 127, 0x0},
   {0x20, 0, 0, 0x18},
   {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 117, 0, 0xa},
+  {0x15, 129, 0, 0xa},
   {0x6, 0, 0, 0x30005},
   {0x20, 0, 0, 0x24},
-  {0x15, 0, 109, 0x0},
+  {0x15, 0, 121, 0x0},
   {0x20, 0, 0, 0x20},
-  {0x15, 112, 111, 0x4},
+  {0x15, 124, 123, 0x4},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 117, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 120, 0, 0x10},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 113, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 116, 0, 0xf},
+  {0x20, 0, 0, 0x14},
+  {0x15, 0, 109, 0x0},
+  {0x20, 0, 0, 0x10},
+  {0x15, 112, 0, 0x3},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 105, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 108, 0, 0x10},
+  {0x15, 108, 0, 0x4},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 101, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 104, 0, 0xf},
+  {0x15, 104, 0, 0x53564d41},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 97, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 100, 0, 0x3},
+  {0x15, 100, 0, 0x59616d61},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 93, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 96, 0, 0x4},
+  {0x15, 96, 0, 0x29},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 89, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 92, 0, 0x53564d41},
+  {0x15, 92, 0, 0x2b},
   {0x20, 0, 0, 0x14},
   {0x15, 0, 85, 0x0},
   {0x20, 0, 0, 0x10},
-  {0x15, 88, 0, 0x29},
+  {0x15, 88, 0, 0x7f},
   {0x6, 0, 0, 0x30004},
   {0x20, 0, 0, 0x24},
   {0x15, 0, 80, 0x0},
@@ -1063,7 +1110,7 @@
   {0x15, 1, 0, 0x0},
   {0x6, 0, 0, 0x30003},
   {0x20, 0, 0, 0x10},
-  {0x15, 2, 0, 0x9d0},
+  {0x15, 2, 0, 0x78a0},
   {0x6, 0, 0, 0x30002},
   {0x6, 0, 0, 0x50001},
   {0x6, 0, 0, 0x7fff0000},
@@ -1077,265 +1124,291 @@
   {0x20, 0, 0, 0x0},
   {0x45, 0, 1, 0x40000000},
   {0x6, 0, 0, 0x30006},
-  {0x35, 0, 59, 0x7f},
-  {0x35, 0, 29, 0xe4},
+  {0x35, 0, 58, 0x7f},
+  {0x35, 0, 28, 0xe4},
   {0x35, 0, 14, 0x111},
   {0x35, 0, 7, 0x120},
   {0x35, 0, 3, 0x13c},
   {0x35, 0, 1, 0x13f},
-  {0x35, 102, 95, 0x140},
-  {0x35, 101, 94, 0x13e},
+  {0x35, 105, 114, 0x140},
+  {0x35, 104, 113, 0x13e},
   {0x35, 0, 1, 0x123},
-  {0x35, 99, 94, 0x126},
-  {0x35, 98, 91, 0x121},
+  {0x35, 102, 120, 0x126},
+  {0x35, 101, 110, 0x121},
   {0x35, 0, 3, 0x119},
   {0x35, 0, 1, 0x11d},
-  {0x35, 95, 88, 0x11e},
-  {0x35, 94, 89, 0x11a},
-  {0x35, 0, 86, 0x112},
-  {0x35, 85, 92, 0x118},
+  {0x35, 98, 107, 0x11e},
+  {0x35, 97, 115, 0x11a},
+  {0x35, 0, 105, 0x112},
+  {0x35, 104, 95, 0x118},
   {0x35, 0, 6, 0xf8},
   {0x35, 0, 3, 0x106},
   {0x35, 0, 1, 0x10e},
-  {0x35, 88, 83, 0x110},
-  {0x35, 80, 82, 0x107},
-  {0x35, 0, 86, 0x101},
-  {0x35, 78, 80, 0x102},
-  {0x35, 0, 4, 0xea},
+  {0x35, 91, 109, 0x110},
+  {0x35, 99, 108, 0x107},
+  {0x35, 0, 89, 0x101},
+  {0x35, 97, 106, 0x102},
+  {0x35, 0, 3, 0xea},
   {0x35, 0, 1, 0xec},
-  {0x35, 77, 82, 0xf7},
-  {0x35, 74, 0, 0xeb},
-  {0x5, 0, 0, 0x12a},
-  {0x35, 0, 89, 0xe5},
-  {0x35, 73, 78, 0xe7},
+  {0x35, 103, 85, 0xf7},
+  {0x35, 93, 60, 0xeb},
+  {0x35, 0, 93, 0xe5},
+  {0x35, 100, 82, 0xe7},
   {0x35, 0, 15, 0xac},
   {0x35, 0, 7, 0xcb},
   {0x35, 0, 3, 0xd9},
   {0x35, 0, 1, 0xdc},
-  {0x35, 73, 66, 0xdd},
-  {0x35, 67, 65, 0xda},
+  {0x35, 77, 86, 0xdd},
+  {0x35, 94, 85, 0xda},
   {0x35, 0, 1, 0xd5},
-  {0x35, 70, 65, 0xd6},
-  {0x35, 62, 69, 0xd4},
+  {0x35, 74, 92, 0xd6},
+  {0x35, 82, 73, 0xd4},
   {0x35, 0, 4, 0xbb},
   {0x35, 0, 1, 0xc9},
-  {0x35, 118, 61, 0xca},
-  {0x35, 0, 65, 0xc8},
-  {0x5, 0, 0, 0x121},
-  {0x35, 0, 56, 0xae},
-  {0x35, 57, 62, 0xba},
+  {0x35, 124, 88, 0xca},
+  {0x35, 0, 69, 0xc8},
+  {0x5, 0, 0, 0x13c},
+  {0x35, 0, 76, 0xae},
+  {0x35, 84, 66, 0xba},
   {0x35, 0, 6, 0x8a},
   {0x35, 0, 3, 0x95},
   {0x35, 0, 1, 0x9d},
-  {0x35, 58, 166, 0x9e},
-  {0x35, 57, 52, 0x97},
-  {0x35, 0, 56, 0x8c},
-  {0x35, 55, 50, 0x8e},
+  {0x35, 62, 172, 0x9e},
+  {0x35, 61, 79, 0x97},
+  {0x35, 0, 60, 0x8c},
+  {0x35, 59, 77, 0x8e},
   {0x35, 0, 3, 0x83},
   {0x35, 0, 1, 0x87},
-  {0x35, 45, 52, 0x88},
-  {0x35, 44, 46, 0x84},
-  {0x35, 0, 50, 0x80},
-  {0x35, 49, 44, 0x81},
-  {0x35, 0, 28, 0x3b},
+  {0x35, 65, 56, 0x88},
+  {0x35, 64, 73, 0x84},
+  {0x35, 0, 54, 0x80},
+  {0x35, 53, 71, 0x81},
+  {0x35, 0, 29, 0x3b},
   {0x35, 0, 14, 0x69},
   {0x35, 0, 7, 0x74},
   {0x35, 0, 3, 0x79},
   {0x35, 0, 1, 0x7c},
-  {0x35, 36, 38, 0x7e},
-  {0x35, 35, 42, 0x7a},
+  {0x35, 56, 65, 0x7e},
+  {0x35, 55, 46, 0x7a},
   {0x35, 0, 1, 0x77},
-  {0x35, 35, 33, 0x78},
-  {0x35, 34, 32, 0x76},
+  {0x35, 62, 53, 0x78},
+  {0x35, 61, 52, 0x76},
   {0x35, 0, 3, 0x6e},
   {0x35, 0, 1, 0x71},
-  {0x35, 31, 29, 0x73},
-  {0x35, 35, 30, 0x6f},
-  {0x35, 0, 27, 0x6b},
-  {0x35, 33, 28, 0x6d},
+  {0x35, 58, 49, 0x73},
+  {0x35, 39, 57, 0x6f},
+  {0x35, 0, 47, 0x6b},
+  {0x35, 37, 55, 0x6d},
   {0x35, 0, 6, 0x4a},
   {0x35, 0, 3, 0x62},
   {0x35, 0, 1, 0x67},
-  {0x35, 24, 29, 0x68},
-  {0x35, 23, 28, 0x66},
-  {0x35, 0, 27, 0x4c},
-  {0x35, 21, 19, 0x60},
+  {0x35, 51, 33, 0x68},
+  {0x35, 50, 32, 0x66},
+  {0x35, 0, 31, 0x4c},
+  {0x35, 48, 39, 0x60},
   {0x35, 0, 3, 0x3f},
   {0x35, 0, 1, 0x48},
-  {0x35, 18, 174, 0x49},
-  {0x35, 15, 17, 0x40},
-  {0x35, 0, 14, 0x3c},
-  {0x35, 238, 15, 0x3e},
-  {0x35, 0, 15, 0x1d},
-  {0x35, 0, 6, 0x31},
+  {0x35, 45, 201, 0x49},
+  {0x35, 35, 44, 0x40},
+  {0x35, 0, 34, 0x3c},
+  {0x35, 0, 42, 0x3e},
+  {0x5, 0, 0, 0x108},
+  {0x35, 0, 14, 0x1d},
+  {0x35, 0, 7, 0x31},
   {0x35, 0, 3, 0x36},
   {0x35, 0, 1, 0x39},
-  {0x35, 15, 8, 0x3a},
-  {0x35, 9, 14, 0x37},
-  {0x35, 0, 6, 0x33},
-  {0x35, 238, 12, 0x35},
+  {0x35, 18, 27, 0x3a},
+  {0x35, 35, 17, 0x37},
+  {0x35, 0, 25, 0x33},
+  {0x35, 0, 15, 0x35},
+  {0x5, 0, 0, 0x107},
   {0x35, 0, 3, 0x27},
   {0x35, 0, 1, 0x29},
-  {0x35, 4, 2, 0x2c},
-  {0x35, 8, 3, 0x28},
-  {0x35, 1, 0, 0x20},
-  {0x5, 0, 0, 0x105},
-  {0x35, 5, 0, 0x24},
-  {0x5, 0, 0, 0x104},
-  {0x35, 0, 7, 0xb},
+  {0x35, 29, 20, 0x2c},
+  {0x35, 10, 28, 0x28},
+  {0x35, 0, 18, 0x20},
+  {0x35, 8, 26, 0x24},
+  {0x35, 0, 8, 0xb},
   {0x35, 0, 4, 0x15},
   {0x35, 0, 2, 0x1a},
-  {0x35, 233, 0, 0x1c},
-  {0x5, 0, 0, 0x100},
-  {0x35, 254, 253, 0x16},
-  {0x35, 0, 253, 0x12},
-  {0x35, 252, 253, 0x13},
-  {0x35, 0, 3, 0x6},
-  {0x35, 0, 1, 0x9},
-  {0x35, 233, 240, 0xa},
-  {0x35, 248, 247, 0x7},
-  {0x35, 0, 247, 0x4},
-  {0x35, 246, 245, 0x5},
+  {0x35, 0, 4, 0x1c},
+  {0x5, 0, 0, 0x103},
+  {0x35, 20, 11, 0x16},
+  {0x35, 0, 19, 0x12},
+  {0x35, 18, 0, 0x13},
+  {0x5, 0, 0, 0x117},
+  {0x35, 0, 5, 0x6},
+  {0x35, 0, 3, 0x9},
+  {0x35, 1, 0, 0xa},
+  {0x5, 0, 0, 0x109},
+  {0x5, 0, 0, 0x101},
+  {0x35, 11, 2, 0x7},
+  {0x35, 0, 10, 0x4},
+  {0x35, 9, 0, 0x5},
+  {0x5, 0, 0, 0x10c},
+  {0x20, 0, 0, 0x14},
+  {0x15, 4, 0, 0x0},
+  {0x15, 0, 2, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 1, 0, 0x80000000},
+  {0x5, 0, 0, 0x103},
+  {0x20, 0, 0, 0x10},
+  {0x15, 0, 1, 0x1},
+  {0x5, 0, 0, 0x104},
+  {0x20, 0, 0, 0x14},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 253, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 0, 251, 0x80000000},
+  {0x20, 0, 0, 0x10},
+  {0x15, 253, 0, 0x6},
+  {0x20, 0, 0, 0x14},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 246, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 0, 244, 0x80000000},
+  {0x20, 0, 0, 0x10},
+  {0x15, 246, 0, 0x2},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 239, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 237, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 239, 0, 0x1},
+  {0x15, 239, 0, 0x0},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 232, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 230, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 232, 0, 0x6},
+  {0x15, 232, 0, 0x5},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 225, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 223, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 225, 0, 0x2},
-  {0x20, 0, 0, 0x14},
+  {0x15, 225, 226, 0x3},
+  {0x20, 0, 0, 0x1c},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 218, 0xffffffff},
-  {0x20, 0, 0, 0x10},
+  {0x20, 0, 0, 0x18},
   {0x45, 0, 216, 0x80000000},
-  {0x20, 0, 0, 0x10},
-  {0x15, 218, 0, 0x0},
-  {0x20, 0, 0, 0x14},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 218, 0xfffffe7f},
+  {0x20, 0, 0, 0x1c},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 211, 0xffffffff},
-  {0x20, 0, 0, 0x10},
+  {0x20, 0, 0, 0x18},
   {0x45, 0, 209, 0x80000000},
-  {0x20, 0, 0, 0x10},
-  {0x15, 211, 0, 0x5},
+  {0x20, 0, 0, 0x18},
+  {0x54, 0, 0, 0xfffffe7f},
+  {0x15, 210, 0, 0x1},
+  {0x20, 0, 0, 0x1c},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 203, 0xffffffff},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 201, 0x80000000},
+  {0x20, 0, 0, 0x18},
+  {0x54, 0, 0, 0xfffffe7f},
+  {0x15, 202, 0, 0x3},
+  {0x20, 0, 0, 0x1c},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 195, 0xffffffff},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 193, 0x80000000},
+  {0x20, 0, 0, 0x18},
+  {0x54, 0, 0, 0xfffffe7f},
+  {0x15, 194, 0, 0x4},
+  {0x20, 0, 0, 0x1c},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 187, 0xffffffff},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 185, 0x80000000},
+  {0x20, 0, 0, 0x18},
+  {0x54, 0, 0, 0xfffffe7f},
+  {0x15, 186, 0, 0x5},
+  {0x20, 0, 0, 0x1c},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 179, 0xffffffff},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 177, 0x80000000},
+  {0x20, 0, 0, 0x18},
+  {0x54, 0, 0, 0xfffffe7f},
+  {0x15, 178, 0, 0x9},
+  {0x20, 0, 0, 0x1c},
+  {0x15, 3, 0, 0x0},
+  {0x15, 0, 171, 0xffffffff},
+  {0x20, 0, 0, 0x18},
+  {0x45, 0, 169, 0x80000000},
+  {0x20, 0, 0, 0x18},
+  {0x54, 0, 0, 0xfffffe7f},
+  {0x15, 170, 0, 0xa},
+  {0x6, 0, 0, 0x30005},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
-  {0x15, 0, 204, 0xffffffff},
+  {0x15, 0, 162, 0xffffffff},
   {0x20, 0, 0, 0x10},
-  {0x45, 0, 202, 0x80000000},
+  {0x45, 0, 160, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 204, 205, 0x3},
-  {0x20, 0, 0, 0x1c},
+  {0x15, 162, 0, 0x10},
+  {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
-  {0x15, 0, 197, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 195, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 197, 0xfffffe7f},
-  {0x20, 0, 0, 0x1c},
+  {0x15, 0, 155, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 0, 153, 0x80000000},
+  {0x20, 0, 0, 0x10},
+  {0x15, 155, 0, 0xf},
+  {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
-  {0x15, 0, 190, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 188, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 189, 0, 0x1},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 3, 0, 0x0},
-  {0x15, 0, 182, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 180, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 181, 0, 0x3},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 3, 0, 0x0},
-  {0x15, 0, 174, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 172, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 173, 0, 0x4},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 3, 0, 0x0},
-  {0x15, 0, 166, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 164, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 165, 0, 0x5},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 3, 0, 0x0},
-  {0x15, 0, 158, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 156, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 157, 0, 0x9},
-  {0x20, 0, 0, 0x1c},
-  {0x15, 3, 0, 0x0},
-  {0x15, 0, 150, 0xffffffff},
-  {0x20, 0, 0, 0x18},
-  {0x45, 0, 148, 0x80000000},
-  {0x20, 0, 0, 0x18},
-  {0x54, 0, 0, 0xfffffe7f},
-  {0x15, 149, 0, 0xa},
-  {0x6, 0, 0, 0x30005},
+  {0x15, 0, 148, 0xffffffff},
+  {0x20, 0, 0, 0x10},
+  {0x45, 0, 146, 0x80000000},
+  {0x20, 0, 0, 0x10},
+  {0x15, 148, 0, 0x3},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 141, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 139, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 141, 0, 0x10},
+  {0x15, 141, 0, 0x4},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 134, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 132, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 134, 0, 0xf},
+  {0x15, 134, 0, 0x53564d41},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 127, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 125, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 127, 0, 0x3},
+  {0x15, 127, 0, 0x59616d61},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 120, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 118, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 120, 0, 0x4},
+  {0x15, 120, 0, 0x29},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 113, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 111, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 113, 0, 0x53564d41},
+  {0x15, 113, 0, 0x2b},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
   {0x15, 0, 106, 0xffffffff},
   {0x20, 0, 0, 0x10},
   {0x45, 0, 104, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 106, 0, 0x29},
+  {0x15, 106, 0, 0x7f},
   {0x6, 0, 0, 0x30004},
   {0x20, 0, 0, 0x1c},
   {0x15, 3, 0, 0x0},
@@ -1410,7 +1483,7 @@
   {0x20, 0, 0, 0x10},
   {0x45, 0, 29, 0x80000000},
   {0x20, 0, 0, 0x10},
-  {0x15, 31, 0, 0xa57},
+  {0x15, 31, 0, 0x8da},
   {0x6, 0, 0, 0x30003},
   {0x20, 0, 0, 0x14},
   {0x15, 3, 0, 0x0},
diff --git a/tests/tests/os/src/android/os/cts/SecurityPatchTest.java b/tests/tests/os/src/android/os/cts/SecurityPatchTest.java
index 4608f22..2a5e360 100644
--- a/tests/tests/os/src/android/os/cts/SecurityPatchTest.java
+++ b/tests/tests/os/src/android/os/cts/SecurityPatchTest.java
@@ -32,7 +32,7 @@
     private static final String SECURITY_PATCH_DATE_ERROR =
             "ro.build.version.security_patch should be \"%d-%02d\" or later. Found \"%s\"";
     private static final int SECURITY_PATCH_YEAR = 2016;
-    private static final int SECURITY_PATCH_MONTH = 8;
+    private static final int SECURITY_PATCH_MONTH = 11;
 
     private boolean mSkipTests = false;
 
diff --git a/tools/cts-tradefed/res/config/cts-dev.xml b/tools/cts-tradefed/res/config/cts-dev.xml
new file mode 100644
index 0000000..0cf53ca
--- /dev/null
+++ b/tools/cts-tradefed/res/config/cts-dev.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<configuration description="Runs CTS with common options set developer workflow: skips most checks">
+
+    <include name="cts" />
+
+    <option name="log-level" value="verbose" />
+    <option name="skip-preconditions" value="true" />
+    <option name="skip-device-info" value="true" />
+
+    <option name="compatibility:plan" value="cts-dev" />
+    <option name="compatibility:skip-all-system-status-check" value="true" />
+    <option name="compatibility:primary-abi-only" value="true" />
+
+</configuration>