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(ホストとゲスト)の間で複数のファイルを安全に共有するための fuse ファイル システム。
- binder
- VM 間通信の主な手段。
- crosvm
- Rust で書かれた仮想マシンモニタ。crosvm は VM メモリを割り当て、仮想 CPU スレッドを作成して、仮想デバイスのバックエンドを実装します。
- 汎用カーネル イメージ(GKI)
- Android 共通カーネル(ACK)ソースツリーからビルドされた GKI カーネルを含み、Android デバイスの boot パーティションにフラッシュするのに適した、Google が認定したブートイメージ。詳細については、カーネルの概要をご覧ください。
- hypervisor
- AVF で使用される仮想化テクノロジー(pKVM とも呼ばれます)。このハイパーバイザは、ホストの Android や他の pVM が侵害された場合でも、実行されるコードの完全性と pVM アセットの機密性を維持します。
- Java API
- AVF をサポートするデバイスにのみ存在する VirtualizationService の Java API。これらの API はオプションであり、
thebootclasspath
の一部ではありません。
- Microdroid
- pVM で動作する Google 提供のミニ Android OS。
- Microdroid Manager
- pVM のライフサイクル、pVM 内、インスタンス ディスクを管理します。
- Native API
- Android ネイティブ デベロッパー キット(NDK)のサブセット。
- 保護されたカーネルベースの仮想マシン(pKVM)
- ハイパーバイザをご覧ください。
- pVM ファームウェア(
pvmfw
)
- pVM で実行される最初のコード
pvmfw
がペイロードを検証し、VM ごとのシークレットを導出します。 - 保護された仮想マシン(pVM)
メインの Android オペレーティング システム(「ホスト」)の隣で実行される、相互に信頼されていない隔離された実行環境(「ゲスト」)。pVM の重要なセキュリティ機能の 1 つに、ホストが侵害された場合にホストから pVM のメモリにアクセスできない点が挙げられます。pKVM は、pVM を実行する際の標準のハイパーバイザです。
既存の高信頼実行環境(TEE)と比較すると、pVM は Microdroid と呼ばれるミニ Android ディストリビューションを含むリッチな環境を提供します(ただし、Microdroid は保護されていない仮想マシン上でも実行可能です)。pVM は動的に使用でき、そこではサポート対象のすべてのデバイスで利用可能な高信頼環境内で標準の API セットが提供されます。
- VirtualizationService
pVM のライフサイクルを管理する Android サービス。
次のステップ
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-03 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-03-03 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)"]]