简体   繁体   中英

adb command in cmd file (windows)

I have command and she working fine in cmd in manual mode:

adb shell
su
echo 'AT+EGMR=1,7,"558378919678440"' > /dev/radio/pttycmd1

How do I run this command in a .bat file? I tried such options, but they do not work:

adb shell su -с echo 'AT+EGMR=1,7,"558378919678440"' > /dev/radio/pttycmd1
adb shell "su -с 'echo 'AT+EGMR=1,7,"558378919678440"' > /dev/radio/pttycmd1'"
adb shell su "-с echo 'AT+EGMR=1,7,"558378919678440"' > /dev/radio/pttycmd1"

Please help.

Using bash you can run this command

adb shell su root sh -c $'"echo \'AT+EGMR=1,7,\\"558378919678440\\"\' > /dev/radio/pttycmd1"'

So, if you are running it from a batch file you may need to invoke bash first

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM