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:
Or even worse:
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.
A trivial solution would be to find the old adb.exe (e.g. C:\Program Files (x86)\HTC\HTC Sync 3.0\adb.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".
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.
|You can download ADBFix here:adbfix.zip|