简体   繁体   English

亚行未在Ubuntu上识别nexus 4

[英]ADB not recognizing nexus 4 on Ubuntu

I have installed the mtpfs tools for Ubuntu and mounted the nexus 4 successfully. 我已经为Ubuntu安装了mtpfs工具并成功安装了nexus 4。 Here the steps: 这里的步骤:

 sudo apt-get install mtp-tools mtpfs
 sudo gedit /etc/udev/rules.d/51-android.rules

added to the file 51-android.rules : 添加到文件51-android.rules

 #LG – Nexus 4
 SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

then 然后

 sudo chmod +x /etc/udev/rules.d/51-android.rules
 sudo service udev restart
 sudo mkdir /media/nexus4
 chmod 755 /media/nexus4
 sudo mtpfs -o allow_other /media/nexus4

Got everything from this site here . 把一切都从这个站点在这里 But unfortunately I can't list the Nexus 4 with adb , when I run adb devices I get 但不幸的是,当我运行adb devices时,我无法使用adb列出Nexus 4

 adb devices
 List of devices attached

But no devices are listed... Do I need to configure anything when I want to access the nexus with adb? 但是没有列出任何设备......当我想使用adb访问nexus时,是否需要配置任何内容?

You can try developer options on the device (Nexus 4) and then use "adb devices". 您可以尝试设备上的开发者选项(Nexus 4),然后使用“adb devices”。

How to enabled developer options? 如何启用开发人员选项? : http://forums.androidcentral.com/google-nexus-4/258607-how-close-turn-off-developer-option-my-nexus-4-a.html http : //forums.androidcentral.com/google-nexus-4/258607-how-close-turn-off-developer-option-my-nexus-4-a.html

So, you should try: 所以,你应该尝试:

  1. Enable the developer option on Nexus 4 (using above link). 在Nexus 4上启用开发人员选项(使用上面的链接)。
  2. On terminal, use command "adb kill-server" 在终端上,使用命令“ adb kill-server”
  3. On terminal, use command "adb start-server" 在终端上,使用命令“ adb start-server”
  4. On terminal, use command "adb devices" 在终端上,使用命令“ adb设备”

You should then be able to see in the device list. 然后,您应该可以在设备列表中看到。

worked for me only when I executed adb commands as root, 只有当我以root身份执行adb命令时才为我工作,

sudo adb kill-server
sudo adb start-server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM