The ADB Wrapper addon runs ADB commands on the device itself.
That is why a command like
adb devices will not work using that addon, however will work using the Execute action from the Shell Commands addon.
See following example:
I filled in the first command input field with:
and the rest of the input fields are empty.
After running the command with my Xiaomi Android device connected to my PC, I received the expected output as I would if I ran this command from my terminal.
My terminal output:
One again, you can use the same action to save device logs:
After running the
adb -d logcat -d>C:\logs\log4.txt a file will be created in my logs directory on my PC:
You CAN save logs with the ADB Wrapper as well, however they will need to be stored ON the device itself in a writeable directory, if you just use
logcat > file.txt the default location is the root directory of the device’s internal storage, which is normally read-only and you will be faced with the following error:
So specify a writeable directory on the device, for example this command will work:
adb shell logcat > mnt/sdcard/log.txt
You should take note of the two additional fields in the action.
Some commands take more than 5 seconds, or are never terminated, for this you will need to specify a timeout, if you want logs for 10 seconds, specify 10000 milliseconds.
In addition, since the logcat command does not terminate on it’s own, specify the DoNotFailOnTimeout parameter to be true so that the step will not fail, of course you can also just use the always pass step failure behavior.