SlideShare a Scribd company logo
Mob: +91-963283917
Email: info@wavedigitech.com
Copyright © 2013 Wavedigitech. All rights reserved.
Android Debug Bridge (ADB)
Mob: +91-963283917
Email: info@wavedigitech.com
Copyright © 2013 Wavedigitech. All rights reserved.
Android Debug Bridge (adb):- ADB is a versatile command line tool that lets you
communicate with an emulator instance or connected Android-powered device.
It is a client-server program that includes three components:
A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb
command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
A server, which runs as a background process on your development machine. The server manages
communication between the client and the adb daemon running on an emulator or device.
logcat :- The Android logging system provides a mechanism for collecting and viewing system debug
output. Logs from various applications and portions of the system are collected in a series of circular buffers,
which then can be viewed and filtered by the logcat command. You can use logcat from an
ADB (Android Debug Bridge) shell to view the log messages.
=====================================================================================
Step 1: Using the ADB Command
=====================================================================================
At your command prompt, simply type:
adb /* The ADB tool is launched from the command line. */
adb logcat /* start printing out everything that is going on on the device. */
adb logcat -C /* Colour: show logs with color to make them easier to read when viewing.*/
adb logcat -d > Mylogcat.txt /* You can dump the complete logcat to a file like this */
=====================================================================================
Connect Android device to your development machine. Now, if you use the ADB devices command, it
should list any attached devices or emulator instances.
adb devices /* list any attached devices or emulator instances */
adb shell /* Begins shell connection with phone */
=====================================================================================
Step 2: Restarting the ADB Server
=====================================================================================
(Enabled the USB Debugging:: Go to Menu > Settings > Applications > Development > USB Debugging
adb kill-server /* Terminates the adb server process. */
adb start-server /* Checks whether the adb server process is running and starts it, if not */
=====================================================================================
Since LogCat can get pretty large very quickly you may want to clear from Eclipse or from a terminal
window using.
adb logcat -c
adb logcat Wifi:E *:S -v long > Error-Log.txt
And this will only print out any errors associated with Wifi, and anything which is fatal.
In Wifi:E, the :E = to look for Errors, the full list of options is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
Mob: +91-963283917
Email: info@wavedigitech.com
Copyright © 2013 Wavedigitech. All rights reserved.
F — Fatal
S — Silent (highest priority, on which nothing is ever printed).
=====================================================================================
ADB Push and Pull (Sends/Receive files To/From your phone) -
=====================================================================================
adb push < source file path> <device destination file path>
(e.x) adb push foo.txt /sdcard/foo.txt
(e.x) adb push c:example.apk /sdcard/example.apk
adb pull <device source file path> <local destination file path>
(e.x) adb pull /system/app/example.apk c:example.apk
=====================================================================================
App Installation and Removal
=====================================================================================
adb install <file path to apk> /* Install command to install an Android package file/ */
adb uninstall <package name> /* remove an existing app by its package name. */
=====================================================================================
Backup and Restore
===========================================================================
You can backup and restore the contents of a device. This has limitations on devices that aren’t rooted.
adb backup /* Taking Backup */
(e.x) adb backup –apk –shared –all –f /backup/Mybackup.ab
/* Backup folder, and save the backup to “c:/backup/mybackup.ab” */
adb restore <archive name> /* restored your phone */
(e.x ) adb restore C:backupMybackup.ab
=====================================================================================
Device Rebooting
=====================================================================================
Reboot a device either normally, into the boot loader, or into recovery mode.
adb reboot /* reboots phone */
adb reboot recovery /* reboots phone into recovery */
adb reboot bootloader /* reboots the phone into boot loader the white screen */
adb remount /* remounts the system */
=====================================================================================

More Related Content

PPTX
Android - ADB
PDF
Talks on adb - Day 2 (pdf version)
PDF
ADB(Android Debug Bridge): How it works?
PDF
Eclipse HandsOn Workshop
PDF
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
PDF
Linux: LVM
TXT
Adb instructions
PDF
Linux fundamental - Chap 09 pkg
Android - ADB
Talks on adb - Day 2 (pdf version)
ADB(Android Debug Bridge): How it works?
Eclipse HandsOn Workshop
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
Linux: LVM
Adb instructions
Linux fundamental - Chap 09 pkg

What's hot (20)

PDF
Docker Compose Explained
PDF
Q2.12: Debugging with GDB
PDF
Chap 19 web
PPTX
Lecture 3 Perl & FreeBSD administration
TXT
Msfpayload/Msfencoder cheatsheet
PDF
Shrink to grow
PDF
用 Go 語言打造多台機器 Scale 架構
ODP
Inter-process communication of Android
PDF
Kernel Recipes 2015: Anatomy of an atomic KMS driver
PPTX
Running Docker in Development & Production (DevSum 2015)
PPTX
Running Docker in Development & Production (#ndcoslo 2015)
PDF
Hiveminder - Everything but the Secret Sauce
PDF
digitalSTROM Developer Day 2011: Wie Heimelektronik und digitalSTROM zusammen...
PDF
Cme: a tool to edit and validate configuration files
PPTX
QEMU - Binary Translation
PDF
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
PDF
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
PPT
Android Debug
PDF
NativeBoost
PPTX
Docker practice
Docker Compose Explained
Q2.12: Debugging with GDB
Chap 19 web
Lecture 3 Perl & FreeBSD administration
Msfpayload/Msfencoder cheatsheet
Shrink to grow
用 Go 語言打造多台機器 Scale 架構
Inter-process communication of Android
Kernel Recipes 2015: Anatomy of an atomic KMS driver
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (#ndcoslo 2015)
Hiveminder - Everything but the Secret Sauce
digitalSTROM Developer Day 2011: Wie Heimelektronik und digitalSTROM zusammen...
Cme: a tool to edit and validate configuration files
QEMU - Binary Translation
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Android Debug
NativeBoost
Docker practice
Ad

Similar to Android debug bridge (20)

PPTX
Android tools for testers
PDF
Android debug bridge android developers
PDF
Android debug bridge android developers
PDF
Discover System Facilities inside Your Android Phone
PDF
Android developer options & android sdk tools (for qa)
PDF
Android developer options &amp; android sdk tools (for qa)
PPT
Android tools
PDF
Android Bluetooth Introduction
PPTX
Manish Chasta - Securing Android Applications
PDF
Embedded Android
PPTX
Getting the android device zoo under control
PDF
Android chapter02-setup2-emulator
PDF
Interacting with your app through the command line
PPT
Go BlackBerry Z30 ready
PPTX
Provisioning, deploying and debugging node.js applications on azure
PPTX
Android chapter02-setup2-emulator
PPTX
C# Production Debugging Made Easy
PPT
Synapseindia android apps intro to android development
PPTX
行動App開發管理實務 unit1
PPTX
Android Development Tools Overview
Android tools for testers
Android debug bridge android developers
Android debug bridge android developers
Discover System Facilities inside Your Android Phone
Android developer options & android sdk tools (for qa)
Android developer options &amp; android sdk tools (for qa)
Android tools
Android Bluetooth Introduction
Manish Chasta - Securing Android Applications
Embedded Android
Getting the android device zoo under control
Android chapter02-setup2-emulator
Interacting with your app through the command line
Go BlackBerry Z30 ready
Provisioning, deploying and debugging node.js applications on azure
Android chapter02-setup2-emulator
C# Production Debugging Made Easy
Synapseindia android apps intro to android development
行動App開發管理實務 unit1
Android Development Tools Overview
Ad

More from Wave Digitech (17)

DOC
54 sms based irrigation system
DOC
54 a automatic irrigation system
DOCX
Implementation of solar illumination system with three-stage charging and dim...
DOCX
Zl embd045 wireless telemedia system based on arm and web server
DOC
Zl embd029 arm and rfid based event management monitoring system
PPTX
PPTX
PDF
Projects wavedigitech-2013
PPTX
Unix Linux Commands Presentation 2013
PPTX
Difference bw android4.2 to android 4.3
PPTX
Unix Process management
PPTX
U-Boot presentation 2013
PDF
Useful Linux and Unix commands handbook
PDF
Wavedigitech training-broucher-june2013
PPTX
Wavedigitech presentation-2013-v1
PPTX
Wavedigitech presentation-2013
PPTX
Wavedigitech gdb
54 sms based irrigation system
54 a automatic irrigation system
Implementation of solar illumination system with three-stage charging and dim...
Zl embd045 wireless telemedia system based on arm and web server
Zl embd029 arm and rfid based event management monitoring system
Projects wavedigitech-2013
Unix Linux Commands Presentation 2013
Difference bw android4.2 to android 4.3
Unix Process management
U-Boot presentation 2013
Useful Linux and Unix commands handbook
Wavedigitech training-broucher-june2013
Wavedigitech presentation-2013-v1
Wavedigitech presentation-2013
Wavedigitech gdb

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
sap open course for s4hana steps from ECC to s4
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
Spectral efficient network and resource selection model in 5G networks
sap open course for s4hana steps from ECC to s4
A comparative analysis of optical character recognition models for extracting...
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine Learning_overview_presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf

Android debug bridge

  • 1. Mob: +91-963283917 Email: info@wavedigitech.com Copyright © 2013 Wavedigitech. All rights reserved. Android Debug Bridge (ADB)
  • 2. Mob: +91-963283917 Email: info@wavedigitech.com Copyright © 2013 Wavedigitech. All rights reserved. Android Debug Bridge (adb):- ADB is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components: A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients. A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device. logcat :- The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers, which then can be viewed and filtered by the logcat command. You can use logcat from an ADB (Android Debug Bridge) shell to view the log messages. ===================================================================================== Step 1: Using the ADB Command ===================================================================================== At your command prompt, simply type: adb /* The ADB tool is launched from the command line. */ adb logcat /* start printing out everything that is going on on the device. */ adb logcat -C /* Colour: show logs with color to make them easier to read when viewing.*/ adb logcat -d > Mylogcat.txt /* You can dump the complete logcat to a file like this */ ===================================================================================== Connect Android device to your development machine. Now, if you use the ADB devices command, it should list any attached devices or emulator instances. adb devices /* list any attached devices or emulator instances */ adb shell /* Begins shell connection with phone */ ===================================================================================== Step 2: Restarting the ADB Server ===================================================================================== (Enabled the USB Debugging:: Go to Menu > Settings > Applications > Development > USB Debugging adb kill-server /* Terminates the adb server process. */ adb start-server /* Checks whether the adb server process is running and starts it, if not */ ===================================================================================== Since LogCat can get pretty large very quickly you may want to clear from Eclipse or from a terminal window using. adb logcat -c adb logcat Wifi:E *:S -v long > Error-Log.txt And this will only print out any errors associated with Wifi, and anything which is fatal. In Wifi:E, the :E = to look for Errors, the full list of options is as follows: V — Verbose (lowest priority) D — Debug I — Info (default priority) W — Warning E — Error
  • 3. Mob: +91-963283917 Email: info@wavedigitech.com Copyright © 2013 Wavedigitech. All rights reserved. F — Fatal S — Silent (highest priority, on which nothing is ever printed). ===================================================================================== ADB Push and Pull (Sends/Receive files To/From your phone) - ===================================================================================== adb push < source file path> <device destination file path> (e.x) adb push foo.txt /sdcard/foo.txt (e.x) adb push c:example.apk /sdcard/example.apk adb pull <device source file path> <local destination file path> (e.x) adb pull /system/app/example.apk c:example.apk ===================================================================================== App Installation and Removal ===================================================================================== adb install <file path to apk> /* Install command to install an Android package file/ */ adb uninstall <package name> /* remove an existing app by its package name. */ ===================================================================================== Backup and Restore =========================================================================== You can backup and restore the contents of a device. This has limitations on devices that aren’t rooted. adb backup /* Taking Backup */ (e.x) adb backup –apk –shared –all –f /backup/Mybackup.ab /* Backup folder, and save the backup to “c:/backup/mybackup.ab” */ adb restore <archive name> /* restored your phone */ (e.x ) adb restore C:backupMybackup.ab ===================================================================================== Device Rebooting ===================================================================================== Reboot a device either normally, into the boot loader, or into recovery mode. adb reboot /* reboots phone */ adb reboot recovery /* reboots phone into recovery */ adb reboot bootloader /* reboots the phone into boot loader the white screen */ adb remount /* remounts the system */ =====================================================================================