That is the error I get. I don't know why. I am connected. Well at this point I don't know if it refers to another kind of "offline" stuff.
I didn't find any answers to this specific error
09/19 02:49:11: Launching 'app' on samsung SM-J710MN. Installation did
not succeed. The application could not be installed. Installation
failed due to: 'device offline'
There are two possible reasons for this behaviour. Either your Samsung device is faulty or this is an adb issue. To confirm, enter this command into your terminal while your Samsung device is connected:
adb devices
If the result returns the name of your Samsung device, then there's probably a problem with the Samsung device.
However, if your terminal does not recognize this command, it means you have to install Samsung adb driver on your computer. This way, your computer would easily recognize your Samsung device. For Windows, there are a ton of links out there where you can download Samsung adb driver; I have not verified any of them, so you might have to do the search by yourself. Nevertheless, I hope you understand the problem now.
I hope this helps.
Merry coding!
Can you run the following codes in the terminal and share the result?
adb devices
You can also try this method
adb kill-server then adb start-server
GO to avd manager now you are able to see installed avd. from that actions select wipe data, and run your project. this Worked for me.
I can't connect to my device anymore using ADB through the command line or in Eclipse.
Running the command
adb devices
returns the device name, but it says it's offline.
Things I've tried.
Toggled Android debugging mode
Reinstalled the Google USB driver
Restored the OS to a previously working backup (CyanogenMod)
Swapped the USB cord
Rebooted the phone/computer multiple times
Updated the Android SDK
I really don't have any clue what's going on. Anything else you think I can try, I'm all ears.
To be clear, if you're having this same issue the problem is probably an out-of-date SDK. As of 4.2.2 there is a security feature that requires you to confirm the RSA fingerprint of the connecting device. Open the SDK manager and update the tools! Then reboot.
Just kill the server adb kill-server
I just got the same problem today after my Nexus 7 and Galaxy Nexus were updated to Android 4.2.2.
The thing that fixed it for me was to upgrade the SDK platform-tools to r16.0.1. For me, this version was not displayed in my SDK Manager, so I pulled it down from http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip directly.
You then need to rename the platform-tools directory and unzip it to android-sdk-windows/platform-tools. Using the SDK Manager, I had also updated to the latest sdk-tools before this.
If your whole Eclipse and ADT are ancient, you may need to update them as well, but I didn't need to.
Note: you may need to run SDK Manager twice (once to update itself) before you will see the latest packages.
It also seems to occur frequently when you connect to the device using the Wi-Fi mode (in Android Studio or in the console by running adb tcpip 5555 for example).
To fix:
Disconnect the USB connection—or turn off the device's Wi-Fi if you're connected over Wi-Fi.
Close Android Studio/Eclipse/other IDE.
Run adb kill-server to ensure adb is not running.
Restart your Android device.
After your device restarts, connect it via USB and run adb devices. This should start the ADB daemon. Your device should now be online again.
I hit the same issue on a Nexus 7 running 4.2.2 OTA update. I'm almost certain I had an ADB connection over USB and Wi-Fi after the update until it just stopped working. To fix, I updated my SDK using:
android update sdk --no-ui
Now my development tools are:
SDK rev 16.0.2
SDK tools rev 21.1
SDK API 17, rev 2
I can't stress that switching USB ports is key. Often front panel USB ports can be defective.
For anyone wondering about 4.2.2, there is a security question that appears on the phone requesting RSA verification with the PC. Be sure your tools are updated AND you allow the PC access by verifying the security question on the devices in question. This fixed it for me.
And as always, verify you have debugging enabled in the developer options ;)
Try by turning off usb debugging once and then enabling it agin and then connect your device with system: link
Multiple adb.exe files ?
My problem was solved when deleted a copy of OLD adb.exe from C:/Windows/.
I don't know how a copy of adb.exe got to the C:\Windows\ ?
When I launch adb.exe from android-sdk/platform-tools/ I had no problem with detection.
If your device normally connects over USB, but suddenly stops working, especially after the USB cable has been disconnected and reconnected, try the following non-invasive steps before doing some of the more drastic things mentioned in the other answers:
adb kill-server
adb start-server
adb devices
If your device is listed with 'device' next to it, you're back in business.
If your device is listed with 'offline' next to it, try restarting the device. The ADB daemon on the device will occasionally get hung. I've noticed this more when I've disconnected the cable while LogCat is running and after switching back from connecting via Wi-Fi or Ethernet.
If your device isn't listed then you should try the solutions in the other answers, starting with trying a different USB cable and port. Those cheapo cables can go bad.
I was having this problem and none of the other answers helped. What was necessary, after updating the SDK and installing the API for 4.2.2, was running:
android update adb
Another problem I was having was that I was trying to connect ADB over Wi-Fi, which is my only option because the USB ports on my Mac are really finnicky. Unfortunately, ADB over Wi-Fi doesn't show the security question in 4.2.2, so you need to find a USB cable that'll work and connect over USB at least once to accept the security question, but after you do that once, you can connect over Wi-Fi.
Be sure to use adb from your platform-tools folder, after updating the SDK tools.
I finally got this working after I realized I was using an outdated version of ADB copied in /usr/bin.
I ran to through same problem this fixed for me. connect your phone via usb first then make sure you check your mobile ip which is under settings >> about phone >> status run the following commands.
adb kill-server
adb start-server
adb tcpip 5555 //it resets port so put port you want to connect
adb connect 192.168.1.30:5555 //ip:port of your mobile to connect
adb devices //you will be connected over wifi
Sometime this may happen because of adb server error (i think). It always saying
"device-name is offline" from adb devices command.
Just kill server and start again. It worked for me.
"adb kill-server"
"adb start-server"
I used adb connect <device_ip> and non of the other solutions worked because my problem was on the other side. On the device I needed to stop adbd and restart it start adbd. Device is now "online" again.
I stumbled upon this question while trying to connect using the built in "Wireless ADB" feature present in Android 11.
I couldn't get it to connect properly. Always appeared as "offline".
What I did was following:
Firstly disconnect all ADB devices, just as a good measure:
adb disconnect
Then in the developer options, get into the "Wireless ADB" feature, if you're not already there yet. Go to "Pair using PIN" or similar. There, a IP and port will pop up in a dialog, together with a pin. Connect to the phone using:
adb pair 192.168.2.xxx:42838 # Put the IP and port of that dialog in this way
(Note that the port on the main window and on the PIN popup is NOT the same)
Your (PC) ADB will prompt you for a pin. Type it in and press ENTER.
Done that, the PIN popup on the phone should vanish and the computer name should show up in the trusted device list in the main window.
If you come this far, the next step will certainly work. Try to now connect to your phone using:
adb connect 192.168.2.xxx:53548 # This time use the port shown in the main window!
It should connect and you're good to go.
I tried dturvene and all the other solutions, but they didn't work. I needed one more step.
Run these commands
adb kill-server
android update sdk --no-ui
adb start-server
To verify that it worked, run 'adb version' before and after the commands and make sure it is the latest. The reason for the adb kill-server command is that it it most likely running, and it can't be updated while it is running, so you have to kill it first.
Installed the latest android sdk.
Changed the USB port of the device.
Changed from MTP -> Charge only -> MTP.
It worked.
For me nothing worked. I spent about 12 hours constantly searching on the Internet and trying the solutions that worked for other people having similar issues.
Finally I ended up with just doing the ADB stuff over the LAN. The setting was right next to the USB Debug setting and in ADB it can be activated with "adb connect [IPADDRESS]:[PORT]". The port was 5555 on my phone.
I hope this helps someone to get back to work instead of having to deal with constant drawbacks.
This approach worked for me:
adb kill-server
Disable the offline device in Device Manager (see image below)
Enable the device in Device Manager
adb start-server
Device Manager, "View" menu, "Devices by Connection":
I initially encountered the same problem (with ADB/fastboot downloaded from GitHub), but I eventually got it to work. What worked for me:
Android SDK. ADB version: 1.0.31
Using the front USB port (MacBook Pro 15")
Restarting the phone after enabling Dev options and USB debugging (do so by 7x tap on settings > about phone > build).
Kill adb server in case no device is listed (adb kill-server)
The debug icon should be visible on the phone.
Be sure to unlock lock-screen to check for the RSA fingerprint confirmation dialog.
One more possibility for people with flaky ADB connections, and if they're on a Mac and have Android File Transfer installed: I found that file transfer was interfering with my ADB connection, causing it to stop working intermittently.
Killing the Android File Transfer Agent.app process that looks for compatible devices (for example, the Nexus 7) being connected to the Mac cures the flakiness for me.
If you've previously authorized the RSA fingerprint of your PC and tried adb kill-server etc. with no luck, your problem might just be that you're trying to connect to it while it's locked. Try pressing the screen-on button and entering your pattern - this fixed it for me.
The best way I figured is by disabling and then enabling the device from Device Manager and running the adb devices command.
Go to the start tab and right click on Computer
From the drop down menu, click Manage
From the computer management screen, click Device Manager
On the right pane, expand portable devices to find your device
Right click on your device name and click disable on the drop down menu
When it gets disabled, repeat step 5 except for enabling it.
The device will be back online. It's faster.
As nobody gave an answer for my situation: you may not have access to the ~/.android/adbkey file. If you initially start adb with sudo, it will generate a public key pair, writing this to ~/.android/adbkey.pub and ~/android/adbkey. Of course, the private key is chmod 600 - only readable for root in your home directory. Subsequently starting adb as normal user will give no access to the private key file, which in turn will fail silently with "device offline".
What solved for me on Mac was updating adb to the latest version (1.0.32). Now i can see my device online again
The reason for a device to be reported as offline is that adb can not connect to it. Adb executable from the development environment creates a connection (socket) with the device under control. The device has a service (daemon) that listens for this communication. The daemon is called adbd (as in adbdaemon).
When one enables adb on a device in fact one starts this daemon, so comms can be established with the device.
When the device is reported by adb as offline is because the daemon is not running anymore or is in a state that will not accept connections. Most often than not this happens if the network goes down on an active (network) connection.
The only way that I could fix this was by rebooting the device.
One can arrive to fixing the offline status by many other means but restarting the device always works.
When I am facing the same issues than doing like below:
Restart adb by issuing adb kill-server followed by adb start-server in a command prompt
Disable and re-enable USB debugging on the phone
Rebooting the phone if it still doesn't work.
99% of my issues have been resolved with these steps.
I have a dodgy USB connection so I tried to get wifi connectivity going. Tried basically everything here, but one thing I did not try until last, and suddenly it worked! So, if you end up stuck, try these steps:
1. Connect with USB cord
2. adb devices
List of devices attached
HT85X1A00342 device
10.0.0.43:5555 offline
3. adb usb
restarting in USB mode
4. adb reconnect
reconnecting HT85X1A00342 [device]
5. adb tcpip 5555
restarting in TCP mode port: 5555
6. adb devices
List of devices attached
7. adb connect 10.0.0.43:5555
connected to 10.0.0.43:5555
Sweet! I don't know exactly if forcing it to restart USB mode then TCP/IP in sequence helped, or just the last three commands, but clearly it started working. I also found there's a Developer Option to Enable Debugging on Wifi, and you select your hotspot. That may also prevent it working, so check that as well.
Good luck!
I tried all of the solutions above. Mostly, adb kill-server would solve the problem. This time, the problem was in USB cable. Poor quality cables in fancy packing don't work.
It's just because your computer doesn't have the right driver. To fix that:
Download and extract Android SDK
Go to Device Manager (Right Click on Computer --> Properties --> Device Manager
On the right pane expand portable devices to find your device
Right click on your device name and click Update Driver Software
Browse my computer for driver software
Browse to your Android SDK folder on step 1.
Next and you're done
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 use "adb devices" to get following result. Only one device is connected to PC by USB, but we get 8 lines of result.
Could anyone suggest the reason?
WH96TNE00361 offline
WH96TNE00361 offline
WH96TNE00361 offline
WH96TNE00361 offline
WH96TNE00361 offline
WH96TNE00361 offline
WH96TNE00361 offline
WH96TNE00361 offline
Try the following:
Unplug the usb and plug it back again.
Go to the Settings -> Applications -> Development of your device
and uncheck the USB debugging mode and then check it back again.
Restart the adb on your PC.
adb kill-server
and then
adb start-server
Restart your device and try again.
To complete the previous answers, another possible solution is to change the USB socket in which your cable is plugged in.
I had this problem (with the classical answer about using adb kill-server / start-server not working) and it solved it.
Actually, it took some time to find that because Windows was correctly recognizing the device in my first socket. But not ADB. As Windows was recognizing the device, I had no real need to test other USB physical sockets. I should have.
So you can try to plug the cable in all your USB physical sockets directly available on your computer. It did worked for me. Sometimes the USB sockets are not managed the same way by a computer.
Beginning from Android 4.2.2, you must confirm on your device that it is being attached to a trusted computer. It will work with adb version 1.0.31 and above.
adb kill-server
adb start-server
that solved my problem
I've had a similar issue with one of my phones.
I was unable to connect and use usb debugging on any of my computers.
In the end, I had to restart the usb debugging on the phone manually [doing so using the Developer menu was not enough].
There's only one command you have to run on your phone [I did it using Terminal Emulator app]:
adb usb
And that was it.
Hope this helps someone in the future.
You may also try downloading newest version of adb http://developer.android.com/tools/help/adb.html
Reboot the device. This always fixes it on Mac OS, whereas adb kill-server does not.
On my Galaxy Nexus with Android 4.2.2, I had the same problem initially, 'adb devices' was showing the device but with offline status (USB debugging was initially active on my device).
These are the steps I took to remedy the situation :
Disable USB debugging (Device not connected to PC)
Re enable USB debugging
Now connect to your PC, now a pop up on the device (not on PC) will ask you for authenticating the PC, Thats it...
adb devices now lists both device id and no offline.
I post here my question just in case is helpful for somebody else.
My problem was that my colleague was connected to the same device and I was not able to connect to the same device.
Note: I had this problem with Amazon Fire TV connecting over Wifi.
There are 2 solutions:
Easy to "drop" his connection (sorry buddy :)
Restart the device
adb kill-server
adb start-server
adb connect device-ip
A bit more difficult but two clients can use the same device (use different TCP ports)
Please look at this answer
For me with Android 4.1.1 only rebooting device works
Run SDk Manager and install Android SDK Tools and Android SDK Platform-tools updates. ADB must be updated to a new version for 4.2.x
I had the same issue and none of the other answers worked. It seems to occur frequently when you connect to the device using the wifi mode (running command 'adb tcpip 5555'). I found this solution, its sort of a workaround but it does work.
Disconnect the usb (or turn off devices wifi if your connected over wifi)
Close eclipse/other IDE
Check your running programs for adb.exe (Task manager in Windows). If its running, Terminate it.
Restart your android device
After your device restarts, connect it via USB and run 'adb devices'. This should start the adb daemon. And you should see your device online again.
This process is a little lengthy but its the only one that has worked everytime for me.
Had this on client's machine it turned out he had an out of date version of adb installed via website offering adb and fastboot. The client in question didn't want to install the whole SDK because of perceived bloat :S .
So if you're seeing offline make sure you've downloaded and using the latest adb. I ended up emailing him adb executable.
Also worth checking that the adb you are using is the correct one in the Path. i.e on Mac
$ which adb
/Users/me/dev/adt-bundle-mac-x86_64/sdk-macosx/platform-tools/adb
if non of the steps work from the above. my device still offline after connected through wifi. i did the following:
go to your device...
go to settings.
go to developer options.
Allow adb debugging in charge mode only.
repeat the steps as you always do . which is:
a. connet your usb on chargemode only.
b. open command write:
- adb tcpip 4455
- adb connect 192.168.1.11:4455
b. disconnect usb.
now everythings work for me .
make sure the device is set for usb debugging
Have the adb client running (e.g. via "adb usb" or adb start-server"
LEAVE the device connected via usb!!!
AND THEN reboot the device.
This always brings my Motorola MB525 "online" again, after adb complains it would be "offline". I'm using OSX btw.
I made adb working on Android 4.4.2 with GT-N8010 (Samsung tablet) after setting device in authorized mode once upgraded adb to SDK version.
~/local/opt/Android/Sdk/platform-tools/adb
Android Debug Bridge version 1.0.32
While It did not work using :
adb version
Android Debug Bridge version 1.0.31
Shiped in Ubuntu LTS version :
apt-cache show android-tools-adb | grep Version
Version: 4.2.2+git20130218-3ubuntu23
This link may help then
Can't connect Nexus 4 to adb: unauthorized
After wasting hours on it, I have updated my version of adb and now adb devices shows my device online and I can run the app on it again.
also make sure adb isn't running in your processes automatically. If it's there right click open file location, figure out what is starting it, kill it with fire. Run the updated adb from an updated android sdk platform tools. This was the issue with mine, hope it helps someone.
What did me in is was that multiple unrelated software packages just happened to install adb.exe -- in particular for me (on Windoze), the phone OEM driver installation package "helpfully" also installed adb.exe into C:\windows, and this directory appears in %PATH% long before the platform-tools directory of my android SDK. Unsurprisingly, the adb.exe included in the phone OEM driver package is MUCH older than the one in the updated android sdk.
So adb worked just fine for me until one day something caused me to update the windows drivers for my phone. Once I did that, absolutely NOTHING would make my phone status change from "offline" -- but the problem had nothing to do with the driver. It was simply that the driver package had installed a different adb.exe - and a MUCH older one - into a directory with higher precedence.
To fix my installation I simply altered the PATH environment variable to make the sdk's adb.exe have priority.
A quick check suggested to me that "lots" of different packages include adb.exe, so be careful not to insert an older one into your toolchain unintentionally.
I must really be getting old: I don't ever remember such a stupid issue taking so endlessly long to uncover.
Check that the ADB version that you are running is newer than the version of the OS on the connected devices. For me, updating the ADB helped to get the device online.