I can't figure out why my nexus 4 is absent from the list of adb devices. I've tried the following
$ adb kill-server; adb devices
$ echo 0x18d1 >> ~/.android/adb_usb.ini
$ adb kill-server; adb devices
Changed usb computer connection type to PTP instead of MTP
Restarted the phone etc
Adb is on my path. Nexus 4 shows up when I view System Information.
I've tried asking on xda devs but no luck. Any suggestions on what I can try?
Thanks in advance
Very weird, I switched to a cheap chinese made cable and now adb sees my device.
I was only getting a blank result when I run: ./adb devices
nothing would show up.
Here's the fix:
SDK (Latest Version)
Put developer mode on nexus 4 ( About Phone > Build Number > tap 7 times to enter Dev Mode)
A new menu will pop up {} Developer Options -
Make sure you check under Developer options:
USB Debugging : Debug mode when USB is connected
Verify apps over USB : Check apps installed via ADB/ADT for Harmful behavior
This worked for me, no try: ./adb devices
Then my serial number of my Nexus 4 was displayed.
Good luck.
You have to first enable "Developer" mode on the device before trying "adb devices" option. Here is the topic that explains how.
How to find and turn on USB debugging mode on Nexus 4.
This worked for me.
When you connect your device with the developer option enabled, and the USB debugging enabled, it should prompt you about remote debugging. If that prompt doesn't happen, it means the device is not seen by the Mac or ADB.
In my experience on MacOS X, you have to try different USB ports and sometimes disconnect all other USB devices (including the keyboard...).
Once the device finally pops up in your terminal, you can reconnect the devices if required.
Its because that you didnt update your SDK
you need to update you SDK to the latest one
i.e API level 17
your Nexes 4 OS version is 4.2 so you need to update your android sdk to API leve 17 4.2 to detect it.
Related
I'm struggling to get my stock standard Android application ("hello world") running on my LG G5. My device is just not picked up by Android studio's deployment target window ("No USB devices or running emulators detected").
Can not understand why though because I do not pick up any usb driver issues in computer manager (G5 SE identified under portable devices without shown driver problem), and my phone's development option with USB debugging is enabled as shown by Android instructions.
Some additional guidance would help please.
First of all run adb devices (located in android sdk>platform-tools>) from command line / terminal and check if your phone is listed.
If not restart adb :
adb kill-server
adb start-server
If it doesn't work try changing USB Configuration on your phone: select MTP or PTP. You can change this from top panel when your phone is connected.
If this will show confirmation dialog with MAC address confirm it.
Your phone has to be visible by ADB before it can be visible by Android Studio.
LG Nexus 4
Android 4.3 (USB DEBUGGING ACTIVE)
ADB 1.0.31
on Kubuntu 13
My /etc/udev/rules.d/51-android.rules is taken from here https://code.google.com/p/51-android/
Like i said everything i got with #adb devices command is:
List of devices attached
00b453e41****** offline
(i censored the id)
Any other info that could be userful?
Ok i solved by myself, it seems it was an issue of permissions.
Just made my user:group owner of the /home/user/.android folder (and all files inside), the owner was root before and i think this was the problem. Now everything works.
Another solution for people that might find themselves looking for one:
For Android 4.3
Under Developer options, click "Revoke USB debugging authorizations:
(I have no idea if in case of multiple authorized computers the additional keys are in a new line of the file or if they are in new files. I have only 1 computer.)
stop all adb processes "killall adb" in linuxoids and "taskkill /IM adb.exe" in windows or simply the taskmanager in both.
restart the phone
toggle usb debugging off and on
connect
use adb
click authorize
works
With the new update to 4.2.2 to my Galaxy Nexus and Nexus 7, I can't find both my devices under adb.
These are the steps I took:
Updated to 4.2.2
Updated ADT and SDK through the SDK Manager
Checked ADB version, it's at 1.0.31
Restarted PC and Tablet and Phone numerous times
When I run adb devices, it's just blank. I have the same issue on Windows 8 and on Ubuntu 12.10, but on Ubuntu it shows my device and it says offline.
Are there any other steps I can take?
From the adb docs
When you connect a device running Android 4.2.2 or higher to your
computer, the system shows a dialog asking whether to accept an RSA
key that allows debugging through this computer. This security
mechanism protects user devices because it ensures that USB debugging
and other adb commands cannot be executed unless you're able to unlock
the device and acknowledge the dialog. This requires that you have adb
version 1.0.31 (available with SDK Platform-tools r16.0.1 and higher)
in order to debug on a device running Android 4.2.2 or higher
So, unplug, wait, replug in the cable, and hit ok (on modal dialog that appears on your device)
If you hit cancel, the device will show up as offline via adb devices
Try pre-installing the drivers for your devices. Make sure, under Windows, that your device is recognized in the System control panel first.
I use Windows 7 and my Galaxy Nexus wouldn't be recognized by the system until I installed the device drivers before plugging them in. From the comments, this works on Windows 8 as well.
Galaxy Nexus drivers
http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW#
Goto Manual & Drivers > Software
Nexus 7
http://support.asus.com/Download.aspx?SLanguage=en&m=Nexus+7&p=28&s=2
Just though Id share my experience, I had -
Unplugged and re plugged in the device
Installed the correct platform tools
Installed the correct Android bridge Turned USB debugging on and off
and on and off an...
Tried WiFi but it said it was offline
etc. etc.
What fixed it for me was changing the device connection from Mass Storage to MTP. To do so, with the phone unplugged you go into -
"Settings" -> "Storage" -> Click the menu Button -> "USB computer
connection" -> "Media device (MTP)"
Hope this helps some one from going crazy!
Thanks,
Ash.
I tried everything mentioned here and in other posts. It wasn't the cable, the USB port, rebooting the PC or Nexus 7, killing and starting adb or enabling/disabling USB Debugging.
It was due to the 4.2.2 OTA update, I simply replaced the \platform-tools\ folder, as described here: Android ADB device offline, can't issue commands
Download the updated platform-tools: http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip
adb wait-for-device
works for me. Just unplug your usb device, run this command, and while it's waiting, plug your device in, then it will just work. :)
Here is what I did (Galaxy S4 4.2.2):
go to Settings => about this device => click several times on "Version number", that is to say something like "JDQ39.I9505XXBHYTGKDD" (not android version or anything else) ; here you will see that Google or Samsung have a lot of humour as you have to click until multiple times until having a toast displaying "You are at few clicks from being a developer" ; after something like 10 clicks, you have a toast "You are a developer"
Go "Development options" (in the "More" tab (rigjt tab of settings menu)) ; be sure that "USB debugging" is checked.
And it works ! Eclipse can see your S4(or any other device) 4.2.2 !
I had this problem today and fixed it by rebooting the Tab2 while leaving it plugged into the laptop/eclipse
Check if you have installed android-adb-tools in Ubuntu. If you do, the adb tool may be old. Uninstall and make an alias to the latest adb tool you download with the ADB plugin. To check the adb version do "adb version" if it's 1.0.29 is the old, the latest and working for Android 4.2.2 is 1.0.31.
I made a lot of stuff until i realized this.
going to Developer Options and checking USB Debugging solved it for me
My solution used on cm10.1 nightly build on droid bionic, was after updating the newest usb drivers, using the Mass storage option (instead of the MTP option for USB computer connection), then unchecking and rechecking in developer options, "ADB over network" option. Then it did the RSA pop up dialog.
For me the best solution was:
Update the Android SDK via the SDK-Manager. Removing the '.android' folder in my usr directory ( Windows 7 ) and re-plugging the device back in. Worked flawlessly due to the ADB RSA key issue. I had an older version of ADB that I stashed into c:\windows\system32\ due to not wanting to install an entire freakin SDK when all I wanted was a command prompt. Good ol' Google, the new Microsoft.
You may use an old version of adb.exe. Update platform-tools.
You may have to set a new path to adb.exe as well.
In case it helps someone else arriving here, I had this problem with a ZTE phone.
I tried installing the driver based on the offical list here but in Device Manager the driver was marked as not installed correctly.
In the end I found the way to make this work was:
Press Menu Button
Choose "Connect to PC"
Choose "Default connect type"
Choose "Install Driver"
Plug in phone and on PC select option to install the driver
Then change "Default connect type" to "PC software"
After doing this I was able to do:
adb kill-server
adb start-server
adb devices
and view my device.
It's working on windows 8 using Android 4.4.2
Reset your phone,
go to setting->about phone-> seven time click on build number.
go to back and go to developer options check USB debugging.
go to windows 8 start menu click on profile picture and click change profile picture.
Select devices and on Download over metered connections.
Connect your phone via cable your PC and wait.
Following on from ADB not recognising Nexus 4 under Windows 7 I am having problems getting the Eclipse android development environment to recognise my new Nexus 4. My privious Nexus S had no problems.
I believe I have followed all the advice in this previous post but am still stuck.
Can anybody who has succeeded getting the nexus 4 available for android development on windows 7, tell me what their driver detail are for the "Android Composite ABD Interface"? Mine say:
* Driver Provider: "Google Inc"
* Driver Date: 27/08/12
* Driver Version: 7.0.0.1
When my phone storage is set to either PTP or MTP, I still can't see it through the eclipse "android virtual device manager".
When set to PTP, if I run the "adb devices" command described in the linked article, I do get an entry appearing in the dos box, but nothing in the "android virtual device manager" in eclipse.
The solution is to connect your device with PTP instead of MTP and, it works.
Connected devices are not visible in AVD manager. AVD manager is for emulators.
To show connected devices, you use only ADB with this command :
adb devices
This is great step by step tutor for it:
http://androidsecurity.wordpress.com/2013/06/05/install-google-nexus-4-adb-usb-drivers-on-windows-android-studio/
Uninstall the device driver completely from Windows and re-install it.
If you dont see the device in the Devices lists:
First, you need to make sure USB debugging is enabled on your device. Settings->DeveloperOptions: Turn on debugging and enable USB debugging. Ideally, you will install the USB drivers from google, and it will work fine: http://developer.android.com/tools/extras/oem-usb.html#InstallingDriver. There are some cases that new installation may mess up the device connection. You may want to try these:
It may lost the connection, so you can try:
adb kill-server
adb start-server
adb devices
Updating to new tools may mess up the settings:
Go to Storage Options and try to set as Media(MTP) or Camera(PTP) connection. Swtiching to one of them will help
Revoke authorizations, disable usb debugging and then enable
Your Nexus 4 isn't a virtual device, so won't show in Virtual Devices Manager.
If you open the Devices view, then you should see your Nexus 4 listed, and when you run your app it should prompt for running it on as physical or virtual device.
adb doesn't recognize my Nexus 10 on Windows 7. Here's what I've done:
Installed the SDK and USB driver from Google. Windows 7 sees the tablet as an 'Android ADB Interface.'
Put the tablet in developer mode by clicking on 'About tablet' and clicking the build number seven times
Put the tablet in Camera (PTP) mode by going to Storage > USB Computer Connection.
Started and restarted the tablet, my computer, and the adb server repeatedly.
None of this helps. When I run 'adb devices,' it gives me an empty list. What else can I do?
Thanks.
I had the same problem on Windows 7.
First make sure the Nexus 10 developer mode and USB debugging is on ( if you dont see developer options, tap on About Settings -> Tablet -> Build Number a several time and it should activate developer mode)
Check if your ADB driver is in good shape by going into the Device Manager. If not un-install the ADB device manager and re-install it by pointing Windows to Android SDK location (It should pick up the driver automatically).
Once it is installed and still it does not work. Go into Settings-> Storage -> USB Computer Connection and select PTP option. Reconnect tablet to the USB.
Hope it helps!.
I had some problems with this as well. I was on win 8.
Install the SDK and USB driver from Google. USB driver is available in 'Android SDK Manager' in eclipse.
Put the tablet in developer mode by clicking on 'About tablet' and clicking the build number seven times (crazy)
Open Windows Device Manager and right click 'Android ADB Interface'
Click Properties
Driver Tab
Update Driver
Select 'Browse my computer for driver software' Select the 'sdk' folder under the location you installed your sdk in step 1 (e.g. D:\Dev\Software\adt-bundle-windows-x86_64-20130219\sdk)
Not sure why windows didn't auto-detect it but it didn't. Could have been because google doesn't actually 'install' the driver into windows or perhaps it was because I had the HTC USB drivers installed because of my old phone.
I started with the same problem as you, but managed to get my adb connection working on a Fedora 16 system as follows:
Inserted 0x18d1 into adb_usb.ini (I do not bother with the device ID)
Inserted the following extra line into 99-android.rules. It's not the quite the same as yours but I leave you to experiment.
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev", OWNER="johnp"
Pressed the settings->about->version number 7 times.
Rebooted tablet and noticed that a new section is created in settings called "developer options".
Enabled USB debugging in settings->about->developer options.
On Fedora performed adb kill-server.
On Fedora performed adb start-server.
On Fedora performed adb devices.
I now see a new USB device in the list. When I go to my development environment (Eclipse) I see the device there as well.
For those who are still stuck after following the other good answers, try a different USB port ...plus adb restarts just to make sure. That had me stalled for ages.
I had the same issue, but I downloaded the drivers from this application and it started working. I used this same technique on Windows 7 and Windows 8
Followed these instruction installed the correct ADB-drivers for me on Windows 7 http://developer.android.com/tools/extras/oem-usb.html
I have been struggling with the same problem for a month. I tried other Nexus 10's, other ports, other computers ... everything. I thought I tried other USB cables too, but maybe not enough, as when a friend gave me yet another cable debugging worked.
It turns out the problem for me was that the EMI protection of the PC fires off when Nexus 10 is connected via a bad cable to a bad (front-case) port. It is a big tablet, so my guess is it draws a lot of current, and this combined with a badly shielded cable makes the PC freak out.
So my suggestion to people who couldn't solve the problem in any other way is: get a good USB cable (one where the connectors are bulky - means better shielding), rather than a cheap one.
On the picture: the red cable is bad, the black one is good.
Have fun,
-Stan
All I had to do was restart the tablet.
You should have done at least two things to get your device recognized on Linux:
specify USB manufacturer and device ID in your hot-plug manager
add an entry to ~/.android/adb_usb.ini using USB manuacturer ID
You may find manufacturer and device IDs with 'lsusb' command (that's LSUSB in lower case).
As strange as it sounds, try switching the tablet between media device and camera mode. On the 10 ADB only works for me in camera mode, while on the 7 it only works in media device mode.
Try a different usb port. Worked for me on windows 8.1 with Nexus5/10.