การตั้งค่านี้ต้องใช้โฮสต์ x86_64 Linux หน้านี้แสดงวิธีสร้างและเริ่ม Cuttlefish ที่รองรับขนาดหน้าหน่วยความจำ 16 KB ใน x86_64 วิธีการในหน้านี้ถือว่าคุณได้ติดตั้งแพ็กเกจ Cuttlefish ในเครื่องแล้ว หากต้องการดู
วิธีการติดตั้ง โปรดดูขั้นตอนที่ 1 ของ หัวข้อติดตั้ง Cuttlefish
คุณสามารถเปิดใช้ Cuttlefish ได้โดย ดาวน์โหลดอาร์ติแฟกต์ที่สร้างไว้ล่วงหน้าจากเว็บไซต์ Android Continuous Integration โดยตรง หรือ สร้างจาก AOSP หากต้องการแก้ไขซอร์ส โค้ด
การใช้งานเคอร์เนล
การรองรับการจำลองหน้าหน่วยความจำ x86_64 ขนาด 16 KB ได้รับการเพิ่มใน GKI 6.6 ของ Android 14 ในชุดแพตช์ page_size_emulation
การส่ง page_shift=14 ในบรรทัดคำสั่งจะเปิดใช้การจำลองนี้
เป้าหมาย x86_64 ที่มีคำต่อท้าย _16k (หรือเป้าหมายเก่าที่มีคำต่อท้าย _pgagnostic
) เช่น aosp_cf_x86_64_phone_pgagnostic จะส่งตัวเลือกนี้โดย
ค่าเริ่มต้นและทำงานในโหมด 16 KB โดยค่าเริ่มต้น
เปิดใช้ Cuttlefish โดยดาวน์โหลดอาร์ติแฟกต์
ไปที่ เว็บไซต์ Android Continuous Integration และ
ป้อน aosp-main-throttled เป็นชื่อสาขา คลิกบิลด์ล่าสุดสำหรับเป้าหมาย aosp_cf_x86_64_only_phone_pgagnostic จากนั้นทำตามวิธีการจาก
ขั้นตอนที่ 5 ของ หัวข้อติดตั้ง Cuttlefish
เปิดใช้ Cuttlefish โดยสร้างจาก AOSP
สร้างและเปิดใช้ 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