| display = 5.0 inch AMOLED capacitive multi-touch screen, 1280x1920
| memory = 4GB Dual Channel LPDDR4
| image = File:Sailfish.jpg
| imagecaption = Google Pixel (sailfish)
}}
== Contributors ==
* [https://gitlab.com/ojbr Oliver 'ojbr' Brammer]
== Maintainer(s) ==
* [mailto:oliver@octo.im Oliver 'ojbr' Brammer]
<!-- Only if this device doesn't run on linux-postmarketos yet! -->
<!-- This person needs to be willing to answer questions from users of this device -->
== Note on device codenames and compatibility ==
The sailfish variant of the Google Pixel shares the same kernel builds as the Pixel XL (marlin). Therefore, anything here referencing sailfish should also be relevant to marlin.
== What works ==
* Kernel compilation
* Flashing
* Booting kernel (serial only)
== What does not work ==
* SSH over USB
* Touch
* Screen
* WiFi
* Bluetooth (might actually work!)
* Camera
* GPS
* Modem
N.B: The Pixel/Pixel XL are slightly different in format to a typical Android ecosystem. They are given two partition slots, dubbed slot A & B. Out-of-the-box Android installations also enable filesystem encryption by default. However, this is a non-issue for pmOS, since TWRP can reformat the partition layout to drop FDE for testing.
=== Default Partition Layout ===
<pre>
~#: fdisk -l /dev/block/sda
bootlocker_a bootlocker_b
keymaster_a keymaster_b
tz_a tz_b
rpm_a rpm_b
pmic_a pmic_b
hyp_a hyp_b
cmnlib32_a cmnlib32_b
cmnlib64_a cmnlib64_b
aboot_a aboot_b
hosd_a hosd_b
devcfg_a devcfg_b
modem_a modem_b
msadp_a msadp_b
apdp_a apdp_b
vendor_a vendor_b
system_a system_b
userdata
reserve0
</pre>
== How to enter flash mode ==
It is required that the device is '''cell carrier unlocked''' before attempting to perform an OEM unlock using fastboot.
* Enter fastboot by shutting down the device, and hold volume down + power until you see the fastboot screen.
* Depending on the phone's previous sleep state, you may be alerted that a RAM dump is in progress. Ignore these, keep holding the buttons until you end up in fastboot.
Once cell unlocked, you must OEM unlock from fastboot through the standard command:
<pre>
<nowiki>#fastboot oem unlock</nowiki>
</pre>
Be sure that you are using fastboot slot A. If you need to change slots, perform:
<pre>
<nowiki>#fastboot set_active a
#fastboot reboot bootloader</nowiki>
</pre>
At this point, you should be ready to test pmOS deployments.
== Installation ==
More details to this section are coming soon.
<!-- add more sections below as necessary, e.g. Wifi, photos, ... -->
=== Backup with TWRP ===
Take precaution, and keep backups if this is your primary device.
* [https://twrp.me/google/googlepixel.html Download the latest TWRP (both img and zip)]
* From the TWRP directory, run the fastboot command: <pre>#fastboot boot <nowiki><your-twrp.img></nowiki></pre>
* At this point, TWRP will load
* Take your backup, note this does not include the user data directory. You need to copy that over with MTP as well.
=== Installation Steps ===
<pre><nowiki>
#fastboot set_active a
#fastboot reboot bootloader
#pmbootstrap flasher flash_rootfs
#pmbootstrap flasher flash_kernel
#fastboot reboot
</nowiki></pre>
== Serial Debugging ==
It is possible to debug the Pixel/Pixel XL with a standard [[Serial debugging|Nexus Serial debug cable]]. This must be enabled in fastboot first:
<pre>
#fastboot oem uart enable
</pre>
The baud rate is 115200.
== Known Issues ==
==== skip_initramfs ====
This is something added specific to Android, which skips the initramfs loading - something that shouldn't happen on pmOS.
A patch exists which strips the offending commit. However, a more comprehensive patch might be worth investing time into - since this does not remove the extra cmdline parameters.
Without the patch, you'll encounter:
<pre>
[ 14.025620] No filesystem could mount root, tried: ext3 ext2 ext4 vfat msdos fuseblk
[ 14.033436] c2 1 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(253,0)
</pre>
==== Firmware images not available ====
Need to include the [https://developers.google.com/android/drivers#sailfish proprietary vendor drivers].
<pre>
[TP]: [ERR]:fwu_start_reflash: Firmware image synaptics_bl71.img not available
</pre>
== To Do List ==
=== Done ===
* [ojbr] - Fix kernel panic on boot (skip_initramfs)
* [ojbr] - Serial debugging is possible with the kernel builds available on my mirror repository