
If you work with android devices you may already know about ADB if not it is a good time to learn it.
How to install ADB for Mac you can find in this article almost in the bottom of article. Below I will post the most important and commonly used commands from my QA experience.
Activity | Command |
---|---|
Connection | adb connect [your ip of device without brackets] |
Check out all devices | adb devices |
Installation of any apk | adb install [the path of application without brackets] => it is easy to use drag and drop with mouse cursor like here ![]() |
Reboot | adb reboot |
Kill the server | adb kill-server |
Start the server | adb start-server |
Make screenshot | adb shell screencap -p /sdcard/screen.png |
Make a record of screen | adb shell screenrecord /sdcard/video.mp4 => if you are done, to stop the record type Ctrl+C |
Copy made file video or screenshot on your pc | adb pull /sdcard/screen.png /Users/alexanderwahl/Desktop/ |
Delete the made file on the remote device | adb shell rm /sdcard/environment.mp4 |
Get logs | adb logcat -v time > log.txt |
Text input via shell | adb shell input text this italic text would be typed on the device |