Jump to content

Google Pixel (google-pixel)

From postmarketOS Wiki
Revision as of 20:05, 4 May 2018 by Ojbr (talk | contribs)
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

What does not work

  • Booting kernel via fastboot
  • Flashing (install script mods required, see below)
  • Touch
  • Screen
  • WiFi
  • Bluetooth
  • Camera
  • GPS
  • Modem

Installation using normal measures does not successfully boot via the typical flashing method, however it is possible to direct boot to the initramfs without flashing. The Pixel/Pixel XL also have encrypted partitions by default, which is troublesome for TWRP. The Pixels also differ from the standard Android boot partition format, since they have two partition slots (dubbed slot A & B).

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.

Fastboot without flashing

#fastboot set_active a
#fastboot reboot bootloader
#pmbootstrap flasher boot

Serial Debugging

Sounds like this is possible, given kernel has serial debugging enabled.

http://www.viruss.eu/malware/practical-android-debugging-via-kgdb/

Should also be possible with a Nexus Serial debug cable. Awaiting a parts delivery for this.

Must be enabled via fastboot first:

fastboot oem uart enable

To Do List

Doing

  • [ojbr] - Investigate serial debugging. Obtained a USB FTDI device, just need to hack together a 3.5mm TRRS cable

Backlog

  • Re-enable LZMA kernel image compression, add via makedepends
  • Test device flashing using fastboot
  • Investigate Kernel upgrade path to 4.X where MSM8996 has better support in mainline

See also