2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
번들로 묶이지 않은 앱 통합
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
다이얼러, 미디어, 자동차 UI 라이브러리, SMS를 포함하는 앱은 번들로 묶이지 않은 앱으로 간주됩니다 (즉, Android 플랫폼에서 번들로 묶이지 않음). 이러한 앱에는 연결 설정 및 기능 등록 설정을 비롯하여 자동차 측의 휴대전화 호환 앱과 UX에서 데이터를 수신하는 로직이 포함됩니다. 번들로 묶이지 않은 코드에서 빌드된 APK는 여러 버전의 플랫폼에서 작동합니다.
코드 체크아웃
번들로 묶이지 않은 코드를 체크아웃하려면 다음을 실행합니다.
repo init -u https://android.googlesource.com/platform/manifest -b ub-automotive-master
repo sync -cq -j4
AOSP 소스 코드로 작업하는 방법에 관한 자세한 내용은 Repo 클라이언트 초기화를 참고하세요.
코드 빌드
Android 스튜디오 또는 명령줄을 사용하여 코드를 빌드할 수 있습니다.
Android 스튜디오
Android 스튜디오에서 코드를 빌드하는 방법은 다음과 같습니다.
Android 스튜디오에서 다음 빌드 파일을 가져옵니다.
packages/apps/Car/libs/aaos-apps-gradle-project/build.gradle
Gradle JDK가 버전 11 이상으로 설정되어 있는지 확인합니다.
그림 1. Android 스튜디오에서 Gradle JDK를 버전 11로 설정합니다.
명령줄
명령줄에서 코드를 빌드하는 방법은 다음과 같습니다.
다음 방법 중 하나를 사용하여 Android SDK 위치를 설정합니다.
packages/apps/Car/libs/aaos-apps-gradle-project/local.properties
를 만든 후 포함된 sdk.dir
속성을 설정합니다. Android 스튜디오는 프로젝트를 열 때 이 작업을 자동으로 실행할 수 있습니다. 예를 들어 sdk.dir=/Users/MY-USERNAME/Library/Android/sdk
을 사용합니다.
또는
ANDROID_SDK_ROOT
환경 변수를 Android SDK 경로로 설정합니다.
명령 프롬프트 또는 셸 창을 엽니다.
packages/apps/Car/libs/aaos-apps-gradle-project
(으)로 이동합니다.
다음 명령어를 실행합니다.
./gradlew assemble
필요한 최소 API 수준
번들로 묶이지 않은 각 앱은 minSdkVersion
이상의 버전을 가진 Android 플랫폼에서 작동합니다. 다음 표에는 각 앱에서 지원하는 최소 API 버전이 나와 있습니다.
앱 |
최소 API 수준 |
Calendar |
29 |
자동차 UI 라이브러리 |
29 |
CompanionDevice |
29 |
다이얼러 |
31 |
미디어 |
30 |
Messenger (SMS) |
30 |
AOSP 호스트 |
29 |
시스템 이미지에 사전 빌드 통합
앱에서 Android 플랫폼 버전을 지원하는 경우 (이전 섹션의 표 참고) APK를 시스템 이미지에 추가할 수 있습니다. 그러나 통합 단계는 Android 플랫폼 버전마다 다릅니다.
Android 13 이상
Android 13 이상에는 번들 해제된 앱의 소스 코드가 포함되어 있지 않지만 CDD 규정 준수 테스트 또는 권한이 있는 앱 프로비저닝과 같은 사용 사례를 위해 플랫폼 빌드에 사전 빌드된 APK를 포함할 수 있습니다. APK를 지정하려면 다음 예와 같이 android_app_import
Soong 규칙을 사용합니다.
android_app_import {
name: "CarMediaApp",
apk: "CarMediaApp.apk",
privileged: true,
certificate: "platform", // Media must be signed by the platform
required: ["allowed_privapp_com.android.car.media"],
}
Android 12 및 이전 버전
Android 12 이하에는 번들 해제된 앱의 소스 코드가 포함되어 있지만 포함할 사전 빌드된 APK를 지정할 수는 있습니다. Soong 기본값은 사전 빌드보다 소스 코드를 우선하므로 다음 예와 같이 android_app_import
규칙 내에서 prefer
플래그를 true
로 설정해야 합니다.
android_app_import {
name: "CarDialerApp",
apk: "CarDialerApp.apk",
privileged: true,
presigned: true, // Dialer can have its own signature
required: ["allowed_privapp_com.android.car.dialer"],
overrides: ["Dialer"],
prefer: true, // The prebuilt replaces a source target with the same name
}
번들로 묶이지 않은 앱 세부정보
앱/배포 |
권한이 있고 번들로 묶이지 않은 시스템 서명 |
권한이 있고 번들로 묶이지 않은 비시스템 서명 |
번들로 묶이지 않음 시스템 파티션에 있지 않아도 됨 |
앱 -
Calendar
|
|
|
X |
앱 -
CompanionDeviceSupport
|
|
X |
|
앱 -
다이얼러
|
|
X |
|
앱 - AOSP 호스트 |
|
X |
|
앱 -
미디어 |
X |
|
|
앱 -
메신저(SMS) |
|
X |
|
업데이트 배포 |
OTA |
OTA 또는 Google Play |
OTA 또는 Google Play |
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-06-12(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-06-12(UTC)"],[],[],null,["# Integrate unbundled apps\n\nApps that include Dialer, Media, Car UI Library, and SMS are considered\n*unbundled apps* (that is, they are unbundled from the Android platform). Such\napps include the logic for receiving data from the phone companion app and UX on\nthe car side, including settings for association and feature enrollment. APKs\nbuilt from unbundled code work with several versions of the platform.\n\nCheck out the code\n------------------\n\nTo check out the unbundled code, run the following: \n\n repo init -u https://android.googlesource.com/platform/manifest -b ub-automotive-master\n repo sync -cq -j4\n\nTo learn more about working with AOSP source code, see [Initialize the Repo\nClient](/setup/download#initialize_the_repo_client).\n\nBuild the code\n--------------\n\nYou can build the code using Android Studio or from the command line.\n\n### Android Studio\n\nTo build the code in Android Studio:\n\n1. In Android Studio, import the following build file:\n\n packages/apps/Car/libs/aaos-apps-gradle-project/build.gradle\n\n2. Ensure the Gradle JDK is set to Version 11 or higher:\n\n **Figure 1.** Set Gradle JDK to Version 11 in Android Studio.\n\n### Command line\n\nTo build the code from the command line:\n\n1. Set the Android SDK location using one of the following methods:\n\n - Create\n `packages/apps/Car/libs/aaos-apps-gradle-project/local.properties` and\n then set the `sdk.dir` property it contains. Android Studio can do this\n automatically when opening a project. For example, use\n `sdk.dir=/Users/MY-USERNAME/Library/Android/sdk`.\n\n *or*\n - Set the `ANDROID_SDK_ROOT` environment variable with the path to the\n Android SDK.\n\n2. Open a command prompt or a shell window.\n\n3. Go to `packages/apps/Car/libs/aaos-apps-gradle-project`.\n\n4. Run the following command:\n\n ./gradlew assemble\n\nMinimum required API levels\n---------------------------\n\nEach unbundled app works on Android platforms with a version equal to or greater\nthan its\n[`minSdkVersion`](https://developer.android.com/studio/publish/versioning). The\nfollowing table lists the minimum API version supported by each app:\n\n| App | Minimum API level |\n|---------------------------------------------|-------------------|\n| Calendar | 29 |\n| Car UI library | 29 |\n| CompanionDevice | 29 |\n| Dialer | 31 |\n| Media | 30 |\n| Messenger (SMS) | 30 |\n| [AOSP Host](/docs/automotive/hmi/aosp_host) | 29 |\n\nIntegrate a prebuild into a system image\n----------------------------------------\n\nIf the Android platform version is supported by the app (see the table in the\nprevious section), you can add the APK to the system image. However, the\nintegration steps differ between Android platform versions.\n\n### Android 13 and higher\n\nAndroid 13 and higher doesn't include source code for unbundled apps, but you\ncan include a prebuilt APK in the platform build for use cases such as CDD\ncompliance testing or provisioning privileged apps. To specify the APK, use the\n[`android_app_import`](https://ci.android.com/builds/latest/branches/aosp-build-tools/targets/linux/view/soong_build.html)\nSoong rule, as shown in the following example: \n\n android_app_import {\n name: \"CarMediaApp\",\n apk: \"CarMediaApp.apk\",\n privileged: true,\n certificate: \"platform\", // Media must be signed by the platform\n required: [\"allowed_privapp_com.android.car.media\"],\n }\n\n### Android 12 and lower\n\nAndroid 12 and lower includes source code for unbundled apps, but you can still\nspecify a prebuilt APK to include. Because the Soong default is to give\nprecedence to the source code over a prebuilt, it's necessary to set the\n`prefer` flag to `true` inside the `android_app_import` rule, as shown in the\nfollowing example: \n\n android_app_import {\n name: \"CarDialerApp\",\n apk: \"CarDialerApp.apk\",\n privileged: true,\n presigned: true, // Dialer can have its own signature\n required: [\"allowed_privapp_com.android.car.dialer\"],\n overrides: [\"Dialer\"],\n prefer: true, // The prebuilt replaces a source target with the same name\n }\n\nUnbundled app details\n---------------------\n\n| App/Distribution | Privileged unbundled *system signed* | Privileged unbundled *non-system signed* | Unbundled *don't need to be on system partition* |\n|------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|------------------------------------------|--------------------------------------------------|\n| App - [Calendar](https://android.googlesource.com/platform/packages/apps/Car/Calendar/+/refs/heads/mirror-car-apps-aosp-release) | | | X |\n| App - [CompanionDeviceSupport](https://android.googlesource.com/platform/packages/apps/Car/CompanionDeviceSupport/+log/refs/heads/main) | | X | |\n| App - [Dialer](https://android.googlesource.com/platform/packages/apps/Car/Dialer/+/refs/heads/mirror-car-apps-aosp-release) | | X | |\n| App - AOSP Host | | X | |\n| App - [Media](https://android.googlesource.com/platform/packages/apps/Car/Media/+/refs/heads/mirror-car-apps-aosp-release) | X | | |\n| App - [Messenger (SMS)](https://android.googlesource.com/platform/packages/apps/Car/Messenger/+/refs/heads/mirror-car-apps-aosp-release) | | X | |\n| Update distribution | OTA | OTA or Google Play | OTA or Google Play |"]]