2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
기기 관리 테스트
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
관리 프로필에 대한 최소한의 지원을 보장하려면 OEM 기기에는 다음 기본 요소가 있어야 합니다.
전체 요구사항 목록은 기기 관리 구현을 참고하세요. 기기 관리 기능을 테스트하기 위해 기기 소유자는 아래에서 설명하는 TestDPC 애플리케이션을 사용할 수 있습니다.
테스트하도록 기기 소유자 설정
다음 지침에 따라 기기 소유자 테스트 환경을 설정합니다.
- 공장에서 대상 기기를 초기화합니다.
- 기기에 사용자 계정이 없는지 확인합니다 (예: 온라인 서비스에 로그인하는 데 사용한 계정). 확인하려면 설정 > 계정을 살펴보세요.
- 다음 방법 중 하나를 사용하여 테스트 애플리케이션을 설정합니다.
- 다음 명령을 사용하여 TestDPC 앱을 기기 소유자로 설정합니다.
adb shell dpm set-device-owner "com.afwsamples.testdpc/.DeviceAdminReceiver"
- 기기에서 기기 소유자 설정을 살펴봅니다 (암호화, Wi-Fi 선택).
기기 소유자 설정 확인
기기 소유자가 올바르게 설정되었는지 확인하려면 설정 >
보안 > 기기 관리로 이동한 다음 TestDPC가 목록에 있는지
확인합니다. 기기 소유자를 사용 중지할 수 없는지 확인합니다(사용 중지할 수 없으면 기기 소유자임).
버그 신고 및 로그
Android 7.0부터 기기 소유자 DPC(Device Policy Client)가 버그 신고를 받아 관리 기기에서 엔터프라이즈 프로세스에 관한 로그를 확인할 수 있습니다.
버그 신고 (즉, dumpsys
, dumpstate, logcat 데이터가 포함된 adb bugreport
에서 수집된 동등한 데이터)를 트리거하려면 DevicePolicyController.requestBugReport
를 사용하세요. 버그 신고가 수집되면 사용자에게는 버그 신고 데이터를 전송하는 데 동의할지 묻는 메시지가 표시됩니다. 결과는 DeviceAdminReceiver.onBugreport[Failed|Shared|SharingDeclined]
가 수신합니다. 버그 신고 내용에 관한 자세한 내용은 버그 신고 읽기를 참고하세요.
또한 기기 소유자 DPC는 사용자가 관리 기기에 관해 취한 조치와 관련된 로그를 수집할 수도 있습니다. 엔터프라이즈 프로세스 로깅은 device_admin을 보고하고 시스템 서버만 읽을 수 있는 새로운 로그 보안 버퍼로 사용 설정된 모든 기기에 필요합니다 (즉, $ adb logcat -b security
는 이 버퍼를 읽을 수 없음). ActivityManager 서비스와 Keyguard 구성요소는 보안 버퍼에 관한 다음 이벤트를 로깅합니다.
- 애플리케이션 프로세스 시작
- 키가드 작업 (예: 잠금 해제 실패 및 성공)
- 기기에 관해
adb
명령이 실행됨
여러 번 재부팅(콜드 부팅 아님)하는 과정에서 로그를 유지하고, 이러한 로그를 기기 소유자 DPC가 확인할 수 있도록 하려면 기기에는 pstore
및 pmsg
가 활성화된 커널과 모든 재부팅 단계에서 지원 및 새로고침된 DRAM이 있어 메모리에서 로그 손상을 피해야 합니다. 지원하려면 frameworks/base/core/res/res/values/config.xml
에서 config_supportPreRebootSecurityLogs
설정을 사용하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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,["# Test device management\n\nTo ensure minimal support for managed profiles, OEM devices must contain the\nfollowing essential elements:\n\n- Profile owner (as described in [Ensuring\n Compatibility with Managed Profiles](https://developer.android.com/training/enterprise/app-compatibility.html))\n- Device owner\n\nFor a complete list of requirements, see\n[Implement device\nmanagement](/docs/devices/admin/implement). To test device management features, device owners can\nuse the TestDPC application described below.\n\nSet up device owner for testing\n-------------------------------\n\nUse the following instructions to set up a device owner testing environment.\n\n1. Factory reset the target device.\n2. Ensure the device does not contain any user accounts (for example, those used to log into online services). To verify, check *Settings \\\u003e Accounts*.\n3. Set up the testing application using one of the following methods:\n - [Download\n the TestDPC application](https://play.google.com/store/apps/details?id=com.afwsamples.testdpc&hl=en) (available from Google Play).\n - [Build\n the TestDPC application](https://github.com/googlesamples/android-testdpc/) (available from github.com).\n4. Set the TestDPC app as the device owner using the following command: \n\n ```\n adb shell dpm set-device-owner \"com.afwsamples.testdpc/.DeviceAdminReceiver\"\n ```\n5. Go through device owner setup on the device (encrypt, select Wi-Fi).\n\nVerify device owner setup\n-------------------------\n\nTo verify the device owner was correctly setup, go to *Settings \\\u003e\nSecurity \\\u003e Device Administrators* and confirm TestDPC is in the\nlist. Verify it cannot be disabled (this signifies it is a device owner).\n\nBug reports and logs\n--------------------\n\nAs of Android 7.0, device owner Device Policy Client (DPCs) can get bug\nreports and view logs for enterprise processes on a managed device.\n\nTo trigger a bug report (that is, the equivalent data collected by\n`adb bugreport` containing `dumpsys`, dumpstate, and\nlogcat data), use `DevicePolicyController.requestBugReport`. After\nthe bug report is collected, the user is prompted to give consent to send the\nbug report data. Results are received by\n`DeviceAdminReceiver.onBugreport[Failed|Shared|SharingDeclined]`. For\ndetails on bug report contents, see\n[Reading bug reports](/docs/setup/read-bug-reports).\n\nIn addition, device owner DPCs can also collect logs related to actions a\nuser has taken on a managed device. Enterprise process logging is required for\nall devices that report device_admin and enabled by a new log security buffer\nreadable only by the system server (that is, `$ adb logcat -b security`\ncannot read the buffer). ActivityManager service and Keyguard components log the\nfollowing events to the security buffer:\n\n- Application processes starting\n- Keyguard actions (for example, unlock failure and success)\n- `adb` commands issued to the device\n\nTo optionally retain logs across reboots (not cold boot) and make these logs\navailable to device owner DPCs, a device must have a kernel with\n`pstore` and `pmsg` enabled, and DRAM powered and\nrefreshed through all stages of reboot to avoid corruption to the logs retained\nin memory. To enable support, use the\n`config_supportPreRebootSecurityLogs` setting in\n`frameworks/base/core/res/res/values/config.xml`."]]