ADB Commands

1)    To check connected devices

adb devices   #

2)  Getting a shell
To get the termianl of connected device
 -adb shell  (if one device)
 -adb -e shell(Emulator device)
 -adb -d shell(Real device)

 -adb -s [Name of device]
#Exitting Shell
 -exit command

 C:\sdk\platform-tools>adb -d shell
santoni:/ $

 for a specific target when multiple devices/emulators are connected is as follows:

 adb –s [name of the device]

3)Listing all installed packages

santoni:/ $ pm list packages
Note: Here pm is packages manager

4) Transfer Files
          A) PUSHing file

         adb push  /storage/sdcard0/htdocs

        B) Pulling files
          adb pull /data/local/tmp/test.txt

5)  Installing apps using adb

          adb install [filename.apk]

6)more shell commnds click

7) To kills the adb daemon on the device and restarts it for us:
       adb kill-server



Post a Comment