Google Pixel 2
Manufacturer

Google

Name

Pixel 2

Identifier

google-walleye

System Type

android

SoC

qualcomm-msm8998

Architecture

aarch64-linux

Source

Mobile NixOS repository

Builds

Hydra (default build)

Building

This will build the default output for your Google Pixel 2.

$ nix-build --argstr device google-walleye -A build.default

Installation

The device will need to be booted in its bootloader, or fastboot, mode. The boot image can be installed using the following command, assuming it was built using the previous command.

$ result/flash-critical.sh

If you have a system image (system.img) built, you can use fastboot to flash it to the device. Note that it might be too big to fit over the system partition. In such case, it can be flashed on the userdata partition.

Warning
This will erase everything on the partition. Additionally, the common backups methods, e.g. TWRP, will not backup the userdata partition.
$ fastboot flash userdata system.img

Device-specific notes

Serial access

Adding this to your configuration will make it so the shell in initrd will be on ttyMSM0.

mobile.boot.stage-1.shell.console = "ttyMSM0";