I've been developing an Android app using Eclipse and the Android plug-in for Eclipse and all these days, I would just plug in my phone into the computer and hit Run and would see my app run on my Samsung Galaxy Phone. But now it shows me a window like the following and am unable to choose my phone as the device because under the "State" column it says "Offline" even when the phone is plugged into my computer. I can't even use the emulator because its painfully slow on my computer.
Refer this link
Android device chooser - My device seems offline
Restart adb by issuing 'adb kill-server' followed by 'adb
start-server' at a cmd prompt
Disable and re-enable USB debugging on the phone
Rebooting the phone if it still doesn't work.
Sometimes Android devices appear "offline" (according to adb devices). I've generally had success fixing this by rebooting the device, though it won't hurt to also adb kill-server followed by adb start-server.
I've seen this happen with multiple unrelated devices, infrequently, and seemingly randomly (that is, seemingly unrelated to anything I had been doing).
Reformatting the phone solved this problem for me. I don't know if that solved the problem but once I reformatted the phone, I was able to run the app on the phone.
Related
I created a game in unity that I want to download on my phone. I plug in my Samsung galaxy s7 edge and click on build and run.
It starts building as usual, but then the error shows:
I don't know why this is happening. I have enabled USB debugging on my phone and did all the requirements-(click build number seven times, enable USB debugging)
I also disabled and re-enabled the USB debugging but it didn't work. I even downloaded the SDK and JDK!
Few solutions to this problem.
Someone already mentioned try plug/unplug. Sometimes you have to change option from charging to transfer files or other.
Another solution that will probably work is killing adb server. Launch your OS console and type:
adb kill-server
then restart it by
adb start-server
This will force pc-phone communication to be restarted, and probably will solve your problem. Make sure the Android SDK path is correct in your Unity settings too.
I'm working with adb and android studio on mac.
I've noticed that everytime i leave work and come back in the morning, the adb doesn't find the device who's plugged.
What i've tried so far :
Unplugging the usb both from the laptop and the device, and plug it again - adb still doesn't recognise my device.
Restarting the adb by running 2 commands :
adb kill-server
adb start-server
Restarting my mac.
Only the 3rd option worked. However, i don't want to restart my computer every morning, only if i have no other option.
Adb showing no devices :
For some reason the Mac loses authorization for USB debugging after sleeping. The only solution that I have found to work is the big hammer approach...
$ rm ~/.android/adbkeys ~/.android/adbkeys.pub
Then reconnect your USB cable. There are likely significant downsides to this approach, but it certainly works in the short term until a smarter solution is developed.
This was not always a problem, it has crept in with the newer releases of Android Studio. Its probably not really a MAC problem, but an Android Studio problem.
I don't think you need to reboot the MAC, just restart Android Studio. Make sure it shuts down properly first.
I bought a new Alcatel Onetouch 918n phone for app testing. I can't however get it to be recognized in eclipse to test.
After some painful steps, I now see "Alcatel Android ADB interface" in Device manager. But I just can't seem to make this phone visible to Eclipse/ddms/adb.
Since i somehow (I Think after installing Alcatel Android mgr on PC) got the OEM Usb driver installed, I think I don't need the google usb driver, correct?
And Yes usb debugging on phone is on.
Please help?
Take a look at http://blog.fh-kaernten.at/wehr/?p=1182, where the author describes his problem with his device being in Device Manager but not showing up in ADB. Also look at Adb Devices can't find my phone. Some other things to try:
See what you get when you run ADB outside of Eclipse ("adb devices" from a command line). Sometimes Eclipse is finicky, so it may be better to troubleshoot this outside of it. Sometimes it's necessary to quit and restart Eclipse when it's not seeing your device, or unplug and re-plug your device.
When you make any changes, use "adb kill-server" and "adb start-server" to stop and restart the adb server, before again trying to see your device.
If possible, try a different device and see if it shows up in adb (though you'll probably have to install a driver for it first). That may tell you whether the problem is with your Alcatel phone or the software on your computer (missing SDK component, wrong USB driver, etc.)
I have a simple camera app I'm trying to push to my phone, but HTC sync (Thunderbolt on Verizon) simply will not recognize the device. I believe this is the reason I can't get the phone to accept the APK. All my drivers, project, and sdk manager and plugin are updated and I reinstalled HTC sync just to be sure. I also enabled usb debugging and unknown sources
I believe the Thunderbolt connectivity issues also destabilize the eclipse plugin. I get hung randomly during Android functionality in eclipse (like simply loading DDMS or a Run Configuration).
As a result, I'm trying to find a way to work around having to use HTC sync to push my app there.
I developed with a HTC Desire some weeks ago and it worked without problems.
You shouldn't need HTC sync. Have you tried to use the google usb driver as described here?
Whats the output when you call adb devices from commandline? If everything worked correctly you should see the device id of your phone.
Sometimes the following can help if adb does not recognize your device:
adb kill-server to stop the adb process
Use the task manager to make sure no other adb process is running (stop them with the task manager)
restart adb server by calling adb devices
Try to install the app using adb install -r C:\path\to\app.apk
I am running Android SDK 2.2 and am trying to get the adb to connect to the Google Nexus One phone. Its a new phone, shipped straight from Google - haven't installed any apps on it yet.
(I have Windows XP)
Here is what I have done so far:
Followed the instructions on setting up the device for development as given on the Android Developer's site:
http://developer.android.com/guide/developing/device.html
added android:debuggable="true" to my application manifest
USB debuggable is checked on the phone
downloaded the Device Drivers For Windows Revision 3 (this supports Nexus One phones)
Went through the Hardware Installation wizard to install the device - the device shows up as "Android Composite ADB Interface".
When I run adb devices on the shell, the device appears for a moment, then disappears.
On the Eclipse console, I get the following message:
[2010-11-13 11:54:42 - DeviceMonitor]Failed to start monitoring
I have rebooted the pc several times, uninstalled and reinstalled the drivers several times, but I get the same error each time. As I was researching this problem, someone had recommended rebooting the phone. I am a bit confused by that - is that a soft or hard reboot? Do I just power the phone off/on and is there something more complex involved? Do I have to hard reboot it to reset to factory version - even though its brand new?
Has anyone run into a similar problem? Any help on this would be great.
I can't test my application on the device if the adb cannot view the device. Thanks so much in advance.
I had this same problem. To get it working, do the following:
Close Eclipse
Open Task Manager and kill the adb.exe program.
Re-open Eclipse (Eclipse will automatically restart the adb.exe service)
Run adb devices from a command prompt and you should see something like the following:
C:\> adb devices
List of devices attached
0123456789ABCDEF device
Of course, I'm assuming you have your phone plugged into your computer.
It sounds like something is killing the service as soon as it starts. Try disabling any anti-virus and running adb devices again. You can also check your system logs for errors - run compmgmt.msc and check the Event Viewer's logs.
When I run adb devices on the shell, the device appears for a moment, then disappears
Do you mean Windows' command shell cmd.exe? The output of 'adb devices' doesn't update itself, it should just print out what's currently connected then terminate.
Nothing here worked for me. And you know what? I plugged it to my USB 3.0 port.
Just plug it to regular USB 2.0 and it'll work.
Hi you jst need upgrade your usb driver, follow this ref link, after upgrading you need to uncheck USB debugging, disconnect cable from device and then check USB debugging and connect cable to device again. this'll solve your problem..
link text
I had this same problem. Do the following:
Plug your phone into your computer and:
Run the command prompt.
Go to the tools location of the android sdk.
run 'adb kill-server'
then run 'adb start-server'.
Turn off COMODO Firewall and Defense+ module
I got my Nexus One on Windows 7 64 bit going by following these instructions:
http://developer.android.com/sdk/win-usb.html
Note that the directory has changed to /extras/google/usb_driver.
You know that you need to do this if you go to control panel->devices and printers and show properties on the device, and there's no driver shown.
Open the task manager by Ctrl+Shift+Esc
In the Processes select adb.exe and Click the End process Button.
Now close the eclipse and restart it again.
This worked for me. Hope this would work for you as well.