Environment
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"
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