I've been developing my first android apps on Eclipse installed on OSX Lion. I would like to use my Jelly Beans Galaxy Nexus for debugging, but the Android Device Bridge (adb) can't find the device:
./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
The phone is in debugging mode.
The phone is recognizable as a camera (PTP), but not as a media device (MTP). ADB does not work regardless of PTP\MTP setting.
I have restarted noth the phone and the mac
Following this advice, I've installed Android File Transfer. The ATF recognizes the device, but no luck with the ADB.
Any ideas?
Addendum: I have reported a bug for this. Workarounds are still most welcome!
Sep 5 13:28 UTC - Workaround #1: Dropbox: I've moved the OSX Eclipse workspace to Dropbox and installed Dropbox on the device. The APK is written to bin/, and I re-install it from the Dropbox app after each successful build.
I'm answering this because my boss just had the exact same issue with his Galaxy Nexus, and we finally fixed it yesterday. He had an application, "EasyTether" that was snagging his connection to ADB and it couldn't be used anywhere else. Is it possible that you've setup this application, or a similar one that might be using ADB for you? If "Android File Transfer" works (it was working in parallel with EasyTether for my boss), then your connection is active, so as long as "USB Debugging" is enabled in your settings, you should be seeing a connection. Here's a quick how-to in the event that you do have "easytether"
BEFORE you plug your phone in run the following in terminal
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If that fixes the issue, and you want to remove easytether altogether, you can us the rm command with the -rf flags to keep it from happening again...
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext
You can use adb over wifi.
See this post to do it yourself.
or there are quite a lot of apps on google play. But these need root access
Try taking the usb stick out of the phone and put it back
Try taking it out of the mac and put it back
Try to put the stick in another port
Try to wriggle the stick so you are sure it is connected.
There is a long discussion with possible solutions here: Can't find android device using "adb devices" command
Have you tried a different cable? I ordered a bunch of cheap cables off of eBay, and the first one I used would not work for adb. It did work for charging and file transfers however.
Related
I know this question was asked a lot, but going through dozens of answers none have been helpful.
I'm attempting to run a simple hello world on my Huawei Mate 9 using Android Studio 2.3.1 (The APP is 4.X Jellybean API) running on Debian (Jesse).
-I have enabled debugging options on the phone (I can see developer options)
-Installed the SDK and ADB through the Android Studio.
-Device is being detected successfully on ADB devices.*
-I have tried MTP and PTP (currently it's on PTP)
Despite all different combinations I don't see my phone ready for uploading my program.
*With android studio closed:
when I check adb it usually never finds the phone the first time (adb devices) but after i do kill-server and start-server, i get the unique phone ID the second time I run adb devices. Needless to say, should I run studio after the second time around when it detects it, the phone still does not appear.
Thanks
Try this two solutions :
1) Go to setting and than in security and enable " Unknown source " to allow installation of apps from unknown source. If its still not working try second solution.
2) This problem can be due to unsupported adb driver of you mobile model. For this Download PdaNet+ a universal adb driver downloader for all devices. It will ask to remove current driver and go for it. It will fix all the adb driver related issue.
Link : http://pdanet.co/a/
So after rigorous search, I've found the reason for incapability of finding the phone in the android select deployment target menu is due to an option within a hash code menu.
You need to dial ##2846579## (works on Huawei 7 and onwards phones) in order to find a hidden window, for me it says ProjectMenu as the activity title name, then you must pick Background Settings->Background Debug->Open then restart your phone, should you have avd,android running well on your pc and debugging options activated on your phone this is all that's needed in order to deploy your app successfully.
I have attempted every fix that has come up with no success. Of the things i have attempted:
Turn on/off usb debugging
use different cables
use different computers
uninstall and reinstall drivers
remove any other instances of adb
adb is not in my PATH, I navigate to the file directly
delete keys from the .android folder (keys show up in there every time I run adb)
Remove the key from /data/misc/adb on the phone (now no keys even seem to generate)
push adbkey to /data/misc/adb/ on the phone
I have even gone as far as to remove any tethering apps, SideSync, anything that needs a connection to the computer.
There is no button in developer options "Revoke USB debugging authorization" and no matter what I do, there is no popup for RSA. I don't know why i get adbkey and adbkey.pub in my .android folder whenever I start adb. I also don't know why they haven't generated on my phone after I deleted them.
I am using:
windows 10 64 bit
Samsung Android ADB Interface driver v. 2.12.4.0
adb version 1.0.36
Samsung Galaxy Note 4 (T-Mobile) with android 6.0.1
I am rooted and have a different kernel (beastmode 3.1.40) so I can use viper4android
I have exhausted just about every avenue I can think of (short of wiping my phone/computer, which i refuse to do at least for the computer, hence why I tried different computers), please let me know if you can think of anything else.
Try to kill adb kill server and start-server again.
You can find the adb tool in <sdk>/platform-tools/.`
here <sdk> : Path to your android sdk on your machine.Go to platform-tools folder and try below commands.
adb kill-server
adb start-server
Hope it works for you..
Today i bought the Samsung Galaxy Note 3 which came with Android 4.3. Since it's so new, i couldn't find a way to root my device, so instead i tried with the adb connection ... i failed.
So, i used this
D:\android\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb push g:\save15.dat /data/data/com.creativemobile/dragracing/files/
but i got this
failed to copy 'g:\save15.dat' to '/data/data/com.creativemobile/dragracing/files/': No such file or directory
so, is there a way to copy my file to my device?
It should be
adb push g:\save15.dat /data/data/com.creativemobile.dragracing/files/
If you're allowed to push files/data there it will work.
you can use the
adb restore command for android 4.x.x
but you need to have an adb backup before.
but i think adb shell backup command does not work for android 2.x.x
maybe this will work for you
http://dragracingforum.net/viewtopic.php?f=262&t=13477
if not then you can ask the the post author i think he knows how to.
There's a bug in 4.3 that prevents this from working on a real, non-rooted device. https://code.google.com/p/android/issues/detail?id=58373
Yes, the following works on my limited edition nuclearsx-sp5
type these commands
adb reboot
adb remount
adb root
This is tested to work only on "improperly" (YES! I mean it) rooted devices which are known to have production builds. But it works on my samsung galaxy wonder (non-rooted)flawlessly.
Good luck!
I have a bash script running in work which automates the install of various APK samples (some malicious, some not - for testing purposes) to a HTC Desire Z handset running Sophos AV.
Runs well but every now and then an APK will try to install and the shell prompt will just hang at install. At the same time Sophos detects it as malicious but instead of displaying a box offering to uninstall it, it displays a box to delete it instead. Whether this is connected to the adb install issue I'm not sure but it's happened everytime.
It appears to install ok (2539 KB/s (634874 bytes in 0.244s)) .Package size is 640k.
I am running the command adb install -s /location/of/sample.apk
Any ideas?
Sorry for the lengthy post
Thanks
In case this helps others I had a different problem with similar symptoms. ADB install -r "apk path" would hang indefinitely.
I troubleshooted a myriad of things and identified that it was my USB cable length.
I have an USB extender cable as that I plug my devices into. The combined length of my device's cable and the USB extender cable caused this issue. Removing the extension cable fix the issue and eventually I replaced my USB extender cable with a shorter extension cable for the final solution.
try restarting adb server:
adb kill-server
adb start-server
Have you added udev rules file that contains a USB configuration for type of device you want to use.Incase you havn't that may be a reason for this issue. Execute 'lsusb -v' in Terminal. This will give information regarding Unique Vendor id of each connected device in a list.Find the Vendor id of your device.Once you identify the vendor id follow the instructions given in the link for Ubuntu environment. link:http://zoumpis.wordpress.com/2013/06/09/using-hardware-devices-while-developing-and-android-application/
I tried to connect my Nexus S (Android version 2.3.5) to my macbook pro 10.7 (OSX Lion). However, the notification on android phone was just ON and OFF alternative. I tried this command on my terminal.
adb usb
>>error: device not found
adb devices
>>List of devices attached
>>[ nothing here ]
Please help me with this issue. Thank you!
Make sure you don't have a power-only USB cable. If the phone charges but Mac doesn't think it's there, it's a sure sign.
Also, if that does not work, check to see if the device shows up under USB in the System Profiler (included in OS X). If it is showing up there, but not in ADB, try adding the USB Vendor ID of the phone to ~/.android/adb_usb.ini
This file can be created if it does not already exist. The Vendor ID of the Nexus S is 0x18d1. Please make sure the last line of the file is a Vendor ID, do not leave a blank line at the end.
It seams that there are some problems with debugging an Android device on OS X (most describe this problem after updating to Lion).
There are some threads/discussions which offer a few possible workarounds, see if one of them works for you:
OS X 10.6.6 and "adb devices" fails to list android devices
The Issue on the Google Bug-Tracker
Although, this seams to be a problem on Google / Apples site so you can only check if you can work it around.
I had same problem with my N-06C which is made by NEC and solve by writing code less kext.
http://8kpxen.blogspot.com/2011/08/how-to-adb-to-your-android-device-on.html
Please read this blog and download kext.
Since this kext file is configured for N-06C, please modify for your environment.
This happened to me, checked ADB in Eclipse, and was able to select and push file to device. Pushed APK and installed.
I know, horrible solution but Lion has been a nightmare for most developers. Hopefully the updates keep comin!
I have a similar issue. I can issue commands via ./adb shell like ls, but not push and pull, and when i do ./adb devices, it shows my device id, but when i start an interactive shell, adb devices shows nothing. i can still list files in the interactive shell, but still no push or pull.