android asus zenfone 5 not detected on ubuntu os - android

I have an asus zenfone 5, i want to develop android application on it and i am currently use ubuntu as my only OS,
what im already did was :
enabled usb debugging but still not detected in my computer
when i type lsusb on terminal the phone detected as Bus 002 Device 006: ID 18d1:d002 Google Inc.
these are my detail information about the system that i used, in case someone ask
OS : ubuntu 12.04 /elementary luna 64 bit
Android Device : zenfone 5 with android version 4.4.2
thanks^^

Many times, on Ubuntu, "it just works" -- you plug in the device, you accept the "yes, I want to allow debugging from this PC" dialog on the device, and you are set.
Sometimes, though, you need to customize your udev rules. Instructions for this can be found in the documentation. Search engines can usually turn up the rules you need, if your device is reasonably popular.
So, for example, here are some lines from the 51-android.rules set of udev rules on my development machine:
# Acer A700
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
# HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
# SONY
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
# ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
# Rikomagic
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666"
# Kindle Fire HDX
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666"
# Qualcomm MDP 800
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
# Nokia X
SUBSYSTEM=="usb", ATTR{idVendor}=="0421", MODE="0666"
# hudl 2
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", ATTR{idProduct}=="504b", MODE="0666"
I usually then restart udev via service udev restart, before plugging the device in again. Then, if the device has debugging enabled, you should get the confirmation dialog on the device, and if you accept that dialog, you will be able to use development tools to work with that device (set breakpoints, inspect LogCat, etc.).

Related

My Android studio is not detecting my Android OnePlus 6T device

I have installed every SDK in Android studio:
$ lsusb
Bus 002 Device 004: ID 04f2:b34f Chicony Electronics Co., Ltd
Bus 002 Device 006: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 2a70:4ee7
Bus 001 Device 004: ID 0cf3:311d Qualcomm Atheros Communications
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Here is :
$ adb device
List of devices attached
eb048141 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]
Here is the User:
$ sudo useradd -G plugdev edawking
useradd: user 'edawking' already exists
Here is the :
$ ls -l /dev/bus/usb/001
total 0
crw-rw-r-- 1 root root 189, 0 Dec 11 13:23 001
crw-rw-r-- 1 root root 189, 1 Dec 11 13:23 002
crw-rw-r-- 1 root root 189, 3 Dec 11 13:23 004
crw-rw-r-- 1 root root 189, 10 Dec 11 13:38 011
I have even added the
udev / rule.d / 51-android.rules as well as 70-android.rules as:
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666" also,
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
after that I have even change the file permision
sudo chmod a+rx /etc/udev/rules.d/51-android.rules
Basically, what I have trying to say is that before posting this post I have tried all the troubleshooting mentioned in the link I have shared below.
I have also followed the tutorial from the link mentioned below: adb devices” command won't detect my 4.4 Android phone
as well as the previous resolution from stackoverflow.com :
Android studio doesn't detected my android device on my ubuntu laptop
Adb is not detecting my android device on ubuntu
Android studio not detecting my USB device
ubuntu is not detecting my android device
but none of these resolutions are works. If there is any other solution please share. Need assistance. My Ubuntu version is 19.4. I also want to mentioned that previously it was working when I use the HDD, but recently I have replaced it into SSD since than it was not working I hope thats not the issue.
One thing it might be: Enable usb debugging
Settings
System
Developer options
Turn the setting on for USB debugging
If it does not appear go to settings about phone. Then click on build number like 7-10 times and it will enable you to have the developer options appear.
Check your /etc/udev/rules.d/51-android.rules, it must contain:
# OnePlus(Oreo)
ATTR{idVendor}!="2a70", GOTO="not_OnePlus"
ENV{adb_user}="yes"
# Charging mode
ATTR{idProduct}=="4ee7", SYMLINK+="android_adb"
# MTP mode
ATTR{idProduct}=="9011", SYMLINK+="android_adb"
# PTP mode
ATTR{idProduct}=="904e", SYMLINK+="android_adb"
GOTO="android_usb_rule_match"
LABEL="not_OnePlus"
...
# OnePlus One
ATTR{idProduct}=="676?", SYMLINK+="android_adb"
# OnePlus Two
ATTR{idProduct}=="9011", SYMLINK+="android_adb"
# OnePlus 3
ATTR{idProduct}=="900e", SYMLINK+="android_adb"
# OnePlus 3T
ATTR{idProduct}=="676c", SYMLINK+="android_adb"
# OnePlus 3T w/ Oreo MIDI mode
ATTR{idProduct}=="90bb", SYMLINK+="android_adb"
# OnePlus 5 / 6 / 6T
ATTR{idProduct}=="9011", SYMLINK+="android_adb"
# OnePlus 6 / Asia
ATTR{idProduct}=="f003", SYMLINK+="android_adb"
Check it is destected with lsusb
Bus 001 Device 015: ID 2a70:4ee7 OnePlus Technology (Shenzhen) Co., Ltd. ONEPLUS A3010 [OnePlus 3T] / A5010 [OnePlus 5T] / A6003 [OnePlus 6] (Charging + USB debugging modes)
Enable USB debugging on the phone:
Enable developer mode (with Android 11)
Settings
"About phone"
5 taps on "Build number"
Enable usb debugging (with Android 11)
Settings
System
Developer Options (fourth from the end)
Turn the setting on for USB debugging
"USB debugging connected" popup while plugged to te computer (with Android 11)
"Allow" this computer
Test:
# adb devices -l
List of devices attached
******** device usb:1-1 product:OnePlus7TPro_EEA model:HD1913 device:OnePlus7TPro transport_id:2

issues with Android fastboot sensing devices

I've been having some issues getting fastboot to detect devices. I've got my udev rule file set up as follows:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0666"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0666"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0666"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0666"
# adb protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0666"
# fastboot protocol on stingray/wingray (Xoom)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0666"
# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666"
# fastboot protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0666"
# adb protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0666"
# fastboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0666"
# usbboot protocol on panda (PandaBoard)
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0666"
and I've also tried the configuration specified on the Android build page.
I can see the device fine so long as it's not in fastboot mode. I've started the server with the adb start-server command in both my normal user account as administrator, and am able to see the device in either instance.
I boot to the bootloader in order to try to use fastboot using the adb reboot bootloader command, and the phone responds appropriately. However, after rebooting, I'm unable to access the phone using fastboot. When I run the fastboot devices command as a normal user, I get the following:
$ fastboot devices
no permissions fastboot
and when I run fastboot as root, I get the following about 3/4 times:
$ sudo ./fastboot devices
???????????? fastboot
Occasionally, the sudo fastboot command will work, and it will give me the correct MAC associated with the plugged in device. Any ideas as to why this would happen?
Add the OWNER="{your userid}" attribute to each of the udev rules.
Ref

Android Device doesn't appear online in Ubuntu 12.04

I just updated my ubuntu 11.10 to 12.04 and getting this problem, my android device does not appear online while I run android project from eclipse.I've attached a screenshot. I also put file in /etc/udev/rules.d/51-android.rules.
the content of 51-android.rules file is
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
screenshot is
SYSFS was deprecated in the recent versions of udev.
Your file should only have lines like this:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
where 0bb4 is the vendor id.
You can get the vendor id for your phone through the terminal. Run 'lsusb' on the commmand line and find the line with your device.
For example, on my case:
Bus 004 Device 004: ID 18d1:4e22 Google Inc. Nexus S (debug)
So the vender id is 18d1.
And the above line becomes:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

Debugging Android App on Device

I know there are many questions about this but none of them helped my situation.I'm running Ubuntu 11.10 and I'm trying to debug an app on my LG phone. I followed this guide: http://developer.android.com/guide/developing/device.html
I enabled USB debugging on my phone,set the project to debuggable in the manifest, and edited the /etc/udev/rules.d/51-android.rules rules file. Here is the contents of the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
1004 is the vendor ID for LG. The device is mounted; I can access it in my filesystem and the USB mounted indicator is in the notifications area. When I run adb devices, the phone is not listed, only the emulator is. It is also not recognized in Eclipse. How can I get Eclipse to recognize my device?
Here is my ultimate script to adding rules for all Android devices. You should delete your xx-android.rules files if you wrote it and make this with sudo:
#!/bin/bash
android_SDK=$1
if [[ $android_SDK == "" ]]
then
echo 'usage: sudo add_device_rules_to_unix.sh /android-SDK/platform-tools/dir/path'
exit
fi
PATH=$PATH:$android_SDK
rules_file="/etc/udev/rules.d/99-android.rules"
# Adding rules to 99-android.rules file
echo '# Acer
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
# Dell
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
# Foxconn
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
# Garmin-Asus
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
# Google
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
# HTC
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
# Huawei
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
# LG
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
# Motorola
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
# Nvidia
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
# Pantech
SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"
# Samsung
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
# Sharp
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
# Sony Ericsson
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
# ZTE
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"' > $rules_file
# Applying rules and restarting adb
chmod a+r $rules_file
service udev restart
adb kill-server
adb start-server
Hope it helps you.
I found my problem. The Android guide says to name the udev file 51-android.rules. But for newer version of Ubuntu (Karmic and sooner) it needs to be names 70-android.rules. This is the tutorial I followed: http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/. Thanks for your answers though.
You should install usb-drivers for your device (even if you have access with your file system). Maybe it's a standart driver, that allows you to use SD card on your phone (but nothing more).
Try searching for generic adb drivers for LG for Ubuntu, install them, reboot and connect your phone. Then go to terminal, navigate to folder with adb and use the following command to see if your device is recognised:
./adb devices
If it shows your device, it is ready to be used with android sdk.
There is an extra step on 64 bit Ubuntu:
apt-get install ia32-libs
Maybe this is the issue?

Problem to run my application on a real device

I am developing android application under Linux Ubuntu 10.04, with Eclipse IDE.
I successfully managed to run my application through eclipse virtual device emulator (target android2.1-update1).
Then, I followed the tutorial to run my application on a ZTE tablet device through eclipse. I followed every step of the tutorial.
My rules file is located under /etc/udev/rules.d/51-android.rules, with content:
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
The vendor ID of ZTE is 19D2.
I also enabled USB debugging both on the ZTE device and in my application's manifest file.
When I run the application in Eclipse, there is a "Android Device chooser" window popped up, which shows a device with:
serial number: "?????????????"
AVD name: N/A
target : Unknown
Debug:
Why eclipse can not recognize the ZTE tablet device correctly??
What could be the possible reason?
(I also tried to reboot my linux machine, but nothing changed)
State: ??
Change the line to SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Try changing your /etc/udev/rules.d/51-android.rules to:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19D2", OWNER="user", GROUP="group"
where user is the username of the account you develop under; and group is the group of the account you developer under.
??? symbols means that device is either offline or adb has not wright permission to access the device.Inorder to change the permission we need to update /etc/udev/rules.d/51-android.rules file in the following way.
SUBSYSTEM=="usb", ATTRS{idVendor}=="1782" ,MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
using lsusb command to find vender id..

Categories

Resources