You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If SCRCPY_SERVER_PATH points to a directory, then adb push that_directory /data/local/tmp/scrcpy-server.jar will create a directory /data/local/tmp/scrcpy-server.jar/ on the device. In that case, app_process will just abort and fixing it requires a manual action from the user (adb shell rm -rf /data/local/tmp/scrcpy-server.jar).
If SCRCPY_SERVER_PATH points to a directory, then a directory will be
pushed to /data/local/tmp/scrcpy-server.jar.
When executing it, app_process will just abort and leave the directory
on the device, causing scrcpy to always fail.
To avoid the problem, check that the server is a regular file before
pushing it.
Closes#956 <#956>
If
SCRCPY_SERVER_PATH
points to a directory, thenadb push that_directory /data/local/tmp/scrcpy-server.jar
will create a directory/data/local/tmp/scrcpy-server.jar/
on the device. In that case,app_process
will just abort and fixing it requires a manual action from the user (adb shell rm -rf /data/local/tmp/scrcpy-server.jar
).To avoid the issue, we should check that the server path is not a directory before pushing it: https://github.com/Genymobile/scrcpy/blob/v1.10/app/src/server.c#L70
Random stackoverflow threads:
https://stackoverflow.com/questions/4553012/checking-if-a-file-is-a-directory-or-just-a-file
https://stackoverflow.com/questions/6218325/how-do-you-check-if-a-directory-exists-on-windows-in-c
Ref #268 #953 #278 (comment)
The text was updated successfully, but these errors were encountered: