For example, I want to execute this command from this tutorial:
$ adb shell monkey -p your.package.name -v 500
How do I do it? Where do I enter the command? I've tried entering it into the terminal but it says that '$' is not recognized.
I also tried removing '$' but it then says that "'adb' is not recognized as an internal or external command, operable program or batch file."
But, in order to execute several commands in one line, you may use adb shell "cmd1;cmd2;cmd3" . The && command mentioned by @Rachit is not quite right, because in the case adb shell "netcfg && ps && getprop" , command ps will be executed only when netcfg is executed without error raised.
For devices running Android 10 or older, ADB over WiFi can be enabled after some initial setup from a PC. That means on older Android versions, you'll still need to go through the process to set up ADB on your PC. Once you do that, you can then have the app send commands to the ADB server started on the device.
$
isn't part of the command. Use adb shell monkey -p your.package.name -v 500
adb is the command you ran on your terminal. For example:
adb devices
shows you the connected devices.
adb shell
Starts a remote shell in the target emulator/device instance.
See https://developer.android.com/studio/command-line/adb.html for more info about adb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With