Scrcpy: Abort error

Created on 9 Jan 2019  Â·  19Comments  Â·  Source: Genymobile/scrcpy

I'm getting an Abort error similar to the previous issues but I have no idea how to fix it:

Via USB, all I'm seeing when I run 'scrcpy' from with fresh copies is (USB Debugging enabled & authorized)

cmd:
scrcpy-server.jar: 1 file pushed. 1.2 MB/s (19178 bytes in 0.016s)
Aborted (Hangs until Ctrl-C)

I'm running everything in a new extracted folder.
Not the same issue as https://github.com/Genymobile/scrcpy/issues/315

Most helpful comment

Turns out this was my issue: https://github.com/Genymobile/scrcpy/issues/268

Steps to fix (Windows):

  1. Open cmd in folder containing adb.exe
  2. Execute adb shell in cmd
  3. Traverse to data/local/tmp cd data/local/tmp
  4. Execute rm -rf scrcpy-server.jar to remove directory (Idk why this path is made...)
    4a. I deleted all environment variables (such as adding adb path to PATH) that I had configured previously for this process (You likely won't need to do this step)
  5. Restart computer

Thanks all for those who helped me above.

All 19 comments

Is your device running Android >= 5.0?

Is your device running Android >= 5.0?

Android version: 8.0.0

The Abort probably occurs on the device.

Are there any relevant logs in the output of adb logcat when this happens?

I tried typing adb logcat but I didn't get any reply - It just hung.

I tried typing adb logcat but I didn't get any reply - It just hung.

(in another terminal, run adb logcat first)

(in another terminal, run adb logcat first)

I did, adb logcat hung.

OK, something is wrong with the device then. What about adb devices, adb shell?

OK, something is wrong with the device then. What about adb devices, adb shell?

'adb devices' displays my single device.
adb shell <- Not sure, I'm currently out without my cable and I can't test it.

adb shell gives me

image

I met the same 'Abort' error on my Android 8. Not sure your root case, for mine, the reason is because no permission to upload scrcpy_server.jar to /date/local/tmp folder on Android 8 device. So I change the path to somewhere like /sdcard/, then it works. Hope it helps.

BTW, I guess Google may not allow to push file to /data/local/tmp on latest Android version. Why not put scrcpy_server.jar in an APK and publish to Play Store?

How do you change the path?

Turns out this was my issue: https://github.com/Genymobile/scrcpy/issues/268

Steps to fix (Windows):

  1. Open cmd in folder containing adb.exe
  2. Execute adb shell in cmd
  3. Traverse to data/local/tmp cd data/local/tmp
  4. Execute rm -rf scrcpy-server.jar to remove directory (Idk why this path is made...)
    4a. I deleted all environment variables (such as adding adb path to PATH) that I had configured previously for this process (You likely won't need to do this step)
  5. Restart computer

Thanks all for those who helped me above.

I had the same issue, after I copied the scrcpy-server.jar file to c:/users/myProfile.
This helped resolve it.
Thank you

Turns out this was my issue: #268

Steps to fix (Windows):

  1. Open cmd in folder containing adb.exe
  2. Execute adb shell in cmd
  3. Traverse to data/local/tmp cd data/local/tmp
  4. Execute rm -rf scrcpy-server.jar to remove directory (Idk why this path is made...)
    4a. I deleted all environment variables (such as adding adb path to PATH) that I had configured previously for this process (You likely won't need to do this step)
  5. Restart computer

Thanks all for those who helped me above.

Tried and worked. No need to restart computer btw.

Tried and worked. No need to restart computer btw.

For good measure. 😆

If @rom1v could fix this and/or post an update to this, that'd be great.

@ryalia44 I have no idea how scrcpy-server.jar ends up being a folder sometimes. I never reproduced it, and it seems very rare. It might be a bug in how adb push is handled on some versions of the adb server…

@ryalia44
I faced the problem and finally resloved it following @f4th4n guide.
I think I know what might be the cause of the problem in the first place,
I noticed things went wrong just after I added new windows environment variable : SCRCPY_SERVER_PATH. I did it because I wanted to be able to run "scrcpy" from every where, but obviously it ends up with the app aborting.
Now I run the app from within install directory, I just send a shortcut to desktop.

hope this helps. thank you everyone. cheers ;)

I have no idea how scrcpy-server.jar ends up being a folder sometimes

Now, I know: https://github.com/Genymobile/scrcpy/issues/278#issuecomment-491578503

@ryanliang88 your suggestion works for me. thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qymspace picture qymspace  Â·  3Comments

BloodPHamtOm picture BloodPHamtOm  Â·  3Comments

YurieCo picture YurieCo  Â·  4Comments

fernandofreamunde picture fernandofreamunde  Â·  4Comments

tonypachino picture tonypachino  Â·  3Comments