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

Disabling clipboard access in GrapheneOs (READ_CLIPBOARD) and opening first time app crashes on login screen #173

Open
PMK opened this issue Sep 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@PMK
Copy link

PMK commented Sep 15, 2024

Describe the bug

I installed the latest Primal's apk via GitHub on a brand new phone. However, I disabled clipboard access in the OS. When opening the app for the first time, I see the introduction screen and when I press "login" it crashes. This happens every time I open the app and press "login". See logs below.

Steps to reproduce

  1. New installation of Primal via apk at GitHub
  2. Make sure to disable clipboard reading in the OS
  3. Open the app and press "login"

Expected behaviour

The Primal app crashes on pressing "login" with a log that it can't access the clipboard. This is correct behaviour as I didn't enable clipboard access in the OS for all apps. However, I expect the app ignore the clipboard and show the login screen.

Environment

  • Running latest GrapheneOS
  • Disabled clipboard access in OS
  • Latest apk from GitHub

Additional context

If I enable "Exlpoit protection compatibility mode (improves compatibility by disabling some of the GrapheneOS exploit protections for this app)" for Primal, I can go the "login" screen. This is probably necessary because of the "paste your key" button.

Logs:

type: crash
osVersion: google/caiman/caiman:14/AD1A.240905.004/2024090400:user/release-keys
package: net.primal.android:138
process: net.primal.android
processUptime: 1482 + 216 ms

java.lang.SecurityException: net.primal.android from uid 1010189 not allowed to perform READ_CLIPBOARD
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3192)
	at android.os.Parcel.createException(Parcel.java:3176)
	at android.os.Parcel.readException(Parcel.java:3152)
	at android.os.Parcel.readException(Parcel.java:3094)
	at android.content.IClipboard$Stub$Proxy.getPrimaryClip(IClipboard.java:455)
	at android.content.ClipboardManager.getPrimaryClip(ClipboardManager.java:253)
	at m1.h.a(Unknown Source:7)
	at T5.b.p(Unknown Source:2)
	at s6.o.v(Unknown Source:9)
	at v5.a.n(Unknown Source:8)
	at N5.L.run(Unknown Source:112)
	at m1.S.l0(Unknown Source:23)
	at m1.Q.run(Unknown Source:2)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8623)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
	Suppressed: S5.g: [m1.q0@a348112, E0.g@d9aa0e3, w0{Cancelling}@a6ddae0, S@2b6a199]
Caused by: android.os.RemoteException: Remote stack trace:
	at android.app.AppOpsManager.noteOp(AppOpsManager.java:8920)
	at com.android.server.clipboard.ClipboardService.clipboardAccessAllowed(ClipboardService.java:1402)
	at com.android.server.clipboard.ClipboardService.clipboardAccessAllowed(ClipboardService.java:1316)
	at com.android.server.clipboard.ClipboardService.-$$Nest$mclipboardAccessAllowed(ClipboardService.java:0)
	at com.android.server.clipboard.ClipboardService$ClipboardImpl.getPrimaryClip(ClipboardService.java:661)
@PMK PMK added the bug Something isn't working label Sep 15, 2024
@PMK PMK changed the title Disabling clipboard access in OS (READ_CLIPBOARD) and opening first time app crashes on login screen Disabling clipboard access in GrapheneOs (READ_CLIPBOARD) and opening first time app crashes on login screen Sep 15, 2024
@AleksandarIlic AleksandarIlic self-assigned this Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants