背景
在开发过程中,经常需要拷贝修改的文件到开发板验证,或者需要升级内核根文件系统啥的,这时候除了一般常用的网络串口传输方式,使用adb/fastboot也是比较方便的。
使用
首先开发板得支持adb或者fastboot:
使用fastboot命令烧写内核和文件系统:
[yubo.wang@localhost linux-andromeda_andromeda-faw]$ sudo fastboot devices
3c49727c fastboot
[yubo.wang@localhost linux-andromeda_andromeda-faw]$ sudo fastboot flash boot mdm9607-perf-boot.img
target reported max download size of 134217728 bytes
sending 'boot' (6072 KB)...
OKAY [ 0.764s]
writing 'boot'...
OKAY [ 1.323s]
finished. total time: 2.088s
[yubo.wang@localhost linux-andromeda_andromeda-faw]$ sudo fastboot flash system rootfs.ubifs.A
target reported max download size of 134217728 bytes
sending 'system' (29696 KB)...
OKAY [ 3.706s]
writing 'system'...
OKAY [ 7.079s]
finished. total time: 10.784s
[yubo.wang@localhost linux-andromeda_andromeda-faw]$
adb命令推送文件:
[yubo.wang@localhost wang]$ adb devices
List of devices attached
???????????? device
[yubo.wang@localhost wang]$ adb push mcm_ril_service /tmp
920 KB/s (370404 bytes in 0.392s)
[yubo.wang@localhost wang]$
[yubo.wang@localhost wang]$ adb shell
BusyBox v1.19.4 (2019-04-10 10:25:01 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ #
windows adb
解压adb.7z文件内容到电脑用户目录下:
打开电脑dos命令界面,输入:adb version,有正常打印说明adb命令使用正常:
插上USB线后设备管理器显示什么?RNDIS有感叹号,且会显示adb interfa,adb devices可看到设备。