设置设备发展(??????没有权限)没有权限、设备

2023-09-12 21:32:59 作者:范二〃大爷≠

我使用的是三星GALAXY Nexus手机(的Andr​​oid 4.0 平台)。

I am using a Samsung galaxy nexus phone (Android 4.0 platform) .

我正在开发在Ubuntu Linux操作系统的Andr​​oid应用程序。我想直接在三星手机设备上运行我的应用程序,所以我做了如下设置步骤:

I am developing Android app on Ubuntu linux OS. I would like to run my application directly on the Samsung handset device, so I did the following setup steps:

在我的项目的的Andr​​oidManifest.xml 的文件中添加机器人:可调试=真正的 <应用> 元素

在设备,设置>安全性启用未知来源

在设备,设置>开发者选项启用 USB调试

在我的计算机上创建文件 /etc/udev/rules.d/51-android.rules ,该文件的内容:

On my computer, create file /etc/udev/rules.d/51-android.rules , the content of the file is:

SUBSYSTEM ==USB,ATTR {idVendor} ==04E8,MODE =0666,GROUP =plugdev

SUBSYSTEM=="usb", ATTR{idVendor}=="04E8", MODE="0666", GROUP="plugdev"

在我的电脑上,运行命令一个搭配chmod + R /etc/udev/rules.d/51-android.rules

On my computer, run command chmod a+r /etc/udev/rules.d/51-android.rules

于是,我打开一个终端,在我的电脑上执行命令 ADB设备,我得到了:

Then, I open a terminal and execute command adb devices on my computer , I got:

List of devices attached 
????????????    no permissions

由于我没有看到我的设备,但只有???????没有权限,然后我运行下面的命令:

Since I did not see my device but only "??????? no permissions", I then run the following commands:

 adb kill-server
 adb start-server
 adb devices

不过,我仍然得到:

But I still get:

List of devices attached 
 ????????????   no permissions

为什么呢?我在想什么?

Why? What am I missing??

推荐答案

什么工作对我来说是杀死并重新启动ADB服务器。在Linux上:须藤ADB杀死服务器然后 sudo的亚行启动服务器。然后,它会检测到几乎所有设备的开箱即用。

What works for me is to kill and start the adb server again. On linux: sudo adb kill-server and then sudo adb start-server. Then it will detect nearly every device out of the box.