ubuntu下fastboot找不到devices

ubuntu下fastboot找不到devices

标签: ubuntu活动手机c
14421人阅读 评论(1) 收藏 举报
分类:

SPL为1.33.2013,S-OFF


在ubuntu下,输入lsusb命令,显示

  1. Bus 001 Device 004: ID 0bb4:0c02 High Tech Computer Corp. Dream / ADP1 / G1 Phone (Debug)  
  2. Bus 001 Device 002: ID 80ee:0021    

第一个Device是我的手机,因此说明ubuntu已经检测到这个设备了。

另外virtualbox的活动usb状态中也能选到这个device


在命令行中

fastboot devices

却无法显示任何一个devices


fastboot reboot

显示waiting for devices


解决办法:配置udev规则文件,调整权限。

修改/etc/udev/rule.d目录下的51-Android.rules文件(根据情况,这个文件名可能略有不同),备份是修改文件的一个好习惯。

  1. # adb protocol on passion (Nexus One)  
  2. SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600"OWNER="<tom>"  
  3. # fastboot protocol on passion (Nexus One)  
  4. SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600"OWNER="<tom>"  
  5. # adb protocol on crespo (Nexus S)  
  6. SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600"OWNER="<tom>"  
  7. # fastboot protocol on crespo (Nexus S)  
  8. SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600"OWNER="<tom>"  

注意到idVendor,就是我们lsusb的时候,显示出来的id,我的显示的是0bb4,然后看注释,要改的是第二句,将MODE改成0666
  1. # fastboot protocol on passion (Nexus One)  
  2. SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0666"OWNER="<tom>"  

保存。

然后

sudo chmod a+x 51-android.rules

sudo udevadm control --reload-rules


重新插拔下usb,再输入fastboot devices命令,应该就能找到device

如果还不行,关机重启下试试

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 unlock和fastboot oem unlock 5)fastboot --disable-verity --disable-verification flash vbmeta vbmet
fastboot android10版本 ubuntu linux平台 fastboot version 28.0.2-PD02.200305.0422 $ fastboot -h usage: fastboot [OPTION...] COMMAND... flashing: update ZIP Flash all partitions from an update.zip package. flashall Flash all partitions from $ANDROID_PRODUCT_OUT. On A/B devices, flashed slot is set as active. Secondary images may be flashed to inactive slot. flash PARTITION [FILENAME] Flash given partition, using the image from $ANDROID_PRODUCT_OUT if no filename is given. basics: devices [-l] List devices in bootloader (-l: with device paths). getvar NAME Display given bootloader variable. reboot [bootloader] Reboot device. locking/unlocking: flashing lock|unlock Lock/unlock partitions for flashing flashing lock_critical|unlock_critical Lock/unlock 'critical' bootloader partitions. flashing get_unlock_ability Check whether unlocking is allowed (1) or not(0). advanced: erase PARTITION Erase a flash partition. format[:FS_TYPE[:SIZE]] PARTITION Format a flash partition. set_active SLOT Set the active slot. oem [COMMAND...] Execute OEM-specific command. gsi wipe|disable Wipe or disable a GSI installation (fastbootd only). boot image: boot KERNEL [RAMDISK [SECOND]] Download and boot kernel from RAM. flash:raw PARTITION KERNEL [RAMDISK [SECOND]] Create boot image and flash it. --dtb DTB Specify path to DTB for boot image header version 2. --cmdline CMDLINE Override kernel command line. --base ADDRESS Set kernel base address (default: 0x10000000). --kernel-offset Set kernel offset (default: 0x00008000). --ramdisk-offset Set ramdisk offset (default: 0x01000000)
<think>嗯,用户的问题是在Ubuntu系统上安装fastboot驱动以支持设备刷机。看来用户是个喜欢自己动手的技术爱好者,可能正在尝试刷机或修复Android设备。用户引用了四篇相关文档,但主要需求很明确:需要具体的Ubuntu安装指导。从引用内容来看,引用1和引用2强调了fastboot驱动的重要性,引用3提到XP/Win8的安装方式(但用户明确需要Ubuntu方案),引用4则提供了Ubuntu下安装adb和fastboot的关键线索——通过PPA仓库。用户应该更关注实际操作方法,而非理论说明。考虑到用户操作环境是Ubuntu,需要特别注意两点:一是Linux下通常不需要单独安装驱动,因为Android设备通过USB连接时会使用通用协议;二是Linux环境下更依赖软件包的版本管理。用户可能遇到的卡点会是:1)无法识别设备时的USB调试设置;2)较新设备需要更新的fastboot工具版本。我决定分三层回答:先给出最直接的安装方法(apt安装官方源),再提供备用方案(手动下载平台工具)。用户既然提到“刷机”,应该需要最新的平台工具,所以特别说明版本更新的重要性。测试环节也要强调,因为很多用户会忽略设备授权步骤。补充adb安装是必要的,引用4提到adb和fastboot在同一个包里。用户可能实际需要的是整套Android工具链,而不仅仅是fastboot。最后提醒USB调试授权,这是实际使用时的高频卡点——尤其是新手容易忽略这个步骤。相关问题设计要覆盖延伸需求:设备识别问题对应常见故障,不同OS说明用户可能有双系统环境,应用场景则是验证用户是否需要更多刷机知识。既然用户主动提到“固件更新”,第三个问题正好补充实际命令参考。</think> 在Ubuntu系统上安装`fastboot`驱动无需单独安装驱动文件,而是通过安装Android SDK的**平台工具包**实现。具体操作如下: --- ### **方法一:通过apt官方仓库安装(推荐)** 1. **更新软件包列表** ```bash sudo apt update ``` 2. **安装fastboot工具** ```bash sudo apt install android-tools-adb android-tools-fastboot ``` - 此命令会同时安装`adb`(Android调试桥)和`fastboot`工具[^4]。 3. **验证安装** ```bash fastboot --version ``` 若显示版本信息(如:`fastboot version 1:8.1.0+r23-5ubuntu2`)即安装成功。 --- ### **方法二:手动下载最新平台工具包(适合需要新版功能)** 若需要最新版工具(如支持Android 13/14设备): 1. **下载官方工具包** 访问[Android Platform Tools](https://developer.android.com/studio/releases/platform-tools),下载Linux版压缩包。 2. **解压并配置环境变量** ```bash unzip platform-tools-latest-linux.zip -d ~/ # 解压到用户目录 echo 'export PATH=$PATH:~/platform-tools' >> ~/.bashrc # 永久添加PATH source ~/.bashrc # 立即生效 ``` 3. **验证** ```bash fastboot devices # 连接设备后查看是否识别 ``` --- ### **设备连接与测试** 1. **进入Fastboot模式** 手机关机后,长按 **电源键+音量减**(不同机型组合键可能不同)。 2. **连接Ubuntu并检测设备** ```bash fastboot devices ``` 若显示设备ID(如:`ABCDEF0123456 fastboot`),则驱动正常工作。 > ⚠️ **注意**:首次使用需在设备端授权USB调试权限(若开启adb功能)。 --- ### **常见问题解决** - **设备未被识别**: 1. 检查USB线是否支持数据传输(非充电线) 2. 确认设备已正确进入`Fastboot`模式(屏幕显示FASTBOOT字样) 3. 尝试更换USB接口或重启`udev`服务: ```bash sudo service udev restart ``` - **权限问题**: 将当前用户加入`plugdev`组: ```bash sudo usermod -aG plugdev $USER ``` 重启后生效[^3]。 --- **
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值