Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
104.83k stars 10.19k forks source link

adb server version (41) doesn't match this client (40) #527

Closed fabriziocacicia closed 5 years ago

fabriziocacicia commented 5 years ago

I'm facing this error starting from today:

adb server version (41) doesn't match this client (40); killing...
ADB server didn't ACK
Full server startup log: /var/folders/0q/jh77wwcx1cs989k89kv79mqr0000gn/T//adb.501.log
Server had pid: 34316
--- adb starting (pid 34316) ---
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] Android Debug Bridge version 1.0.40
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] Version 28.0.2-5303910
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] Installed as /usr/local/bin/adb
adb I 05-09 21:30:11 34316 4407796 main.cpp:56] 
adb I 05-09 21:30:11 34316 4407799 usb_osx.cpp:308] reported max packet size for ce061716d90b602a027e is 512
adb I 05-09 21:30:11 34316 4407796 auth.cpp:405] adb_auth_init...
adb I 05-09 21:30:11 34316 4407802 transport.cpp:283] ce061716d90b602a027e: read thread spawning
adb I 05-09 21:30:11 34316 4407803 transport.cpp:296] ce061716d90b602a027e: write thread spawning
adb I 05-09 21:30:11 34316 4407796 transport.cpp:1334] fetching keys for transport ce061716d90b602a027e
adb I 05-09 21:30:11 34316 4407796 auth.cpp:457] Calling send_auth_response
adb I 05-09 21:30:11 34316 4407796 adb.cpp:114] ce061716d90b602a027e: offline
adb server killed by remote request
adb I 05-09 21:30:14 34316 4407796 transport.cpp:339] BlockingConnectionAdapter(ce061716d90b602a027e): stopping
adb I 05-09 21:30:14 34316 4407796 usb_osx.cpp:561] Kicking handle
adb E 05-09 21:30:14 34316 4407802 usb_osx.cpp:541] usb_read failed with status: e00002eb
adb I 05-09 21:30:14 34316 4407802 transport.cpp:287] ce061716d90b602a027e: read failed: Undefined error: 0
adb I 05-09 21:30:14 34316 4407802 transport.cpp:676] ce061716d90b602a027e: connection terminated: read failed
adb I 05-09 21:30:14 34316 4407796 transport.cpp:357] BlockingConnectionAdapter(ce061716d90b602a027e): stopped

* failed to start daemon
adb: error: failed to get feature set: cannot connect to daemon
2019-05-09 21:30:14.285 scrcpy[34314:4407786] ERROR: "adb push" returned with value 1

I attached the content of /var/folders/0q/jh77wwcx1cs989k89kv79mqr0000gn/T//adb.501.log adb.501.log

ozzono commented 3 years ago

The idea is to set the environment variable ADB (which is read by scrcpy).

In a shell (typically on linux), you can set the variable for a single command:

VAR=value command

On Windows, you can set it globally in Windows preferenced, but you can also set it locally:

set VAR=value
command

So:

set ADB=C:\path\to\adb.exe
scrcpy

Since I'm using linux, my solution was similar to yours. I added the following line into my .profile: export ADB=$HOME/Android/Sdk/platform-tools/adb

mbfakourii commented 3 years ago

@rom1v please add new adb in new version

Ragner16 commented 3 years ago

1.Ensure there is no other copy of abd in your machine. 2.Add environment variable adb.exe and give path as value

  1. Run command prompt as admin

It worked for me this way! image

cingh-jasdeep commented 2 years ago

Sat Sri Akal ji

I had 2 adb's in my mac

found them using FindAnyFile and replaced android studio version in both places.. problem solved!

hadeer97 commented 2 years ago

It work for me

  1. adb version Android Debug Bridge version 1.0.39 Version 1:8.1.0+r23-5 Installed as /usr/lib/android-sdk/platform-tools/adb
  2. adb kill-server
  3. ps ax | grep adb 12290 ? S 0:00 /home/usuario/Android/Sdk/platform-tools/adb devices -l 12291 ? Ssl 0:00 adb -L tcp:5037 fork-server server --reply-fd 7 12332 pts/1 S+ 0:00 grep --color=auto adb
  4. cd /home/usuario/Android/Sdk/platform-tools
  5. mv adb adbxxx
  6. ln -s /usr/lib/android-sdk/platform-tools/adb adb
  7. Restart Android Studio

thanks for you , it worked will

tekle12 commented 2 years ago

OKEY Just locate the android studio build tools folder in settings of Genymotion , to use the same adb version meaning both the Android studio and the Genymotion emulator, so go for settings in genymotion under setting expand adb then set the folder location.

On Sun, Jan 26, 2020 at 10:55 PM reevrm @.***> wrote:

Help me. I try installing scrcpy on Deepin Linux when i run scrcpy it show INFO: scrcpy 1.12.1 https://github.com/Genymobile/scrcpy [100%] /data/local/tmp/scrcpy-server.jar [server] ERROR: Exception on thread Thread[main,5,main] java.lang.IllegalArgumentException: The server version (1.12.1) does not match the client (1.12) at com.genymobile.scrcpy.Server.createOptions(Server.java:78) at com.genymobile.scrcpy.Server.main(Server.java:162) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:388) Is there something I did wrong while installing it? i am using 1.12.1 prebuild server

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Genymobile/scrcpy/issues/527?email_source=notifications&email_token=AMUKEZPMWMHMLTOI4IO4J63Q7XTB3A5CNFSM4HL5MNC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ54LCA#issuecomment-578536840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMUKEZKYJ6H3T6472IU3WKLQ7XTB3ANCNFSM4HL5MNCQ .

LeonardoCalazans commented 2 years ago

Link in Stack Overflow

Got a quick way to do it First sudo rm /usr/bin/adb

Then sudo ln -s /home/{{username}}/Android/Sdk/platform-tools/adb /usr/bin/adb Fastest way to fix the issue

hugo-zaz commented 2 years ago

Link in Stack Overflow

Got a quick way to do it First sudo rm /usr/bin/adb

Then sudo ln -s /home/{{username}}/Android/Sdk/platform-tools/adb /usr/bin/adb Fastest way to fix the issue

Great solution

Swordox972 commented 2 years ago

rom1v commented on 30 Jul 2019 Oh, but your problem is the reverse:

adb server version (40) doesn't match this client (41);

You correctly uses v41, but some app on your computer executes adb commands with adb v40. You must find this app and stop it 😉

In my case, I had AirDroid App installed and it uses adb. That's why I had the bug. Simply uninstall it and everything is working!

Nikzed commented 1 year ago

Just to point out how you should add adb variable to your PATH image image

Nikzed commented 1 year ago

Hi all, replace 3 files in "scrcpy" folder by their version in "platform-tools" maybe work.

I hope this will be useful !!!

it helps!