Whenever I try to run adb devices
:
$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
It says daemon is not running and restarts the daemon.
Then, if I run adb devices again, it does the same thing -
$ adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
Then, if I run it again, it again does the exact same thing -
$ adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT0ANRV05740 device
Please help!!
Also, my DDMS keeps giving me the following message -
[2011-02-23 16:17:05 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
Here are the logs from just before adb restarts -
1291 locapi_rpc_glue V loc_ioctl
1291 RPC D written RPC packet size: [480]
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [28]
1291 lib_locapi V qct_loc_eng_inject_xtra_data, inject part = 100, len = 167, len = 167
1291 lib_locapi V qct_loc_eng_inject_xtra_data, total part = 100, len = 167
1291 locapi_rpc_glue V loc_ioctl
1291 RPC D written RPC packet size: [248]
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [28]
1291 lib_locapi D qct_loc_eng_inject_xtra_data: injected 39767, SUCCESS
1291 lib_locapi V inject_xtra_waiting = flase
1291 GpsLocationProvider D Releasing wakelock
1291 WifiService D releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@47aead50}
1291 WifiService D enable and start wifi due to updateWifiState
1218 rmt_storage I rmt_storage open event
1218 rmt_storage I rmt_storage client thread started
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage register cb event
1218 rmt_storage I rmt_storage status id = 2
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage open event
1218 rmt_storage I rmt_storage client thread started
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage register cb event
1218 rmt_storage I rmt_storage status id = 2
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage write event
1218 rmt_storage I unblock rmt_storage client thread
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I rmt_storage write: bytes written = 3145216
1218 rmt_storage I rmt_storage write: bytes written = 512
1218 rmt_storage I rmt_storage status handle = 1
1291 BatteryStatsImpl I notePhoneSignalStrengthLocked: 4->3
1218 rmt_storage I rmt_storage write event
1218 rmt_storage I rmt_storage events processing done
1218 rmt_storage I unblock rmt_storage client thread
1291 PowerManagerService D New lightsensor value:40, lcdValue:143
1291 PowerManagerService D lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3
1218 rmt_storage I rmt_storage write: bytes written = 3145216
1218 rmt_storage I rmt_storage write: bytes written = 512
1218 rmt_storage I rmt_storage status handle = 2
1291 RPC D read RPC packet
1291 RPC D read RPC packet size: [80]
1291 locapi_rpc_glue V Callback received: 80 (cb_id=0x50B0000 handle=1)
1291 RPC D written RPC packet size: [28]
1470 usicWidgetController D unbindMusicPlaybackService()
1707 MediaPlaybackService E BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0
1291 NotificationService V Battery Full, Charging
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0 0,len=3
1291 lights E write ok string=1,len=1
1707 MediaPlayer.java D setOnCompletionListener being cleaned to null
1291 lights E write ok string=0,len=1
1291 lights E write ok string=0 0,len=3
1291 NotificationService V Turn off Jogball/OJ LED
1291 NotificationService D cancelNotification, ACTION_NOTIFICATION_REMOVE,pkg=com.htc.music,id=1
1291 AudioService I AudioFocus abandonAudioFocus() from android.media.AudioManager@476ddee0com.htc.music.MediaPlaybackService$5@476dd838
If the device you're trying to interact with is a physical phone connected via USB, you can unplug it and plug it back and and it should work. Sometimes it just gets out of sync I think.
System: Windows 7, Android Studio.
This error occurred when I ran
adb devices
from Windows Commandline.The root cause was that the adb I was running from commandline was not the same adb running from Android Studio.
Solution:
First kill all running adb processes on the machine.
taskkill /F /IM adb.exe
Run your app from Android Studio.
Locate the exact File Location of adb.exe either from Windows Task Manager, OR by running the command below
wmic process where "name='adb.exe'" get ProcessID, ExecutablePath
On Windows Command prompt, run
where adb
to locate the adb that runs from command prompt. This path would be different from the one in Step 3 above.Edit Windows system variable PATH. Delete the base path found in Step 4 from it.
After you have edited PATH, you can see the current contents of this variable by typing below command in a NEW command prompt (don't use old prompt.)
echo %PATH%
Now, run adb from command prompt. It should NOT show any "server out of date error"!
Okay, there is another instance of adb.exe distributed with "Lenovo Photo Companion". A friend of mine has a Lenovo Yoga notebook and had this software installed which includeded another adb.exe
Deinstalling it solved the problem.
Are you using Genymotion for a virtual device?
if yes this error probably came out because ADB from Genymotion conflicted with your ADB from Android SDK(using same port number), to fix this simply go to
settings
=> chooseADB
tab => click on the optionUse custom Android SDK Tools
and set your SDK folderafter you configure this, try to restart your adb by going into folder
platform-tools
whichadb
placed and do this command:./adb kill-server
./adb start-server
*tips: You may close the process of Genymotion before running the command above
Hope this help.
In my machine (Ubuntu 14.04 and Genymotion 2.5.2) the source of the problem was that, I had 2 adb files of different versions.
(Before, narrowing down this problem source, I already had Genymotion's Settings > "Use custom Android SDK tools" referring to my machine's installed Android SDK directory as advised by Aditya Kresna Permana. I also tried with killing and starting the adb server and few other solutions from around the web).
Then saw, that running
adb version
from my Android SDK installation directory “~/Android/Sdk/platform-tools” produced - "Android Debug Bridge version 1.0.32"But,
adb version
command from “/usr/bin” directory produced- “Android Debug Bridge version 1.0.31"So just followed - http://bernaerts.dyndns.org/linux/74-ubuntu/328-ubuntu-trusty-android-adb-fastboot-qtadb to update the adb in “/usr/bin”
And now running
adb devices
works perfectly as expected.And it also solved the associated problem that, before my PhoneGap (Cordova) app was not getting integrated with the Genymotion's virtual device. Now obviously that problem solved as well.
Try this:
Close the Eclipse application.
adb kill-server
Restart Eclipse.