LineageOS on a Pixel

Posted on



This post discusses the challenges of installing LineageOS and Google Play Store on a Pixel 1 phone.

Background

Pixel 1 end of life

Android 10 was just released, and along with it, an official Android 10 stock ROM image for the Pixel 1. However, no further security updates are guaranteed for the phone, despite being a still capable 3 year old device.

LineageOS

LineageOS seems like the most well-supported open source Android ROM project with wide device support. It’s also the spiritual successor to the now defunct CyanogenMod ROM.

Google Play Services and Play Store

Alternative ROMs do not include the proprietary Google Play Services (required for many apps to function correctly), Google Play Store (often the only official channel to acquire many apps) or other Google apps.

Play Service, Play Store, and other Google Apps are not distributed by Google directly to consumers (but device manufacturers only). There seem to be two popular third part distributions: Open GApps and MindTheGapps.

MindTheGapps includes the Play Store, the Google search app, and supporting packages. Open GApps contains several different bundles with different packages. Note: Pixel is ARM64 architecture. Installing a “stock” Open GApps bundle will replace many open-source versions of apps with the Google versions that come with the stock Pixel ROM.

MicroG

There is also MicroG, which is an open source implementation of parts of Play Services that enables many apps to function correctly. It requires signature spoofing (because MicroG pretends to be Google Play Services), which is not supported on LineageOS, unless you get the custom LineageOS for microG build.

Installation Problems

The official LineageOS guide is available at: https://wiki.lineageos.org/devices/sailfish/install. Following these instructions proved problematic.

Problem 1: TWRP bug

Following the guide does not work, because at the moment, there appears to be some problem in the latest version of TWRP (3.3.3.1). An older version, TWRP 3.2.3.1 works fine. Reference: https://android.stackexchange.com/questions/214351/twrp-unable-to-wipe-or-format-failed-to-mount-system-device-or-resource-bus.

Problem 2: Error 70

The system partition on Android is 2GB in size on a Pixel 1. After installing LineageOS, there is ~900MB left for Google packages.

Following the official LineageOS guide and using any Open GApps bundle (even the smallest Pico), even with a working TWRP build, results in a Error 70 code that indicates not enough free space is available.

By using the TWRP recovery to install Open GApps, instead of the LineageOS recovery, allows the Mini (or smaller) Open GApps bundles to be installed without Error 70. It is not clear why. The stock build is too big. Trying MindTheApps package appears to work with both TWRP and LineageOS recovery.

Problem 3: Pixel Launcher crash-loops

After successful installation and during the setup process of first boot, a choice between the Pixel Launcher and the LineageOS Trebuchet Launcher needs to be made. The former results in crash looping and (if “always use” was chosen), a difficult experience of switching to Trebuchet Launcher.

Problem 4: Play Store Error 495

Next, there is a significant problem with both OpenGApps (mini or pico bundles) and MindTheGapps: the Play Store is unable to update or install any apps. Attempts to do so hang, never complete, and eventually result in error 495, with no clear and effective resolution. This occurs when updating pre-installed apps, or installing new apps. It also occurs with or without logging in (Play Store now updates pre-installed Apps without requiring logging in).

No Play Store is a dealbreacker

It was not feasible to get (at least these builds of) LineageOS and Play Store working in a reasonable fashion. Other options include using LineageOS and Google Play Services, but relying on an alternative app store, such as Aptoide or a reverse-engineered Play Store client such as Aurora Store. Or using LineageOS and MicroG and one of these app stores. Or LineageOS and just the open source F-Droid app store.

Unfortunately, a Google Play Services update from Aptoide resulted in non-stop “Google Play services has stopped” crash loop. A GBoard APK from Aptoide simply did not work. Relying on Aurora Store seems risky in the long term (the previous Play store client Yalp Store used to break unexpectedly and is now abandoned). Relying on pure open source sans-Google is an interesting experiment, but does not meet the expectations of most people.

Giving up

Stock ROMs, in general and especially for Pixel, have gained so much functionality and polish over the years that there are fewer compelling features gained by adopting custom ROMs or rooting. Long term support (and security updates) for aging hardware, however, is still something ROMs like LineageOS excel at.

Nevertheless, it seems quite challenging to get a fully functioning replacement OS installed. Perhaps sticking to the stock Android 10 ROM (without future security updates), or retirement, are the best options for the Pixel 1.

Appendix

Installation instructions

These are the final installation instructions, for reference purposes, that solve Problems 1-3. Problem 4 remains unresolved.

Note: the “Back” refers to the Android OS level back function (the TWRP back button also works but is not always shown).

  • Unlock the bootloader as described in https://wiki.lineageos.org/devices/sailfish/install
  • Boot into the bootloader by, turning off the phone and pressing and holding the power and volume down buttons.
  • With the phone connected to a computer, run fastboot boot twrp-3.2.3-1-sailfish.img to load TWRP, press Allow modification.
  • (Might need to enter the phone PIN/password).
  • Wipe, Format Data, type yes.
  • Back, Back, Advanced Wipe, System, Data, Swipe to Wipe.
  • Back, Back, Back, Advanced, ADB Sideload, Wipe Dalvik Cache, Swipe to Start Sideload.
  • Run adb sideload lineage-16.0-20190906-nightly-sailfish-signed.zip.
  • (DO NOT run adb sideload as directed in the LineageOS guide. This will use the LineageOS recovery which seems to cause the error 70 for all Open GApps bundles.)
  • For Root: Back, ADB Sideload, Swipe to Start Sideload and run adb sideload addonsu-16.0-arm64-signed.zip
  • Back, Back, Reboot, Bootloader, Swipe.
  • Run fastboot boot twrp-3.2.3-1-sailfish.img to load TWRP and press Allow modification.
  • Advanced, ADB Sideload, Wipe Dalvik Cache, Swipe to Start Sideload.
  • Reboot System, Do Not Install
  • Run adb sideload open_gapps-arm64-9.0-mini-20190906.zip OR adb sideload MindTheGapps-9.0.0-arm64-20190615_031441.zip.
  • Set up the phone. Warning: some parts of the setup can be very slow at times and requires patience.
  • When asked to pick a launcher, do NOT use Pixel Launcher (crash loops / doesn’t work), use the LineageOS Trebuchet Launcher.
  • Attempt to update or install apps in Play Store. This does not work (see problem 4).