Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard crashes when attempting to decrypt the device after rebooting #59

Closed
7 tasks done
esjarc opened this issue Jul 24, 2024 · 9 comments
Closed
7 tasks done
Labels
ASAP Issue needs to be fixed as soon as possible. bug Something is not working

Comments

@esjarc
Copy link

esjarc commented Jul 24, 2024

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.0.0

Affected Android/Custom ROM version

Android 14 (GrapheneOS)

Affected device model

Google Pixel 5

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. Install the app
  2. Enable the keyboard and set it as the default keyboard
  3. (Make sure to enable "USB-Debugging" in the developer options and add your computer to the trusted devices, otherwise you might not be able to use your device again without factory resetting it.)
  4. Reboot the device
  5. Swipe up on the unlock screen and attempt to unlock the device

Expected behavior

Keyboard should appear and allow the decryption of the device.

Actual behavior

Keyboard crashes. It is almost impossible to switch to another keyboard, as the keyboard selector disappears immediately.

Screenshots/Screen recordings

No response

Additional information

My attempt to get an adb logcat from the crash:

07-24 17:30:19.846  4387  4408 W org.fossify.keyboard: Cleared Reference was only reachable from finalizer (only reported once)
07-24 17:30:20.626  4387  4387 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10299; state: ENABLED
07-24 17:30:20.629  4387  4387 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10299; state: ENABLED
07-24 17:30:20.629  4387  4387 D CompatibilityChangeReporter: Compat change id reported: 63938206; UID 10299; state: DISABLED
07-24 17:30:20.657  4387  4387 E RecyclerView: Cannot scroll to position a LayoutManager set. Call setLayoutManager with a non-null argument.
07-24 17:30:20.665  4387  4387 E RecyclerView: Cannot scroll to position a LayoutManager set. Call setLayoutManager with a non-null argument.
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: QUALCOMM build                   : 4783c89, I46ff5fc46f
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Build Date                       : 11/30/20
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: OpenGL ES Shader Compiler Version: EV031.31.04.01
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Local Branch                     : QPR2
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Remote Branch                    : 
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Remote Branch                    : 
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Reconstruct Branch               : 
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Build Config                     : S P 10.0.4 AArch64
07-24 17:30:20.686  4387  4416 I AdrenoGLES-0: Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
07-24 17:30:20.686  4387  4387 W View    : requestLayout() improperly called by android.widget.LinearLayout{5345a30 V.E...... ......ID 0,0-695,81 #7f09033f app:id/suggestions_items_holder} during layout: running second layout pass
07-24 17:30:20.686  4387  4387 W View    : requestLayout() improperly called by android.widget.TextView{be536a9 V.ED..... ......ID 303,0-391,81 #7f0900cd app:id/clipboard_value} during layout: running second layout pass
07-24 17:30:20.698  4387  4416 I AdrenoGLES-0: PFP: 0x016dd093, ME: 0x00000000
07-24 17:30:20.701  4387  4416 W AdrenoUtils: <ReadGpuID_from_sysfs:197>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
07-24 17:30:20.701  4387  4416 W AdrenoUtils: <ReadGpuID:221>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
07-24 17:30:20.800  4387  4387 W ContextImpl: Failed to ensure /data/user/0/org.fossify.keyboard/shared_prefs: mkdir failed: errno 126 (Required key not available)
07-24 17:30:20.800  4387  4387 D AndroidRuntime: Shutting down VM
07-24 17:30:20.800  4387  4387 E AndroidRuntime: FATAL EXCEPTION: main
07-24 17:30:20.800  4387  4387 E AndroidRuntime: Process: org.fossify.keyboard, PID: 4387
07-24 17:30:20.800  4387  4387 E AndroidRuntime: java.lang.IllegalStateException: SharedPreferences in credential encrypted storage are not available until after user (id 0) is unlocked
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:611)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:594)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:223)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at x9.b.<init>(SourceFile:14)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at o2.f.W(SourceFile:8)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at u8.y.v0(SourceFile:6)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at fa.l.<init>(SourceFile:19)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at org.fossify.keyboard.views.MyKeyboardView.setupEmojiAdapter(SourceFile:391)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at org.fossify.keyboard.views.MyKeyboardView.c(SourceFile:1)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at g.m0.run(SourceFile:49)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:959)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:100)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:232)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:317)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8623)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at com.android.internal.os.ExecInit.main(ExecInit.java:50)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
07-24 17:30:20.800  4387  4387 E AndroidRuntime:        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
07-24 17:30:20.803  4387  4387 I Process : Sending signal. PID: 4387 SIG: 9
07-24 17:30:20.837  1001  1001 I Zygote  : Process 4387 exited due to signal 9 (Killed)
07-24 17:30:20.838  1673  3410 I ActivityManager: Process org.fossify.keyboard (pid 4387) has died: vis BFGS
07-24 17:30:20.838  1673  1824 I libprocessgroup: Removed cgroup /sys/fs/cgroup/uid_10299/pid_4387
07-24 17:30:20.851  1673  1796 W ActivityManager: setHasOverlayUi called on unknown pid: 4387

To unlock the device via ADB you can execute the following commands:

adb shell input text PASSWORD
adb shell input keyevent 66

Since I use GrapheneOS, I have also verified that this issue occurs with "Exploit protection compatibility mode" enabled and disabled.

@esjarc esjarc added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jul 24, 2024
@Isakovsky92
Copy link

Same here too, i wrote a bug report for this at the same time so it got closed as duplicate.

A tips for those who is stuck at unlock is to use a OTG adapter and connect a physical keyboard.

@naveensingh naveensingh added ASAP Issue needs to be fixed as soon as possible. and removed needs triage Issue is not yet ready for PR authors to take up labels Jul 25, 2024
@naveensingh
Copy link
Member

Should be fixed in the next update.

@Xanatos00
Copy link

Xanatos00 commented Aug 6, 2024

Same issue here with 1.0.0 from F-Droid
OTG cable tip save my day

@tenextractor
Copy link

If anyone has this issue and the other solutions do not work, hold the power button to open the power off menu, and press and hold the 'Power off' option to reboot in safe mode.

@luewolf
Copy link

luewolf commented Sep 14, 2024

The issue still exists in the latest version.

Good thing I had a USB to USB-c adapter lying around and that I was able to find a hardware keyboard.

@naveensingh
Copy link
Member

The issue still exists in the latest version.

I haven't yet updated the app (not proud).

@Dietr1ch
Copy link

I just wasted 2 hours because I ended up needing to factory reset my phone (adb refused to connect before decrypting and my phone refused to pick up my keyboard behind a USB C hub)

I can't belive this has been fixed, but not deployed for so long given how annoying this is. I'd help with the build, but in all honesty I'll just go back to my old keyboard anyway.

@naveensingh naveensingh unpinned this issue Oct 25, 2024
@naveensingh
Copy link
Member

A new version with fix is out now: https://github.com/FossifyOrg/Keyboard/releases/tag/1.1.0

Sorry for (unintentionally) locking you guys out of your devices.

@Dietr1ch
Copy link

I know it was not intentional, no hard feelings, nobody wants to write buggy code and I guess you didn't realize it was a huge deal since the issue starts with an alternative to get access again,

adb shell input text PASSWORD
adb shell input keyevent 66

Thanks for the quick fix release. I hope it helps other people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP Issue needs to be fixed as soon as possible. bug Something is not working
Projects
None yet
Development

No branches or pull requests

8 participants
@Dietr1ch @Xanatos00 @naveensingh @esjarc @luewolf @tenextractor @Isakovsky92 and others