genymobile / scrcpy Goto Github PK
View Code? Open in Web Editor NEWDisplay and control your Android device
License: Apache License 2.0
Display and control your Android device
License: Apache License 2.0
Directing audio to the client would be pretty neat.
Currently you can accomplish the same thing by plugging a 3.5mm cable into the mic or line-in on the computer. Some manufacturers are dropping headphone ports though.
Suggestion by @rom1v: The best solution currently is to connect the device via bluetooth to the computer. It works for all apps, it does not suffer from additional limitations and works for basically all devices.
--> There is work in progress for Android >= 11. Please test #3757 🚀
My phone has capacitive buttons, and because of that i don't have on-screen buttons. A command line argument for showing the buttons would be nice.
check out a similar project https://github.com/openstf/stf
When typing into apps via the PC's keyboard it will input Russian/Cyrillic characters instead of "normal" ones. Neither my phone's nor my PC's layout are Russian though. (Phone is English and PC is German)
Running ninja:
Set executable permissions for: /home/myuser/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1/bin/gradle
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '9.0.4'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
ninja: build stopped: subcommand failed.
As the title says
Here is what I get on Ninja Install, on 4.14.0-kali3-amd64 #1 SMP Debian 4.14.17-1kali1 (2018-02-16) x86_64 GNU/Linux.
root@xxxx~/scrcpy/x# ninja install
[1/2] Generating scrcpy-server with a custom command.
(not invoking gradle, since we are root)
[1/2] Installing files.
Installing app/scrcpy to /usr/local/bin/scrcpy
Stripping target 'app/scrcpy'
Installing server/scrcpy-server.jar to /usr/local/share/scrcpy/scrcpy-server.jar
Traceback (most recent call last):
File "/usr/bin/meson", line 37, in <module>
sys.exit(main())
File "/usr/bin/meson", line 34, in main
return mesonmain.run(sys.argv[1:], launcher)
File "/usr/share/meson/mesonbuild/mesonmain.py", line 323, in run
sys.exit(run_script_command(args[1:]))
File "/usr/share/meson/mesonbuild/mesonmain.py", line 279, in run_script_command
return cmdfunc(cmdargs)
File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 375, in run
do_install(datafilename)
File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 190, in do_install
install_targets(d)
File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 314, in install_targets
raise RuntimeError('File {!r} could not be found'.format(fname))
RuntimeError: File 'server/scrcpy-server.jar' could not be found
FAILED: meson-install
/usr/bin/python3 /usr/bin/meson --internal install /root/scrcpy/x/meson-private/install.dat
ninja: build stopped: subcommand failed.
The Android emulator uses right click and drag to simulate pinch zooming. An alternative would be ctrl-mouse wheel.
In developer options, there is an option "show taps", that whenever you touch the screen, a white circle appears.
For some reason, it doesn't appear when using this app.
Please let us have it.
It can be useful for screenshots and screen-video capture.
I’m not sure I fully understood why scrcpy does not start as 1:1 right away on my computer since the window does fit on screen after I press ctrl+g.
But there should be a cli option to start as 1:1 anyway as it can be useful is some situations, even when it does not fit on screen.
Compiling on Mac Sierra with java 9 installed
following error
[30/30] Generating scrcpy-server with a custom command.
FAILED: server/scrcpy-server.jar
/Work/Workspace/scrcpy/server/./scripts/build-wrapper.sh ../server/. server/scrcpy-server.jar release
Downloading https://services.gradle.org/distributions/gradle-4.1-all.zip
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /Users/NAME/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1-all.zip to /Users/NAME/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew
Set executable permissions for: /Users/NAME/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1/bin/gradle
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '9.0.1'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
ninja: build stopped: subcommand failed.
First of all, kudos for the utility. Appreciate your efforts.
It would be great if you could provide a feature where once can mimic click of the power button. This would come quite handy if someone wants keep the device always connected and control it from the laptop altogether. At the moment, it is a manual task to first unlock via physical button.
In case the device isn't connected via USB , the PC app could ask for IP, while the device is running one of the available apps for rooted devices, that opens adb via wifi.
Alternatively, you could make a helper app on Android itself, which would scan a QR code on the PC screen, so that each would find the other, and they will get connected.
I am unable to run ninja run on ubuntu 17.10 as it throughs following error, python version is 2.7.14
[0/1] Running external command run.
exec: No such file or directory
ERROR: "adb push" returned with value 1
FAILED: meson-run
/usr/bin/python3 /usr/share/meson/meson --internal commandrunner /home/ateeb/StudioProjects/scrcpy /home/ateeb/StudioProjects/scrcpy/x '' /usr/share/meson/mesonintrospect scripts/run-scrcpy.sh
ninja: build stopped: subcommand failed.
On Arch GNU/Linux, built scrcpy using the released .jar.
meson x --buildtype release --strip -Db_lto=true \
-Dprebuilt_server=/path/to/scrcpy-server.jar
cd x
ninja
sudo ninja install
I have a Samsung Galaxy Note II N7100 running Replicant 6.0 0003.
The resulution should be 720x1280.
$ scrcpy -m 1280
/usr/local/share/scrcpy/scrcpy-server.jar: 1 file pushed. 1.9 MB/s (19038 bytes in 0.009s)
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
Invalid return value 0 for stream protocol
ERROR: Could not open video stream
ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
at android.media.MediaCodec.native_stop(Native Method)
at android.media.MediaCodec.stop(MediaCodec.java:1901)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:69)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:21)
at com.genymobile.scrcpy.Server.main(Server.java:70)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:258)
INFO: Initial texture: 720x1280
Any ideas? I think Replicant may be the offender here.
Edit: installed android sdk aura -A android-sdk
and built my own .jar; same result.
Edit2: Does not affect Samsung S9 with Stock or LineageOS
Apps such as Bitwarden and Silence block screenshots. Attemtping to take a screenshot on the device results in this error.
Using scrcpy, the app functions normally on the device, but scrcpy displays a black background with the status bar visible. No notification or log output indicates anything abnormal. The screenshot notifciation does not appear.
Strangely enough, LineageOS's built-in screen recording app captures these applications without problems. The device is not rooted.
Tested on a OnePlus 3T running LineageOS 15.1 20180305.
While I understand that this might be a bit out-of-scope, I think the approach the Substratum team took for Andromeda is something that could be implemented for scrcpy.
What Andromeda does is basically launching a service that keeps the app_process
instance alive, providing a continuously running interface for ADB commands. This of course poses a security risk, but the service itself could be limited to an extent.
This way the screen capturing can be done easily in a controlled environment (the app_process
service would have two functions, one to start the stream and one to stop), an app could be written that handles connection, and it could work through not just ADB, but through a (local) wireless network connection too.
Does this currently have this feature that I can make the display orientation to be horizontal and full screen?
When I launch scrcpy, I am prompted for a password to access the server (which it somewhat perplexingly identifies as being from utorrent). Sometimes it shows the username "pairing", other times both fields are blank. I've searched the docs and can't find any instances of password.
Sorry if this is lame, but if someone could point me in the right direction I'd be appreciative.
Having a keyboard command to take a screenshot and one to start/stop recording the screen into a video would be an extremely useful feature for scrcpy.
scrcpy seems to already be using ffmpeg on the computer side, so saving the input stream to a file/screenshotting the input stream should be very do-able.
Whenever, i rotate my phone to landscape, the video stream gets corrupt, but the keyboard input still functions, and when i turn phone back to potrait mode, video stream resumes.
My phone model and android version are:
Micromax Canvas A1 (AQ4501)
sprout4
Android 6.0.1
Following is the terminal output:
INFO: Initial texture: 480x854
[h264 @ 0x7fb0c80008c0] Reinit context to 848x480, pix_fmt: yuv420p
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in I frame
[h264 @ 0x7fb0c80008c0] mb_type 218 in P slice too large at 14 7
[h264 @ 0x7fb0c80008c0] error while decoding MB 14 7
[h264 @ 0x7fb0c80008c0] concealing 1254 DC, 1254 AC, 1254 MV errors in P frame
[h264 @ 0x7fb0c80008c0] P sub_mb_type 4 out of range at 38 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 38 1
[h264 @ 0x7fb0c80008c0] concealing 1548 DC, 1548 AC, 1548 MV errors in P frame
[h264 @ 0x7fb0c80008c0] P sub_mb_type 4 out of range at 7 6
[h264 @ 0x7fb0c80008c0] error while decoding MB 7 6
[h264 @ 0x7fb0c80008c0] concealing 1314 DC, 1314 AC, 1314 MV errors in P frame
[h264 @ 0x7fb0c80008c0] dquant out of range (-59) at 33 2
[h264 @ 0x7fb0c80008c0] error while decoding MB 33 2
[h264 @ 0x7fb0c80008c0] concealing 1500 DC, 1500 AC, 1500 MV errors in P frame
[h264 @ 0x7fb0c80008c0] cbp too large (51) at 31 5
[h264 @ 0x7fb0c80008c0] error while decoding MB 31 5
[h264 @ 0x7fb0c80008c0] concealing 1343 DC, 1343 AC, 1343 MV errors in P frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in P frame
[h264 @ 0x7fb0c80008c0] cbp too large (112) at 50 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 50 1
[h264 @ 0x7fb0c80008c0] concealing 1536 DC, 1536 AC, 1536 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 241 in P slice too large at 43 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 43 1
[h264 @ 0x7fb0c80008c0] concealing 1543 DC, 1543 AC, 1543 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 167 in P slice too large at 26 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 26 1
[h264 @ 0x7fb0c80008c0] concealing 1560 DC, 1560 AC, 1560 MV errors in P frame
[h264 @ 0x7fb0c80008c0] out of range intra chroma pred mode at 29 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 29 1
[h264 @ 0x7fb0c80008c0] concealing 1557 DC, 1557 AC, 1557 MV errors in P frame
[h264 @ 0x7fb0c80008c0] P sub_mb_type 32 out of range at 19 2
[h264 @ 0x7fb0c80008c0] error while decoding MB 19 2
[h264 @ 0x7fb0c80008c0] concealing 1514 DC, 1514 AC, 1514 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 34 in P slice too large at 27 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 27 1
[h264 @ 0x7fb0c80008c0] concealing 1559 DC, 1559 AC, 1559 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 220 in P slice too large at 42 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 42 1
[h264 @ 0x7fb0c80008c0] concealing 1544 DC, 1544 AC, 1544 MV errors in P frame
[h264 @ 0x7fb0c80008c0] negative number of zero coeffs at 24 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 24 1
[h264 @ 0x7fb0c80008c0] concealing 1562 DC, 1562 AC, 1562 MV errors in P frame
[h264 @ 0x7fb0c80008c0] out of range intra chroma pred mode at 31 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 31 1
[h264 @ 0x7fb0c80008c0] concealing 1555 DC, 1555 AC, 1555 MV errors in P frame
[h264 @ 0x7fb0c80008c0] dquant out of range (1522) at 46 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 46 1
[h264 @ 0x7fb0c80008c0] concealing 1540 DC, 1540 AC, 1540 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 1619 in P slice too large at 33 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 33 1
[h264 @ 0x7fb0c80008c0] concealing 1553 DC, 1553 AC, 1553 MV errors in P frame
[h264 @ 0x7fb0c80008c0] corrupted macroblock 26 1 (total_coeff=-1)
[h264 @ 0x7fb0c80008c0] error while decoding MB 26 1
[h264 @ 0x7fb0c80008c0] concealing 1560 DC, 1560 AC, 1560 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 47 in P slice too large at 52 2
[h264 @ 0x7fb0c80008c0] error while decoding MB 52 2
[h264 @ 0x7fb0c80008c0] concealing 1481 DC, 1481 AC, 1481 MV errors in P frame
[h264 @ 0x7fb0c80008c0] cbp too large (119) at 36 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 36 1
[h264 @ 0x7fb0c80008c0] concealing 1550 DC, 1550 AC, 1550 MV errors in P frame
[h264 @ 0x7fb0c80008c0] out of range intra chroma pred mode at 28 15
[h264 @ 0x7fb0c80008c0] error while decoding MB 28 15
[h264 @ 0x7fb0c80008c0] concealing 816 DC, 816 AC, 816 MV errors in P frame
[h264 @ 0x7fb0c80008c0] P sub_mb_type 17 out of range at 45 11
[h264 @ 0x7fb0c80008c0] error while decoding MB 45 11
[h264 @ 0x7fb0c80008c0] concealing 1011 DC, 1011 AC, 1011 MV errors in P frame
[h264 @ 0x7fb0c80008c0] out of range intra chroma pred mode at 29 16
[h264 @ 0x7fb0c80008c0] error while decoding MB 29 16
[h264 @ 0x7fb0c80008c0] concealing 762 DC, 762 AC, 762 MV errors in P frame
[h264 @ 0x7fb0c80008c0] mb_type 142 in P slice too large at 31 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 31 1
[h264 @ 0x7fb0c80008c0] concealing 1555 DC, 1555 AC, 1555 MV errors in P frame
[h264 @ 0x7fb0c80008c0] cbp too large (69) at 10 15
[h264 @ 0x7fb0c80008c0] error while decoding MB 10 15
[h264 @ 0x7fb0c80008c0] concealing 834 DC, 834 AC, 834 MV errors in P frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in I frame
[h264 @ 0x7fb0c80008c0] cbp too large (239) at 51 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 51 1
[h264 @ 0x7fb0c80008c0] concealing 1535 DC, 1535 AC, 1535 MV errors in P frame
[h264 @ 0x7fb0c80008c0] cbp too large (435) at 44 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 44 1
[h264 @ 0x7fb0c80008c0] concealing 1542 DC, 1542 AC, 1542 MV errors in P frame
[h264 @ 0x7fb0c80008c0] corrupted macroblock 39 1 (total_coeff=-1)
[h264 @ 0x7fb0c80008c0] error while decoding MB 39 1
[h264 @ 0x7fb0c80008c0] concealing 1547 DC, 1547 AC, 1547 MV errors in P frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in I frame
[h264 @ 0x7fb0c80008c0] concealing 4 DC, 4 AC, 4 MV errors in P frame
[h264 @ 0x7fb0c80008c0] concealing 2 DC, 2 AC, 2 MV errors in P frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in I frame
[h264 @ 0x7fb0c80008c0] dquant out of range (-8229) at 40 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 40 1
[h264 @ 0x7fb0c80008c0] concealing 1546 DC, 1546 AC, 1546 MV errors in P frame
[h264 @ 0x7fb0c80008c0] negative number of zero coeffs at 33 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 33 1
[h264 @ 0x7fb0c80008c0] concealing 1553 DC, 1553 AC, 1553 MV errors in P frame
[h264 @ 0x7fb0c80008c0] negative number of zero coeffs at 38 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 38 1
[h264 @ 0x7fb0c80008c0] concealing 1548 DC, 1548 AC, 1548 MV errors in P frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in I frame
[h264 @ 0x7fb0c80008c0] corrupted macroblock 39 1 (total_coeff=-1)
[h264 @ 0x7fb0c80008c0] error while decoding MB 39 1
[h264 @ 0x7fb0c80008c0] concealing 1547 DC, 1547 AC, 1547 MV errors in P frame
[h264 @ 0x7fb0c80008c0] corrupted macroblock 39 1 (total_coeff=-1)
[h264 @ 0x7fb0c80008c0] error while decoding MB 39 1
[h264 @ 0x7fb0c80008c0] concealing 1547 DC, 1547 AC, 1547 MV errors in P frame
[h264 @ 0x7fb0c80008c0] concealing 1 DC, 1 AC, 1 MV errors in P frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
[h264 @ 0x7fb0c80008c0] concealing 1586 DC, 1586 AC, 1586 MV errors in I frame
[h264 @ 0x7fb0c80008c0] left block unavailable for requested intra mode at 0 1
[h264 @ 0x7fb0c80008c0] error while decoding MB 0 1
I have hebrew keyboard layout on both my computer and my android keyboard that is in use but it wouldn't let me pass the letters. Any chance to fix this?
Running the app on Windows using the pre-compiled version, does not display any device screen, and actually does not display anything at all.
My laptop has a touch screen but trying to control my phone with it doesn't seem to do anything at all. It would be nice if touch input was also supported.
Hello,
First of all, thank you for this tool.
I know I don't have an usual setup, but here's a bug with it.
This is my setup, I'm on macOS Sierra 10.12.4 and I have two screens:
Now, on the main display, everything works fine with scrcpy, but when the window is on the secondary display, there is an offset for the touch input:
Hi,
First of all thank you for making this application.
I have never used meson build system before.I tried executing the commands given in the README but i am still unable to setup scrcpy.
I executed this command inside of scrcpy folder. "meson x --buildtype release --strip -Db_lto=true"
gives the following error.
Error during basic setup:
[Errno 2] No such file or directory: '/home/udit/scrcpy/x'
So I made a folder named 'x' and executed the same command again.
Got this error
The Meson build system
Version: 0.29.0
Source dir: /home/udit/scrcpy
Build dir: /home/udit/scrcpy/x
Build type: native build
Build machine cpu family: x86_64
Build machine cpu: x86_64
Meson encountered an error in file meson.build, line 1, column 0:
Meson version is 0.29.0 but project requires >= 0.37.
I updated meson using pip3 but still I get the above errors.
Am I doing something wrong? Please let me know.
Thanks.
As a user, I'd like to be able to install scrcpy with a single brew install scrcpy
command so that I can quickly start using the program without needing to install meson or gcc.
Closing the window on Fedora 27 (Linux 4.15.6-300.fc27.x86_64) makes Gnome slowly fade to black, then lock the screen. Target device is a Nexus 6P on Android 7.1.2.
$ uname -sr
Linux 4.15.6-300.fc27.x86_64
$ gdm --version
GDM 3.26.2.1
$ scrcpy -v
scrcpy v1.0
dependencies:
- SDL 2.0.7
- libavcodec 57.89.100
- libavformat 57.71.100
- libavutil 55.58.100
This can be reproduced by running scrcpy
and closing the window.
OS: Arch Linux
Phone: Pixel 2 XL on latest Android 8.1.0
Built from v1.0 tag and using prebuilt server.jar.
Seeing the following output
$ scrcpy
/usr/local/share/scrcpy/scrcpy-server....pushed. 0.1 MB/s (613 bytes in 0.009s)
Aborted
I got a crash when trying to paste computer clipboard with ctrl+v:
/usr/share/scrcpy/scrcpy-server.jar: 1 file pushed. 1.7 MB/s (19038 bytes in 0.011s)
INFO: Initial texture: 540x960
*** buffer overflow detected ***: scrcpy terminated
fish: Tâche -1667279360, 'scrcpy' terminée par le signal SIGABRT (Abandon)
Please tell me if you need details/testing.
(I used the PKGBUILD from https://linuxfr.org/users/rom1v/journaux/scrcpy-une-appli-pour-afficher-et-controler-des-devices-android#comment-1731993 to install, phone has lineageos from february)
Hey, thank you for this awesome (and free!) tool, I am really excited to start using it.
I have an external monitor connected to my MacBook and if I move the scrcpy window to the second screen mouse input stops working. If I move back to the laptop's screen it works again.
My setup: macOS High Sierra 10.13.3 (17D102)
marcin@macgyver ~> scrcpy -v
scrcpy v1.0
dependencies:
- SDL 2.0.8
- libavcodec 57.107.100
- libavformat 57.83.100
- libavutil 55.78.100
Let me know if there's some more data you'd like me to provide or if I can do any debugging.
I am using elementary OS, Followed all the steps in the document.
when i enter this command,
meson x --buildtype release --strip -Db_lto=true
I get,
Error during basic setup:
Neither directory contains a build file meson.build.
Thank you for this incredible tool !
Do you think it is possible to forward the notifications from the phone to the PC ?
I installed the last version with
padok@Idris:~/git/scrcpy$ meson x --buildtype release --strip -Db_lto=true
The Meson build system
Version: 0.42.1
Source dir: /home/padok/git/scrcpy
Build dir: /home/padok/git/scrcpy/x
Build type: native build
Project name: scrcpy
Native C compiler: cc (gcc 7.2.0)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency libavformat found: YES 57.71.100
Native dependency libavcodec found: YES 57.89.100
Native dependency libavutil found: YES 55.58.100
Native dependency sdl2 found: YES 2.0.6
Configuring config.h using configuration
Program ./scripts/build-wrapper.sh found: YES (/home/padok/git/scrcpy/server/./scripts/build-wrapper.sh)
Build targets in project: 6
padok@Idris:~/git/scrcpy$ cd x
padok@Idris:~/git/scrcpy/x$ ninja
[30/30] Generating scrcpy-server with a custom command.
:server:preBuild UP-TO-DATE
:server:preReleaseBuild UP-TO-DATE
:server:compileReleaseAidl UP-TO-DATE
:server:compileReleaseRenderscript UP-TO-DATE
:server:checkReleaseManifest UP-TO-DATE
:server:generateReleaseBuildConfig UP-TO-DATE
:server:prepareLintJar UP-TO-DATE
:server:generateReleaseResValues UP-TO-DATE
:server:generateReleaseResources UP-TO-DATE
:server:mergeReleaseResources UP-TO-DATE
:server:createReleaseCompatibleScreenManifests UP-TO-DATE
:server:processReleaseManifest UP-TO-DATE
:server:splitsDiscoveryTaskRelease UP-TO-DATE
:server:processReleaseResources UP-TO-DATE
:server:generateReleaseSources UP-TO-DATE
:server:javaPreCompileRelease UP-TO-DATE
:server:compileReleaseJavaWithJavac UP-TO-DATE
:server:compileReleaseNdk NO-SOURCE
:server:compileReleaseSources UP-TO-DATE
:server:lintVitalRelease
:server:mergeReleaseShaders UP-TO-DATE
:server:compileReleaseShaders UP-TO-DATE
:server:generateReleaseAssets UP-TO-DATE
:server:mergeReleaseAssets UP-TO-DATE
:server:transformClassesWithPreDexForRelease UP-TO-DATE
:server:transformDexWithDexForRelease UP-TO-DATE
:server:mergeReleaseJniLibFolders UP-TO-DATE
:server:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:server:processReleaseJavaRes NO-SOURCE
:server:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:server:packageRelease UP-TO-DATE
:server:assembleRelease
BUILD SUCCESSFUL in 1s
24 actionable tasks: 1 executed, 23 up-to-date
padok@Idris:~/git/scrcpy/x$ sudo ninja install
[1/2] Generating scrcpy-server with a custom command.
(not invoking gradle, since we are root)
[1/2] Installing files.
Installing app/scrcpy to /usr/local/bin/scrcpy
Stripping target 'app/scrcpy'
Installing server/scrcpy-server.jar to /usr/local/share/scrcpy/scrcpy-server.jar
When I tried to use scrcpy with my mobile phone I got the error message
padok@Idris:~/git/scrcpy/x$ adb connect 10.80.0.138
connected to 10.80.0.138:5555
padok@Idris:~/git/scrcpy/x$ scrcpy
exec: No such file or directory
ERROR: "adb push" returned with value 1
The adb command seems to work.
padok@Idris:~/git/scrcpy/x$ adb push server/scrcpy-server.jar /data/local/tmp/scrcpy-server.jar
server/scrcpy-server.jar: 1 file pushed. 0.7 MB/s (19038 bytes in 0.025s)
My phone is an Oneplus One (bacon) running LineageOS 14.1-20180128
I am using the windows precompiled build on Windows 10 x64 and a phone running 7.0.
The program starts up fine and shows the screen perfectly, but whenever I left click on the screen with my mouse (on my PC) nothing happens.
Right-clicking does turn on the screen and all the shortcuts work. I do have two monitors on my PC, if that matters.
EDIT: I am using a LG G5 and this seems to be a common problem on LG devices?
Reddit thread
Touch data shows correct position, but pressure is always at 1.
Not sure this is possible but I already use KDE connect to sync notifications and copy/paste, so I was wondering if it would be possible to use the same technology as scrcpy in the connection that KDE connect establish.
Advantages would be that ADB would not need to be activated and it works over wifi.
Inconvenient is it may run slower than on USB and kde connect requires an installed app on the phone side.
I am using OSX and followed the guide to build the source code, but then when I get to the
ninja
command, it's throwing build errors
[2/30] Compiling C object 'app/scrcpy@exe/src_decoder.c.o'.
FAILED: app/scrcpy@exe/src_decoder.c.o
cc -Iapp/scrcpy@exe -Iapp -I../app -I/usr/local/include -I/usr/local/include/SDL2 -flto -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -O3 -D_THREAD_SAFE -MD -MQ 'app/scrcpy@exe/src_decoder.c.o' -MF 'app/scrcpy@exe/src_decoder.c.o.d' -o 'app/scrcpy@exe/src_decoder.c.o' -c ../app/src/decoder.c
../app/src/decoder.c:3:10: fatal error: 'libavformat/avformat.h' file not found
#include <libavformat/avformat.h>
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[7/30] Compiling C object 'app/scrcpy@exe/src_main.c.o'.
FAILED: app/scrcpy@exe/src_main.c.o
cc -Iapp/scrcpy@exe -Iapp -I../app -I/usr/local/include -I/usr/local/include/SDL2 -flto -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -O3 -D_THREAD_SAFE -MD -MQ 'app/scrcpy@exe/src_main.c.o' -MF 'app/scrcpy@exe/src_main.c.o.d' -o 'app/scrcpy@exe/src_main.c.o' -c ../app/src/main.c
../app/src/main.c:5:10: fatal error: 'libavformat/avformat.h' file not found
#include <libavformat/avformat.h>
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
When I use the command ninja run in the scrcpy/x folder, it gives me the following error. I'm on mac OSX High Serria
[0/1] Running external command run.
Traceback (most recent call last):
File "/usr/local/Cellar/meson/0.45.0/libexec/bin/meson", line 17, in <module>
from mesonbuild import mesonmain, mesonlib
ModuleNotFoundError: No module named 'mesonbuild'
FAILED: meson-run
/usr/local/Cellar/python/3.6.4_3/bin/python3.6 /usr/local/Cellar/meson/0.45.0/libexec/bin/meson --internal commandrunner /Users/vincent/scrcpy /Users/vincent/scrcpy/x '' /usr/local/Cellar/python/3.6.4_3/bin/python3.6 /usr/local/Cellar/meson/0.45.0/libexec/bin/meson scripts/run-scrcpy.sh
ninja: build stopped: subcommand failed.
Hi, I noticed an issue that arises when using the default camera app on my phone. When I enter my camera in portrait mode it works fine. If I change to landscape however the viewing window does not follow and instead gets squished. Upon rotating back to portrait, the window remains in a weird squished state. This continues after closing the app and returning to the home screen. I have been able to fix this by entering a different app that supports a landscape mode (such as messaging) where the window will correctly resize.
When first initialized, the terminal shows:
INFO: Initial texture: 1440x2560
I have noticed that when changing orientation in most apps the computer recieves a [h264 @ 0x7fa2140008c0] Reinit context to 1440x2560, pix_fmt: yuv420p
and then reorients the display window accordingly. However, I noticed that when the camera app changes to landscape no reinit message appears in the terminal. Navigating to a different app and rotating yields a reinit and fixes the issue.
I am sure this is the source of the issue, I don't know how scrcpy gets the signal to reinit the display. Wondering if there's perhaps a different signal that could be caught?
I built scrcpy on desktop Ubuntu 16.04 64-bit and it seems to be working just fine besides this. The phone is a stock LG G5 running android 7.0
Let me know if there's any more information that would be helpful. Thanks for looking.
When I go back to home screen the phone goes back to portrait mode and then after starting an app I have to manually lean the phone to rotate the screen, it would be easier if there was a shorcut which rotates the screen.
Hi,
First of all, thanks to devs for creating this tool.
I tried to install it on my Windows 7 32-bit using Nexus 6p Android 8.1 but it does not work.
I can see my device is authorized from adb devices command, but when I then invoke scrcpy, it says the following error:
This version of H:\scrcpy-windows-v1.0\scrcpy.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
adb.exe is already in PATH system variable.
I tried to use Compatibility Mode and set it to Windows 7 and Run As Administrator, but they do not fix the issue.
Does scrcpy require 64-bit and won't work with 32-bit?
Any ideas why this happens and how to resolve it?
Really looking forward to get this working so I can use the tool..
Thanks
Following error occured while I tried to run meson to build scrcpy
Neither directory contains a build file meson.build.
Vertical scrolling is reversed, but horizontal is not. So scrolling is confusing.
Great useful tool. Thank you.
It would be really cool if the device did not have to be connected via usb.
IME intercept pasted text, which is undesirable.
IME: Gboard with English and Chinese Languages.
sample pasted text: scrcpy:用电脑控制 Android 手机,做演讲时很有用。比 vysor 的延迟和画面质量都好多了,开源,支持 Windows, Mac, Linux。目前Mac, Linux 端需要自行编译。
result: IME(in either English or Chinese mode) intercept scrcpy
and discard text behind, no text pasted into TextView
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.