senzhk / ADBKeyBoard

Android Virtual Keyboard Input via ADB (Useful for Test Automation)
GNU General Public License v2.0
1.22k stars 299 forks source link

i create a script to paste content from windows to android base on this project #33

Closed ssddi456 closed 4 years ago

ssddi456 commented 4 years ago

the script can get from here

  1. install adbkeyboard on your phone
  2. download the scripts and add it to your path,
  3. connect to your phone with adb
  4. when you want to paste content ,just run adbpaste

the ones who cannot execute ps1 scripts can resolve it here

senzhk commented 4 years ago

Cool. Thanks. Added in README>

sunshinewithmoonlight commented 4 years ago

Hello, I have a python script that implements the same function as your ps script. :3

import os
import base64

# os.system("adb devices")

chars = '的广告'
charsb64 = str(base64.b64encode(chars.encode('utf-8')))[1:]
# print(charsb64)

os.system("adb shell am broadcast -a ADB_INPUT_B64 --es msg %s" %charsb64)

Thanks to https://stackoverflow.com/questions/33294213/how-to-decode-unicode-in-a-chinese-text

senzhk commented 4 years ago

Thanks.