I. Introduction to ADB
1. ADB full name is Android Debug Bridge, is the Android SDK comes with a tool, with this tool can directly operate the management of Android Simulator (Emulator) or real Android device
2. The functions of ADB are many, the main functions we use are:
A. Shell command line to run the device
B. Managing port mappings for emulators or devices
C. Uploading/downloading files between computers and devices
D. Install the local APK package on the emulator or Android device
3. ADB is a client-server program in which the client is the computer used to operate and the server side is the Android device. To use the ADB tool, you must first open the USB debug key on the phone, the specific steps are: settings-application-Development-USB debugging (may be different device, the specific steps are slightly difference)
Two. Common commands for ADB
1. View devices-adb devices
2. Install software-adb install <apk file path >
3. Uninstall software-adb uninstall [-K] < package name > (-k Parameter: Preserve configuration and cache files when uninstalling software)
4. Login Device shell-adb Shell <command command > (after adding <command command > will run Device command directly, equivalent to execute remote command)
5. Copy files from computer to device-ADB push < Local path > < remote path >
6. Download files from the device to the computer-ADB pull < remote path > < local path >
7. Display Help Information-adb
8. Connecting devices-adb connect < equipment ip>
9. Disconnect the current connection-ADB kill-server
10. Open service-adb Start-servet
Small tips: During the development of Android apps using Eclipse, sometimes errors may be found during debugging, the error message is not connected to the ADB server, you can end Adb.exe in task management or "Disconnect the current connection" in the command line, Then restart Eclipse or execute the "open service" command
ADB (Debug Bridge)-Device management tools