test_permissions_sync() 테스트 사례는 테스트가 실행되는 기기의 빌드 유형에 따라 동작이 다릅니다. 디버그 가능한 빌드 (userdebug 또는 eng)와 디버그 불가능한 빌드 (user)를 모두 OEM에서 테스트하고 두 빌드 모두 테스트를 통과하는 것이 중요합니다.
예외
권한 동기화 API 구현의 CDD 절에는 보안 채널을 통해 기기 간에 데이터를 전송할 수 있을 뿐입니다.
보안 채널 구현은 CDD 규정 준수 요구사항이 아니므로 디버그 불가능한 (사용자) 빌드에서는 이 테스트를 건너뛸 수 있지만, CDM 권한 동기화 기능을 지원하지 않으려는 경우에만 가능합니다.
테스트는 예외 없이 디버그 가능한 빌드에서 통과해야 합니다.
디버그 불가능한 빌드에서 테스트하기 위한 기본 요건
이전 예외 조항에 따라 예외가 적용되지 않는 경우 다음 기본 요건을 충족해야 합니다.
보안 채널은 AVF (AttestationVerificationFramework)를 사용하여 하드웨어의 신뢰성을 확인합니다. 양 당사자가 생성한 증명에는 시스템에 승인되지 않은 변경사항이 없었음을 확인하기 위한 당사자 정보가 여러 개 포함됩니다. AVF는 인증 프로세스 중에 다음 상태를 확인합니다.
기기가 인터넷에 액세스할 수 있음
기기에서 자체 검사 부팅을 사용하며 빌드는 dev-key가 아닌 release-key로 서명되어야 합니다.
OS, 키 부팅, 주요 공급업체 패치 수준이 12개월 이내입니다. 1년 이상 지난 빌드는 사용하지 마세요.
기기 증명은 공급업체에서 승인한 루트 인증서 중 하나로 뒷받침됩니다. vendor_required_attestation_certificates.xml 리소스 오버레이에서 신뢰할 수 있는 루트 인증서를 지정합니다.
호스트 측 멀티스크린 테스트 실행 (AOSP 16 이상)
CTS 인증 도구 16에서는 호스트 측 멀티기기 테스트 지원을 도입합니다.
이러한 테스트는 기기에서 수동 테스트 작업을 실행하는 대신 호스트에서 자동화된 스크립트를 사용하여 실행할 수 있습니다. 각 테스트가 완료되면 결과가 자동으로 DUT에 업로드되고 CTS 인증 도구 앱에 표시됩니다.
이 섹션에서는 호스트 측 멀티 디바이스 테스트를 실행하는 방법을 설명합니다.
멀티 디바이스 테스트 실행
멀티 디바이스 테스트를 실행하려면 다음 단계를 따르세요.
테스트 워크스테이션에서 CTS-V ZIP 패키지가 압축 해제된 디렉터리에서 cts-v-host 콘솔을 실행합니다.
DUT의 CTS 인증 도구 앱에서 호스트 측 테스트를 클릭합니다.
그림 2는 CTS 인증 도구 앱의 호스트 측 테스트를 보여줍니다.
그림 2. CTS 인증 도구 앱의 호스트 측 멀티스크린 테스트
테스트 호스트 측 멀티스크린 테스트 모듈 목록이 표시됩니다.
실행하려는 테스트 모듈의 이름을 식별합니다. 예를 들어 CompanionDeviceManager 모듈은 CtsCompanionDeviceManagerMultiDeviceTestCases로 표시됩니다.
cts-v-host 콘솔에서 다음 명령어를 실행합니다. 참고: CTS Verifier 앱에서 호스트 측 모듈을 탭하면 개별 테스트 사례 목록이 표시되지 않습니다. 대신 모듈이 호스트에서 실행된 후 UI가 테스트 사례 결과로 자동으로 채워집니다.
xTS 콘솔에서 다음 명령어를 실행합니다.
run cts-v-host -m test_module_name
예를 들면 다음과 같습니다.
run cts-v-host -m CtsCompanionDeviceManagerMultiDeviceTestCases
xTS 콘솔에서 테스트 실행을 완료하면 결과가 CTS 인증 도구 앱에 표시됩니다. 녹색으로 표시된 테스트는 통과한 것입니다. 빨간색으로 표시된 테스트는 실패했습니다. 그림 3은 CtsCompanionDeviceManager 테스트의 예시 결과를 보여줍니다.
그림 3. CTS 인증 도구 앱의 호스트 측 멀티스크린 테스트 결과
멀티 디바이스 테스트 문제 해결
이 섹션에서는 발생할 수 있는 문제에 대한 문제 해결 도움말을 제공합니다.
NFC 테스트 중에 GetFirmwareVersion에 대한 응답 없음 수정
멀티 디바이스 테스트를 실행하는 동안 verify_firmware_version RuntimeError: No response
for GetFirmwareVersion 메시지가 표시되면 테스트에서 PN532 NFC 보드에 액세스할 수 없습니다.
이 문제를 해결하려면 호스트의 PN532 NFC 보드에서 사용하는 직렬 경로(예: dev/ttyUSB1)를 식별한 다음 콘솔에서 --module-arg 인수를 사용하여 수동으로 지정합니다.
run cts-v-host -m CtsNfcHceMultiDeviceTestCases --module-arg CtsNfcHceMultiDeviceTestCases:pn532_serial_path:/dev/ttyUSB1
NFC 테스트 중에 '거래 실패' 오류 메시지 수정
모든 NFC 테스트 사례에 Transaction failed, check device logs for more
information. 메시지가 표시되면 DUT의 NFC 칩이 PN532를 감지할 수 없기 때문일 수 있습니다.
호스트에 연결된 기기가 여러 대인데 그중 일부에 PN532가 위에 놓여 있지 않으면 잘못된 DUT가 선택되었을 수 있습니다. 자세한 내용은 NFC 테스트 설정을 참고하세요.
이 문제를 해결하려면 다음 중 한 가지를 따르세요.
-s 플래그를 사용하여 호스트 측 테스트 명령어에서 올바른 DUT 일련번호를 설정합니다.
호스트에서 DUT가 아닌 기기를 모두 분리합니다.
CDM 테스트 사례 test_permissions_sync가 무시됨
디버그 불가능한 기기에서 테스트를 실행하는 경우 예외에 해당하는지 확인하세요. 그렇지 않은 경우 두 기기가 모두 기본 요건을 충족하는지 확인합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","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"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Run CTS Verifier multidevice tests\n\nThis page contains instructions for using CTS\nVerifier (CTS-V) multidevice tests for Android 16 and\nhigher.\n\nSet up host-side multidevice tests\n----------------------------------\n\nThis section explains how to set up multidevice tests.\n\n1. Ensure that your desktop machine meets the [operating system requirements](/docs/compatibility/cts/setup#os-reqt) for CTS.\n2. Follow steps 2 and 5 of [Install desktop software](/docs/compatibility/cts/setup#install-software) to ensure that adb, AAPT2, and Python are correctly installed on your desktop.\n3. Prepare two matching devices under test (DUTs), each with CTS-V set up.\n\n - For information on setting up a DUT, see [Set up the DUT](/docs/compatibility/cts/setup#device-setup).\n - For instructions on setting up CTS-V, see [Setup](/docs/compatibility/cts/verifier#setup).\n4. If you are testing a module other than NFC, follow\n [Set up standard two-device tests](#setup-standard).\n\n - For NFC tests, follow [Set up NFC tests](#setup-nfc).\n5. If you are testing the CDM module, follow [Set up CDM tests](#setup-cdm) in\n addition to the standard two-device setup.\n\n### Set up standard two-device tests\n\nFor the default two-device setup:\n\n1. Place two matching Android DUTs approximately 20 cm apart.\n2. To ensure a clean environment, place both devices in a shield box.\n\n | **Note:** If you have issues with these tests and require help, ensure tests have been run with both devices in a shield box.\n3. (optional) Set up an OTA sniffer for Wi-Fi debugging.\n\n### Set up NFC tests\n\nNFC tests use **one** DUT and a PN532 NFC chip.\n\nTo set up NFC tests:\n\n1. Purchase a PN532 NFC chip. We recommend the [All-In-One PN532](https://shop.mtoolstec.com/product/mtools-all-in-one-pn532).\n2. On the DUT, navigate to the **Settings** app.\n\n3. Enable **NFC**.\n\n4. Position the NFC chip:\n\n - For phones, position the DUT's NFC reader as shown in figure 1:\n\n **Figure 1.** NFC chip positioning.\n - For other device types, position the chip next to the device's NFC antenna.\n\n5. Attach the PN532 NFC chip to your testing workstation using a USB cable.\n\n### Set up CDM tests\n\nThe `test_permissions_sync()` test case has different behavior depending on the\nbuild type of the devices on which the test is executed. It is critical that\n**both** debuggable (userdebug or eng) and non-debuggable (user) builds are\ntested by OEMs and that tests pass for both.\n\n#### Exemption\n\nThe CDD clause for the permissions sync API implementation only requires it to\nbe able to successfully transfer data between devices over a secure channel.\nSince the secure channel implementation isn't a CDD compliance requirement, this\ntest can be skipped on non-debuggable (user) builds, but only if you want to opt\nout of supporting the CDM permissions sync feature.\n\nThe tests must pass on debuggable builds without exception.\n\n#### Prerequisites for testing on non-debuggable builds\n\nIf you aren't exempt by the previous exemption clauses, ensure the following\nprerequisites are met.\n\nThe secure channel uses AVF (`AttestationVerificationFramework`) to verify the\ntrustworthiness of hardware. Attestations generated by both parties contain\nseveral pieces of information about themselves to ensure that there hasn't been\nany unauthorized alteration in their system. AVF checks for the following states\nduring the verification process:\n\n- Device has access to internet\n- Device uses verified boot and the build must be signed with a release-key, not a dev-key\n- Device is bootloader locked. For detailed instructions, see [locking the bootloader](/docs/core/architecture/bootloader/locking_unlocking#locking-bootloader)\n- OS, key boot, and key vendor patch levels are within 12 months. Don't use a build older than a year\n- Device attestation is backed by one of the vendor-approved root\n certificates. Specify your trusted root certificates in the\n `vendor_required_attestation_certificates.xml` resource overlay.\n\n \u003cbr /\u003e\n\nRun host-side multidevice tests (AOSP 16 or later)\n--------------------------------------------------\n\nCTS Verifier 16 introduces the support for host-side\nmultidevice tests.\nThese tests can be executed using automated scripts on the host, instead of the\nmanual test operation on the device. After each test is completed, results are\nautomatically uploaded to the DUT and displayed in the CTS Verifier app.\n\nThis section explains how to run the host-side multidevice tests.\n\n### Run multidevice tests\n\nTo run a multidevice test:\n\n1. On your test workstation, launch the `cts-v-host` console\n from the directory where the CTS-V zip package was unzipped:\n\n ./android-cts-verifier/android-cts-v-host/tools/cts-v-host-tradefed\n\n2. From within the CTS Verifier app on the DUT, click **Host-side Tests**.\n Figure 2 shows the host-side tests in the CTS Verifier app:\n\n **Figure 2.** Host-side multidevice tests in CTS Verifier app.\n\n A list of test host-side multidevice test modules is displayed.\n3. Identify the name of the test module that you want to run. For example, the\n CompanionDeviceManager module is listed as\n **CtsCompanionDeviceManagerMultiDeviceTestCases**.\n\n4. In the cts-v-host console, run the following command:\n Note: If you tap on a host-side module in the CTS Verifier app, you won't see\n a\n list of individual test cases. Instead the UI automatically populates with the\n test case results after the module has been executed on the host.\n\n5. In the xTS console, run the following command:\n\n run cts-v-host -m \u003cvar translate=\"no\"\u003etest_module_name\u003c/var\u003e\n\n For example: \n\n run cts-v-host -m CtsCompanionDeviceManagerMultiDeviceTestCases\n\n | **Note:** If you run `cts-v-host` without using the `-m `\u003cvar translate=\"no\"\u003etest_module_name\u003c/var\u003e, the command attempts to run all test modules, ignoring deviations in device and hardware requirements. Instead, execute the `run cts-v-host-default-devices` command to run the tests with the [standard setup](#setup-standard) as a single subplan.\n | **Note:** You can indicate the specific DUTs to test using their serial numbers: `run cts-v-host -m `\u003cvar translate=\"no\"\u003etest_module_name\u003c/var\u003e` -s `\u003cvar translate=\"no\"\u003edevice1_serial\u003c/var\u003e` -s `\u003cvar translate=\"no\"\u003edevice2_serial\u003c/var\u003e` ...`\n\n After the xTS console finishes running the tests, the\n results appear in the CTS Verifier app. Tests marked green have passed. Tests\n marked red have failed. Figure 3 shows example results for the\n CtsCompanionDeviceManager tests:\n\n **Figure 3.** Host-side multidevice test results in CTS Verifier app.\n | **Note:** Host-side results are automatically added to the overall CTS-V test report.\n\n \u003cbr /\u003e\n\nTroubleshoot multidevice tests\n------------------------------\n\nThis section provides troubleshooting help for possible issues.\n\n### Fix No response for GetFirmwareVersion during NFC tests\n\nIf you receive the message `verify_firmware_version RuntimeError: No response\nfor GetFirmwareVersion` while running the multidevice tests, the tests\ncan't access the PN532 NFC board.\n\nTo fix this issue, identify the serial path used by the PN532 NFC board on\nyour host, such as `dev/ttyUSB1`, then manually specify it using the\n`--module-arg` argument in the console: \n\n run cts-v-host -m CtsNfcHceMultiDeviceTestCases --module-arg CtsNfcHceMultiDeviceTestCases:pn532_serial_path:/dev/ttyUSB1\n\n### Fix Transaction failed error message during NFC tests\n\nIf you receive the message `Transaction failed, check device logs for more\ninformation.` for all NFC test cases, it is likely because the DUT's NFC chip\ncan't detect the PN532.\n\nIf you have multiple devices connected to the host, and some of them don't have\na PN532 placed on top, the wrong DUT may have been selected. For more\ninformation, see [Set up NFC tests](#setup-nfc).\n\nTo fix this problem, do one of the following:\n\n- Set the correct DUT's serial in your host-side test command using the `-s`\n flag.\n\n- Disconnect all non-DUT devices from the host.\n\n### CDM test case `test_permissions_sync` is ignored\n\nIf the test is being run on non-debuggable devices, then see if you are\n[exempted](#cdm-exemption). Otherwise, ensure that both devices meet the\n[prerequisites](#cdm-prerequisites)."]]