简体   繁体   中英

Android shell script

I have an android 4.2 phone on which I wish to run the following script:

su
setprop service.adb.tcp.port 5555
stop adbd
start adbd

If I put it into and .sh file, and have the SManager app to run it, it does nothing, no error nothing, just get back the console. I allow root access for the app.

If I manually type it into Terminal Emulator, then it works.

How can I run .sh files easily (without much typing) other then SManager, as its obviously not working.

Thank you

All my scripts was ctrl c ctrl v to sh files. Some windows spec char went into the script, and it did nothing. As soon as i typed the whole thing in on touchkeyboard, AND allowed Root run within SManager (it was not enough to start it as rooted only), it came alive.

Thanks!

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