sisco311 / scrcpy-snap

Snap packaging for scrcpy: https://github.com/Genymobile/scrcpy
Apache License 2.0
53 stars 12 forks source link

execution failed #3

Closed TonyStark closed 5 years ago

TonyStark commented 5 years ago

Hellow I have installed scrcpy with snap --edge install scrcpy now i followed your documentation but not helped here i m posting log... 1st error

aaa@aaa:~/Downloads$ sudo snap connect scrcpy:adb-support
error: cannot resolve connection, slot snap name is empty

next i locate binary of scrcpy and try to execute with sudo and without it 2nd error

aaa@aaa:~/Downloads$ sudo /snap/bin/scrcpy
* daemon not running. starting it now on port 5037 *
free(): invalid next size (fast)
ADB server didn't ACK
* failed to start daemon *
adb: error: connect failed: cannot connect to daemon
ERROR: "adb push" returned with value 1

by the way in both case usb connected to phone and i adb-shell works too. so any help?

thanks for the snap package :)

TonyStark commented 5 years ago

i hv tried to kill and restart adb server but it wont work

TonyStark commented 5 years ago

OKAY I found the solution /snap/scrcpy/16/usr/local/bin/scrcpy above command works but before execute first i had placed scrcpy-server.jar in /usr/local/share/scrcpy directory after that it successfully work cheers :+1:

sisco311 commented 5 years ago

Hi,

My mistake. The correct way to connect the snap to the adb slot is: sudo snap connect scrcpy:adb-support :adb-support You can check if it's connected with: snap interfaces scrcpy

An adb tool and the scrcpy server is included in the snap. Once the the plug is connected to the slot you should be able to run scrcpy without manually copying the server to /usr/share/local/scrcpy directory.

The builtin adb should find it in the snap's dir. But you may have to restart the adb server before a working connection to the phone is made. For this use: scrcpy.adb kill-server

Thank you for trying out this snap. Any help and feedback is greatly appreciated

TonyStark commented 5 years ago

okay

snap interfaces scrcpy
Slot  Plug
-     scrcpy:adb-support
-     scrcpy:desktop
-     scrcpy:desktop-legacy
-     scrcpy:network
-     scrcpy:opengl
-     scrcpy:pulseaudio
-     scrcpy:unity7
-     scrcpy:wayland
-     scrcpy:x11

it gives me above output and i tried kill-server command, it says server not running also scrcpy gives me same error which i posted in first post

sisco311 commented 5 years ago

We are getting closer!

Looks like to me that the core snap is not installed on your system. sudo snap install core and try again the steps above. ​ ​ Some details about your system will also help to debug this.

Thanks, sisco311

TonyStark commented 5 years ago

ok done now above command gives some good output

Slot             Plug
:desktop         scrcpy
:desktop-legacy  scrcpy
:network         scrcpy
:opengl          scrcpy
:pulseaudio      scrcpy
:unity7          scrcpy
:wayland         scrcpy
:x11             scrcpy
-                scrcpy:adb-support

and scrcpy works fine

sisco311 commented 5 years ago

Cool!

Updated the README, but I will keep this issue as "Open" until I can figure out a way to make the core snap as a "dependency" in a proper way.