This might seem like a duplicate question, but hear me out.
I basically need to press "CTRL+V" inside of Android. I need to paste the current Android clipboard into the focused TextBox.
So this:
adb shell input text [text]
won't do, as it requires me to enter the text myself. I just need to paste the current clipboard.
Is that possible through ABD? I googled and googled and all I found was ways to set clipboard content and not actually just press the paste button.
for the sake to ease development
As you would just "CTRL+V" on windows, I just need to "CTRL+V" on Android if you know what I mean. Not directly through adb. If you have root, you could create a background system service that responds to an intent, and upon receiving the intent, inject a key sequence equivalent to paste (Ctrl + V).
Since API 24, KEYCODE_PASTE
is available from the KeyEvent
class, its constant is 279
.
The adb command would be as follows:
adb shell input keyevent 279
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With