https://bugs.kde.org/show_bug.cgi?id=527365

--- Comment #2 from Simon Tutek <[email protected]> ---
Correction and root cause for my case (my comment 1 was wrong: the messages are
in the store, Android 17 hides them from KDE Connect).

With adb I found the three long texts sent from kdeconnect-sms on 2026-11-11
10:08-10:12 in content://sms: thread_id 12, type=2,
creator=org.kde.kdeconnect_tp, restricted=1, and a tr_id written by
com.google.android.apps.messaging. They are the only rows with restricted=1.
Short texts sent from the desktop at 10:30 have restricted=0 and sync normally.

Android 17 TelephonyProvider (android-17.0.0_r1, SmsProvider.java, flag
secureAccessToRestrictedRcsMessages) returns read-restricted rows only if
ProviderUtil.canReadRestrictedMessages() passes: system/phone uid, or AppOp
READ_RESTRICTED_MESSAGES allowed. On my phone:

  adb shell appops get org.kde.kdeconnect_tp READ_RESTRICTED_MESSAGES
  READ_RESTRICTED_MESSAGES: ignore; rejectTime=+4m14s35ms ago      (that was my
requestConversation)
  com.android.shell and com.google.android.apps.messaging: allow

Effect: SMSHelper.getMessagesInThread() for thread 12 returns the 10:05 message
as newest, without any error in logcat. The desktop never gets the three
messages, and ConversationsDbusInterface::updateConversation() only asks for
messages older than the oldest cached one, so they never appear. A fresh
kdeconnectd (empty cache) gets the same 25 messages.

This looks like the same Android 17 messaging change as in the description (the
tr_id suggests Google Messages took over the long texts, and it shows them as
"Multimedia message"), but with a different result: the row survives and is
read-restricted. KDE Connect Android 1.37.2, targetSdk 37. Possible fixes:
obtain READ_RESTRICTED_MESSAGES if a non-default app can, otherwise detect
restricted rows (the restricted column is visible) and tell the user why
messages are missing.

Workaround confirmed: after "adb shell appops set org.kde.kdeconnect_tp
READ_RESTRICTED_MESSAGES allow" and a kdeconnectd restart, requestConversation
for thread 12 returns the three messages (10:08, 10:11, 10:12), and appops
shows the op as used, not rejected.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to