0

Would you please say me how can I convert this code:

path to app/adb devices | awk 'NR>1{print $1}' | xargs -n1 -I% adb -s % install app.apk

to python command?

3
  • Does this answer your question? How to execute a program or call a system command from Python Commented Mar 7, 2021 at 13:02
  • 1
    Not really .... Commented Mar 8, 2021 at 9:42
  • The second answer in the link I suggested is precisely the same as the answer below... Commented Mar 8, 2021 at 10:20

1 Answer 1

1

You can always utilize the os.system() method:

import os

command = "path to app/adb devices | awk 'NR>1{print $1}' | xargs -n1 -I% adb -s % install app.apk"

os.system(command)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.