scrcpy not working after upgrade to Catalina OS

Created on 15 Apr 2020  Â·  8Comments  Â·  Source: Genymobile/scrcpy

  • [x] I have read the FAQ.
  • [x] I have searched in existing issues.

Environment

  • OS: macOS
  • scrcpy version: 1.12.1
  • installation method: brew
  • device model: STB HP5116
  • Android version: 9

Describe the bug
After I upgrade my OS from Mojave to Catalina 10.15.4, everytime I run scrcpy the following errors are printed in console

2020-04-15 09:54:20.962 scrcpy[40541:894337] INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
exec: Bad CPU type in executable
2020-04-15 09:54:20.963 scrcpy[40541:894337] ERROR: Failed to execute: [adb], [push], [/usr/local/Cellar/scrcpy/1.12.1/share/scrcpy/scrcpy-server], [/data/local/tmp/scrcpy-server.jar]
2020-04-15 09:54:20.963 scrcpy[40541:894337] ERROR: Could not execute "adb push"

All 8 comments

What if you just execute:

adb push /usr/local/Cellar/scrcpy/1.12.1/share/scrcpy/scrcpy-server /data/local/tmp/scrcpy-server.jar

Try reinstalling adb.

@rom1v I executed the push command as you asked and it worked just fine. Should I try reinstalling adb anyways?

file $(which adb)
file $(which scrcpy)

?

@rom1v

➜  ~ file $(which adb)
/usr/local/bin/adb: Mach-O executable i386
➜  ~ file $(which scrcpy)
/usr/local/bin/scrcpy: Mach-O 64-bit executable x86_64

It's related to Apple dropping support for 32 bits (your adb binary is 32 bits):

https://support.apple.com/fr-fr/HT208436
https://discussions.apple.com/thread/251024475

I don't know why it works when you call adb directly but not from an exec() though.

@rom1v is there something else that I can do? I tried updating adb, but the issue persists.

Android Debug Bridge version 1.0.41
Version 29.0.6-6198805

Sorry, I'm clueless about this macOS issue.

If you find the solution, please give it on this thread :wink:

@rom1v after running

brew upgrade scrcpy
brew cask install android-platform-tools

it got fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SamuelBlickle picture SamuelBlickle  Â·  3Comments

fleytman picture fleytman  Â·  4Comments

cordac1 picture cordac1  Â·  4Comments

SuryaElavazhagan picture SuryaElavazhagan  Â·  4Comments

BloodPHamtOm picture BloodPHamtOm  Â·  3Comments