سؤال

Recently I bought a new android tablet (a no-name Chinese tablet), and I'd like to test an application I'm developing on it.

However, when I try to run it through Eclipse, it won't recognize my tablet (the debugging mode is enabled on the tablet). When I have the select device dialog I see

Serial Number : ???????????
AVD Name : N/A
Target : unknown
Debug :
State : ??

I'm running Linux Mint. What should I do?

هل كانت مفيدة؟

المحلول

On Linux, you have to add an udev rule for your tablet. For instance:

#cat /etc/udev/rules.d/51-android.rules 
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"

you can use lsusb in order to retrive the vendor id

Bus 002 Device 016: ID 0502:3325 Acer, Inc. 

نصائح أخرى

For Linux you need to setup UDEV to support the manufacture's identity, or you need to restart adb using sudo.

To do it correctly, do this:

lsusb

and look for your tablet:

Bus 002 Device 008: ID 04e8:6860 Samsung Electronics Co., Ltd

Note the ID.

Then go to /etc/udev/rules.d and create a new file called androiddevelopment.rules in that file put this:

SUBSYSTEM=="usb", ATTRS{idVendor}=="xxxx", OWNER="yyyy", GROUP="zzzz"

Where xxxx is the first part of the ID (04e8 in my example), yyyy owner is your username and zzzz is your group.

Then restart udev:

sudo service udev restart

That should allow Linux to automatically allow your user to connect to that device.

Problem: How to get Eclipse to recognize my 7" RCA tablet:

This problem frustrated me for two days. I have a generic RCA 7" tablet that I bought at a Black Friday sale at Walmart. I was trying to use it with the Android SDK and eclipse, but my computer would not recognize the tablet as anything more than a storage device. I found several clues that led me in the right direction, but nothing seemed to work; finally found my answer here:
http://pychildren.blogspot.se/2012/12/getting-android-adb-working-with-pipo.html

(Before you start, if you are as much of a newbie as I am, go to this site first to find out something about terminal commands - community.linuxmint.com/tutorial/view/100

I was working with Linux Mint 15. I had also installed the Eclipse and Android sdk bundle.

No matter what I did, Eclipse would not recognize my tablet. Finally I got the problem resolved. I really just had to three things:

First I had to go to my home folder

Then to the .android folder

    Then add the following line to the bottom of the "adb.usb.ini" file:

        0x2207

and save the file. I was able to do this from the GUI interface.

Second, I had to open a terminal and navigate to the file system folder

Then to the etc folder

    Then to the udev folder

        Then to the rules.d folder

I had to create a file called

"51-adroid.rules" that contained only two lines:

SUBSYSTEM=="usb", SYSFS{idVendor}=="2207", MODE=="0666"

SUBSYSTEM=="usb", SYSFS{idVendor}=="0x2207", MODE=="0666"

(I probably needed only the last line, but several sources had not included the "0x" so I included it both ways.

Then, still in the terminal, I ran the following command from my home folder after the ? (just enter cd to return to the home folder)

sudo Development(the name of the folder in which I installed Eclipse and the sdk, yours will be different)/sdk/platform-tools/adb kill-server

Then I had to run the following command from the home folder

sudo Development(the name of the folder in which I installed Eclipse and the sdk)/sdk/platform-tools/adb start-server

I also had to make sure that debugging was enabled on my tablet.

I also turned off wifi on my tablet - no one but my last source had mentioned this, but I think that it may have helped.

Then, when I typed in "adb devices", my tablet was recognized. When I started Eclipse and started the Hello program, it displayed beautifully on my tablet. I just don't understand why my wife was not impressed.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top