Fairphone Open stuck in “optimizing app” loop after OS update After a routine system update from Fairphone Open 16.08.0 to Fairphone Open 16.10.0 (Fairphone's customized version of Lollipop 5.1, rooted edition), my Fairphone 2 did not reboot. After rebooting, it got stuck in a loop: the initial splash screen, then “optimizing app 1/106” through 106/106, then “LOADING” flashing for a while, then repeat. A hard reset (yank out the battery and back in) did not help.

How can I recover? There is TWRP on that phone, but it doesn't offer any option to restore the previous version that I can find.
After scouring the Fairphone forums, I found a solution that worked (among many that didn't). So thanks to https://forum.fairphone.com/t/stuck-optimizing-apps-after-updating-on-fp-open-os-16-07-1/21146. The important thing was to reinstall OpenGApps. In more detail:


Yank out the battery to break out of the boot loop, and put it back in.
Ensure that you have a copy of the OpenGApps package on the internal flash or on the SD card. Select Platform=ARM, Android=5.1, Variant=pico (other variants presumably work too). It doesn't necessarily have to be the latest version (it worked for me with a version that was a couple of months old that I still had on the internal flash).
Press and hold the Volume Up and Power buttons for a few seconds, to load the phone's recovery image (TWRP).
From TWRP, choose “Install”, then select the OpenGApps zip and install that.
TWRP prompts to clear the cache partition. I did that, I don't know if it's actually necessary.
Reboot.


freibadschwimmer's update guide suggests doing the same for Xposed Framework, if you have that installed. Other package managers such as F-Droid may also need to be reinstalled; it isn't clear to me whether that's actually necessary.

I recommend keeping zips of extra software such as OpenGApps on the internal flash all the time, in case another update causes the same problem.