Upgrade Pixel XL to LineageOS 17.1 (Android 10)

LineageOS recently pushed official 17.1 images for my phone, the Pixel XL (marlin). I’d been stalling a little bit in the upgrade as the only path is a manual and I was concerned I was going to lose all of my application state.

I finally took the plunge, in part I was keen to move to the new Android 10 features – and LineageOS has also stopped their 16.0 builds, and this means you won’t get new security patch levels.

It turns out that while you need to take some manual steps, the upgrade path was very smooth. Still, here are the steps I took:

(1) Backup

  • I already make use of SimpleSSHD to support nightly SSH based backups.
  • Export settings from various apps: k9mail, feedme, etc. that are not backed by cloud services.
  • Run SMS Backup+ to archive all my SMS to my gmail account.

Usually I run TWRP recovery, but LineageOS has moved to their own recovery. Unfortunately the LineageOS recovery doesn’t support Nandroid backups. You can however still use adb backup.

To perform an adb backup, have the phone running as normal. Enable both developer options, and then allow adb (debugging) and adb root access. To do the backup we need to let adb connect, and have root access to access the files.

On your desktop machine:

Your phone will prompt you for confirmation of the backup process. Once it starts to run, it’ll take a while (mine was 8GB over USB2).

Additionally I manually copied the backup files (exported settings) I had made.

(2) Download the ROM

Grab the 17.1 marlin ROM from LineageOS. I also run the Google stuff, so also go to OpenGApps to get that. I initially picked ‘stock’ because I though, hey the Pixel is as Google a phone as you might get. The list of stock apps is pretty close to what I have installed anyways – despite the fact that my current gapps is the nano version.

Once I upgrade my phone to a later version of the hardware, I’ll probably stick with the Pixel line. LineageOS isn’t officially supported on the more recent hardware, but the delta between LineageOS and Google stock has become pretty slim too. I may finally give up on custom firmware and run stock, we’ll have to see.

[If you read on, you’ll note that I ended up falling back to the nano pico gapps build.  Oh well]

(3) Check hashes of all downloads

Always check the hashes. I’ve personally had bad downloads. You don’t want a bad file to cause you additional grief, it’s easy to check.

(4) Upgrade

We can follow the LineageOS upgrade wiki to do the install.

My device did reboot to a blank screen, but once I started the next command – I got a visual progress display. It is possible I just didn’t wait long enough, but either way things started up just fine.

If you are as I am, intending to install the Google apps, then you want to avoid booting into normal mode.

On the phone in recovery once it has finished the sideload

  • Click Advanced
  • Reboot to Recovery
  • Once recovery start again..
  • Click Apply Update
  • Apply from ADB

Now we sideload gapps:

Note: It does appear that I got a new recovery as part of the lineage install.

Here is where I ran into trouble with the stock version of gapps. While the source file did match the md5sum, the phone install was giving me a signature verification failure – at 47%.

oh oh.. 1st try to install the (md5sum verified) gapps.. and I get a signature verification failure.. but at 47% progress.. hmm. It turns out that other people have had exactly this problem.

The 47% appears to be a side effect of the sideload process. I banged my head on this a few times, until I carefully read what was actually being reported on the phone screen when the verification failed.

Not enough system space to install the stock gapps. Sigh, how many times have I struggled with getting a computer to do something when the problem was that I didn’t carefully read the error message.

Downloading and installing the nano pico version worked fine, but my notes say that I still saw the signature verification failure (this may be due to the gapps approach to building the bundle).

(5) Reboot

And wait, and wait, and wait.. The first boot is always exciting and takes enough extra time you start to worry something is wrong.

And.. it’s alive! All my apps/data are still “ok”. This is unexpected, I had prepared myself to do a full rebuild of things, but it seems that this upgrade path allows my applications and their state to persist.

There were some minor configuration difference (launcher UI settings reset.. to 5×5 instead of 5×6 which I prefer). This was easy to fix and my layout was fully restored.

A bunch of permission checks popping up too, still overall a mostly painless upgrade to Android 10. Lots of settings persisted, like my mobile data per app preferences. Ringtones and sounds were busted, because the LineageOS sounds have been replaced by the Pixel ones.

(6) Epilogue

It’s been over a week, and no big surprises (which is good).

The whole Privacy stuff is great. I always liked Privacy Guard in LineageOS and now that similar function added to Android itself, I’m ok with letting that go. I’m a bit disappointed with the stock sounds available, I may just need to go add the old LineageOS sounds as user sounds so I can get the ones I’m used to.

Google Pixel XL

On average I upgrade my phone every 18 months. Sometimes I’ll hang onto a phone for 2 years, and other times it’s much less than that. My most recent phone I used for about 2 years – the Motorola X Play. It was a great fit for me, huge battery, headphone jack, SD card support for more storage and the camera was pretty good. I have for many years bought used phones, avoiding the high prices for new devices and still enjoying a regular flow of great hardware. The Moto X Play was great, it did everything I needed and I really didn’t have a strong urge to upgrade.

Buying used phones, means I’ve always got my eye on the used market. I’ve usually scoped out the set of possible phones I’d consider owning and watch for the street prices to drop under $200, my personal sweet spot for buying a phone. I think it was near the end of last year that the original Google Pixel started to dip into that range locally, and I got a recently refurbished from Google version from someone for a great price. This phone went to Jenn, who had been struggling a little with her Moto X Play and I knew she wanted a better camera.

This of course started me on the slippery slope of wanting a Pixel for myself. Still, prices were fairly high and the Moto X Play did everything I needed. The one thing that the Motorola didn’t have was a fingerprint reader, and this is a nice feature to have as my work apps require long passwords OR biometric access. When I wear my tinfoil hat, I’m not a big fan of fingerprint access – too easy to fool and impossible to change once you’ve run out of fingers and toes. On the other hand, accessing my phone is super fast and easy with a fingerprint vs. typing a really long password in every time.

Then I spotted a Pixel XL with 128GB of storage, but a cracked back glass. They were asking more than I was willing to pay, but the darn listing sat there for a couple of days and ate away at me. I offered quite a bit less than asking to knock it down below my $200 ceiling – it was a bit of a low ball price, but fair enough considering the damage to the phone, and I wasn’t willing to pay more than that.

Wouldn’t you know it, they accepted my offer. I almost walked away from this deal too, because the first time I was supposed to meet up to buy it – they had a schedule mix up and were a no show. That’s usually a sign to say that something isn’t right and it’s a bad deal. They were very apologetic, and I decided to meet up a couple of hours later – where they apologized again, included a nice craft chocolate bar, and knocked another $10 off the price! I have walked away from a couple of used sales where things didn’t feel right, but in this case aside from a schedule mess up there wasn’t anything off about this deal.

Recently Woot featured the same phone for $250 USD, now they are ‘brand new’ condition and come with a warranty, but I still think I’m laughing all the way to the bank with my find. Considering when the Pixel was first launched it was north of $1000, the depreciation as always has been harsh. While my used model may not have ‘like new’ battery life, I still get a solid day out of it.

The camera continues to be amazing, and 4GB of RAM makes a huge difference over the 2GB I had before. I also really like the AMOLED screens, which was one of the attractions to the Samsung Galaxy phones.

Of course, even though the Pixel has the latest version of Android on it (Pie) and looks like it may even get the next one, I went with a LineageOS build, I’ll have to write up that process later as it was a journey. On cold boot I get a pre-boot screen telling me dire things will happen because my boot loader is unlocked, but I can live with that.

It’s been over 9 weeks since I switched over to the Pixel, and I’m still in the honeymoon phase with it. I keep telling myself that I should really fix the back glass, but I’m not sure I’ll ever get to it.

Returning a Nexus 5 to ‘stock’, including re-locking bootloader

Hmm, I had a bunch to say about used phones and my history with different models, skip to about halfway down to find the actual details on returning a phone to stock.

It’s interesting to look back over my personal smartphone ownership history. All of them have been purchased ‘used’ but some were barely used, where others saw heavy use. For the most part I’ve not had any real problems with the phones, but there have been a few exceptions. My price point has generally been under $200, but I’ve scored a few at the $150 mark too.

Resale of the phones hasn’t been a strong point of mine, I usually keep them (sometimes idle on my desk) to the point where I’m getting less than half what I paid for them. Still I think I’m ahead in terms of the diversity of the phones I’ve had, and my total layout in cost.

The Nexus 4 was a great phone for me, I used it for almost 2 years before swapping to a Nexus 5. It wasn’t without problems, something went wrong with the charging circuitry (part of the motherboard) and it was destroying batteries by mis-charging them. I went through a couple aftermarket batteries before finding a donor phone that had a good motherboard.

I flipped the donor phone with now bad motherboard and ended up $20 out of pocket to fix my Nexus 4. I ran with this fixed phone for nearly another year.

In the Nexus 4 ownership phase, I ended up having Jenn switch from iOS to Android, and so I started getting 2 of the same phone. Late in 2016 the Nexus 5 (32GB) came below the $200 price point. I ended up buying 3 within the span of a couple of weeks.

Of the 3 Nexus 5’s, it turns out one of them had something wrong with it. After a little while that bad phone started to randomly reboot, and sometimes even turn itself off and refuse to power back on. You could get it back, but had to fiddle with it for some time. I ended up taking this phone and using it as my daily driver to see if I could isolate and fix the issue. It felt like it might have been the very common power button problem, but a local repair shop didn’t think it was. Instead of trying to fix it myself, I just upgraded to the Moto X Play and sold the bad Nexus 5 (with full disclosure on it’s issues) as a parts phone for $50.

Oh yeah, and that gets us to the returning to stock story..

Continue reading “Returning a Nexus 5 to ‘stock’, including re-locking bootloader”