2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
Android 가상화 프레임워크(AVF) 개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android 가상화 프레임워크(AVF)는 코드 실행을 위한 안전한 비공개 실행 환경을 제공합니다. AVF는 Android의 앱 샌드박스에서 제공되는 것보다 강력하면서도 보다 공식적으로 검증된 격리 보장이 필요한 보안 지향 사용 사례에 이상적입니다. Android는 AVF를 구현하는 데 필요한 모든 구성요소의 참조 구현을 제공합니다. 현재 AVF는 ARM64 기기에서만 지원됩니다. 그림 1은 AVF의 아키텍처를 보여줍니다.
그림 1. AVF 아키텍처
다음은 그림 1에서 가장 중요한 용어의 정의입니다.
- apexd 및 zipfuse
- 호스트에서 가져온 APEX 및 APK를 안전하게 마운트합니다.
- authfs
- Android와 pVM(호스트 및 게스트) 간에 여러 파일을 공유하는 보안용 퓨즈 파일 시스템입니다.
- binder
- VM 간 통신의 주요 수단입니다.
- crosvm
- rust로 작성된 가상 머신 모니터입니다. crosvm은 VM 메모리를 할당하고 가상 CPU 스레드를 생성하며 가상 기기의 백엔드를 구현합니다.
- GKI(Generic Kernel Image)
- Google에서 인증한 부팅 이미지로 ACK(Android Common Kernel) 소스 트리에서 빌드한 GKI 커널을 포함하며 Android 기기의 부팅 파티션에 플래시하는 데 적합합니다. 자세한 내용은 커널 개요를 참고하세요.
- hypervisor
- AVF에 사용되는 가상화 기술로, pKVM이라고도 합니다. hypervisor는 Android 또는 다른 pVM이 손상되더라도 실행된 코드의 무결성과 pVM 애셋의 기밀성을 보존합니다.
- Java API
- VirtualizationService Java API로, AVF를 지원하는 기기에만 있습니다. 이 API는 선택사항이며
thebootclasspath
의 일부는 아닙니다.
- Microdroid
- pVM에서 실행되는 Google 제공 미니 Android OS입니다.
- Microdroid Manager
- pVM 내부의 pVM 수명 주기와 인스턴스 디스크를 관리합니다.
- Native API
- Android NDK(Native Developers Kit)의 하위 집합입니다.
- 보호된 커널 기반 가상 머신(pKVM)
- Hypervisor를 참고하세요.
- pVM 펌웨어(
pvmfw
)
- pVM에서 실행되는 첫 번째 코드인
pvmfw
는 페이로드를 확인하고 VM별 보안 비밀을 파생합니다.
- 보호된 가상 머신(pVM)
기본 Android 운영체제('호스트')와 함께 실행되는, 상호 분리되어 있으며 신뢰할 수 없는 실행 환경('게스트')입니다. pVM은 pKVM에서 관리됩니다.
기존의 신뢰할 수 있는 실행 환경(TEE)과 비교할 때 pVM은 Microdroid라는 미니 Android 배포를 포함한 보다 풍부한 환경을 제공합니다. pVM은 동적으로 사용할 수 있으며, pVM을 지원하는 모든 기기에서 사용 가능한 표준 API 세트를 제공합니다.
- VirtualizationService
pVM의 수명 주기를 관리하는 Android 서비스
다음 단계는 무엇일까요?
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2024-04-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"]],["최종 업데이트: 2024-04-27(UTC)"],[],[],null,["# Android Virtualization Framework (AVF) overview\n\n*Android Virtualization Framework (AVF)* provides secure and private execution\nenvironments for executing code. AVF is ideal for security-oriented use cases\nthat require stronger, even formally verified, isolation assurances over those\noffered by Android's app sandbox. Android provides a reference implementation\nof all the components needed to implement AVF. AVF is supported only\non ARM64 devices. Figure 1 shows the architecture of AVF:\n\n**Figure 1.** AVF architecture.\n\nHere are the definitions for the most important terms from figure 1:\n\n*apexd and zipfuse*\n: Securely mounts APEXes and APKs imported from host.\n\n*authfs*\n: A fuse file system for securely sharing multiple files between Android and pVM\n (host and guest).\n\n*binder*\n: Primary means of inter-VM communication.\n\n*crosvm*\n: A virtual machine monitor written in rust. crosvm allocates VM memory,\n creates virtual CPU threads, and implements the virtual device's back-ends.\n\n*Generic Kernel Image (GKI)*\n: A boot image certified by Google that contains a GKI kernel built from an\n Android Common Kernel (ACK) source tree and is suitable to be flashed to the\n boot partition of an Android device. For further information, see the [Kernel\n overview](/docs/core/architecture/kernel).\n\n*hypervisor*\n: The virtualization technology used by AVF, also known as *pKVM*. The\n hypervisor maintains the integrity of the executed code and confidentiality of\n the pVM's assets, even if host Android or any of the other pVMs are compromised.\n\n*Java API*\n: The VirtualizationService Java APIs, which are present only on devices with\n AVF support. These APIs are optional and not part of `thebootclasspath`.\n\n*Microdroid*\n: A Google-provided mini-Android OS that runs in a pVM.\n\n*Microdroid Manager*\n: Manages the pVM lifecycle, inside the pVM, and instance disk.\n\n*Native API*\n: A subset of the Android Native Developers Kit (NDK).\n\n*protected kernel-based virtual machine (pKVM)*\n: See [Hypervisor](#hyper).\n\n*pVM firmware (`pvmfw`)*\n: The first code that runs on a pVM, `pvmfw` verifies the payload and derives\n the per-VM secret.\n\n*protected virtual machine (pVM)*\n\n: A mutually distrusted isolated execution environment (*guest* ) that runs\n alongside the main Android operating system (*host*). One important aspect of\n pVM security is even if the host is compromised, the host doesn't have access\n to a pVM's memory. pKVM is the standard hypervisor for running pVMs.\n\n Compared to existing trusted execution environments (TEEs), pVMs provide a\n richer environment, including the ability to run a mini-Android distribution\n called [Microdroid](#micro) (though Microdroid can also run on an\n unprotected VM). pVMs can be used dynamically and provide a\n standard set of APIs in a trusted environment available across all devices\n that support them.\n\n*VirtualizationService*\n\n: The Android service that manages the lifecycle of pVMs.\n\nWhat's next?\n------------\n\n- If you want to better understand the need for AVF, refer to [Why AVF?](/docs/core/virtualization/whyavf).\n- To read about how AVF can be used for isolated compilation, refer to [Use cases](/docs/core/virtualization/usecases).\n- If you want a more in-depth explanation of the AVF reference implementation's architecture, refer to [AVF architecture](/docs/core/virtualization/architecture).\n- If you want to learn about Microdroid, refer to [Microdroid](/docs/core/virtualization/microdroid).\n- If you are interested in how AVF handles security, refer to [Security](/docs/core/virtualization/security).\n- To understand the role of the virtualization service, refer to [VirtualizationService](/docs/core/virtualization/virtualization-service).\n- For source code of AVF or in-depth explanation about individual components, refer to [AOSP\n repository](https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/main)"]]