Mobile Testing: Android Debug Bridge (ADB)
If you read my blog and previous post, this post will be helpful for everyone who will work as a mobile tester.
Well, if sound "ADB" confused you and you don't understand what is it, please read it:
ADB is the literal meaning "Android Debug Bridge". Though at first glance it doesn’t appear to tell you anything, it actually does. It’s a “bridge” for developers to work out bugs in their Android applications. This is done by connecting a device that runs the software through a PC, and feeding it terminal commands. ADB lets you modify your device (or device’s software) via a PC command line.
Let's learn commands:
1. Turn on ADB
Go to Menu > Settings > Applications > Development > USB Debugging
2. Running ADB
Open up command prompt and type your way to the directory you have your SDK in.
Mine is in C:\
So for example, mine would be: cd c:\AndroidSDK/tools
You are now in
3. Basic ADB commands
ADB push (sends files to your phone) -- adb push c:\example.apk /sdcard/example.apk
ADB pull (Receives files from your phone) -- adb pull /system/app/example.apk c:\example.apk
ADB install (installs application) -- adb install c:\example.apk
ADB uninstall(sometimes needadd 'com') -k means keep the data and cache directories
usage: adb uninstall -k package_name
adb shell (Begins shell connection with phone)
adb reboot (reboots phone)
adb reboot recovery (reboots phone into recovery)
adb reboot bootloader (reboots the phone into bootloader/the white screen)
adb remount (remounts the system)
4. Commands to run while in ADB Shell
cd (changes directories) -- cd /system/app
ls (lists all files in the directory) -- cd /system/app
rm (removes files) -- rm /system/app/example.apk
cp (copies files) similar to cat -- cp /system/app/example.apk /sdcard/example.apk
cat (copies files) -- cat /system/app/example.apk > /sdcard/example.apk
exit (exits shell) -- exit
overview: view device log. (DDMS logcat)
usage: adb logcat
How to use adb devices overview: list all connected devices
usage: adb devices
how to use adb bugreport overview: return all information from the device that should be included in a bug report.
usage: adb bugreport
Hope you learned something!
Well, if sound "ADB" confused you and you don't understand what is it, please read it:
ADB is the literal meaning "Android Debug Bridge". Though at first glance it doesn’t appear to tell you anything, it actually does. It’s a “bridge” for developers to work out bugs in their Android applications. This is done by connecting a device that runs the software through a PC, and feeding it terminal commands. ADB lets you modify your device (or device’s software) via a PC command line.
Let's learn commands:
1. Turn on ADB
Go to Menu > Settings > Applications > Development > USB Debugging
2. Running ADB
Open up command prompt and type your way to the directory you have your SDK in.
Mine is in C:\
So for example, mine would be: cd c:\AndroidSDK/tools
You are now in
3. Basic ADB commands
ADB push (sends files to your phone) -- adb push c:\example.apk /sdcard/example.apk
ADB pull (Receives files from your phone) -- adb pull /system/app/example.apk c:\example.apk
ADB install (installs application) -- adb install c:\example.apk
ADB uninstall(sometimes needadd 'com') -k means keep the data and cache directories
usage: adb uninstall -k package_name
adb shell (Begins shell connection with phone)
adb reboot (reboots phone)
adb reboot recovery (reboots phone into recovery)
adb reboot bootloader (reboots the phone into bootloader/the white screen)
adb remount (remounts the system)
4. Commands to run while in ADB Shell
cd (changes directories) -- cd /system/app
ls (lists all files in the directory) -- cd /system/app
rm (removes files) -- rm /system/app/example.apk
cp (copies files) similar to cat -- cp /system/app/example.apk /sdcard/example.apk
cat (copies files) -- cat /system/app/example.apk > /sdcard/example.apk
exit (exits shell) -- exit
overview: view device log. (DDMS logcat)
usage: adb logcat
How to use adb devices overview: list all connected devices
usage: adb devices
how to use adb bugreport overview: return all information from the device that should be included in a bug report.
usage: adb bugreport
Hope you learned something!
Comments
Post a Comment