adb shell immediately terminates I have an emulator that I started with:

~/Android/Sdk/emulator/emulator -avd Nexus_5X_API_25_x86 &amp;


I run "adb shell" and it enters the shell for about 4 seconds and then it terminates:

me@mycomp:~/codec/vlc-x86-android-master$ adb shell
adb server is out of date.  killing...
* daemon started successfully *
generic_x86:/ $ me@mycomp:~/codec/vlc-x86-android-master$


what might be the problem?
This usually happens if multiple instances of adb are running.
Many OEM's sync applications (e.g. HTC sync or droid explorer) runs adb automatically so you will get the error. 

Kill all these instances beforehand from task manager and then start an adb server.

Or uninstall these sync application and everything will work fine.

If you want to use the sync application also then download adb fix from this link.