For more information about adb, see Android Debug Bridge.
From: http://tech.163.com/mobile/09/1105/06/5NBAG1OQ00112K88.html
When we pull to adb.exe, we should not be unfamiliar with our friends who have been paying attention to our Android series tutorials, because we use adb to directly manage Android phones no matter if we have obtained the Root permission or flushed the machine, however, most of the steps for adb are limited to the Flash tutorial, and they do not have an in-depth and comprehensive understanding of it. Now I will explain the functions and usage of adb for Android mobile phone fans.
[Historical review]
Phase 1: [Android series tutorial (I) connecting to the USB on the PC end]
Phase II: [Android series tutorial (ii) Installation of software for Android phones]
Phase 3: [Android series tutorial (iii) How to obtain Root permissions]
Phase 4: [Android series tutorial (4) teach you how to brush your machine]
Phase 5: [Android series tutorial (5) custom SMS ringtone solution]
Phase 6: [How do I use a mobile phone as a router? Detector? Android alternative software highlights]
[Daily question and daily answer]
Question 1: What is ADB?
Question 2: What is the use of ADB?
Question 3: How to Use the ADB tool as the most critical issue?
Q & A 1: Adb is called Android Debug Bridge, which serves as the debugging Bridge. Through adb, We can debug the Android program through DDMS in Eclipse. To put it bluntly, it is the debug tool. Adb works in a special way. It listens to Socket TCP 5554 and other ports to allow the IDE to communicate with Qemu. By default, adb will use the network port related to daemon, so when we run Eclipse, the adb process will automatically run.
Q & A 2: With the adb tool, we can manage the status of devices or mobile phone simulators. You can also perform many mobile phone operations, such as installing software, upgrading the system, and running shell commands. In short, adb is a bridge between Android phones and PCs, allowing users to perform comprehensive operations on their mobile phones on their computers.
Q & A 3: This is the key to this tutorial. Next I will introduce how to operate the adb tool and several common commands for your reference!
[Software requirements]
1. Android SDK
2. Android-related mobile phone drivers
The related software pen is integrated to facilitate the download. Click the roottool and drive. rar
[Software installation]
Step 1: Install the USB driver
I have already introduced this step in the series of tutorials before Android, so I will briefly describe the process today. Go to settings-Application-Development-USB debugging, and check the first option. Connect to the computer through USB cable and prompt to install the driver. For 32-bit systems, select the x86 folder to install the driver, and for 64-bit systems, select the amd64 folder.
Step 2: Prepare the software
Put the TMG folder in the toolkit to the C root directory. The reason for this is not to specify a location, just to facilitate the subsequent entry into the folder in the MS-DOS. Folder path: C: \ TMG \
Figure: Software material preparation
[Operation Command]
1. View Devices
ADB Devices
This command is used to view the currently connected devices. The android devices or simulators connected to the computer are listed and displayed.
2. Install software
ADB install
Adb install <apk file path>: This command installs the specified apk file on the device.
3. uninstall software
ADB uninstall <software Name>
ADB uninstall-k <software Name>
If the-k parameter is added, the software is uninstalled but the configuration and cache files are retained.
4. Enter the shell of the device or simulator:
ADB Shell
Through the above command, you can enter the shell environment of the device or simulator. In this Linux Shell, You can execute various Linux commands. In addition, if you only want to execute one shell command, you can use the following methods:
ADB shell [command]
For example, adb shell dmesg prints the kernel debugging information.
5. Release Port
You can set any port number as the request port from the host to the simulator or device. For example:
Adb forward tcp: 5555 tcp: 8000
6. Send files to the device from the computer
ADB push <local path> <remote path>
Use the push command to copy files or folders on the local computer to the device (mobile phone)
7. download files from your device to your computer
ADB pull <remote path> <local path>
Run the pull command to copy files or folders on the device (mobile phone) to the local computer.
8. view the bug report
Adb bugreport
9. Record wireless communication logs
In general, there are a lot of wireless communication logs and there is no need to record them during operation, but we can still set the record through the command:
Adb shell
Logcat-B radio
10. Obtain the device ID and serial number.
ADB get-Product
ADB get-serialno
ADB Shell
Sqlite3