Trouble Connecting Azpen Tablet to Linux PC - android

I purchased a new tablet which is manufactured by a company called Azpen. The product page for the device is http://www.azpenpc.com/product_t64.html I'm trying to develop apps for it and I'm a beginner. I connected the device to my Linux machine (running CentOS 5.3) but something isn't working right. I can't install the simple HelloWorld program via 'ant debug install'. Here's the output of some adb commands, which I ran as a regular user, then as root:
# adb usb
error: insufficient permissions for device
# adb devices
List of devices attached
???????????? no permissions
I did 'adb kill-server ; adb start-server' as root, but this didn't help.
Does anyone know what the problems is? My next attempt at debugging this myself was to create a new rules file in /etc/udev/rules.d, but I don't know what 'idVendor' to use for Azpen devices. Can anyone help with this?
ps. I also posted this on http://forums.androidcentral.com

I ran 'dmesg' and grepped for 'idVendor' in the output and found:
usb 2-1.2: New USB device found, idVendor=18d1, idProduct=0003
So I added this line to /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
then restarted adb as root: 'adb kill-server ; adb start-server' and it worked.

Related

Android devices don't show up in "adb devices" until logged into Ubuntu GUI session

We have thousands of devices that we test on hundreds of Ubuntu hosts and one of the big problems we're running into is that unless you log into the host via the GUI, some of the devices don't show up. I was speaking with a coworker and he was saying this was due to the device being unable to mount until an active GNOME session was started, but he didn't know how to fix it - does anyone know a way around this? This is a huge problem for us because if we need to reboot a host (or many hosts), we need to remote into each one, log in, and then the devices show up - logging in via Putty doesn't have any effect - it's only if you log into the GUI that the devices show up.
Our systems are running Ubuntu 16.04.
sudo adb kill-server
sudo adb devices
Has been tried, and does not help.
Thanks!
Create this file as root if it's not created already:
touch /etc/udev/rules.d/51-android.rules
Use this format to add each vendor id from your devices to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for my HUAWEI device. The MODE assignment specifies read/write permissions so when you have created/updated the file, execute.
Make the file executable:
chmod +x /etc/udev/rules.d/51-android.rules
Now try restart adb again.
adb kill-server; adb start-server; adb devices -l
If you do not know your vendor ID i have created a list for the most known brands for you, otherwise the vendor ID can be found by lsusb command if you got this package installed, the bolded text is your Vendor ID if the phone is listed.
List devices Vendor ID via lsusb:
lsusb
Bus 002 Device 019: ID 12d1 :107e Huawei Technologies Co., Ltd.
List Vendor ID's for different phone models via curl:
curl -L https://nr1.nu/xm89
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev" #Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev" #ASUS
I assume you know that the phone is connected properly already but if you are not sure about this type dmesg -w followed by connecting the device to your pc again, you should see a message that a new device has been found if everything is okey.
Try this
adb kill-server
adb devices
adb server will be restarted hence there is a change to detect the connected devices

Device not getting detected in DDMS in Ubuntu 12.04 - 32bit

I am using Ubuntu 12.04 32bit. I have a Micromax Ninja A87 Android phone running GB 2.3.5.
My problem is the phone does not get detected. When I try on a windows 7 pc, it does get detected.
Here are all the steps I followed but still no lucks.
$ lsusb
Output: Bus 002 Device 006: ID 1c9e:9e08 OMEGA TECHNOLOGY
I created the 51-android.rules file and have this as the contents:
SUBSYSTEM=="usb", ATTR{idVendor}=="1c9e", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
Alternatively I tried this link also - http://forum.xda-developers.com/showthread.php?t=1475740
Done chmod a+r on 51-android.rules
Restarted udev , also restarted my PC.
done kill-server & start-server
But still when I do "adb devices" -- it doesn't detect my phone.
Here are some more info:
1)USB debugging is enable in phone.
2)Whenever i connect my phone to pc, it shows a popup in PC("usbmodem mass storage has been connected").
while checking the vendorId and productId in windows(phone always detected by windows system), it shows 1c9e:9e18. But as mentioned, in ubuntu it shows 1c9e:9e08. So tried to switch to the same vendorId/productId in ubuntu i.e 1c9e:9e18. So created a rule in /etc/usb_modeswitch.d/1c9e:9e08 and put the below contents in the file.
Code:
DefaultVendor=0x1c9e
DefaultProduct=0x9e08
TargetVendor=0x1c9e
TargetProduct=0x9e18
SierraMode=1
NoDriverLoading=1
add below code to the file /lib/udev/rules.d/40-usb_modeswitch.rules
ATTR{idVendor}="1c9e", ATTR{idProduct}="9e08", RUN+="usb_modeswitch '%b/%k'"
Once done run :
sudo usb_modeswitch -v 0x1c9e -p 0x9e08 -S -R -W
Now adb will recognise the phone.
For further reference you can go through the below link:
http://forum.xda-developers.com/showthread.php?t=1968465

Problem when run adb command / Problem of developing with tablet device

I followed the tutorial to set up ZTE tablet device for development. I am developing under Ubuntu 10.04.
After create the rules file: /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
After I plug in the ZTE tablet device with debugging enabled. I run command:
adb kill-server
adb start-server
adb devices
I got :
List of devices attached
???????????? no permissions
I thought may be it is because I did not restart adb as root. SO, I tried to restart adb as root, and I entered the command in my terminal:
sudo adb kill-server , but I got the message in terminal that "sudo: adb: command not found"
But if I enter command without "sudo", that's "adb kill-server" it works.
Is it because my path setting is wrong?????
I set the path under HOME/.bashrc, with :
export PATH=$PATH{}:/home/user/android-sdk-linux_x86/platform-tools:/home/user/android-sdk-linux_x86/platform-tools
Conclude all above, I got two problems:
the adb listed device has no permissions
I can not run adb as root
My questions:
Are the problems all because of my path setting is wrong?
Is it because ZTE tablet device is different from mobile device? Some tricks need to be done for tablet??
something else?
Where am I wrong?
P.S. Since I lost the USB cable shipped with the ZTE tablet, I use a NOKIA USB cable to connect the ZTE tablet with my development Ubuntu machine, could this also cause the above problems???? (With Nokia USB cable, I can still access the ZTE tablet file system anyhow)
Every thing goes fine after I run the command:
sudo -s
adb kill-server
adb start-server
adb devices
Then my ZTE tablet is shown.

adb devices command not working

I'm running Ubuntu 10.10 64 bit. I have ia32-libs installed along with Android Debug Bridge version 1.0.26.
My problem(s):
adb devices >>> ???????????? no permissions
sudo adb devices >>>> sudo: adb: command not found
adb shell >>> error: insufficient permissions for device
I guess these are all related. Here's the relevant info.
$ echo $PATH
/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/android-sdk-linux_x86/tools:/opt/android-sdk-linux_x86/platform-tools
$ which adb
/opt/android-sdk-linux_x86/platform-tools/adb
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
$ sudo adb devices
sudo: adb: command not found
$ adb shell
error: insufficient permissions for device
I get the same results with a rooted Moto Droid running CM6.1 and a rooted G-Tab running a CM7-based ROM.
I have reviewed the following related posts:
http://forum.xda-developers.com/archive/index.php/t-522827.html
http://ubuntuforums.org/archive/index.php/t-1164359.html
adb command not found in linux environment
I tried most (not all) of the suggestions and I have not been able to resolve my issue. The things I didn't try seemed inappropriate. I would appreciate a few more tips and I'll keep troubleshooting.
One thing I didn't try was editing /etc/udev/rules.d/70-android.rules. Is that likely to be the issue? I can't see how that would cause "sudo: adb: command not found". Maybe my problems are not all related. Anyway, at this point I think I need some input from other people because I don't believe I have a path problem or the other common problems discussed in those other posts.
EDIT: SOLVED thanks to EboMike and RivieraKid. This was actually two different problems:
Item #2 above (sudo: adb: command not found) was solved by making a symlink as follows:
$ sudo ln -s /opt/android-sdk-linux_x86/platform-tools/adb /usr/local/sbin/adb
That allowed me to then do as EboMike suggested and use this solution. Doing that was required for my Moto Droid. (Running adb as sudo was not required for my Viewsonic G-Tablet, however.)
My other two items were resolved by implementing the udev rule as RivieraKid suggested (from this link).
One thing I didn't try was editing
/etc/udev/rules.d/70-android.rules. Is
that likely to be the issue?
Any particular reason why you didn't do that? To answer the question - YES! The udev rules are what informs Ubuntu what your device is and allows user-space tools to therefore access it.
You will not be able to use adb without correctly following the instructions.
With that in mind however, you don't say what version of Ubuntu you're using but I had issues with 10.10 - let me know if you need me to post the contents of my rules file.
Don't worry about running adb via sudo, you don't need it. The MODE="0666" from the udev rule allows you to access the device as any user.
EDIT:
Don't forget to reload the rules:
sudo udevadm control --reload-rules
EDIT #2:
As #Jesse Glick correctly points out, if adb is already running in daemon mode, you'll also need to restart it for this to work:
sudo adb kill-server
I've used sudo here, since that will guarantee that adb will be killed , and it's the officially supported method to stop the server. It will be automatically restarted the next time adb is used, but this time with the correct environment.
You need to restart the adb server as root. See here.
On my Gentoo/Funtoo linux system I am having similar problems:
I gotting always not the correct device description and insufficient permissions:
# sudo ./adb devices
List of devices attached
???????????? no permissions
# ./adb usb
error: insufficient permissions for device
For me helps the howto from Google.
In my case I needed to add the udev rule:
# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
and setting up the filesystem rights
# chmod a+r /etc/udev/rules.d/51-android.rules
After replugging my smartphone the access to the phone was successful, it also appears now in Eclipse' Android Device Chooser:
# sudo ./adb devices
List of devices attached
3XXXXXXXXXXXXXC device
# sudo ./adb usb
restarting in USB mode
You also have to check the membership of your user to the plugdev-group.
Every answer I've read indicates the SUBSYSTEM=="usb". However, my (perhaps ancient) udev needed this to be changed to DRIVER=="usb". At last I can run the adb server as a non-root user... yay.
It can be instructive to look at the output of udevmonitor --env, followed by the output of
udevinfo -a -p <DEVICE_PATH_AS_REPORTED_BY-udevmonitor>
Please note that IDEs like IntelliJ IDEA tend to start their own adb-server.
Even manually killing the server and running an new instance with sudo won't help here until you make your IDE kill the server itself.
restarting the adb server as root worked for me. see:
derek#zoe:~/Downloads$ adb sideload angler-ota-mtc20f-5a1e93e9.zip
loading: 'angler-ota-mtc20f-5a1e93e9.zip'
error: insufficient permissions for device
derek#zoe:~/Downloads$ adb devices
List of devices attached
XXXXXXXXXXXXXXXX no permissions
derek#zoe:~/Downloads$ adb kill-server
derek#zoe:~/Downloads$ sudo adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
derek#zoe:~/Downloads$ adb devices
List of devices attached
XXXXXXXXXXXXXXXX sideload
I fixed this issue on my debian GNU/Linux system by overiding system rules that way :
mv /etc/udev/rules.d/51-android.rules /etc/udev/rules.d/99-android.rules
I used contents from files linked at :
http://rootzwiki.com/topic/258-udev-rules-for-any-device-no-more-starting-adb-with-sudo/
HTC One m7 running fresh Cyanogenmod 11.
Phone is connected USB and tethering my data connection.
Then I get this surprise:
cinder#ultrabook:~/temp/htc_m7/2015-11-11$ adb shell
error: insufficient permissions for device
cinder#ultrabook:~/temp/htc_m7/2015-11-11$ adb devices
List of devices attached
???????????? no permissions
SOLUTION: Turn tethering OFF on phone.
cinder#ultrabook:~/temp/htc_m7/2015-11-11$ adb devices
List of devices attached
HT36AW908858 device
I just got the same situation, Factory data reset worked well for me.

Samsung Pop 5570 does not connect in Ubuntu 10.10. in development mode

Adb devices is not listing my Samsung Pop 5570 wen connected in with USB debugging on in ubuntu 10.10
adb devices
?????????? no permissions
i did add the 51-android.rules file in /etc/udev/rules.d folder but still adb devices shows that devices wit ?????? no permissions.
51-android.rules file has the following contents:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04e8", MODE="0666"
please let me know if i am missing something
I resolved the issue by appending #samsung in the 51-android.rules file and copying the "adb" command to /bin folder.
$ restart udev
$ cp adb /bin
$ sudo adb kill-server
$ sudo adb start-server
$ sudo adb devices
List of devices attached
S5570e905be1c device
Edit: I suspect your subsystem name is the culprit (simply try "usb" instead). However, I am unable to comment as to whether or not that subsystem name is still valid in 10.10 as I do not know what changes have been made to udev.
First step would be to verify that your vendor id is correct with lsusb (that appears to be Samsung's vendor id, but it can't hurt to check).
I am also running 10.10, but I have an HTC device. Here is my rule file's content:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
After editing the file, I unplugged my device. Just in case, I kill adb's daemon:
sudo adb kill-server
I then reconnected my device and executed "adb devices". adb started the daemon without sudo. My device was listed properly.
I resolved the above problem by prefixing the 51-android-rules file with #samsung, i mean,
'#samsung SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04e8", MODE="0666"'.
I killed the adb server and restarted in SU mode and then ran
$sudo adb devices,
i was able to see my device listed.

Categories

Resources