How to input ampersand with adb shell input?

寵の児 提交于 2019-12-10 17:31:18

问题


adb shell input text "&" doesn't work, nor does adb shell input keyevent KEYCODE_AMPERSAND.

Related to question 7789826.


回答1:


Try:

adb shell input text "\&"



回答2:


For anyone stumbling across this in the future, the escape that finally worked from me was not \&, but rather "\&"

as in

adb shell echo Macaroni "\&" Cheese

and not

adb shell echo Macaroni \& Cheese

Hopefully this helps someone.

For the record, this is on Windows.



来源:https://stackoverflow.com/questions/28468279/how-to-input-ampersand-with-adb-shell-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!