Jump to content

Google Pixel (google-pixel)

From postmarketOS Wiki
Revision as of 19:17, 14 May 2018 by Ojbr (talk | contribs) (Add device image)
Google Pixel
Manufacturer Google
Name Pixel
Codename sailfish, marlin
Released 2016
Hardware
Chipset Qualcomm MSM8996 Snapdragon 821
CPU Quad-core (2x2.15 GHz Kryo & 2x1.6 GHz Kryo)
GPU Adreno 530
Display 5.0 inch AMOLED capacitive multi-touch screen, 1280x1920
Storage 32/128GB
Memory 4GB Dual Channel LPDDR4
Software
Original software Android 7.1 (Nougat)
postmarketOS
Category testing
Pre-built images no
Mainline no
Features
Flashing
No data
USB Networking
No data
Internal storage
No data
SD card
No data
Battery
No data
Screen
No data
Touchscreen
No data
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
No data
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

Maintainer(s)


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

What does not work

  • Booting kernel via fastboot (see details below)
  • 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.

Standard fastboot flashing is known working, however the kernel currently panics on boot:

[   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 ront fs on unknown-block(253,0)

This seems pretty easy to solve; just need the time to look at where the filesystem is attempting to go.

Default Partition Layout

~#: 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

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:

#fastboot oem unlock

Be sure that you are using fastboot slot A. If you need to change slots, perform:

#fastboot set_active a
#fastboot reboot bootloader

At this point, you should be ready to test pmOS deployments.

Installation

More details to this section are coming soon.

Backup with TWRP

Take precaution, and keep backups if this is your primary device.

  • Download the latest TWRP (both img and zip)
  • From the TWRP directory, run the fastboot command:
    #fastboot boot <your-twrp.img>
  • 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

#fastboot set_active a
#fastboot reboot bootloader
#pmbootstrap flasher flash_rootfs
#pmbootstrap flasher flash_kernel
#fastboot reboot

Serial Debugging

It is possible to debug the Pixel/Pixel XL with a standard Nexus Serial debug cable. This must be enabled in fastboot first:

#fastboot oem uart enable

The baud rate is 115200.

To Do List

Done

  • [ojbr] - Serial debugging is possible with the kernel builds available on my mirror repository
  • [ojbr] - Re-enable LZMA kernel image compression, add via makedepends
  • [ojbr] - Test device flashing using fastboot

Doing

  • [ojbr] - Fix kernel panic on boot

Backlog

  • Investigate Kernel upgrade path to 4.X where MSM8996 has better support in mainline

See also