Ask Your Question
3

Can I execute these ADB commands in a one-line format?

asked 2023-05-04 00:38:03 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-04 01:02:01 +0000

scrum gravatar image

Yes, you can execute multiple ADB commands in a one-line format by separating them with a semicolon (;) or using the double ampersand (&&) operator to execute the second command only if the first command exits without any error.

Example:

adb shell am start -n com.package.name/.ActivityName; adb shell input text "Hello World"

or

adb shell am start -n com.package.name/.ActivityName && adb shell input text "Hello World"

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-04 00:38:03 +0000

Seen: 10 times

Last updated: May 04 '23