adb&fastboot 安装和使用

来源:互联网 发布:先序遍历的非递归算法 编辑:程序博客网 时间:2024/06/08 10:00

1.ubuntu

$sudo add-apt-repository ppa:nilarimogard/webupd8or$sudo add-apt-repository ppa:phablet-team/tools $sudo apt-get update $sudo apt-get install android-tools-adb android-tools-fastboot

plug usb:

$lsusbBus 001 Device 002: ID 8087:8008 Intel Corp. Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 003 Device 002: ID 413c:2107 Dell Computer Corp. Bus 003 Device 003: ID 04ca:0061 Lite-On Technology Corp. Bus 003 Device 007: ID 0bb4:0c03 High Tech Computer Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub$sudo vi /etc/udev/rules.d/51-android.rulesSUBSYSTEM=="usb", ATTR{idVendor}==" 0bb4", ATTR{idProduct}=="0c03",MODE="0666"$adb devicesList of devices attached $adb kill-server

plug usb:

$sudo adb start-server$adb shellroot@simcom72_cwet_kk:/ # 

fastboot mode:

$sudo adb reboot bootloader$lsusbBus 001 Device 002: ID 8087:8008 Intel Corp. Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 003 Device 021: ID 18d1:d00d Google Inc. Bus 003 Device 006: ID 413c:2107 Dell Computer Corp. Bus 003 Device 007: ID 04ca:0061 Lite-On Technology Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub$sudo vi /etc/udev/rules.d/51-android.rulesSUBSYSTEM=="usb", ATTR{idVendor}==" 0bb4", ATTR{idProduct}=="0c03",MODE="0666"SUBSYSTEM=="usb", ATTR{idVendor}==" 18d1", ATTR{idProduct}=="d00d",MODE="0666"$sudo fastboot devices44a1d897    fastboot

2.windows

1.push文件

adb remount
adb push filename remote_dir
如果提示read only则在push之前:
adb shell
/:# chmod 777 remote_dir

2.fastboot使用流程

adb reboot-bootloader
fastboot erase < partition > :擦除相应flash分区
eg:
fastboot erase sbl1
fastboot erase modemst1
fastboot erase modemst2
fastboot reboot

0 0