LineageOS OTA/Android stuck on recovery

2017-01-31

Don't worry, it's easy!
TL;DR:

fastboot continue

Intro

LineageOS is finally out, and a new version is available for OTA upgrade.
So I gessed it was time to give my old Nexus 4 an upgrade!
The proble is: it didn't work as expected and ended in a soft-brick-like situation.
On Reddit, people are reflashing to stock rom 4.2 to re-root and re-flash everything (seemed overkill to me).

Disclaimer

I am NOT affiliated in any way to Cyanogen or TWRP or LineageOS teams. I am just an occasional user which had this problem. I am not liable to any damage oe brick that might happen if you follow those instructions. IF YOU FOLLOW THESE INSTRUCTIONS, DO IT A YOUR OWN RISKS!

Warnings

First of all, the OTA upgrade seems to be not yet totally working:
- it reboots the device to recovery mode (in my case TWRP 3.0.2-0)
- nothing else happens!

The downloaded upgrade is located somewhere on your filesystem (path can be found on XDA-dev forums).
You need to so as if you had downloaded the upgrade manually (TWRP install, wipe cache, etc).

Then your device is stuck to recovery mode, i.e. when you boot it, you will only boot (whatever you do) to TWRP recovery in my case.
Now its time to find a computer with ADB/Fastboot installed on it.

ADB/Fastboot on Linux

On Fedora 25:

dnf install android-tools

This provides you ADB and Fastboot binaries.

Enable boot to LineageOS

Whith ADB (Android Debug Bridge) installed on your computer, you need to tell your device the OTA was completed with:

fastboot continue

That's it! Your device should be able to boot normally.
Note: first boot after upgrade/flash is really slow... (a few minutes on Nexus 4)

Links

  • (TWRP)[https://twrp.me/]
  • (LineageOS Downloads)[https://download.lineageos.org/]
  • (XDA Nexus 4 topics)[https://forum.xda-developers.com/nexus-4]