1. View all linked devices
Command:
ADB devices
Cases:
C:\USERS\LAIYU>ADB devices
List of devices attached
5D3B5AAC Device
Device commands
2. Copying Files / directory to mobile device
Command:
ADB push
Example: Copy d:\\ wifi.apk to phone/mnt/sdcard/(phone memory)
C:\USERS\LAIYU>ADB Push d:\\wifi.apk/mnt/sdcard/
1661 kb/s (7471417 bytes in 4.390s)
3. copy files from a mobile device / Catalogue
Command:
ADB pull []
Cases:
C:\USERS\LAIYU>ADB pull/mnt/sdcard/wifi.apk d:\\
1573 kb/s (7471417 bytes in 4.637s)
Note: If the file already exists, overwrite it directly, without prompting
4. Enter the mobile remote terminal
Command:
ADB shell
Cases:
C:\USERS\LAIYU>ADB Shell
[Email protected]:/$
5. running Remote Shell Command
ADB shell
6. View Device Logs
Command:
ADB Logcat []
Note: About FILTER-SPEC reference command: ADB logcat--help
7. installation
Non-covered installation
Command:
ADB install package_name.apk
Cases:
C:\USERS\LAIYU>ADB Install d:\\wifi.apk
2802 kb/s (7471417 bytes in 2.603s)
PKG:/data/local/tmp/wifi.apk
Success
Overwrite the installation
Command:
ADB install package_name.apk
Cases:
C:\USERS\LAIYU>ADB Install-r d:\\wifi.apk
1772 kb/s (7471417 bytes in 4.117s)
PKG:/data/local/tmp/wifi.apk
Success
Note: ADB will copy the package to the TEMP directory and install it
8. Uninstall
Command:
adb uninstall [-K] Pkg_name
Option Description:
-K preserving data and cache directories
Note: Here's the pkg_name, not the on-time package naming
Cases:
C:\USERS\LAIYU>ADB Uninstall com.snda.wifilocating
Success
Script commands
9. Open ( run ) Service
Command:
ADB start-server
Note: The ADB process is visible in Task Manager after opening
Cases:
C:\USERS\LAIYU>ADB Start-server
* Daemon not running. Starting it now on Port 5037 *
* Daemon started successfully * Example:
10. terminating a running service
Command:
ADB kill-server
Android Common ADB commands