clipper
clipper copied to clipboard
Broken on Android 10 (Android Q)
I just updated my Pixel 3 XL to Android 10 and now Clipper won't return data from the clipboard.
Issuing the adb command adb shell am broadcast -a clipper.get
always returns result=0, data=""
.
I assume this is related to the recent Android security changes that limits clipboard access except to system apps: https://issuetracker.google.com/issues/123461156
Is there any more information regarding this issue, or any workaround being considered?
Seems like we need to open the app to the foreground to achieve it. You can do a trick that start the app from the command line then calling clipper get, then stop the app.
adb shell am start ca.zgrs.clipper/.Main
sleep 1
adb shell am broadcast -a clipper.get
adb shell am force-stop ca.zgrs.clipper
This is my complete script for both get/set:
adb shell am start ca.zgrs.clipper/.Main
sleep 0.5
if [[ -z $1 ]]; then
adb shell am broadcast -a clipper.get
else
adb shell am broadcast -a clipper.set -e text "\"$1\""
fi
adb shell am force-stop ca.zgrs.clipper