2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
서명된 구성 구현
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
서명된 Config 기능을 사용하면 비 SDK 인터페이스 제한의 구성을 APK에 삽입할 수 있습니다. 이렇게 하면 블랙리스트에서 특정 비 SDK 인터페이스를 삭제하여 AndroidX에서 안전하게 사용할 수 있습니다. 따라서 AndroidX팀이 이미 출시된 Android 버전의 새 기능을 추가로 지원할 수 있습니다. 이 기능은 Android 10 이상에서 지원됩니다.
서명된 Config를 제대로 지원하면 AndroidX 라이브러리가 향후 기기에서 제대로 작동합니다.
이 기능은 맞춤설정할 수 없습니다. AOSP에서 완벽하게 지원되므로 별도로 OEM이 지원할 필요가 없습니다.
예시 및 소스
이 기능은 시스템 서버의 frameworks/base/services/core/java/com/android/server/signedconfig
에서 구현됩니다. CTS 테스트 CtsSignedConfigHostTestCases
에는 사용 예시가 포함되어 있으며 cts/hostsidetests/signedconfig/app/version1_AndroidManifest.xml
에 구성 예시가 있습니다.
구현
이 기능을 지원하기 위한 별도의 작업은 필요하지 않으며 특정 하드웨어 요구사항도 없습니다.
이 기능은 두 개의 애플리케이션 메타데이터 키를 사용하여 구성과 서명을 APK에 삽입합니다. 키는 android.settings.global
과 android.settings.global.signature
입니다. AndroidX 라이브러리에서 향후 비 SDK 인터페이스를 블랙리스트에서 삭제해야 하는 경우 Android팀 또는 AndroidX에서 키 값을 게시합니다.
APK 메타데이터 키 android.settings.global
및 android.settings.global.signature
모두 base-64로 인코딩된 데이터를 포함합니다. 키 android.settings.global
의 값은 SettingsProvider
의 전역 설정에 적용될 JSON으로 인코딩된 구성 값입니다. android.settings.global.signature
의 값은 JSON 데이터의 ECDSA-p256 서명입니다.
서명은 구성 데이터의 출처를 확인하는 데 사용됩니다.
이 기능은 사용자에게 표시되지 않습니다.
맞춤설정
이 기능은 맞춤설정용이 아닙니다. OEM에서는 키를 교체하는 등 기능을 수정하지 않는 것이 좋습니다. 변경할 경우 향후 영향을 받는 기기에서 AndroidX가 제대로 작동하지 않을 수 있습니다.
유효성 검사
CTS 테스트 CtsSignedConfigHostTestCases
는 기능 구현을 확인합니다.
적절한 APK를 설치하고 adb logcat
출력을 검사하여 기능을 수동으로 테스트할 수도 있습니다.
$ adb install CtsSignedConfigTestAppV1.apk
...
$ adb logcat
...
I SignedConfig: Verified config using production key
...
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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,["# Implement Signed Config\n\nThe Signed Config feature allows embedding configuration of non-SDK interface restrictions\nin APKs. This allows removing specific non-SDK interfaces from the blacklist, to\nallow AndroidX to safely use them. This allows the AndroidX team to add support\nfor new features on Android versions that have already been released. It is\nsupported in Android 10 and later.\n\nProperly supporting Signed Config ensures that the AndroidX libraries will\nfunction correctly on devices in the future.\n\nNo customization of this feature is possible. It is fully supported in AOSP and\nrequires no OEM effort to support it.\n\nExamples and source\n-------------------\n\nThe feature implementation is in the system server at\n`frameworks/base/services/core/java/com/android/server/signedconfig`. The CTS\ntest `CtsSignedConfigHostTestCases` includes example usage, and an example\nconfiguration in\n`cts/hostsidetests/signedconfig/app/version1_AndroidManifest.xml`.\n\nImplementation\n--------------\n\nNo effort is required to support the feature, and there are no specific hardware\nrequirements.\n\nThe feature uses two application metadata keys to embed configuration and a\nsignature inside APKs. Those keys are `android.settings.global` and\n`android.settings.global.signature`. If or when the AndroidX libraries require\nnon-SDK interfaces to be removed from the blacklist in the future, values for\nthese keys will be published by the Android team and/or as part of AndroidX.\n\nThe APK metadata keys `android.settings.global` and\n`android.settings.global.signature` both contain base-64 encoded data. The value\nfor key `android.settings.global` is JSON-encoded config values to be applied to\nthe global settings in `SettingsProvider`. The value for\n`android.settings.global.signature` is an ECDSA-p256 signature of the JSON data.\nThe signature is used to verify the origin of the configuration data.\n\nThe feature isn't user visible.\n\nCustomization\n-------------\n\nThe feature isn't intended for customization. OEMs are discouraged from\nmodifying the feature, including replacing the keys. Any changes to it are\nlikely to cause AndroidX to not function properly on affected devices in the\nfuture.\n\nValidation\n----------\n\nThe CTS test `CtsSignedConfigHostTestCases` verifies the feature implementation.\n\nYou can also test the feature manually by installing an appropriate APK and\ninspecting the `adb logcat` output: \n\n $ adb install CtsSignedConfigTestAppV1.apk\n ...\n $ adb logcat\n ...\n I SignedConfig: Verified config using production key\n ..."]]