Fix clipboard permission on Android 10

Clipboard sync is awesome, let's bring it back.

<div class="card info"> <div class="header"> <div class="symbol"><svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Information Circle</title><path d='M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64z' fill='none' stroke='currentColor' stroke-miterlimit='10' stroke-width='32'/><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32' d='M220 220h32v116'/><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32' d='M208 340h88'/><path d='M248 130a26 26 0 1026 26 26 26 0 00-26-26z'/></svg></div> <span>info</span> </div> <div class="content">

This guide is updated on 2020-03-29 due to update of the upstream module.

The lazy way no longer works. You'll need to add the entry manually.

</div> </div>

Android 10 has some great improvements on user privacy, but it also brings problems. One issue I faced is that background applications can no longer access the clipboard 1. This directly breaks the clipboard share functionality of KDE Connect, and that's annoying.

Fortunately, it's Android, and (at least for now) we can do whatever we want to it. And, for sure, there is a solution. There's a Magisk module called Riru-ClipboardWhitelist that can inject a list of Apps that bypasses this limitation.

The Manual Way

Using this module is quite straight forward, just install Riru (Riru - Core) and Riru - Clipboard Whitelist with Magisk Manager (both avaliable in the official Magisk module repository), and do a reboot.

Then, head toward a shell (JuiceSSH, Termux, whatever you like), obtain root privilege (via typing su and allow the app to use root access), and type:

1
2
3
# Here, org.kde.kdeconnect_tp is a example. You can also add other apps.
# Just replace the package name and do this multiple times.
echo "org.kde.kdeconnect_tp" >> /data/misc/clipboard/whitelist.list

Then do another reboot. Now the clipboard sync capability of KDE Connect should work as before!

Published on Jan 23, 2020 Last modified on Mar 29, 2020
JS
Arrow Up