Andriod ubuntu 14.04 adb的安装和配置, fastboot的安装

本文介绍了在Ubuntu 14.04上安装和配置Android的ADB及Fastboot的详细步骤。首先通过apt-get安装相关工具,解决无法定位adb包的问题。接着,通过lsusb命令识别Android设备并配置adb_usb.ini文件,确保设备能被正确识别。最后,在/etc/udev/rules.d/创建70-android.rules文件,重启adb完成配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 安装adb和fastboot

    sudo apt-get install android-tools-adb android-tools-fastboot android-tools-adbd

   结果:Unable to locate package adb

    那就还需要一些步骤:

 sudo add-apt-repository ppa:phablet-team/tools
 sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
 sudo apt-get update 
 sudo apt-get install android-tools-adb
 sudo apt-get install android-tools-adbd
 sudo apt-get install android-tools-fastboot 

     这样就可以正常的将adb 与 fastboot安装成功。

2.  adb配置

    设备连接pc,确保连接完好。

    使用lsusb, 查看一下,连接到pc的usb设备,如果不能确定哪一个是你的设备,就将设备从pc上拔下来,再次使用lsusb命令查看,将两次的lsusb的输出结果进行对比,就可将android设备的usb信息准确无误的去顶出来,如下图:

      

     如果~/.android/adb_usb.ini文件不存在,那么需要安装android-tools-adbd,adb devices才能显示。

手动配置adb_usb.ini文件,lsusb把id填进去,例如 ID 1782:5d04,那么把0x1782写入adb_usb.ini即可

     这里可以比较清楚的看到有一个设备,ID号是1782:5d04,如果你的系统上有很多USB设备连接你一时看不清楚,可以插拔设备打出ID号对比一下,确保找到这个ID。这个ID的前面实际上是厂商编号,后面是产品编号。

    在/etc/udev/rules.d/下创建一个配置文件,也可以在已有的配置文件中增加 70-android.rules文件。

sudo vim /etc/udev/rules.d/70-android.rules
添加:
SUBSYSTEM=="usb",ATTR(idVendor)=="1782", MODE="0666", GROUP="plugdev"

   重启adb:

sudo adb kill-server
sudo adb start-server
adb device
fastboot 命令即可对android的otg进行操作

 

What is this? This is All-in-One installer for 3 most needed PC tools for Android. No need to download big SDK for 3 small things. I originaly made it for my Kurdish friend AnGrY DuDe in early 2013. I saw another ADB installer on XDA, but it wasn't good enough for me so i'm finaly posting it here. It's very small and fast installer for tools and drivers. Features: Small - 9.18 MB Fast - 15 seconds install (many times its even less) AIO - ADB, Fastboot and also Drivers Easy to install - just run it and program will guide you Clean - ADB and Google Drivers from latest SDK Install process: 1. Run it (Require administrator privileges) 2. Press Y/Yes to install ADB and Fastboot or N/No to skip 3. Press Y/Yes to install ADB system-wide or N/No for current user only 4. Press Y/Yes to install Drivers or N/No to skip 5. Continue Driver installation 6. 15 seconds passed - finished! Notes: System-wide: ADB and Fastboot are installed to %SystemDrive%\adb directory, and added system-wide path. Current user only: ADB and Fastboot are installed to %UserProfile%\adb directory, and added path for current user. CMD can use ADB and Fastboot from any directory. Drivers are installed to system - no need to install them from directories. Installer automaticly decides if install 32-bit or 64-bit drivers. If anybody got problem with detecting device, go see picture guide howto_driver.zip If installation fails, then post here contents of "adb-installer.log" from desktop. (if there is any) If you have problem with driver enumeration in Windows 8.1 install update KB2917929 If you have older Google USB Driver installed, please uninstall it from Control Panel before installing new If you have previously installed it as system-wide and now you want it current user only (or vice-versa), it won't remove it, you must do it yourself. (at least for now)
linux ubuntu fastboot 下载 方法1: GSI Flashing Procedure For Android-Q Fresh Launch Build(DP Enabled): Flash META Change directory to Apps path Flash below Apps and GSI image. Apps Build flashing fastboot flash persist persist.img cd secondary-boot fastboot flash boot_a boot.img (boot.img image for CTS-on-GSI, boot-debug.img for VTS testing) fastboot flash dtbo_a dtbo.img fastboot flash recovery_a recovery.img fastboot flash super super.img fastboot flash userdata userdata.img fastboot flash vbmeta_a vbmeta.img fastboot flash vbmeta_system_a vbmeta_system.img GSI Flashing steps: fastboot reboot fastboot fastboot flash system fastboot -w fastboot flashing lock fastboot reboot NOTE: Dynamic Partition mandatory for android-Q Fresh Launch devices. Device should not come out of fastboot mode between Apps flashing and GSI flashing. For Android-Q Upgraded Build or Android-P Builds: Apps and GSI image flashing: fastboot flash userdata userdata.img fastboot flash persist persist.img cd secondary-boot fastboot flash boot_a boot.img fastboot flash dtbo_a dtbo.img fastboot flash vendor_a vendor.img fastboot flash system_a fastboot --disable-verification flash vbmeta_a vbmeta.img fastboot flashing lock fastboot reboot 方法2: 这个版本刷GSI时,oem unlock的操作有更新如下: adb reboot-bootloader fastboot oem sim-allowunlock (允许解锁) fastboot flashing unlock (这里需要按 音量上键 确认) adb reboot-bootloader fastboot flash system system_xxxxxxxxxxx.img fastboot --disable-verification flash vbmeta vbmeta.img fastboot reboot 取消验证,取消AVB验证 fastboot --disable-verification flash vbmeta vbmeta.img 之后就可以通过fastboot烧录boot.img vendor.img system.img 单独烧录。 3.4 AndroidO userdebug版本刷机时禁止dm-verity AndroidO dm-verity disable flag存在于vbmeta.img(keystore分区)中;而老版本是放置在system.img分区的dm-verity metadata中。 1)在设置中打开OEM unlocking选项 2)在设置中打开USB debugging选项 3)adb reboot bootloader 4)fastboot flashing unlockfastboot oem unlock 5)fastboot --disable-verity --disable-verification flash vbmeta vbmet
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值