Running "adb" on USB Debugging Interface

This section provides a tutorial example on how to run 'adb' commands on Samsung Android mini tablet through the USB debugging interface. 'adb -d' is to run commands on the USB connected Android device. But if there is only 1 device, '-d' option is not needed.

With my Samsung Galaxy Tab 3 mini tablet connected in USB debugging mode, I can try some Android SDK debugging tools on my Windows computer now.

1. Try the ADB (Android Debugging Bridge) tool to list the device:

C:\herong>\local\android-sdk-windows\platform-tools\adb devices
List of devices attached
5200e5505ae3a000   unauthorized

Cool. My tablet is showing up as "5200e5505ae3a000". But it is flagged as "unauthorized" for some reason.

2. Go back to the tablet, go to "Settings > Developer options", uncheck "USB debugging" and check it again.

3. Tap OK on the warning message. You will see an authorization request message:

Allow USB debugging?
The computer's RSA key fingerprint is "....".
[x] Always allow from this computer.

4. Check "Always allow..." and tap OK.

5. Go back to Windows computer, and run the "adb devices" command again:

C:\herong>\local\android-sdk-windows\platform-tools\adb devices
List of devices attached
5200e5505ae3a000   device

6. Run some other "adb" commands:

C:\herong>\local\android-sdk-windows\platform-tools\adb -d shell \
   uptime
up time: 1 days, 02:25:28, idle time: 1 days, 10:38:29, sleep time: 08:35:28

C:\herong>\local\android-sdk-windows\platform-tools\adb shell \ 
   ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.291 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.173 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.166 ms
...
   Ctrl-C   

C:\herong>\local\android-sdk-windows\platform-tools\adb -d shell

shell@lt02wifi:/ $ df
/mnt/secure/asec: Permission denied
Filesystem              Size     Used     Free   Blksize
/dev                  416.2M   164.0K   416.0M      4.0K
/mnt/secure           416.2M     0.0K   416.2M      4.0K
/mnt/asec             416.2M     0.0K   416.2M      4.0K
/mnt/obb              416.2M     0.0K   416.2M      4.0K
/preload              196.7M   182.6M    14.1M      4.0K
/system                 1.4G     1.2G   218.1M      4.0K
/efs                   11.8M     4.1M     7.7M      4.0K
/cache                196.7M    51.4M   145.3M      4.0K
/data                   5.3G     2.1G     3.2G      4.0K
/NVM                   15.7M     4.2M    11.5M      4.0K
/tmp                  416.2M     0.0K   416.2M      4.0K
/mnt/shell/emulated     5.3G     2.1G     3.2G      4.0K

shell@lt02wifi:/ $ exit
exit

C:\herong>\local\android-sdk-windows\platform-tools\adb -d logcat
...
...
I/ServiceManager(  119): Waiting for service com.marvell.FileMonito...
I/ServiceManager(  119): Waiting for service com.marvell.FileMonito...
I/ServiceManager(  119): Waiting for service com.marvell.FileMonito...
V/AlarmManager(  548): waitForAlarm result :8
D/KeyguardClockWidgetService(  930): onReceive action=android.inten...
V/AlarmManager(  548): ClockReceiver onReceive() ACTION_TIME_TICK
D/KeyguardUpdateMonitor(  645): received broadcast android.intent.a...
D/KeyguardUpdateMonitor(  645): handleTimeUpdate
D/STATUSBAR-IconMerger(  645): checkOverflow(420), More:false, Req:...
I/ServiceManager(  119): Waiting for service com.marvell.FileMonito...
I/ServiceManager(  119): Waiting for service com.marvell.FileMonito...
W/        (  119): FileMonitorService not published, waiting...
...
   Ctrl-C

What I learned here are:

Last update: 2015.

Table of Contents

 About This Book

 Installing JDK 1.8 on Windows System

 Installation of Android SDK R24 and Emulator

 Installing Apache Ant 1.9 on Windows System

 Developing First Android Application - HelloAndroid

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

 Android File Systems

 Android 4.0.3 File Systems

 AboutAndroid - Application to Retrieve System Information

 android.app.Activity Class and Activity Lifecycle

 View Objects and Layout Resource Files

 Using "adb logcat" Command for Debugging

 Build Process and Package File Content

 Building Your Own Web Browser

 Android Command Line Shell

 Samsung Galaxy Tab 3 Mini Tablet

USB Debugging Applications on Samsung Tablet

 Samsung USB Driver for Mobile Phones

 Turning on USB Debugging on Samsung Galaxy Tab 3

Running "adb" on USB Debugging Interface

 Installing Application to Tablet using "ant installd"

 Installing Application to Tablet using "adb -d install"

 Installing "AboutAndroid" to Samsung Tablet

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 Android Phone - LG-P925g

 USB Debugging Applications on LG-P925g Phone

 Outdated Tutorials

 References

 PDF Printing Version