I have definitely encountered that error message when trying to connect to a Genymotion VM using the Android SDK platform-tools ADB instead of using the Genymotion-provided version; however, I have not attempted to configure Genymotion to use the Android SDK-provided ADB.
I would try connecting with the Genymotion-provided version. It sounds like Genymotion may not be respecting the configuration you put in place.
This is the issue I have observed:
As shown in that screenshot. This issue definitely occurs when you attempt to connect with a version of ADB that does not match the version being used by Genymotion.
To confirm which version is being used by Genymotion (i.e., to make sure it is respecting your configurations), run the following:
netstat -tlpn | grep -i adb
That should tell you the process ID of the ADB server that is listening for connections. Using that process ID, we can determine which version of ADB is executing via ls -la /proc/ADB_PROCESS_ID/
(Obviously, substitute in the numerical process ID.)
For example, I can see that the ADB server running on my side is /opt/genymobile/genymotion/tools/adb
, as is pictured below:
If Genymotion does appear to be using the version of ADB you expected it to use, then you might want to run which adb
and subsequently readlink "$(which adb)"
. If that result is unexpected, then you should either make sure the directory to the correct adb
appears sooner in your PATH
environment variable, or you could try adding an alias for adb which points explicitly to the correct path. (I would probably append to the front of the PATH
rather than using an alias, since other applications you run will be more likely to respect the PATH
than they will to respect an alias.)
If you find that the ADB path Genymotion refers to is different than the path ADB refers to, and you decide to resolve this by modifying your PATH
, then you should modify the .bash_profile
file in your home directory to add the following line (modify where necessary) to the bottom:
export PATH="/path/to/adb-directory:$PATH"
After that, you may need to run source ~/.bash_profile && hash -r
and for the change to take effect. After that, if everything worked correctly, running the which adb
command above should show the desired path to ADB.