ADB's all-called Android Debug Bridge, is the role of the Debug bridge. With ADB we can debug the Android program via DDMS in Eclipse, and the ADB process will run automatically when we run eclipse.
adb command
1. remount re-mount the system partition to make the system partition writable
ADB remount
2. root for Administrator privileges
ADB root
3. Devices viewing device
ADB devices
4 Install the software, install the specified APK file on the device
ADB install <apk file path >
5. Uninstall Uninstall the software, if you add the-K parameter, to uninstall the software but retain the configuration and cache files.
ADB uninstall-k < software name >
6. Shell enters device or simulator
ADB shell
The command behind the ADB shell comes mainly from: source \system\core\toolbox directory and source \frameworks\base\cmds directory.
7. Forward release port, you can set any port number as the host to the emulator or device request port.
ADB forward tcp:5555 tcp:8000
8. Push sends files from the computer to the device
ADB Push < Local path > < remote path >
9. Pull to download files from the device to the computer
ADB pull < Remote path > < local path >
10, reboot restart the phone
ADB reboot
11. Sqlite3 Access Database SQLite3
Sqlite3
12. Bugreport View bug Report
ADB bugreport
13, Logcat record wireless communication log
Logcat-b Radio
14, get-product get the ID and serial number of the device:
ADB get-product
ADB Get-serialno
Bat Tool
Test.bat file:
@echo off
Set APK_SRC_PATH=C:\USERS\ASUS\DESKTOP\AA
Set sys_apk_dst_path=/system/app/
Set sys_jar_dst_path=/system/framework/
Set sys_lib_dst_path=/system/lib/
Set sys_fonts_dst_path=/system/fonts/
ADB root
ADB remount
for/f "delims="%%i in (' dir/b/a-d/S "%apk_src_path%" ') Do (
Echo%%~nxi
echo-------------xxxxxxxxxx--------------
If%%~xi==.apk (
ADB Shell RM%sys_apk_dst_path%%%~nxi
ADB push%%~fi%sys_apk_dst_path%
) Else if%%~xi==.so (
ADB push%%~fi%sys_lib_dst_path%
) Else if%%~xi==.ttf (
ADB push%%~fi%sys_fonts_dst_path%
) Else if%%~xi==.jar (
ADB push%%~fi%sys_jar_dst_path%
)
)
Pause