在 x86-64 上模拟页面大小为 16KB 的 Cuttlefish

本页介绍了如何在 x86-64 上构建和启动支持 16KB 页面大小的 Cuttlefish。本页面中的说明假定您的机器中已安装 Cuttlefish。如需了解安装说明,请参阅安装 Cuttlefish

同步和构建设有与页面无关的目标的 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 身份访问 shell:

    $ 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