adb与fastboot相关
Ubuntu下adb安装配置:
安装:
sudo apt-get install android-tools-adb
配置adb_usb.ini:
a.lsusb
查看Android设备的idVendor:Bus 001 Device 001: ID ==1d6b==:==0002== Linux Foundation 2.0 root hub
b.
echo 0x$idVendor > ~/.android/adb_usb.ini
配置android.rules,创建
/etc/udev/rules.d/70-android.rules
文件,添加:SUBSYSTEM=="usb",ATTR{idVendor}=="1d6b", ATTRS{idProduct}=="0002" ,MODE="0666"
重新插拔 USB 线,或运行以下命令,让 udev 规则生效:
chmod 666 /etc/udev/rules.d/70-android.rules
service udev restart
重启adb:
sudo adb kill-server
adb start-server
相关命令:
adb install apk
adb reboot edl #高通9008模式
adb shell su
./build/tools/releasetools/ota_from_target_files
adb devices
adb reboot bootloader
adb reboot recovery
fastboot devices
fastboot erase system
fastboot erase cache
fastboot erase config
fastboot erase data
fastboot erase logs
fastboot erase factory
#fastboot oem unlock
#fastboot erase boot/system/userdata/cache
fastboot flash aboot emmc_appsboot.mbn #高通
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot reboot
注:目前测试发现fastboot不能传输这么大的数据量过去,我们的system.img有1.7G。 或者 mmm + 编译的目标文件,生成的目标文件
adb root
adb remount
adb puch 目标文件 system/vendor/lib/
adb sync
adb reboot
android5.1网络adb
In android_L5.1.1_2.1.0-ga_doc.tar.gz/ Android Frequently Asked Questions:
“How do I use ADB over Ethernet?”
Since Jelly Bean, security ADB is enabled by default (ro.adb.security is set to 1). In security ADB mode, the ADB over
ethernet is not allowed. For more details, see How do I enable and disable security ADB? To use the ADB over ethernet,
there are two steps to follow:
Disable the security ADB by changing ADB security setting in init.rc
Delete or comment the below line, and then rebuild the boot.img.setprop ro.adb.security 1
.
Then in the terminal:setprop service.adb.tcp.port 5555 && stop adbd && start adbd
adb connect 192.168.1.101