简体   繁体   中英

How can i make a .bat file which runs commands inside adb shell

I want to create a .bat file in which i can use following command :

adb shell
uiautomator runtest StandbyCase.jar -c sprd.powertest.Standby &

The second line will not work here. I have tried :

adb shell uiautomator runtest StandbyCase.jar -c sprd.powertest.Standby &

But in this case & will not work. It is used to keep the process running in backgound. So, i want to run

adb shell

first, and then

uiautomator runtest StandbyCase.jar -c sprd.powertest.Standby &

Can anyone suggest how can i do this ?

Try using;

adb shell "runtest StandbyCase.jar -c sprd.powertest.Standby &;uiautomator runtest StandbyCase.jar -c sprd.powertest.Standby &"

in a normal batch file.

This can be used for up-to 20 lines.

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