ADB command line tool utility is included in android SDK , so firstly you must install android SDK in your computer to work with ADB Command .
Read : Installing Android SDK
After Installing SDK ,for accessing ADB Command through command line you need to make android sdk tools available to systems environment variable
Read : Environment variable setup for android SDK tools
Lets See some of ADB Commands.
The adb devices command on execution displays the number of Android devices connected to your computer with name and id , this cmd is mainly used to make ensure the communication between your computer and android devices
The adb shell input text command is used for sending text from computer to android device , this command takes text as a parameter to it and passes it on android device which is in connected
Note : Have focus on edittext ui component ,before executing this cmd , because the edittext ui component receives the text send by this command.
adb shell input text "yout_text_goes_here"
Here is an sample scenario of inputing text into edittext component
adb shell input text "http://www.pavanh.com/p/android-tutorial.html"
The adb shell input swipe command is used for swiping on to android device , this command takes four parameter which are grouped into two forms ,specifes start and end co-ordinates.
swipe start point co-ordinates : x1 y1
swipe End Point co-ordinates : x2 y2
adb shell input swipe x1 y1 x2 y2
Here is an useful scenario of swipe command for opening and closing notification
Note : This command is tested with HTC Desire X Device , the co-ordinates may vary from device to device , make ensure you use co-ordinates points according to the one
> Opening Notification
adb shell input swipe 10 10 10 1000
> Closing Notification
adb shell input swipe 10 1000 10 10
The adb shell input swipe command is used for tapping on to android device screen , this command takes two parameter which specifies the co-ordinate point for tappping on to the screen
adb shell input tap x1 y1
Here is an sample scenario of tapping on to application icon to open it
adb shell input tap 200 300