Auf dieser Seite wird beschrieben, wie Sie das Pixel 8, das Pixel 8 Pro und das Pixel 8a mit Unterstützung für 16 KB erstellen.
AOSP synchronisieren und erstellen
So synchronisieren und erstellen Sie AOSP:
AOSP-Repository auschecken:
$ mkdir ~/aosp_main && cd ~/aosp_main $ repo init -u https://android.googlesource.com/platform/manifest -b main $ repo sync -c -j$(nproc)
Fügen Sie das
envsetup.sh
-Skript ein, um Ihre Build-Umgebung einzurichten:$ source build/envsetup.sh
Wählen Sie eines der drei Ziele für Pixel 8-Geräte aus:
aosp_husky_pgagnostic-trunk_staging-userdebug
für das Pixel 8 Proaosp_shiba_pgagnostic-trunk_staging-userdebug
für das Google Pixel 8aosp_akita_16k-trunk_staging-userdebug
für das Pixel 8a
$ lunch target
Erstellen Sie den Code:
$ m -j$(nproc)
Diese Bilder werden nach Abschluss des Builds generiert:
$ ls out/target/product/<husky|shiba|akita>/*.img out/target/product/husky/boot.img out/target/product/husky/vbmeta.img out/target/product/husky/dtb.img out/target/product/husky/vbmeta_system.img out/target/product/husky/dtbo.img out/target/product/husky/vendor-bootconfig.img out/target/product/husky/init_boot.img out/target/product/husky/vendor_boot-debug.img out/target/product/husky/product.img out/target/product/husky/vendor_boot.img out/target/product/husky/pvmfw.img out/target/product/husky/vendor_boot-test-harness.img out/target/product/husky/ramdisk.img out/target/product/husky/vendor.img out/target/product/husky/super_empty.img out/target/product/husky/vendor_kernel_boot.img out/target/product/husky/system_dlkm.img out/target/product/husky/vendor_kernel_ramdisk.img out/target/product/husky/system_ext.img out/target/product/husky/vendor_ramdisk-debug.img out/target/product/husky/system.img out/target/product/husky/vendor_ramdisk.img out/target/product/husky/system_other.img out/target/product/husky/vendor_ramdisk-test-harness.img out/target/product/husky/userdata.img
Kernel synchronisieren und erstellen
Wählen Sie einen dieser 6.1-Kernel aus:
android-gs-shusky-6.1-android15-qpr2-beta
für Pixel 8- und Pixel 8 Pro-Geräteandroid-gs-akita-6.1-android15-qpr2-beta
für das Pixel 8a
Kernel synchronisieren:
# Sync the kernel. $ mkdir ~/android-gs-shusky-6.1 $ cd ~/android-gs-shusky-6.1 $ repo init -u https://android.googlesource.com/kernel/manifest -b kernel $ repo sync -c -j6
Erstellen Sie den Kernel:
So erstellen Sie den Kernel für das Pixel 8 oder das Pixel 8 Pro:
$ ./tools/bazel run \ --config=shusky \ //private/devices/google/shusky:zuma_shusky_dist \ --config=16k [dist] INFO: Copying to ~/android14-gs-pixel-6.1/out/shusky/dist
So erstellen Sie den Kernel für das Pixel 8a:
$ ./tools/bazel run \ --config=akita \ //private/devices/google/akita:zuma_akita_dist \ --confige=16k [dist] INFO: Copying to ~/android14-gs-pixel-6.1/out/akita/dist
Anbieterbilder herunterladen
Das AOSP-Repository enthält nicht die Anbieter-Images, die zum Booten des Geräts erforderlich sind. Sie können die Bilder unter ci.android.com
herunterladen:
Rufen Sie
ci.android.com/git_aosp-main-with-phones-throttled
auf.Wählen Sie einen grün hervorgehobenen Build aus, der zu Ihrem Gerät passt:
Klicken Sie für das Pixel 8 Pro auf
aosp_husky_pgagnostic
.Klicken Sie für das Pixel 8 auf
aosp_shiba_pgagnostic
.Klicken Sie für das Pixel 8a auf
aosp_akita_16k
.
Der Tab Artefakte wird unten auf der Seite angezeigt.
Klicken Sie auf Artefakte. Die Artefakte für Ihr Gerät werden aufgelistet.
Klicken Sie auf die Datei, die mit
.sh
endet, um das Artefakt herunterzuladen.Führen Sie im Verzeichnis, in das die Datei heruntergeladen wurde, den folgenden Befehl aus, um den Inhalt zu extrahieren:
$ cd ~/Downloads $ chmod +x aosp_<selected target>-flashable-<build id>-with-license.sh ./aosp_<selected target>-flashable-<build id>-with-license.sh # After reading the license, type Type "I ACCEPT" if you agree to the terms of the license: I ACCEPT # The extracted file will be in the current directory $ ls aosp_<selected_target>-flashable-with-license.zip # unzip that file in a directory named aosp_vendor $ unzip aosp_<selected_target>-flashable-with-license.zip -d aosp_vendor # The content of the directory will look like: $ ls aosp_vendor android-info.txt init_boot.img super_empty.img system_other.img vbmeta_vendor.img vendor_kernel_boot.img boot.img product.img system_dlkm.img userdata.img vendor_boot.img bootloader.img pvmfw.img system_ext.img vbmeta.img vendor_dlkm.img dtbo.img radio.img system.img vbmeta_system.img vendor.img
Bilder in ein temporäres Verzeichnis kopieren
Kopieren Sie die AOSP-, Kernel- und Anbieter-Images in dieser Reihenfolge in ein Verzeichnis:
$ mkdir ~/images && cd ~/images
# Copy AOSP generated images
$ cp ~/aosp_main/out/target/product/<akita|husky|shiba>/*.img ./images
# Copy kernel generated images
$ cp ~/android-gs-shusky-6.1/out/<akita|shusky>/dist ./images
# Copy the vendor images
$ cp ~/Downloads/aosp_vendor/vendor.img ./images
$ cp ~/Downloads/aosp_vendor/vbmeta_vendor.img ./images
Bilder mit Blitz
So flashen Sie die Bilder:
Dynamische Partitionen flashen:
$ IMGS_DIR=~/images $ adb reboot fastboot $ fastboot flash product $IMGS_DIR/product.img $ fastboot flash system $IMGS_DIR/system.img $ fastboot flash system_ext $IMGS_DIR/system_ext.img $ fastboot flash system_dlkm $IMGS_DIR/system_dlkm.img $ fastboot flash vendor $IMGS_DIR/vendor.img $ fastboot flash vendor_dlkm $IMGS_DIR/vendor_dlkm.img
Flashen Sie die Kernel-Images:
$ fastboot reboot bootloader # Wipe out /data partition $ fastboot -w # Disable pkvm $ fastboot oem pkvm disable $ fastboot flash boot $IMGS_DIR/boot.img $ fastboot flash init_boot $IMGS_DIR/init_boot.img $ fastboot flash dtbo $IMGS_DIR/dtbo.img $ fastboot flash vendor_kernel_boot $IMGS_DIR/vendor_kernel_boot.img $ fastboot flash pvmfw $IMGS_DIR/pvmfw.img $ fastboot flash vendor_boot $IMGS_DIR/vendor_boot.img $ fastboot flash --disable-verity --disable-verification vbmeta $IMGS_DIR/vbmeta.img $ fastboot flash --disable-verity --disable-verification vbmeta_system $IMGS_DIR/vbmeta_system.img $ fastboot flash --disable-verity --disable-verification vbmeta_vendor $IMGS_DIR/vbmeta_vendor.img
Drücken Sie die Ein/Aus-Taste, um das Gerät zu starten.
So prüfen Sie die Seitengröße:
$ adb shell getconf PAGE_SIZE 16384