Linux adb 不显示 nexus 5 设备

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20343014/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 01:31:34  来源:igfitidea点击:

adb doesn't show nexus 5 device

androidlinuxadb

提问by ant2009

Android Studio 0.3.6
Fedora 18 3.11.7-100.fc18.x86_64
Nexus 5 Kitkat

Hello,

你好,

I have been using my Samsung Galaxy Tab 3 7.0running Android 4.1.2everything works fine with adb.

我一直在使用我的Samsung Galaxy Tab 3 7.0运行Android 4.1.2一切正常的adb.

However, I have just bought a new Nexus 5 device, and when I do the following command adb devicesit doesn't show my Nexus 5.

但是,我刚买了一个新的 Nexus 5 设备,当我执行以下命令时,adb devices它没有显示我的 Nexus 5。

Under Android SDK Manager | Extras | Google USB Driver | status "Not compatiable with Linux"

在下面 Android SDK Manager | Extras | Google USB Driver | status "Not compatiable with Linux"

Because I am running Fedora 18if I need drivers what drivers for the USB do I need?

因为我正在运行,Fedora 18如果我需要驱动程序,我需要什么 USB 驱动程序?

Because the Samsung works fine and I can deploy and run my apps, I think my setup is correct. So I am wondering if there is something wrong with my Nexus 5.

因为三星工作正常并且我可以部署和运行我的应用程序,所以我认为我的设置是正确的。所以我想知道我的 Nexus 5 是否有问题。

I have tried the following:

我尝试了以下方法:

adb kill-server
adb start-server

Setting the Nexus 5 Camera PTPand media device MTPdidn't work.

设置 Nexus 5Camera PTPmedia device MTP不起作用。

Many thanks for any suggestions,

非常感谢您的任何建议,

采纳答案by ant2009

What you need to do is this:

你需要做的是:

Settings | About Phone

Scroll to the bottom to build number. Tap on build number about 7 times. Each time you will get a popup message saying you are x steps away from being a developer

滚动到底部build number。点击内部版本号大约 7 次。每次你都会收到一条弹出消息说you are x steps away from being a developer

When you get to the final step you will get a message saying now you are a developer

当您到达最后一步时,您将收到一条消息说 now you are a developer

Go back into settings and you will see a new setting Developer optionsthere you will see a lot of options for developers. Enable USB debugging

回到设置,你会看到一个新的设置Developer options,你会看到很多开发人员的选项。使能够USB debugging

Re-connect you phone to the usb, and you should see you device under adb devices.

将手机重新连接到 USB,您应该会在 下看到您的设备adb devices

I hope this answer helps someone else.

我希望这个答案可以帮助别人。

回答by Dharani Kumar

Follow these steps,

按着这些次序,

  • Enable Developer optionsin your device. To enable the developer mode, Settings->About phone, tap Build number option 7 times continuously
  • Go to Settings-> Developer optionsand Turn on USB debugging
  • Make sure you reconnected the device via USB and grant permission on the dialog that appears.
  • From the above steps it didn't work try this step, Go to Settings->Securityand turn on Unknown Sources
  • 在您的设备中启用开发人员选项。要启用开发者模式,Settings->About phone,连续点击 Build number 选项 7 次
  • 转到设置-> 开发人员选项并打开USB 调试
  • 确保您通过 USB 重新连接了设备并在出现的对话框中授予权限。
  • 从上面的步骤它没有工作尝试这一步,转到设置->安全并打开未知来源

回答by Harshit Rathi

The communication with the emulator or your Android device might have problems. This communication is handled by the Android Debug Bridge (adb).

与模拟器或您的 Android 设备的通信可能有问题。此通信由 Android 调试桥 (adb) 处理。

Eclipse allows you to reset the adb in case this causes problems. Select therefore the DDMS perspective via Window → Open Perspective → Other... → DDMS

Eclipse 允许您重置 adb,以防这会导致问题。因此通过 Window → Open Perspective → Other... → DDMS 选择 DDMS 透视图

To restart the adb, select the "Reset adb" in the Device View.

要重新启动 adb,请在设备视图中选择“重置 adb”。

回答by r1ckr

I had a similar problem with my Nexus 4(Android version 4.4.2), it wasn't listed in adb devices.

我的 Nexus 4(Android 版本 4.4.2)也有类似的问题,它没有在 adb 设备中列出。

Make sure USB debugging is enabled from device, and do the following on your PC:

确保从设备启用 USB 调试,并在您的 PC 上执行以下操作:

  1. Update Android SDK (Google USB Driver)

  2. From PC Control Panel, System -> Device manager -> Right click Nexus 4 -> Update driver.

  3. Set android-sdk-folder\extras\google\usb_driveras path to search, include subfolders checked.

  1. 更新 Android SDK(谷歌 USB 驱动程序

  2. 从 PC 控制面板,系统 -> 设备管理器 -> 右键单击​​ Nexus 4 -> 更新驱动程序。

  3. android-sdk-folder\extras\google\usb_driver 设置为搜索路径,包括选中的子文件夹。

If windows tells you that the driver is up to date, just uninstall the driver (right click on nexu4 -> uninstall driver) and start from step 2 again.

如果 Windows 告诉您驱动程序是最新的,只需卸载驱动程序(右键单击 nexu4 -> 卸载驱动程序)并再次从步骤 2 开始。

After that, open a cmd and type adb kill-serverand then a adb devices, now it will include your device.

之后,打开一个 cmd 并键入adb kill-server然后adb devices,现在它将包含您的设备。

https://developer.android.com/studio/run/oem-usb.html

https://developer.android.com/studio/run/oem-usb.html

回答by jimbob

My windows solution:

我的 Windows 解决方案:

Go here and download and unzip to an easy location:

去这里下载并解压到一个简单的位置:

http://developer.android.com/sdk/win-usb.html#top

http://developer.android.com/sdk/win-usb.html#top

  • Right click 'My Computer' or 'Computer'

  • Select properties

  • Select Device manager

  • Look for your device. It should have a yellow mark above it.

  • Click 'update driver software'.

  • select browse my computer for driver software.

  • select the usb_driver folder you saved earlier.

  • install it

  • 右键单击“我的电脑”或“计算机”

  • 选择属性

  • 选择设备管理器

  • 寻找您的设备。它上面应该有一个黄色标记。

  • 单击“更新驱动程序软件”。

  • 选择浏览我的计算机以查找驱动程序软件。

  • 选择您之前保存的 usb_driver 文件夹。

  • 安装它

and wala. magic.

和瓦拉。魔法。

回答by Utkarsh

If anyone is trying to connect Nexus 5 to a formatted Windows XP then follow these steps:

如果有人试图将 Nexus 5 连接到格式化的 Windows XP,请按照以下步骤操作:

  1. Download and install media transfer protocol porting kit: MTP porting kit
  2. Download and install WMFDistributable-11 for XP: WMFDist-11 XP
  3. Download and install LG United Mobile Driver v3.10.1: stackoverflow is not allowing to share more than 2 links, please google this.
  4. Connect your device.
  5. Go to Device Management
  6. Right click on Nexus 5 and click Update Driver
  7. Select Yes this time only
  8. Select Install Software Automatically
  9. Wait for sometime.. and enjoy transferring files
  1. 下载并安装媒体传输协议移植套件: MTP 移植套件
  2. 下载并安装适用于 XP 的WMFDistributable-11WMFDist-11 XP
  3. 下载并安装 LG United Mobile Driver v3.10.1:stackoverflow 不允许共享超过 2 个链接,请谷歌这个。
  4. 连接您的设备。
  5. 进入设备管理
  6. 右键单击 Nexus 5,然后单击更新驱动程序
  7. 仅这次选择是
  8. 选择自动安装软件
  9. 稍等片刻……享受传输文件的乐趣

回答by madx

This simple steps worked for me, I debug on my Nexus 5 and 5X devices on Windows 8.1.

这个简单的步骤对我有用,我在 Windows 8.1 上的 Nexus 5 和 5X 设备上进行调试。

The steps to follow are these:

要遵循的步骤如下

1) Enable from Developers Options the Debug USB Mode

1) 从开发人员选项中启用调试 USB 模式

2) Unplug the device from the computer

2) 从电脑上拔下设备

3.1) Go to SettingsStorage, in the ActionBar, click the option menu and choose USB computer connection.

3.1) 转到SettingsStorage,在操作栏中,单击选项菜单并选择USB computer connection

3.2) If you didn't find the 3.1)option then go to SettingsDevelopers OptionsSelect USB Configuration.

3.2) 如果您没有找到该3.1)选项,请转到SettingsDevelopers OptionsSelect USB Configuration

4) Select Camera (PTP)connection.

4) 选择Camera (PTP)连接。

5) Plug the device and you should have a popup on the device allowing you to accept the computer's incoming connection, or something like that.

5)插入设备,您应该在设备上有一个弹出窗口,允许您接受计算机的传入连接,或类似的东西。

6) If it doesn't work try to toggle the Debug USB Mode in the Developers Options Finally, you should see it now in the DDMS and voilà.

6)如果它不起作用尝试在开发人员选项中切换调试USB模式最后,您现在应该在DDMS中看到它,瞧。

回答by PSchuette

For those who are still frustrated, if you are using the experimental ART runtime, try switching back to dalvik (in developer options on device)

对于那些仍然感到沮丧的人,如果您使用的是实验性 ART 运行时,请尝试切换回 dalvik(在设备上的开发人员选项中)

回答by user1420482

Try executing :

尝试执行:

sudo ./adb kill-server

须藤 ./adb 杀服务器

sudo ./adb start-server

须藤 ./adb 启动服务器

sudo ./adb devices

须藤 ./adb 设备

回答by Yuri

In my case:

就我而言:

  • The phone was connected as a media device.
  • Clicked on that message and got a menu. "USB computer connection"
  • In that menu chose to connect it as a camera (for devices that do not support MTP)
  • 电话作为媒体设备连接。
  • 单击该消息并获得一个菜单。“USB 计算机连接”
  • 在该菜单中选择将其作为相机连接(对于不支持 MTP 的设备)

And then it worked.

然后它起作用了。