Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
98 views
in Technique[技术] by (71.8m points)

android - set up device for development (???????????? no permissions)

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

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

  1. in my project AndroidManifest.xml file, added android:debuggable="true" to the <application> element

  2. On the device, in the Settings > Security enabled Unknown sources

  3. On the device, in the Settings > Developer options enabled USB debugging

  4. On my computer, created the /etc/udev/rules.d/51-android.rules file with the following content:

    SUBSYSTEM=="usb", ATTR{idVendor}=="04E8", MODE="0666", GROUP="plugdev" 
    
  5. On my computer, run the chmod a+r /etc/udev/rules.d/51-android.rules command

Then, on my computer I opened a terminal and executed the adb devices command, 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 got:

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

Why? What am I missing?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...