Update to Android 7

I've been running CyanogenMod 13 (Android 6) on my Wileyfox Swift smartphone since I bought it in 2016-03. In the meantime Cyanogen Inc. shut down the whole CyanogenOS and CyanogenMod infrastructure, and LineageOS was born. Also Android 7 and now Android 8 were released, and a lot of security issues piled up so I wanted to upgrade to LineageOS 14.1.

A couple of weeks ago, LineageOS for microG crept up and promised a Google-free phone with all the goodies: Deep F-Droid integration, local location services, Over-The-Air updates and the ability to use Google services if you needed them, but using the microG reimplementation that is fully open source.

MicroG is publishing their own LineageOS fork because to be able to act as a Google library replacement, they need to be able to masquerade their own code as being the official Google code. This is called "signature spoofing" and the LineageOS developers do not want this in their code (Support µg package signature faking, core: Add support for fake signatures, enabled per app by dynamic permission). Since Lineage does not want it in their code, you cannot fully use microG unless you patch signature spoofing into your phone.


I downloaded the microG lineageos crackling distribution and TWRP to be able to flash Lineage onto the phone.

Before flashing, I backed up all my apps with Adebar, which uses adb's backup command for that.

Then I followed the install instructions and put the latest TWRP version 3.1.1 onto the phone.

Unfortunately, I could not access TWRP at all, the phone would hang in a reboot loop that others had also experienced. I solved it by downgrading to TWRP 3.0.0, and then I could finally access TWRP by rebooting from the running Android system into recovery mode.

After wiping all the data and caches it was easy to push the LineageOS zip onto the phone and install it.

Backup restore

After LineageOS was installed and the first time setup wizard was run, I restored all applications that I had backed up previously. After that I noticed that none of the applications had actually been restored (the backup files were ok; I could convert them to .tar with ab2tar and inspect them).

adb logcat showed me (adb 1.0.32):

BackupManagerService: io exception on restore socket read
BackupManagerService: java.io.EOFException: Unexpected end of ZLIB input stream
BackupManagerService:   at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:245)
BackupManagerService:   at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
BackupManagerService:   at com.android.server.backup.BackupManagerService$PerformAdbRestoreTask.restoreOneFile(BackupManagerService.java:7104)
BackupManagerService:   at com.android.server.backup.BackupManagerService$PerformAdbRestoreTask.run(BackupManagerService.java:6701)
BackupManagerService:   at java.lang.Thread.run(Thread.java:761)
BackupManagerService: Full restore processing complete.
BackupManagerService: Full restore pass complete.

With adb 1.0.39, the log looked like this:

BackupManagerService: [discarding file content]
BackupManagerService: Saw type=0 in tar header block, info=FileMetadata{null,0,null:,0}
BackupManagerService: Full restore processing complete.
BackupManagerService: Full restore pass complete.

Still nothing was restored, not even the application installed.

So I threw away the microG LineageOS installation and installed a pure LineageOS, only to find that the problem was still there. I then tried to report a bug to LineageOS, but their bug tracker is only open on weekends:

Nightly/Weekly Bugs
These are accepted weekly from Midnight UTC on Friday through Midnight UTC on Monday, and can be any problems. Additional attachments and comments can be added at any time to already open bugs.

Please be sure to fill out every field with accurate information. It doesn’t matter if your baseband version has nothing to do with a lock screen animation issue, if it is not there your bug will be removed. Logcats must be attached for all bugs, and must be captured right after reproducing the issue.

This sounds like a good way to keep away bug reports because only desperate people would copy the 30 character kernel version manually from the phone screen or the 25 character baseband version. I waited until saturday when the bug tracker was open, and reported BUGBASH-1241: "adb restore" fails.

Manual restoration

I guessed that the bug would not be fixed tomorrow, and so I manually reinstalled all the applications I need on my phone.

Of very great help was Android Remote Keyboard which allowed me to type everything into a telnet session on my laptop, and have that appear in the selected input field on my phone. All the account setup and login screens would have been a huge pain to fill in from the phone itself. The app is available on F-Droid.

I could also open the AntennaPod settings database locally with Sqliteman and copy+paste the feed URLs via the remote keyboard telnet session, so restoration of the feeds was a matter of minutes.

Gesture typing

On CyanogenMod 13 (Android 6) I could type by swiping the letters on the keyboard, which is so much faster than typing each letter. This is lost on Android 7. It is strange, because on both systems I was using the AOSP keyboard.

After some searching I found out that I had it because I had installed the Google libraries with opengapps, and they contain a library that hooks into the keyboard to provide gesture typing. Because I use microG now, I don't have that /usr/lib/libjni_latinimegoogle.so file anymore :/

I could manually install it somehow, but haven't done that yet.

Essential android applications

Here are the apps that I installed immediately:

Android Remote Keyboard
Type fast on your computer, copy&paste passwords onto the phone
Podcast player
Business Calendar
Usable calendar manager, unfortunately not open source
XMPP chat
Sync calendar and contacts with my Nextcloud server
Remote control for the Dreambox satellite receiver
Headphone indicator
Show if the headphones are plugged in
Firefox browser with ad blocker
K-9 Mail
Much better e-mail client
Display PDF documents
Auto-upload photos and screenshots to my Nextcloud server
Awesome map and car routing app using OpenStreetMap data
Play the video from the browser on the TV
Translate from english to german and back
GPS and mobile phone statistics
Help fix and improve OpenStreetMap data
Note taking, syncs with my Nextcloud server
Install Google Play store apps


Frozen Bubble
I played this already 20 years ago
Hitman GO
Puzzle solving game really made for a mobile phone
Lara Croft GO
Puzzle solving game really made for a mobile phone

Written by Christian Weiske.

Comments? Please send an e-mail.