Bug 494022

Summary: kdeconnect Android application crashes after pairing
Product: [Applications] kdeconnect Reporter: Morgan Diepart <morgandiepart>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED DUPLICATE    
Severity: crash CC: andrew.g.r.holmes, i, me
Priority: NOR    
Version: 24.08.1   
Target Milestone: ---   
Platform: Android   
OS: Android 14.x   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Android app backtrace generated using ADB

Description Morgan Diepart 2024-10-03 08:39:06 UTC
Created attachment 174357 [details]
Android app backtrace generated using ADB

SUMMARY
Android application crashes after having completed the pairing process

The android app's version is 1.32.4 - Play Store. Same behavior was observed with 1.32.3 (from F-Droid store).
The desktop app is version 24.08.1 on Archlinux.
Attached file contains the android's app backtrace as acquired by following the instructions on the wikipedia page.

STEPS TO REPRODUCE
1. Open desktop app
2. Open Android app
3. Pair both devices, initiating from either app.
4. Once pairing is completed, refresh the android app (drag finger downward)

OBSERVED RESULT
Application crashes and cannot be restarted unless unpairing from desktop app.

EXPECTED RESULT
Application should be working as expected.

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Archlinux, linux 6.11.1-arch1-1 (64-bits)
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3

ADDITIONAL INFORMATION
firewalld is intalled on the Archlinux machine. Service kdeconnect is allowed (TCP and UDP 1714-1764).
Comment 1 outloudvi 2024-10-03 09:38:05 UTC
This seems to be the root cause for this bug (as well as Bug 494021 - that adb log was grepped but stacktrace at `checkRequiredPermissions` is visible):

java.lang.SecurityException: Settings key: <enabled_input_methods> is only readable to apps with targetSdkVersion lower than or equal to: 33

I can also reproduce it on KDE Connect 1.32.3. This bug WILL crash the app while KDE Connect is connected to a PC that has "Remote Keyboard" enabled, but seems to have no effect otherwise (e.g. while the plugin is not enabled).

Related d.a.c doc: https://developer.android.com/reference/android/provider/Settings.Secure#ENABLED_INPUT_METHODS
Comment 2 Iyán Méndez Veiga 2024-10-03 14:02:42 UTC

*** This bug has been marked as a duplicate of bug 493943 ***