Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken on Android 10 (Android Q) #9

Open
haferje opened this issue Nov 8, 2019 · 1 comment
Open

Broken on Android 10 (Android Q) #9

haferje opened this issue Nov 8, 2019 · 1 comment

Comments

@haferje
Copy link

haferje commented Nov 8, 2019

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?

@tuanchauict
Copy link

tuanchauict commented Dec 4, 2019

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

J-G-Froejk added a commit to J-G-Froejk/PGo-CalcaBotaBotaCalca that referenced this issue May 12, 2020
Change the front program to Clipper, do the clipper.get and change back to PokemonGO.
Do some small waits in between.
The idea is base on some note from Tuan Chau @tuanchauict , he is mention in a issue note on Clipper (/majido/clipper/issues/9), "Seems like we need to open the app to the foreground to achieve it."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants