scrcpy (Android desktop emulator)

Submit command line tools that you find here.
Message
Author
User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

scrcpy (Android desktop emulator)

#1 Post by Midas »

I have tested scrcpy (https://github.com/Genymobile/scrcpy) both in Windows and in Linux with different results; when first ran, my first result was a console error In both platforms like this:

Code: Select all

INFO: scrcpy 1.14 <https://github.com/Genymobile/scrcpy>
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
Press any key to continue...
In Linux (Ubuntu Mate 20.04) the error went away once I changed the USB connection from "Charge the device" to "Transfer files"; in Windows, although it enabled browsing phone files, the same action got no results -- i.e., an interactive display of the phone screen in my desktop.

Anyway, when it works scrcpy can be really handy for anyone with an Android phone (v5.0 or newer), so here's the gist of it...

This application provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access. It works on GNU/Linux, Windows and macOS.

Image

Bear in mind that scrcpy isn't entirely stealth because it needs to have a working USB driver. Other than that, I couldn't find any traces of it in my system.

Windows tutorials for scrcpy can be found at: Download scrcpy latest release (currently v1.14) from https://github.com/Genymobile/scrcpy/releases.

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: scrcpy

#2 Post by webfork »

I'm not sure I'd class this as an emulator, more like an easy remote-desktop program.

Anyway, about a year ago, I had a reasonably new tablet computer with a cracked screen that would have been *amazing* to use with this software. I wish I'd known about it ...
summary wrote:This application provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access. It works on GNU/Linux, Windows and macOS.
Uses

As mentioned above, this could breathe new life to an android device that's either old or damaged (or both), though it would require an at least somewhat usable screen to enable the Developer Mode. I can see a lot of ways it could help including:

Apps
  • Get access to Android-only apps in a native environment (run it right off your phone)
  • Use of any of dozens of popular Electron applications without sacrificing a gig of RAM on your computer
  • Avoiding security issues with installing some software programs on your computer (e.g. use a BitTorrent client at work)
  • Play games on your computer (puzzles, chess, etc. should all work fine, not sure about very visual games)
Convenience
  • Keeping your phone visible without taking up space on your desk
  • Setup the camera on a tripod or for use in product photography without having to touch the screen (and maybe mess up the position) everytime you want to make a change

Testing notes

I didn't connect my Android device to the Internet *at any point* in the test below, so you can use this with phones that may not have all the latest security patches (so long as it's newer than API 21 (Android 5.0 / Lollipop).

Clipboard text is supported between both devices so you can copy and paste into and from your scrcpy window.

I had a fairly new Galaxy Tab and it required both enabling Developer Mode and USB Debugging (as discussed on the webpage). Beyond that, usage was very intuitive. Even though I get into some detailed functions below, that shouldn't scare anyone who avoids command-line interfaces from giving this a try.

My launch arguments

Code: Select all

scrcpy.exe --turn-screen-off --window-width 600 --window-height 960 --bit-rate 2M --rotation 0 --stay-awake
The settings above turn the screen off, sets the to my Galaxy Tab A (found with a breif web search), reduces the refresh rate just because my needs are minimal (it looks fine), turns off rotation, and the device doesn't go to sleep.

The test screen is actually 800 x 1280 but my screen isn't that tall and it looks fine at 75% size.


Untested
  • Full screen video or intensive graphical apps (e.g. racing games)
  • Multi-touch operations (not sure it's possible)
  • Copy/paste images (like I did with text)
---

Would love to see a graphical front-end for the program to launch with common options. Would see a wider usage base and an amazingly useful and benefitial program to breathe new life into old or damaged phones and tablets.

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: scrcpy

#3 Post by billon »

webfork wrote: Mon Sep 07, 2020 9:16 pm Would love to see a graphical front-end for the program to launch with common options.
https://github.com/srevinsaju/guiscrcpy

also
https://github.com/Tomotoes/scrcpy-gui

also
https://github.com/barry-ran/QtScrcpy

also
https://anl.ink/

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: scrcpy (Android desktop emulator)

#4 Post by vevy »


User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: scrcpy (Android desktop emulator)

#5 Post by webfork »

vevy wrote: Tue Sep 08, 2020 3:38 pm viewtopic.php?p=98257#p98257
Some good questions raised there around CLI vs. GUI and you're right that there's some overlap. For the site's purposes, some people are always going to be reluctant to touch anything that requires a command prompt. scrcpy is definitely right at the edge of the dilema.
billon wrote: Mon Sep 07, 2020 9:43 pm https://github.com/srevinsaju/guiscrcpy
Excellent, thanks.

The weird part is I pictured in my head what the interface would look like and whomever came up with this program thinks a lot like me.

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: scrcpy (Android desktop emulator)

#6 Post by Midas »

webfork wrote:Some people are always going to be reluctant to touch anything that requires a command prompt.

My thoughts, precisely. :neutral_face:

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: scrcpy (Android desktop emulator)

#7 Post by vevy »

So, I will respond there not to fragment the discussion (also because scrcpy is just an example. This is really a discussion about what to include in the database).

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: scrcpy (Android desktop emulator)

#8 Post by billon »

Related:

https://github.com/rom1v/sndcpy
sndcpy

This tool forwards audio from an Android 10 device to the computer. It does not require any root access. It works on GNU/Linux, Windows and macOS.

The purpose is to enable audio forwarding while mirroring with scrcpy. However, it can be used independently.

Requirements
  • The Android device requires at least Android 10.
  • VLC must be installed on the computer.

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: scrcpy (Android desktop emulator)

#9 Post by webfork »

billon wrote: Sat Oct 17, 2020 2:28 pm The purpose is to enable audio forwarding while mirroring with scrcpy.
This just keeps getting better. This thread has made me start thinking about trying to find a used Android device and use it for various extras. Now maybe that includes a music player.

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: scrcpy (Android desktop emulator)

#10 Post by Midas »

Topic update: Scrcpy v1.16 released 2020-08-10 (changelog and downloads at https://github.com/Genymobile/scrcpy/releases).

webfork wrote:Made me start thinking about trying to find a used Android device and use it for various extras. Now maybe that includes a music player.

Cool. :sunglasses:

Incidentally, I'm in the process of trying to replace my aging Axon 7 with a mint new Poco X3, while struggling to decouple vanilla Android from the overbearing GApps framework -- something that could take me months... :confused:

When (and if) I manage that, I plan to convert the Axon to /e/ (https://e.foundation/) and I'll surely have a lot more uses for such tools.

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: scrcpy (Android desktop emulator)

#11 Post by SYSTEM »

Midas wrote: Sun Oct 18, 2020 6:35 am Incidentally, I'm in the process of trying to replace my aging Axon 7 with a mint new Poco X3, while struggling to decouple vanilla Android from the overbearing GApps framework -- something that could take me months... :confused:
Are you aware of microG, an independent open source reimplementation of GApps? Many custom ROMs allow you to use microG instead of real GApps.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: scrcpy (Android desktop emulator)

#12 Post by Midas »

SYSTEM wrote:Are you aware of microG, an independent open source reimplementation of GApps? Many custom ROMs allow you to use microG instead of real GApps.

Yes, I am -- and of Nanodroid, too. :nerd:

I first learned of it through the Vanced Youtube client (https://vancedapp.com/).

I was really close to have it all setup last July -- in a Redmi Note 8 I got back in January, but had to pass the device to a relative in need...

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: scrcpy (Android desktop emulator)

#13 Post by Midas »

New scrcpy version (v1.17) released 2021-01-02 (changelog and downloads at https://github.com/Genymobile/scrcpy/releases).

Re-tested this version successfully under Windows 10.

Note that on top of USB debugging enabled in the device (Usually in "Developers Options"), you also need to enable "Allow granting permissions and simulating input via USB debugging" to interact remotely with the device.

scrcpy allows for screen recording directly form the desktop, which may prove really useful for tutorials and training.

It is also convenient to "Override high DPI scaling behavior" by setting "Scaling performed by: Application" in the executable's "High DPI settings" properties, in order to make the display better (particularly to get less blurry text).

For details and more options, check the FAQ (github.com/Genymobile/scrcpy/blob/master/FAQ.md).

Image

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: scrcpy (Android desktop emulator)

#14 Post by Andrew Lee »


User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: scrcpy (Android desktop emulator)

#15 Post by Midas »

Voted. 8)

Post Reply