這個設定需要 x86_64
Linux 主機。本頁面說明如何在 x86_64
上建構並啟動支援 16 KB 頁面大小的 Cuttlefish。本頁面的操作說明假設您已在電腦上安裝 Cuttlefish 套件。如需安裝操作說明,請參閱「安裝 Cuttlefish」的步驟 1。
您可以直接從 Android 持續整合網站下載預先建構的構件,或從 AOSP 建構 (如果您需要修改原始碼)。
核心實作
page_size_emulation
修補程式系列中的 Android 14 6.6 GKI 已新增模擬 x86_64
16 KB 分頁的支援功能。在指令列上傳遞 page_shift=14
即可啟用此模擬功能。x86_64
目標如果有 _16k
後置字元 (或舊版目標有 _pgagnostic
後置字元),例如 aosp_cf_x86_64_phone_pgagnostic
,則預設會傳遞這個選項,並預設以 16 KB 模式運作。
下載構件來啟動 Cuttlefish
前往 Android 持續整合網站,然後輸入 aosp-main-throttled
做為分支版本名稱。按一下 aosp_cf_x86_64_only_phone_pgagnostic
目標的最新版本。接著,請按照「安裝 Cuttlefish」一文的步驟 5 操作。
透過 Android 開放原始碼計畫建構,啟動 Cuttlefish
使用不區分網頁的目標建構及啟動 Cuttlefish:
$ mkdir android-latest-release && cd android-latest-release
$ repo init -u https://android.googlesource.com/platform/manifest -b android-latest-release
$ repo sync -c -j32
# Build cf agnostic target.
$ source build/envsetup.sh
$ lunch aosp_cf_x86_64_only_phone_pgagnostic-aosp_current-userdebug
$ m
# Launch cf with a kernel with 16 KB 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
驗證頁面大小和啟動
如要確認頁面大小和開機狀態,請按照下列步驟操作:
以根使用者身分存取 Shell:
$ adb root adbd is already running as root $ adb shell vsoc_x86_64_pgagnostic:/ #
驗證頁面大小和開機狀態:
vsoc_x86_64_pgagnostic::/ # getconf PAGE_SIZE 16384 vsoc_x86_64_pgagnostic::/ # getprop | grep sys.boot.completed sys.boot_completed: 1