I'm doing Android development with Eclipse 3.6.2, OS X 10.6.7 and a Samsung Galaxy Tab.
Everything is working great, except every 15 or 20 minutes, the Settings | Applications | Development | USB debugging checkbox "unchecks" itself. Which means I need to unplug the USB cable and go back into the setting, re-select the checkbox, plug the cable back in and I'm good to go.
What I would like to know is if there is some way to make that checkbox "sticky" (I asssume it probably is supposed to be - but I haven't been able to figure out under what circumstances cause the "uncheck" to occur). I've tried a number of variations of USB / sdcard / Development settings and haven't found the "sticky bit" yet.
I'm new to Android, so I'm hoping there is some "you forgot to also do X" here...
EDIT:
Maybe it has to do with a USB Mass Storage message that pops up after 10 min or so? I just noticed a message "USB Connected: You have connected your phone to your computer via USB. Select Mount if you want to copy files between your computer and your phones SD card".
I have a Galaxy Tab and have not experienced this behavior. Nor have I encountered this on any other Android device, and I have used quite a few for development purposes.
From what I can tell, this state cannot be toggled via SDK applications, but only via the firmware. My guess is that there is something flaky in your setup that is triggering something in the Tab's firmware to do this.
Sorry that I don't have a silver bullet for you.
UPDATE
Maybe it has to do with a USB Mass Storage message that pops up after 10 min or so? I just noticed a message "USB Connected: You have connected your phone to your computer via USB. Select Mount if you want to copy files between your computer and your phones SD card".
That further suggests there is something strange going on between your development machine and the Tab. That should appear when you first plug in the cable, then remain there until you unplug the cable. I would not expect it to be toggling the USB debugging checkbox, but I am really starting to think you have one screwed-up Tab.
Had the same problem on Huawei P20. Upon activating developer options, what I did was :
On the smartphone, open System Settings -> Developer options -> Enable USB debugging
Connect the smartphone to the computer
When the prompt shows on the smartphone select "File Transfer"
Uncheck and check USB debbuging (smartphone is still connected to computer)
The prompt for USB debugging finally appears
Hope it helps.
verizon has something running in the background making this happen and having the same problem on my samsung fascinate after upgrading to fro yo. I think they're trying to block usb tethering
My Galaxy Tab 7" does this all the time. I would be in the middle of something and it would just drop. Over & over.
The solution that I found that works great for me is to just use adbWireless. This allows you to run ADB over wifi instead of USB. adbWireless can be found on the Android Market. It does require you to ROOT your phone, but since you are developing for it, you will want to do that anyway.
THis seems to have gone away in 2.3 for DroidX. But it was quite frustrating when I was using DroidX w/ 2.2 on OS X to debug.
Related
I am getting started with Android development. I have an older Samsung Galaxy S2. But Android Studio doesn't recognize the device. I've tried going to the USB utilities but I can't seem to find them. Is my device too old?
You will have to enable the "USB debugging" option in your phone:you will get this after enable the "developer mode" on your phone(aka "developer options" on some devices).
Check this guide to enable this mode.
In addition - if you want to test your apps on a real device you will need to have a data USB cable(if you can upload stuff from your phone to your computer than you have the correct type of cable )
In some devices after enabling developer mode and connecting a cable you should scroll from the top side of the screen (Like in the photo) and click on USB for file transfer, and select Transfer files.
In addition to enable the Developer mode, if yet doesn't work, take a look at this page https://developer.android.com/studio/run/oem-usb, maybe with this driver you will have your problem solved: http://www.samsung.com/us/support/downloads
You can also check at your adb to make sure your device is connected:
cd cd c:\Users\Linda\AppData\Local\Android\sdk\platform-tools\
run: adb devices
It must shows your device's ID.
Hope it helps.
I was not using the correct cable. I assumed since the phone was charging I was using the correct usb cable to connect to my pc. Found a different cable, I believe the same cable that came with the phone. Now my device is found and working.
I have tried EVERYTHING I could find on this but still no solution.
I have a Samsung s6 edge Plus 32 GB. I am trying to deploy an app on Android Studio but it always shows the device as offline. What I have tried
Unplugging and plugging back
Restarting device
Enabling debugging on device
Shuffled and tried different transfer protocols
Installing and Uninstalling Samsung drivers
Checking 'Enable ADB integration' under Tools -- Android
Checking android studio & driver updates
Any help will be greatly appreciated
This happens sometime, even when USB Debugging is on. Try this:
Go to Settings->Developer Options
Search for Revoke USB Debugging Devices
Revoke all existing devices
Disable USB Debugging and enable it
Now connect your phone to system with USB cable
Wait, and a dialog will appear on your phone, for permission to allow for USB Debugging. Click on checkbox and press Allow.
Now the device should appear online in Android Studio.
If problem still persists, then problem is with your phone drivers installed on system.
This happens to me regularly (I use multiple devices) and one of these two things always fixes it:
Make sure your device has "only charge" selected in the dropdown menu entry that appears when you connect your phone. Instead select "transfer files".
Disable and enable usb debugging.
Change your device cable or change your connection USB port on PC. I think this problem is hardware problem. Try other hardware problem possibilities.
I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now.
Here is what I do to produce the problem.
I Connect phone to USB
This is what the ADB log says at that point
PropertyFetcher: AdbCommandRejectedException getting properties for
device c9c2d39f: device offline PropertyFetcher:
AdbCommandRejectedException getting properties for device c9c2d39f:
device unauthorized. Please check the confirmation dialog on your
device. DeviceMonitor: ExecutionException getting info for device
c9c2d39f
Please not that the phone actually connects -and that I can see the logcat etc on my device after I connect. I have tried to revoke debugging rights from the developer menu, and re-authorized the computer.
Start my app, that I want to debug
Press the "Attach debugger to process" icon (to the right of the regular "debug" icon)
At this point, the "Choose process" dialog appears with no running processes. The phone also disconnects the debugging session, and do not show up when running
Adb devices
At this point a restart of adb has no effect. The only way to get debugging back is to reconnect the phone to the USB port.
As I said, this only happens on one of my USB ports, it works on another. Does anyone have an Idea of what is going on here?
I had a similar issue on an older computer when the computer's motherboard was on its way out. Just as a precaution, you should back-up all of your work and try to determine if this is hardware or software related. From my experience, when USB ports start acting weird, it is usually hardware related.
When mine started to act up, it would connect and acknowledge a connected device, but the computer would throw all sorts of errors regarding reading the device files and even allowing the connection to remain. I tried re-installing software, resets, firmware re-installs, etc. I could not figure out what was going on, so I had my friend check it out (he has around 30+ years experience in computer engineering) and he determined it was my computer's motherboard that was on its way out. He said the only thing that would correct it was to replace the motherboard or get a new computer.
My S5 active showed 'offline' to ADB despite enabling/disabling debugging, updating the driver, and restarting the phone and computer. Finally - I move the USB plug from a HUB, and plugged it in directly from the phone to the PC - and it finally worked.
I had a similar issue too.
Try these steps:
Unplug the usb cable. Reboot your computer and samsung s5
In S5' Developer options, click "Revoke USB debugging authorizations" and press OK
In Android Studio, check "Tools | Android | Enable ADB intergration", if already checked, uncheck it, and then check it again.
Plug your samsung s5, and follow the dialogues instructions to allow this computer ...
Run your app
These steps should fix the problem.
I'm having an issue with my Galaxy S2. I typically leave it in Debug mode, up until a few days ago it has worked great. I've successfully loaded APK's for testing through eclipse previously.
I tried to load a prototype of a new app im working on and when I plugged in the S2 nothing happened, Windows didn't beep like usual and when I tried to view running devices it did not show up.
When I look at the device manager under universal serial bus controllers, it doesn't show any 'unknown devices'
I've tried reinstalling drivers through kies, and third party sources (as well as removing all drivers and letting windows install them again for me.
I've tried connecting as Mass Storage Device, with debug mode on and off.
I've restarted both my computer and phone many times.
When my phone is off and plugged in Windows will beep and say that a device was connected but not recognized (which is more then what I get when the phone is on)
And sometimes when I "troubleshoot connection issues" in Kies it will reinstall the drivers and after the process is complete windows will report "Drivers were not successfully installed"
I've tried plugging it into my Windows XP laptop and it will show up as "Unrecognized device" even after I installed Kies on the laptop, and tried the driver installation it with the same results.
Posting here is my last resort as I've spent close to 5 hours troubleshooting this issue, and searching for answers. My biggest concern is that when I do plug my phone in it will beep to say that it is charging, but windows 7 doesnt even see it!
I appreciate all suggestions & help!
EDIT: Also I installed the Samsung Android USB Driver for Windows and windows reports that the drivers were not successfully installed
Thanks
Jon
Try to key in dialer:
*#7284#
It has 4 options:
UART
MODEM
PDA
USB
MODEM
PDA
In USB section, select the PDA. If it already selected to PDA then reselect it by selecting MODEM and then PDA again.
Only change the USB setting and then press back and try reconnect to kies again.
Hope it helps..
I had the same problem and JUST as i was about to give up, i realized that I had replaced my usb cord with a generic one from the store. I happened to still have the old one around still and that ended up being my issue -.-; Hope this helps someone else!
This really sucks, I know I've had this happen a few times and it's really annoying to have to deal with. I had luck with this post where they suggest:
... they suggested removing battery from hero with usb pluged in and
then putting battery back in, so i did this thinking it wouldn't work
and hey presto, mounting option became available. I was then able to
follow your first set of intructions to install the drivers through
devices and sync is now working!
If that doesn't work there are a few suggestions and helpful driver websites on there for you to follow :-D
I know I would:
Uninstall all drivers related to your device
Restart Computer without connected
Pull battery on device, plug it in, and once detected put battery back in.
If driver doesn't install correctly, or "unknown device", go to the website on that forum to get the CORRECT driver for your device and Windows OS
Go to Control Panel->Device Manager->(unknown device)->Update Driver
Locate downloaded driver, install
Make sure that when connected, the device says "USB Connected" in it's notification area
Click "Turn on USB storage", or "USB Debugging -> USB debugging"
.. this will at least show you that you have the right drivers.
IF you did all of this and you still can't get it to debug through eclipse, you either have conflicting drivers somehow, or your eclipse IDE isn't setup properly. Maybe update Eclipse, and Android SDK and try again?
Sorry can't give you exact details but this problem could be ANYTHING lol
I had the same problem while using a generic cord.
Don't use for usb transfert
I think they are made only for charging.
Solve by using a stock cord not a generic one.
Okay, so after talking to Samsung they informed me that there is a small defect with the female usb connection, and that it can sometimes be loose.
Only solution, mail it to them...
This fix works on all my computers that "don't recognize" my rooted Samsung Android. Plug the phone into the computer and restart phone. When it comes up again, the computer recognizes it.
My method is KIES AIR.
Open Kies Air
Go to settings > Bluetooth off set.
More settings > Tethering and portable hot spot > Bluetooth tethering check true and portable Wi-Fi hotspot check true.
Now KIES air open on your device and start button click. copy IP address to browser
Your s2 is connected your computer.
Open browser, and copied ip then click paste.
I have two Win XP SP3 workstations that would not connect to my Galaxy. Finally fixed it by installing this particular Intel driver and installing Windows Media Player 11.
if you are running a custom kernel on your phone, you may want to check too if you have "force fast charge" turned on or not. I thought my phone and computer would never talk to each other again but it turned out I had fast charge enabled. Turning that off solved the problem for me.
It might be an issue with USB 3.0 ports. I was tormented by this issue too and I was at the point where I was so ready to burn this device to kingdom come. Before I did that, I decided to use my never-used 2.0 port and guess what, IT WORKED! If your PC doesn't have a 2.0, good luck with that.
punch in code *#7284#, (UART set to PDA) and (USB set to PDA)
solved my problem
I've connected my Samsung Galaxy Tab device to my Mac. Yes, I've turned on debugging. When I go to run my application to test on the device the device is not listed on the Android Device Chooser menu. Running the ./adb devices shows no results.
NOTE: Posting this question for others to find. When looking for the solution earlier all I was able to locate were answers to broken links to device driver downloads for Windows.
Make sure you uncheck
Settings > Applications > Unknown Sources (Allow installation of non-Market applications)
Turn on USB Debugging inside Settings > Applications > Developers Settings
If you're trying to connect to a Mac, I had this issue with a Samsung Galaxy Tab 10.1 running Android 4.3. To enable developer options, open the Settings app, tap on "About device" under the "General" tab and then tap on the "Build number" repeatedly (it's grayed out but you can tap on it anyway). A small pop-up will appear showing the amount of additional taps you need to do to turn on these options.
Once enabled, just turn on USB Debugging and it'll show up in Eclipse just fine.
I had this problem on my Mac and after 30 minutes tried switching USB ports and it finally started working on the second port.
I fixed it by reboot the device (Samsung Galaxy Tab2 7.0)
Update your driver for samsung. It can be found here: http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows
Connecting your phone after development mode is on, and USB debugging is on.
At connecting to the PC the phone asks to trust this location. Finally.
This fixed my problem while all other tips were incomplete.
It does not answer your question of how to get ADB to see the device - I could not get that working. But what I did to install an APK I needed to test was to put it in Dropbox on my computer, then install it from there on the device.
Connect your device via USB hub instead of directly connecting to one of the usb ports on MAC. It worked that way for me. Please give a try.
There's also a pop-up that comes up at times requesting the currently connected computer to have access to your device(not to be confused with the Linux not supported pop-up; it lies ; ] ). I continued to receive Target:Unknown in Eclipse until I managed to catch it and accept. This is on a Samsung Note 8", which I believe is registered as a Tab 10.1 in my Arch Linux udev rules.
It may also happen that USB debugging is not checked on your device. Please go to developper options in your device and check it is enabled.
By the way, for devices with android Jelly Beam (4.2) and later versions, you will find out that this option is hidden. To activate it, click 7 times on the compilation number, and the option will be activated.
Tried everything, nothing helped. Including
USB debugging enabled
MTP/PTP
ADB restarted
Device/PC restarted
Tried Samsung's USB driver
By tricking/modifying driver installer, installed Google OEM Usb drivers for Galaxy Tab.
All software up-to-date
The only thing that helped is installing Kies3 + setting PTP on device, instantly authorization pops out in device. Everything OK now.
Kies3 download here: http://www.samsung.com/uk/support/usefulsoftware/KIES/
Enable USB Debugging mode solve the problem!
For those who don't know how to enable it (it's very hidden on Android 4.3 onward), see this.
In my case, this solved the problem:
unchecked the Settings->Security->Unknown Sources,
clicked on the upper left corner and changed USB mode from MTP to PTP,
unplugged/plugged the device, and
clicked OK on the USB debugging prompt.
Had this problem last year, never solved it. Again, after googling high and low, I could not find a cure for the USB debugging flakiness. Now for the good news:
1) Root your device. 2) Install adbWireless widget from Play (I am in no way associated with the author).
You are now good to go. After starting adbWireless and following its directions, you can now debug through adb wirelessly to your device, in my case, the original 7" Galaxy Tab.