Adb Tutorials
Adb Tutorials
04.07.2009 - 28.10.2013
TableofContents
1. Android Debugging Bridge - adb
2. Shell access via adb
3. Copy files from and to your device
4. Uninstall an application via adb
5. Telnet your your Android device
6. Comand line tool dumpsys
6.1. adb dumpsys
6.2. Memory consumption overview with
dumpsys
6.3. Information about schedule tasks
7. Support free vogella tutorials
7.1. Thank you
7.2. Questions and Discussion
8. Links and Literature
8.1. Source Code
8.2. Android Resources
8.3. vogella Resources
TheadballowsyoutosendcommandstoyourAndroiddevice,pullandpushfilestoit,givesshellaccesstothe
Androiddeviceandallowsyoutoreadinformationfromyourdevice,forexamplethecurrentmemoryusage.The
followingchapterdescribetheusageofthecorrespondingcommands.
Ifyouhaveseveraldevicesrunningyoucanissuecommandstooneindividualdevice.
# Lists all devices
adb devices
#Result
List of devices attached
emulator-5554 attached
emulator-5555 attached
# Issue a command to a specific device
adb -s emulator-5554 shell
ThiswillconnectyoutoyourdeviceandgiveyouLinuxcommandlineaccesstotheunderlyingfilesystem,e.g.ls,
rm,,cd,mkdir,etc.Theapplicationdataisstoredinthedirectory"/data/data/package_of_your_app".
FormoreinformationontheemulatorconsolepleaseseeEmulatorConsolemanual
Thisshowstheinfothatthealarmisscheduledforapprox.12minutes.
Tofindouttheinformationaboutthependingintent,runtheadb shell dumpsys activity intentscommandand
lookfortheIDofthePendingIntentRecord(inthisexample43bbf887):
* PendingIntentRecord{43bbf887 com.vogella startService}
uid=10042 packageName=com.vogella type=startService flags=0x0
requestIntent=act=MY_ACTION cmp=com.vogella/.MyService (has extras)