Paste text on Android using ADB?

前端 未结 2 1481
醉酒成梦
醉酒成梦 2021-01-11 14:22

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 int

相关标签:
2条回答
  • 2021-01-11 14:46

    My solution:

    1. I installed the Tasker plugin.
    2. I made a "scene" with a button.
    3. On the button tap event I added the "Control+V plugin" with the configuration to type %CLIP.
    4. Now I made a profile that direct to a task to show the scene (overlay,blocking).
    5. And last but not least, I use adb shell input tap x y to tap the button.
    0 讨论(0)
  • 2021-01-11 14:49

    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
    
    0 讨论(0)
提交回复
热议问题