Bug 523424 - Sent messages don't appear in the application.
Summary: Sent messages don't appear in the application.
Status: RESOLVED UPSTREAM
Alias: None
Product: kdeconnect
Classification: Applications
Component: messaging-application (other bugs)
Version First Reported In: 23.08.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Redman
URL:
Keywords:
: 527640 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-07-23 16:22 UTC by muffin.prancer
Modified: 2026-11-09 19:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
KDE Connect Version (88.02 KB, image/png)
2026-07-23 16:22 UTC, muffin.prancer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muffin.prancer 2026-07-23 16:22:15 UTC
Created attachment 194549 [details]
KDE Connect Version

***
If you're not sure this is actually a bug or valid feature request, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Do not paste LLM output.

Please remove this comment after reading and before submitting - thanks!
***

DESCRIPTION


STEPS TO REPRODUCE
1. Open KDE Connect SMS
2. Send a message to any number

OBSERVED RESULT
The message gets sent successfully. I can see it in the phone too. But the sent message does not appear in the KDE Connect SMS application. This was working fine a few weeks ago. I didn't keep a track as to when or how this broke. I am on Linux Mint and I am attaching the version that I am using.


EXPECTED RESULT
I should be able to see the sent message in the KDE Connect SMS application.

SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a terminal window): Linux Mint 22.3 Zena base: Ubuntu 24.04 noble
For KDE version please see attached screenshot.

ADDITIONAL INFORMATION
Comment 1 Sébastien Beausoleil 2026-09-01 15:58:39 UTC
Root cause for this symptom, with a reproducer and a workaround. I can't confirm it is the original
reporter's cause (their Android version isn't stated), but it produces exactly this behaviour and
the fix is on our side either way.

**Environment:** GrapheneOS (Android 17, build 2026081301) on a Pixel 8, KDE Connect Android
1.35.13 (`targetSdk=37`), desktop KDE Connect 25.12.3 on Kubuntu 26.04.

**Cause.** Android 17 stamps a `restricted` column on rows in the SMS provider. A row written by an
app that does not hold `android.app.role.SMS` gets `restricted=1`, and `SmsProvider` then filters
those rows out of that app's own reads unless it holds the `READ_RESTRICTED_MESSAGES` appop, which
defaults to `ignore`. The consequence is circular: **KDE Connect cannot read back the message it
just wrote itself.** Since the desktop displays only what it can re-read from the provider, the
reply is invisible there while being genuinely sent and plainly present in the phone's own
messaging app.

**Reproducer.** Send yourself an SMS from the desktop. The message lands twice in the provider,
once as `type=2` (sent, written by KDE Connect) and once as `type=1` (received, written by the
default SMS app). Only the received copy reaches the desktop, seconds later — proving the link is
healthy and that exactly one row is being withheld:


id: 438
type: 2 sent
creator: org.kde.kdeconnect_tp
restricted: 1
reaches destop: no

id: 439
type: 1 received 
creator: com.android.messaging
restricted: 2
reaches destop: yes


Both rows share the same `thread_id` and address. In this database every `restricted=1` row — 18 of
them — had `creator=org.kde.kdeconnect_tp` and `type=2`; no other row was marked.

`logcat` while the desktop requests the thread:

```
V/SmsProvider: checkQueryForForbiddenColumns checking sel: date <= ? AND thread_id = ?
V/SmsProvider: canReadRestrictedMessages=false
V/MmsProvider: accessRestricted=true
```

**Confirmation.** Granting the appop flips that to `canReadRestrictedMessages=true`, and every
previously hidden message reappears, including two weeks of history:

```
adb shell appops set --uid org.kde.kdeconnect_tp READ_RESTRICTED_MESSAGES allow
adb shell am force-stop org.kde.kdeconnect_tp
```

UID mode is required — package mode leaves the provider refusing. A restart is also required, as
the app caches the decision.

**Worth noting:** KDE Connect's `WRITE_SMS` appop is `ignore` (rejected), yet the row exists
under its name — the platform wrote it on the app's behalf during the send. The system knows the
message genuinely went out over its own telephony stack, and marks it untrusted regardless. The
flag tracks *who wrote the row*, not direction: in this database 172 outgoing messages written
by the Messaging app are unmarked, against 18 written by KDE Connect that are.

**Suggested fix.** The appop is a local workaround, not a solution; it can't be granted from within
the app. The durable fix is for the Android side to stop depending on a provider read-back it is
not entitled to: when a send succeeds, emit that message to the desktop directly from what was just
sent, rather than waiting to observe it reappear in the provider. That also removes a race that
exists on every Android version, since the read-back is inherently asynchronous.

If maintainers prefer, the platform behaviour could additionally be raised with AOSP/GrapheneOS —
an app arguably ought to be able to read rows for which it is itself the `creator` — but that would
not help existing installs.
Comment 2 Simon Redman 2026-09-01 22:46:24 UTC
> **Reproducer.** Send yourself an SMS from the desktop. The message lands twice in the provider,
once as `type=2` (sent, written by KDE Connect) and once as `type=1` (received, written by the
default SMS app). Only the received copy reaches the desktop, seconds later — proving the link is
healthy and that exactly one row is being withheld:

This precisely describes the intended behavior and does not describe a situation in which sent messages do not appear in the application, since it literally describes a situation in which "[a] copy reaches the desktop".

The rest of the report appears to be mostly nonsense. Please do not paste LLM output. Please review https://community.kde.org/Guidelines_and_HOWTOs/Maintainers_and_Contributions

Original reporter: Please see if this reproduces with a modern version of KDE Connect.
Comment 3 muffin.prancer 2026-09-02 12:52:07 UTC
(In reply to Simon Redman from comment #2)
> > **Reproducer.** Send yourself an SMS from the desktop. The message lands twice in the provider,
> once as `type=2` (sent, written by KDE Connect) and once as `type=1`
> (received, written by the
> default SMS app). Only the received copy reaches the desktop, seconds later
> — proving the link is
> healthy and that exactly one row is being withheld:
> 
> This precisely describes the intended behavior and does not describe a
> situation in which sent messages do not appear in the application, since it
> literally describes a situation in which "[a] copy reaches the desktop".
> 
> The rest of the report appears to be mostly nonsense. Please do not paste
> LLM output. Please review
> https://community.kde.org/Guidelines_and_HOWTOs/Maintainers_and_Contributions
> 
> Original reporter: Please see if this reproduces with a modern version of
> KDE Connect.

Thank you for the analysis. It is correct that I am using GrapheneOS with Android 17. That said, I am not sure how I can upgrade to a newer version of KDEConnect on Linux Mint, I am already on the latest that they package and https://kdeconnect.kde.org/download.html and quick google search is not very helpful in guiding me a way to upgrade. If there is a (relatively easy) way to upgrade please let me know, worst case I might have to change my linux distro (not very preferable for my workflows). 

Thank you for your time - very much appreciated.
Comment 4 Bug Janitor Service 2026-09-17 03:48:46 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2026-10-02 03:48:29 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.
Comment 6 Brian Stine 2026-10-18 15:45:54 UTC
I can reproduce the restricted-row behaviour from comment 1 on a Samsung phone. It is stock Android 17 behaviour, and it affects received messages too, not only messages KDE Connect sends. Please consider reopening.

Environment: Galaxy S24+ (SM-S926U), One UI build S926USQU6EZIF (Android 17), installed 2026-10-14. KDE Connect Android 1.36.0. Google Messages is the default SMS app, RCS on. Desktop kdeconnectd 23.08.5 (Ubuntu 24.04 base).

Symptom: Since the Android 17 update, end-to-end encrypted RCS conversations are marked as restricted by Android. Only a few apps, such as Google Messages and Microsoft's Link to Windows, can read them. KDE Connect and other apps without the READ_RESTRICTED_MESSAGES app-op cannot, so these messages never reach the desktop. I confirmed this across multiple message threads via adb and dbus-monitor.

I found this while working on Connected, a COSMIC applet that uses kdeconnectd over D-Bus (https://github.com/nwxnw/cosmic-ext-connected). Because the rows never leave the phone, every desktop client is affected, not only mine.

Evidence: These symptoms are seen in results from the kdeconnectd daemon on the desktop side and are shown in KDE Connect SMS and other apps that rely on the daemon. In my test set, the missing messages were 12 hours to over two days old, so this is not Android 17's 3-hour SMS OTP delay.

The rows are in Android's telephony provider, flagged restricted (adb shell reads them):

  adb shell content query --uri content://mms --projection _id:thread_id:date:msg_box:restricted --where "'restricted=1'"

In my testing, this returned 14 rows across 3 encrypted conversations, both received (msg_box=1) and sent (msg_box=2), all written after the update. The same query on content://sms returns nothing, so plain SMS is unaffected. Two unencrypted RCS conversations active in the same period have no restricted rows.

Logcat shows the telephony provider applying the restriction to every KDE Connect query. To see it:

  adb shell pidof org.kde.kdeconnect_tp
  adb logcat | grep TP/SmsProvider

then start KDE Connect SMS on the desktop and open a conversation. Lines with the KDE Connect pid as the calling pid include: 

  canReadRestrictedMessages=false
  getSelectionBySubIds() : view_pdu_restricted_exclude_device_identifiers.sub_id IN (...)

Google Messages' queries show canReadRestrictedMessages=true.

All of this is consistent with Android 17's documentation, which says "Restricted message access: Most apps now cannot access end-to-end encrypted messages" (https://developer.android.com/about/versions/17/summary). The linked detail section isn't published.

The check is in AOSP (android-17.0.0_r1): TelephonyProvider's `ProviderUtil.canReadRestrictedMessages` lets only system and phone apps, or an app whose READ_RESTRICTED_MESSAGES app-op is set to allow, read restricted rows. The op defaults to ignored. It sits behind the flag secure_access_to_restricted_rcs_messages, so any Android 17 device with that flag on behaves this way. 

Workaround, confirmed:

Set KDE Connect's app-op to read restricted messages, but this can only be done through an adb command and not by any user accessible setting. No Android permission grants it, so the app cannot request it. 

  adb shell appops set org.kde.kdeconnect_tp READ_RESTRICTED_MESSAGES allow

After this KDE Connect's queries log canReadRestrictedMessages=true and the missing messages sync. Note that kdeconnectd has to be restarted afterwards to reset its message cache. Persistence across reboot and OS updates is untested.

To undo the app-op:

  adb shell appops set org.kde.kdeconnect_tp READ_RESTRICTED_MESSAGES default
Comment 7 John Kizer 2026-10-23 04:59:29 UTC
*** Bug 527640 has been marked as a duplicate of this bug. ***
Comment 8 Bill 2026-11-05 15:59:36 UTC
Reproduces on current master. Adding my test here since it covers Simon's ask for a modern version.

Setup:
- Desktop: kdeconnect-kde master aee1439f8 (2026-11-04), daemon and SMS app run straight from the build dir. I had to leave out the mousepad and shareinputdevices plugins because Ubuntu 24.04's libei is too old for them. Neither touches SMS.
- Phone: Pixel 10 Pro XL, GrapheneOS 2026110201 (Android 17), KDE Connect Android 1.37.0. Default SMS app is the bundled Messaging app (com.android.messaging).

Steps:
1. Open a conversation with another person in the KDE Connect SMS window.
2. Send a text.
3. Check the phone, check the desktop.

Result: the text shows up in Messaging on the phone, but doesn't show up in the desktop conversation. It only appeared after I enabled the app-op workaround (below).

Analysis:

On the phone, every message sent from the SMS window since July is stored with creator=org.kde.kdeconnect_tp and restricted=1. Everything Messaging writes is restricted=0. That includes a reply I sent from the desktop notification's quick reply (on my regular, older build): the phone hands that one to Messaging, the row ends up creator=com.android.messaging restricted=0, and it echoed to the desktop in about a second. Same desktop, same phone, same conversation. The only difference is who wrote the row.

To make sure the desktop wasn't dropping anything, I put a log line in the desktop SMS plugin where the packet comes in and asked the phone for the 10 newest messages in that conversation. The packet had the 10 newest restricted=0 messages, including sent ones written by Messaging, and none of the 7 restricted=1 messages in that range. So they never leave the phone. The desktop version can't matter here.

This is a different problem from bug 517659, which I reported in March. That one was the echo stopping after a WiFi reconnect. Here the messages are missing even when the desktop explicitly requests the conversation.

Workaround from comment 1 works for me (tested on my regular build):

  adb shell appops set --uid org.kde.kdeconnect_tp READ_RESTRICTED_MESSAGES allow
  adb shell am force-stop org.kde.kdeconnect_tp

After relaunching the Android app, messages sent from the SMS window echo again, and the ones that were hidden showed up too. I haven't tested whether it survives a reboot yet.

For timing: in my SMS database the last KDE Connect row with restricted=0 is from 2026-07-01 and the first with restricted=1 is from 2026-07-07. All 246 KDE Connect rows before that are restricted=0, all 44 since are restricted=1, and no row written by Messaging is flagged. That lines up with the original report in comment 0 (July 23, "working fine a few weeks ago").

###
All testing and debugging (and this comment) relied heavily on Fable 5.1 Medium. I had Claude review and tune many times. This may have errors but it is not slop, and I understand what I'm posting (to the degree I am able as a non-coder)
Comment 9 Simon Redman 2026-11-05 16:58:43 UTC
Given Android has very explicitly and intentionally broken this, and all of these reports are for Android 17, I will close this bug as upstream issue. If someone later finds that there is an in-code workaround that enables access to restricted messages, without implementing KDE Connect as a full messaging app, please feel free to reopen this bug with the details of what changes should be made.

 I will add this appops workaround to the wiki. It would be nice if Android would stop breaking user choice in the name of "safety".
Comment 10 Bill 2026-11-06 15:12:31 UTC
One not-so-related-but-possibly-helpful note. If you set your default sms message to Quik the issues solves itself. I have confirmed. 

creator=dev.octoshrimpy.quik.fdroid, restricted=0

This doesn't help users who live fully in the google ecosystem, but for those of us militant non-cloud'ers, it's a win-win
Comment 11 Bill 2026-11-06 15:16:26 UTC
(In reply to Bill from comment #10)
> One not-so-related-but-possibly-helpful note. If you set your default sms
> message to Quik the issues solves itself. I have confirmed. 
> 
> creator=dev.octoshrimpy.quik.fdroid, restricted=0
> 
> This doesn't help users who live fully in the google ecosystem, but for
> those of us militant non-cloud'ers, it's a win-win

sigh... sorry, I forgot that I still have the workaround in place. Quik does not fix the issue.
Comment 12 Brian Stine 2026-11-09 17:52:51 UTC
A follow-up for anyone landing here.  I've filed a feature request with Google for a user-facing, revocable way to grant an app access to restricted messages: https://issuetracker.google.com/issues/583727690. Starring it will help this get more traction with Google.