Preparatory work:
Make sure \android-sdk-windows\tools\ has adb.exe AdbWinApi.dll AdbWinUsbApi.dll three files, if not from \android-sdk-windows\platform-to Ols\ under Tools (Android SDK 3.0 or later, some tools are not placed under tools by default and are placed under Platform-tools as an optional configuration)
Begin:
Install APK to Phone:
ADB install c:\HA_drocap2_JOY3G.apk
Start the installed program, if the phone is rooted and enters the Data\app directory:
# AM Start-n cn.vsp/cn.vsp.startactivty
To view the appropriate logs:
ADB logcat-s welcome:i
The action command
1. View the device
ADB devices
This command is to view the currently connected device, the Android device connected to the computer, or the emulator will list the display
2. Installing the Software
ADB install
ADB install <apk file path >: This command installs the specified APK file on the device
3. Uninstalling the Software
ADB uninstall < software name >
ADB uninstall-k < software name >
If you add the-K parameter, the software is uninstalled but the configuration and cache files are preserved.
4. Enter the shell of the device or simulator:
ADB shell
From the above command, you can enter the device or emulator shell environment, in this Linux shell, you can execute a variety of Linux commands, in addition, if you want to execute only one shell command, you can use the following way:
ADB Shell [command]
For example, the ADB shell DMESG will print out debug information for the kernel.
5. Publishing ports
You can set any port number as the request port for the host to the emulator or device. Such as:
ADB forward tcp:5555 tcp:8000
6. Send files from the computer to the device
ADB Push < Local path > < remote path >
Use the push command to copy files or folders on your computer to your device (mobile)
7. Download files from the device to the computer
ADB pull < Remote path > < local path >
Use the pull command to copy files or folders on your device (phone) to your local computer
8. View Bug Reports
ADB bugreport
9. Record the wireless communication log
Generally speaking, the wireless communication log is very many, at run time not necessary to record, but we can still through the command, set the record:
ADB shell
Logcat-b Radio
10. Get the ID and serial number of the device
ADB get-product
ADB Get-serialno
ADB shell
Sqlite3
Android installs software with adb command