x86_64 で 16 KB ページサイズの Cuttlefish をシミュレートする

このセットアップには、x86_64 Linux ホストが必要です。このページでは、x86_64 で 16 KB ページサイズをサポートする Cuttlefish をビルドして開始する方法について説明します。このページの手順では、Cuttlefish パッケージがマシンにインストールされていることが前提となります。Cuttlefish パッケージをインストールする手順については、Cuttlefish のインストールに関する記事のステップ 1 をご覧ください。

Android Continuous Integration のサイトからビルド済みのアーティファクトを直接ダウンロードするか、ソースコードを変更する必要がある場合は AOSP からビルドして、Cuttlefish を起動できます。

アーティファクトをダウンロードして Cuttlefish を起動する

Android Continuous Integration のサイトにアクセスし、ブランチ名として aosp-main-throttled を入力します。aosp_cf_x86_64_phone_pgagnostic ターゲットの最新のビルドをクリックします。Cuttlefish のインストールに関する記事のステップ 5 に記載された手順を行います。

AOSP からビルドして Cuttlefish を起動する

ページに依存しないターゲットをビルドし、そのターゲットで Cuttlefish を起動します。

$ mkdir main && cd main
$ repo init -u https://android.googlesource.com/platform/manifest -b main
$ repo sync -c -j32

# Build cf agnostic target.
$ source build/envsetup.sh
$ lunch aosp_cf_x86_64_phone_pgagnostic-trunk-userdebug
$ m

# Launch cf with a kernel with 16KB page size support.
$ launch_cvd
...
...
VIRTUAL_DEVICE_DISPLAY_POWER_MODE_CHANGED
virtio_input_hid_handle_status: unknown type 20
virtio_input_hid_handle_status: unknown type 20
virtio_input_hid_handle_status: unknown type 20
virtio_input_hid_handle_status: unknown type 20
Generating new secret with slot ID: 4
VIRTUAL_DEVICE_BOOT_STARTED
VIRTUAL_DEVICE_NETWORK_MOBILE_CONNECTED

ページサイズと起動を確認する

ページサイズと起動ステータスを確認する方法は以下のとおりです。

  1. root としてシェルにアクセスします。

    $ adb root
    adbd is already running as root
    $ adb shell
    vsoc_x86_64_pgagnostic:/ #
    
  2. ページサイズと起動ステータスを確認します。

    vsoc_x86_64_pgagnostic::/ # getconf PAGE_SIZE
    16384
    vsoc_x86_64_pgagnostic::/ # getprop | grep sys.boot.completed
    sys.boot_completed: 1