LineageOS 16: unlock loop (systemui crashes when I unlock)

Hello all,

A month ago I installed LineageOS 16, specifically 20190823-nightly, and it’s been working fine until this morning.

This morning, I opened an app, then decided to close it, so I pressed the square button to bring up the list of all running apps. The screen went momentarily black, and then I was greeted with the locked screen. There was also a message saying that my SD card was missing and I should replace it.

After opening the phone, fidgeting with the SD card and restarting a few times, the SD card message went away.

However, what didn’t go away was that when I try to unlock, the system UI seems to crash, I get a black screen for a second, and then it goes back to the locked screen.

Using adb logcat, I found that this error happens every time I try to unlock:

09-23 21:06:07.856 11260 12169 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #6
09-23 21:06:07.856 11260 12169 E AndroidRuntime: Process: com.android.systemui, PID: 11260
09-23 21:06:07.856 11260 12169 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at android.os.AsyncTask$3.done(AsyncTask.java:354)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.util.concurrent.FutureTask.run(FutureTask.java:271)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.lang.Thread.run(Thread.java:764)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.internal.widget.VerifyCredentialResponse.getResponseCode()' on a null object reference
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at com.android.internal.widget.LockPatternUtils.checkCredential(LockPatternUtils.java:382)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at com.android.internal.widget.LockPatternUtils.checkPattern(LockPatternUtils.java:431)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at com.android.internal.widget.LockPatternChecker$2.doInBackground(LockPatternChecker.java:124)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at com.android.internal.widget.LockPatternChecker$2.doInBackground(LockPatternChecker.java:110)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at android.os.AsyncTask$2.call(AsyncTask.java:333)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
09-23 21:06:07.856 11260 12169 E AndroidRuntime: |      ... 4 more

(I can post a full logcat if needed)

I don’t know what to do. I have the backup I made before I installed LineageOS 16 (made with the stock FairphoneOS 19), but that one’s from a month ago and I’ve got plenty of new data I don’t want to lose. Can I somehow recover my OS without losing my data?

I’m somewhat familiar with TWRP and recovery, although not much. I flashed a new OS into my phone for the first time a month ago.

Any help would be appreciated.

If you start TWRP and connect via USB data cable to a PC you should be able to copy data from /data/media (e.g. photos etc.) to your PC if this helps.
You could also try to manually reinstall LOS16. If done correctly this shouldn’t delete any data. On the other side it may not help if problem is not in system installation but somewhere in system data.
You might also try to start in #dic:safemode and see if that helps.

2 Likes

Thanks for the advice! I went into safe mode and had the exact same issue, so then it’s probably not an app causing this, the system itself is somehow borked.

I’m not sure how I’d go about reinstalling LOS16 manually. Do you mean this process but without the wipe?

I’m also wondering: if I create a backup of the Data partition using TWRP (without media, I know), and then I flash a new LOS16 and then recover that partition, will that reinstate all my settings, apps etc?

Yes, you may use this process, as you say, without wipe or format!
Or you can copy a downloaded current LineageOS 16 nightly to your SD card (e.g. when in TWRP and connected via USB data cable) and use the “installation” option in TWRP.

Yes, but it may also restore the error cause.
Anyway, doing the backup may after all become helpful - in case anything goes wrong during repair attempts.

2 Likes

Thanks so much! I created a backup including my boot and system partitions, and one with only the data partition. Now I will try to backup /data/media, and then I’ll go to town with installing a new LOS16.

Unfortunately, I’m not sure how to recursively copy /data/media into my computer. When I connect my phone to my PC via USB, I can see its contents via mtp, but I’m not sure exactly where /data/media is (my SD card has /Android/data/media, but it doesn’t let me go in there). Am I supposed to use TWRP’s Mount functionality to mount /data/media somewhere and then copy it?

Hopefully this is the last thing I’ll need.

Thanks again for the help.

EDIT: I think I solved it, apparently adb pull can take a directory name and it copies recursively. I guess I’m set! I’ll write again if I’m in despair.

Hmmm - sorry, I can’t exactly follow you here…
Did you configure your SD card as “internal memory”? Or as external?
In case it’s external you should see /data/media/0 as “Internal Storage” (under “Fairphone 2” in your PC) and the SD card as “Micro SD card” when using mtp.

If you want to backup your /data/media too - then there’s an “ugly workaround”:
Go to “Advanced->File Manager” in TWRP. Then go into data->media folders.
Using the blue folder icon at the bottom right you get the “Rename Folder” option. There you can temporarily(!) rename /data/media folder for the backup. Then this folder and subfolders will also be backed up. This of course only works if you select “Micro SD card” as backup storage (and not “internal storage”).
If you do it, then please don’t forget to rename it back after doing the backup AND after doing the restore!

1 Like

I thought I had configured my SD card as internal memory, but I did see what you said.

In any case, I thought I backed up my /data/media via

adb pull /data/media

Not sure that actually copied everything.

I ended up fixing the issue by using adb to remove my lock, which was what was crashing. Everything else seemed to work just fine, so that fixed it.

Thanks for the support anyway!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.