I’m creating my first react-native project with this tutorial: http://facebook.github.io/react-native/
When it comes to executing code and running react-native run-android
I am getting:
adb server is out of date. killing...
* daemon started successfully *
And the app on the android device is obviously not working.
I’ve reinstalled the SDK, tried to adb kill-server
and adb start-server
, but nothing seems to work
I’m using Android 4.4 and Ubuntu 14.04
serv-inc
34.6k9 gold badges161 silver badges182 bronze badges
asked Apr 19, 2016 at 23:34
2
Open Android Studio, and then update all your build tools, install the SDKs that you need for your device and ensure that have you set ANDROID_HOME
env var to the same dir that you have in Android Studio (commonly in /home/you/Android/Sdk
), also update react-native-cli node package. Run adb kill-server
and adb start-server
.
Probably you will have problems with adb version, just change your bin:
sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
sudo chmod +x /usr/bin/adb
answered Jul 3, 2016 at 1:56
diegod3vdiegod3v
6546 silver badges7 bronze badges
1
In the latest adb
update the adb server is out of date. killing… message has been replaced with more informative adb server version (%d) doesn’t match this client (%d)
So this solution is applicable to both.
The root cause of the error is that your system has multiple adb
binaries of different versions) installed. These adb
binaries may come from different sources — distributed together with some development tools or even installed from your linux distribution official repository. I would strongly advise against using any of those sources. The official source of the most recent version of adb
is the platform-tools
package from the Android SDK. The adb
tag info page contains the direct links to the package.
So if you have Android SDK already installed — just update the platform-tools
package to the latest version using SDK Manager. If not — download and unpack the contents of platform-tools.zip
file for your platform to a folder. Add that folder to your $PATH
. Now kill all running adb
processes and make sure to find all other copies of adb
and delete them. In rare cases some software might stop working. In that case you would need either change that application’s internal setting telling it where to find the new binary or if the application uses hard-coded adb
location — just create a symlink to the new location.
That’s it. No more server/client version mismatches. Although you might need to repeat the procedure after installing another software which comes prepackaged with its own adb
copy.
answered Sep 10, 2016 at 1:01
Alex P.Alex P.
29.8k17 gold badges118 silver badges168 bronze badges
It might be that you installed the adb
package in addition to the SDK’s. In that case, a
sudo apt purge adb
might solve the problem.
answered May 17, 2017 at 15:27
serv-incserv-inc
34.6k9 gold badges161 silver badges182 bronze badges
0
I’m getting this error using ADB (1.0.32) and Genymotion (2.8.2). My solution was change the ADB of the VM, from my local Android SDK’s ADB to Genymotion ADB (default).
answered Oct 13, 2016 at 7:58
Juanjo SalvadorJuanjo Salvador
1,0551 gold badge12 silver badges33 bronze badges
If you are debugging your Android app on a phone or a tablet
over USB, you might get
the following message shown every time you (or your debugging
tool) runs ADB:
adb server is out
of date. killing…
* daemon started successfully *
Or even worse:
adb server is out
of date. killing…
* daemon started successfully *
** daemon still not runningerror: cannot connect to daemon
The message will make every small operation involving ADB
last 3-5 seconds, making deployment annoyingly slow and failing
most of the times.
This happens because your phone sync application (e.g. HTC
Sync) has its own version of
adb.exe that is incompatible with Android SDK. Every
time you connect your phone to a USB port, the sync application will try to
start its own version of adb.exe interfering
with your one.
The solution
A trivial solution would be to find the old adb.exe
(e.g.
C:Program Files (x86)HTCHTC Sync 3.0adb.exe) and
delete it.
However, this would break the sync application functionality.
To make things better we have developed ADBFix — a small tool
that you can download from this page. The tool
will detect the older instances of adb.exe that
are conflicting with Android SDK and replace them with a stub.
The stub will always run the adb.exe from
Android SDK instead, so no conflicts will arise.
To fix the «adb server is out of date» bug, please follow
these steps:
- Connect your device to the USB port
- Download and run ADBFix.
- Specify the location of your Android SDK.
- Ensure that ADBFix finds the conflicting version of
adb.exe: - Press «Fix all». Ensure that the conflict is marked as
«fixed»: - Note that you can always roll back the fix by selecting
an ADB instance and pressing «Restore original ADB».
The internals
When you start the tool, it will search for all instances of
adb.exe running (and potentially causing future
«adb server out of date» messages) and compare their versions
with the version of adb.exe from Android SDK. If a version
mismatch is found, the tool will rename the old adb.exe
to adb_conflicting_backup.exe and put a
shortcut to the adb.exe from SDK in place of the old adb.exe.
Thus, both Android SDK and your sync application (e.g. HTC
Sync) will use the same version of adb.exe causing no more
conflicts.
Note that when you click «Fix All» you will see the «adb
server is out of date» message, as adbfix will have to stop the
old adb.exe. Once it’s successfully stopped, the the new version
will be used and the annoying message won’t bother you again.
Download
License
ADBFix is free for commercial and non-commercial use.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS «AS IS» AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Fix adb server is out of date killing… Android
Last week I showed you how to fix the error adb server version doesn't match...
with Xamarin.Android — https://kimsereyblog.blogspot.co.uk/2016/11/fix-installfailed-error-adb-server.html when trying to deploy an application built in Xamarin.Studio to a Genymotion VM.
This was caused by two different versions of ADB being installed on the machine.
One installed during Xamarin installation and another one installed separately.
The solution was to set the ADB path in the options of Genymotion. I thought all was good but turns out there was another issue.
1. Problem
When running adb shell
, I had the following error in bash:
adb server is out of date killing...
2. Solution
Again the problem was due to my machine having two adb versions and the adb location in $PATH
was the wrong one.
In order to check verify that, I ran echo $PATH
and saw that the path was incorrect.
In order to rectify that, I modified the ~/.bash_profile
which is the script executed on each start of bash by removing the wrong path and adding the correct one.
vim ~/.bash_profile
export PATH=$PATH:/Users/kimsereylam/Library/Developer/Xamarin/android-sdk-macosx/platform-tools
After doing that, running adb shell
was all good!
Conclusion
Today we saw how we could fix adb server is out of date killing
which was happening because of a wrong adb path in $PATH.
Make sure the location of ADB is the same in Xamarin.Studio, Genymotion and bash $PATH!
Hope this helped! If you have any question, leave it here or hit me on Twitter @Kimserey_Lam. See you next time!
Other posts you will like!
- Build your own Line Chart for Xamarin.Forms (Part 2) — https://kimsereyblog.blogspot.co.uk/2016/10/build-your-own-line-chart-for_31.html
- Build your own Line chart for Xamarin.Forms (Part 1) — https://kimsereyblog.blogspot.co.uk/2016/10/build-your-own-line-chart-for.html
- Make a splash screen in Xamarin.Android — https://kimsereyblog.blogspot.co.uk/2016/10/how-to-make-splash-screen-with.html
- Make an accordion view in Xamarin.Forms — https://kimsereyblog.blogspot.co.uk/2016/10/build-accordion-view-in-xamarinforms.html
Popular posts from this blog
Verify dotnet SDK and runtime version installed
Verify dotnet SDK and runtime version installed To check your dotnet version installed, use dotnet —info . This command will display the SDKs and runtimes installed on your system together with the path where they can be found. For example on my Windows 10 development machine, dotnet —info will yield the following: > dotnet —info .NET Core SDK (reflecting any global.json): Version: 2.1 . 301 Commit: 59524873 d6 Runtime Environment: OS Name: Windows OS Version: 10.0 . 17134 OS Platform: Windows RID: win10-x64 Base Path: C:Program Filesdotnetsdk 2.1 . 301 Host (useful for support): Version: 2.1 . 1 Commit: 6985 b9f684 .NET Core SDKs installed: 2.1 . 4 [C:Program Filesdotnetsdk] 2.1 . 201 [C:Program Filesdotnetsdk] 2.1 . 300 [C:Program Filesdotnetsdk] 2.1 . 301 [C:Program Filesdotnetsdk] .NET Core runtimes installed: Microsoft.AspNetCore.All 2.1 . 0 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.A
A complete SignalR with ASP Net Core example with WSS, Authentication, Nginx
SignalR with ASP Net Core SignalR is a framework from ASP NET Core allowing us to establish a two way communication between client and server. This two way communication allows the client to send messages to the server but more importantly allows the server to push messages to the client. SignalR makes use of Websocket when available else it falls back to SSE or pulling. Today we will focus on how to setup SignalR to work with WSS, Websocket secure and how we can authenticate the user requesting to connect to our SignalR hub via Webscoket. Getting started with SignalR SSL encryption for Websocket Secure WSS Websocket Authentication with Identity Server 4 SignalR behind Nginx 1. Getting started with SignalR The Hubs are the main components of SignalR. It is an abstraction of a two way communication available for both client and server. Public functions from the hub can be called from the server code and can be called from the client. The frontend NPM package @aspnet/signalr
SDK-Style project and project.assets.json
SDK-Style project and project.assets.json Last week I encountered an issue with MSBuild while trying to run it from command line. The issue did not appear when using VisualStudio right click + build but only appeared when using msbuild.exe CLI directly with a clean project. Assets file ‘C:[…]objproject.assets.json’ not found. Run a NuGet package restore to generate this file. When I first saw the error, few questions came to my mind which I will share today in 3 points: Overview of project.assets.json Slim SDK-Style project Mixing SDK-Style project and old projects Special shoutout to @enricosada who provided me with all the answers regarding the SDK-Style project. 1. Overview of project.assets.json project.assets.json lists all the dependencies of the project. It is created in the /obj folder when using dotnet restore or dotnet build as it implicitly calls restore before build, or msbuid.exe /t:restore with msbuild CLI. To simulate dotnet build (re
Introduction
If you have been debugging some Android apps on an HTC phone, you have probably noticed the annoying message that is shown when you try to debug a phone over USB on a computer running HTC Sync:
adb server is out of date. killing... * daemon started successfully *
The message is usually accompanied by 3-5 seconds of waiting time and can appear several times before you manage to start debugging. The worst thing is that sometimes it does not manage to restart the daemon and aborts the launching after 10-20 seconds of waiting with a message like that:
adb server is out of date. killing... * daemon started successfully * ** daemon still not runningerror: cannot connect to daemon
Although the problem seems almost random, there is a simple explanation to it and a clean way of fixing it.
ADB stands for Android Debug Bridge. It is a tool that is used by Android environment to do a variety of tasks: list connected devices, transfer files between them, establish TCP/IP connections… The last feature is directly used by the HTC Sync application to communicate with the phone over USB.
Let’s now see what exactly happens when you connect your phone and try to debug it.
- HTC Sync (more specifically, htcUPCTLoader.exe continuously running in the background) detects that you have connected a device and tries to forward a TCP/IP port to it. To do so, it runs the adb.exe from its own folder and tells it to start mapping the port. The adb.exe keeps on running in the background providing the port map for HTC Sync.
- When you start debugging with the Android SDK, it does several minor jobs (e.g. lists devices, deploys your App, etc) each involving a call to its own adb.exe. When this happens, the newer adb.exe detects that the older adb.exe from HTC Sync is running and terminates it, then it runs its own instance.
- The HTC Sync running in the background detects that the port mapping has been broken and tries to restart it. What happens then? Right, adb.exe from Android SDK gets kicked off. If this happens before the adb.exe from SDK manages to complete, you get an error message and your debugging fails.
The Solution
First of all, we need to find the old instance of adb.exe that interferes with Android SDK. This can be done by opening Task Manager, finding adb.exe there and selecting “Properties”. Do not forget to connect your phone to USB before doing that.
A trivial solution then would be to delete/rename the adb.exe used by HTC Sync. However, this would break HTC Sync.
Another one is to kill or suspend htcUPCTLoader.exe for the time you are debugging your app. This will prevent it from interfering with the adb.exe from the Android SDK.
Finally, you can make a simple stub that reads the location of the real ADB.exe from the Registry and runs it with the original command line:
#include "stdafx.h" #include <bzscore/Win32/registry.h> using namespace BazisLib; int _tmain(int argc, _TCHAR* argv[]) { wchar_t *p = GetCommandLineW(); if (p[0] == '"') p = wcschr(p+1,'"'); else p = wcschr(p, ' '); if (!p) p = L""; else p+=2; wchar_t *pwsz = new wchar_t[512 + wcslen(p)]; String ADBPath = RegistryKey(HKEY_CURRENT_USER, L"SOFTWARE\Sysprogs\ADBFix", 0, false)[L"SDKPath"]; if (ADBPath.empty()) ADBPath = L"adb_noadbfix.exe"; else ADBPath += L"\platform-tools\adb.exe"; swprintf(pwsz, L""%s" %s", ADBPath.c_str(), p); STARTUPINFO info = {sizeof(info), }; PROCESS_INFORMATION PI; CreateProcess(0, pwsz, 0, 0, 0, 0, 0, 0, &info, &PI); WaitForSingleObject(PI.hProcess, INFINITE); DWORD exitCode = -1; GetExitCodeProcess(PI.hProcess, &exitCode); return exitCode; }
You can rename the adb.exe in the HTC Sync directory to adb_noadbfix.exe and put the stub instead of the original file.
Sometimes ADB does not work and the following error is reported.
C:Usersgaojs>adb devices
adb server is out of date. killing…
ADB server didn’t ACK
* failed to start daemon *
error: unknown host service
Port 5037 was found to be occupied with the following command.
C:Usersgaojs>adb nodaemon server
cannot bind ‘tcp:5037’
You can find out what processes are occupying this port with the following command.
C:Usersgaojs>netstat -ano | findstr “5037”
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 21152
TCP 127.0.0.1:5037 127.0.0.1:62629 ESTABLISHED 21152
TCP 127.0.0.1:5037 127.0.0.1:63942 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:63943 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:63944 TIME_WAIT 0
TCP 127.0.0.1:62629 127.0.0.1:5037 ESTABLISHED 2980
You can see exactly what the process of the above PID is with the following command.
C:Usersgaojs>tasklist | findstr “2980”
QQ.exe 2980 Console 4 60,712 K
C:Usersgaojs>tasklist | findstr “21152”
tadb.exe 21152 Console 4 2,136 K
Kill tadb.exe (PID:21152) with the following command.
C:Usersgaojs>taskkill /f /pid 21152
Then, try again, and it works as follows.
C:Usersgaojs>adb devices
* daemon not running. starting it now on port5037*
* daemon started successfully *
List of devices attached
4dfadcb86b00cf05 device