使用adb命令在APP中输入中文

搞了好几天的东西,终于搞定了,记录下
text = '微信'
text = text.encode('UTF-7').decode('US-ASCII')
text = text.replace('+', '&')
os.popen('adb shell "settings put secure default_input_method jp.jun_nama.test.utf7ime/.Utf7ImeService"')
os.popen('adb shell "input text ' + text + '"')
需要安装一个输入法的apk (Utf7Ime.apk)
原文地址:https://www.cnblogs.com/wang1122/p/8288559.html