[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-05-08。"],[],[],null,["# Set up CTS automated testing (AOSP 10 or lower)\n\nThis page contains CTS set up instructions specific to Android 10 and\nlower.\n\nInstall JDK\n-----------\n\n- For Android 9 and 10, install JDK 9.\n- For Android 8 or lower, install JDK 8.\n\nSet first API level\n-------------------\n\nFor devices launched with Android 9 or 10, set the\n`ro.product.first_api_level` property to a valid value from\n[Codenames, Tags, and Build Numbers](/docs/setup/reference/build-numbers).\n\nFor devices launched on Android 8.x or lower, unset (remove) the\n`ro.product.first_api_level` property for the first build of the product. For\nall subsequent builds, set `ro.product.first_api_level` to the correct API level\nvalue. This lets the property correctly identify a new product and\npreserves information about the first API level of the product. If the flag is\nunset, Android assigns `Build.VERSION.SDK_INT` to `ro.product.first_api_level`.\n\nStorage requirements\n--------------------\n\nThe CTS media stress tests require video clips to be on external storage\n(`/sdcard`).\n\nThe required space depends on the maximum video playback resolution supported by\nthe device. See section 5 in the\n[Android Compatibility Definition document](/docs/compatibility/cdd) for\nthe platform version of the required resolutions.\n| **Note:** The video playback capabilities of the device under test (DUT) are checked through the `android.media.CamcorderProfile` APIs for lower versions of Android and the `android.media.MediaCodecInfo.CodecCapabilities` APIs from Android 5.0.\n\nHere are the storage requirements by maximum video playback resolution:\n\n- 480x360: 98 MB\n- 720x480: 193 MB\n- 1280x720: 606 MB\n- 1920x1080: 1863 MB\n\nConfigure the DUT\n-----------------\n\nThis section contains special DUT configuration instructions for AOSP 10 or\nlower.\n\n### Enable USB debugging\n\nIn Android 9 or 10, navigate to **System** \\\u003e **Developer options**.\n\nIn Android 8 or lower, navigate to **Settings** \\\u003e **Developer options**.\n\n### Enable mock locations (AOSP 4.4.x and 5.x)\n\nIn Android 5.x and 4.4.x, navigate to\n**Settings \\\u003e Developer options** and enable **Allow mock locations**.\n\n### Set up for accessibility tests (CTS 2.1 R2 - 4.2 R4)\n\nSet up your device (or emulator) to run the accessibility tests with: \n\n adb install -r\n android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk\n\nThen, navigate to **Settings \\\u003e Accessibility \\\u003e Accessibility** and enable\n**Delegating Accessibility Service**.\n\n### Set up for device administration test (CTS 6.x or lower)\n\nOn devices that declare `android.software.device_admin`, set up your device to\nrun the device administration test using: \n\n adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk\n\nThen, in **Settings \\\u003e Security \\\u003e Select device administrators** , enable the\ntwo `android.deviceadmin.cts.CtsDeviceAdminReceiver*` device administrators.\nEnsure that `android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver` and any\nother preloaded device administrators remain disabled.\n\n### Set up media files (AOSP 10 or lower)\n\nVideo streaming tests for Android 10 or lower require the\nvideo files to be on external storage (`/sdcard`). For more information, see\n[Storage requirements](/docs/compatibility/cts/setup-older#storage-requirements)."]]