[HN Gopher] Scrcpy 2.0 mirrors Android devices with audio forwar...
       ___________________________________________________________________
        
       Scrcpy 2.0 mirrors Android devices with audio forwarding
        
       Author : rom1v
       Score  : 217 points
       Date   : 2023-03-14 13:39 UTC (9 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | aa_memon wrote:
       | Anyone know of a scrcpy for windows/mac/Linux? If not, why has
       | there not been a "wired" screen mirroring tool for desktop os? Is
       | it just more difficult than doing it for android?
        
         | [deleted]
        
         | yjftsjthsd-h wrote:
         | "Full size" computers don't usually have a way of tying to a
         | host system like adb+USB. That said, historically I think VNC
         | and RDP filled this role.
        
         | hexmiles wrote:
         | Not really unless you count Ethernet as wired, in that case
         | there are plenty of tools that work and is probably your best
         | option (thing like parsec, nomachine, or even steam remote
         | play).
         | 
         | As far as I know scrcpy only work because android devices works
         | as USB device/gadget and can be connected to a host, two
         | computers will work both as host and cannot be connected
         | directly. You could do it with something akin to the Raspberry
         | Pi that can work as a USB device instead of a host, but I don't
         | know of any software that does directly(without emulating a
         | network connection, and if you emulate a network connection you
         | could use one of the many sofware for screen sharing) if i
         | remember correctly even scrcpy use ADB to emulate a TCP
         | connection.
        
           | causi wrote:
           | _two computers will work both as host and cannot be connected
           | directly_
           | 
           | I cannot believe transferring a file from one computer to
           | another without a network is still such a pain in the rear.
        
           | aa_memon wrote:
           | Do these limitations also apply to the newer Thunderbolt
           | based usb c ports? If you can't tell I really miss target
           | display mode and wish a wired cross platform ideally open
           | source solution existed to use any computer as a second
           | monitor.
        
       | xfalcox wrote:
       | Man I wish I could get this running on my Android Auto compatible
       | car media thing.
        
         | vageli wrote:
         | There are a number of tools including AA Mirror that cast the
         | phone screen to the center console (via connected USB cable).
        
       | textread wrote:
       | scrcpy (mnemonic SCReen CoPY) is such a cool, unique, easily
       | googlable & memorable name.
       | 
       | I pray to God to give me this wisdom everytime I am goofing off
       | on instantdomainsearch.
       | 
       | ---------edit:-                   Why scrcpy?         A colleague
       | challenged me to find a          name as unpronounceable as
       | gnirehtet.              strcpy copies a string; scrcpy copies a
       | screen.
       | 
       | https://github.com/Genymobile/scrcpy/tree/4e9e712#why-scrcpy
        
         | em-bee wrote:
         | it looks to similar to strcpy() which for some reason makes it
         | confusing and not at all memorable to me. (and i don't even
         | write code in languages that have this function)
        
           | textread wrote:
           | Being similar to strcpy() seems to have been intentional by
           | its creator.
           | 
           | Alas, a feature has turned into a bug :(
        
         | digdugdirk wrote:
         | Super interesting comment, since I've used the software for
         | years and had always assumed the name had something to do with
         | "scraping" your UI from your phone to your screen.
         | 
         | Agreed on the cool/unique, but I could never remember the name
         | when I needed to look for it, because I never made the "screen
         | copy" connection.
         | 
         | Just another data point for why marketing is a thing, I
         | suppose.
        
           | textread wrote:
           | Thank you. Let us assume that you were the owner of a
           | hypothetical business named scrcpy.com
           | 
           | You would love for browsers to implement CSS colored urls or
           | capital lettering to resolve both the issues you raised.
        
         | tripdout wrote:
         | And up next, scrncpy
        
       | 2h wrote:
       | 78,000 stars, 2096 commits, of which Romain has 87%, and he only
       | has one GitHub sponsor:
       | 
       | https://github.com/sponsors/rom1v
       | 
       | and two LiberaPay sponsors:
       | 
       | https://liberapay.com/rom1v
       | 
       | who donate a combined 3 euro per month. If you can afford it,
       | please send this guy some money, he has earned it many times
       | over.
        
       | VikingCoder wrote:
       | Does it work with media players? Netflix, Disney, etc?
        
         | dotancohen wrote:
         | Why wouldn't it? I don't use these apps, what is special about
         | them?
        
           | occz wrote:
           | DRM, if I had to guess.
        
         | Mindwipe wrote:
         | No.
         | 
         | It's still a userland app.
        
         | donio wrote:
         | For DRM players I get blank video, audio works. Non-DRM players
         | do work.
        
       | eddieroger wrote:
       | This app and its sister app, Gnirehtet, were essential to me as
       | an Android dev in a corporate environment. It's very cool to see
       | them continuing to ship features in the face of Android Studio
       | releasing mirroring and remote control. I am excited to check out
       | this update!
        
       | cmm wrote:
       | just to register that I didn't know about scrcpy or gnirehtet,
       | have no obvious need of either, but they are impressively neat!
        
       | mdrzn wrote:
       | So I can use my phone as webcam now? Wirelessly?
        
         | diffeomorphism wrote:
         | You could already do that for years, e.g. droidcam. That has
         | nothing to do with the article though? This is about showing
         | the phone screen on your computer.
        
           | mdrzn wrote:
           | Last time I tried was with my Samsung S2, and I remember it
           | being a PITA.
           | 
           | Now with newer phones I honestly never tried, but if I could
           | share the screen on the pc I would be able to use AR effects
           | from Instagram and TikTok on Skype/Discord etc.
        
             | diffeomorphism wrote:
             | Hm, so scrcpy+obs virtual cam or something? Sounds
             | interesting. Another fun option is opencv for effects, e.g.
             | 
             | https://learnopencv.com/real-time-style-transfer-in-a-
             | zoom-m...
        
       | [deleted]
        
       | almog wrote:
       | Scrpy has been such a great tool!
       | 
       | There is another project inspired by scrcpy (I think) called
       | sndcpy but it's no longer maintained it seems, so I'm very glad
       | to see these capabilities added to scrcpy.
       | 
       | I've been trying in the past and failed to setup an A2DP + Bluez
       | to allow me to use my desktop machine as a handset for my android
       | phone. I know that such tools exist for Windows but couldn't to
       | work well on Mac or Linux. If Scrcpy had a bi-directional audio
       | copy (i.e. mount a mic), it would probably be able to do just
       | that.
        
         | erichdongubler wrote:
         | > There is another project inspired by scrcpy (I think) called
         | sndcpy but it's no longer maintained it seems, so I'm very glad
         | to see these capabilities added to scrcpy.
         | 
         | From the blog post:
         | 
         | > With the introduction of a new API to capture audio from an
         | Android app in Android 10, I made a prototype called sndcpy.
         | ...
         | 
         | Not only was it work by the same author, it was one of
         | _multiple_ pushes to make this work. Nice!
        
       | SleepilyLimping wrote:
       | Big fan of scrcpy from a consumer usage perspective because I can
       | access mobile-first apps (like Hinge, which doesn't have webchat)
       | while still being able to use my keyboard and mouse to input.
        
       | robberth wrote:
       | I hooked up scrcpy to opencv once so it could play a game for me:
       | https://github.com/robberth/scrcpy-opencv
       | 
       | Not the prettiest but it worked :-)
        
       | mikelovenotwar wrote:
       | Used scrcpy on Friday to recover/access data from a phone with a
       | mostly broke screen. Very impressive. Straightforward and easy to
       | use.
        
         | greatjack613 wrote:
         | If the screen was broken how did you manage to enable debugging
         | and perform authorization?
        
           | anonsec123 wrote:
           | I actually have the perfect(?) solution to this ridiculous
           | problem after it happened to me a couple of months ago.
           | 
           | Hit the Google Assistant button, ask it to turn on
           | "TalkBack". Now you can browse the interface the same way
           | someone blind would browse the interface. Plug in a USB
           | keyboard.
           | 
           | From here you go to the Settings page and enable Developer
           | Tools.
        
             | maven29 wrote:
             | If you have assistant disabled, holding down volume-up and
             | volume-down buttons together on the lockscreen should have
             | the same effect
        
           | mikelovenotwar wrote:
           | The comment said 'mostly broke', many people are familiar
           | enough with their phones and the various screens prompts to
           | do this without looking at all, or with a little guess work
           | with help from various only resources, images & videos.
        
           | forgotpwd16 wrote:
           | Either was already enabled or utilized a custom recovery and
           | modified build.prop.
        
             | textread wrote:
             | I would love to read more about this solution. Would you
             | please direct me to the appropriate XDA forum thread
             | please. Please...:)
        
               | forgotpwd16 wrote:
               | No XDA thread that I know of, but have a nice gist. https
               | ://gist.github.com/varhub/7b9555cdd1e5ad785ffde2300fcfd..
               | .
        
               | textread wrote:
               | Thank you!
               | 
               | Bye, going to Craigslist to buy them broken landfill
               | phones before your suggestion becomes more popular and
               | the price increases :)
        
           | drewtato wrote:
           | Perhaps the prompt wasn't on the broken part? Can also plug
           | in a keyboard and use that if you know the sequence.
        
             | freedomben wrote:
             | srcpy can actually emulate a keyboard and mouse in OTG
             | mode! Discovering that was a thrill for my use case.
        
             | rom1v wrote:
             | Note that scrcpy has an OTG mode which allows to use the
             | computer keyboard and mouse "as if" they were connected via
             | an OTG cable:
             | https://github.com/Genymobile/scrcpy/blob/master/doc/hid-
             | otg... (in that case, USB debugging is not necessary)
             | 
             | > Can also plug in a keyboard and use that if you know the
             | sequence.
             | 
             | For information, once the phone is unlocked and the
             | authorization popup is open, the sequence to validate the
             | authorization popup is Tab, Enter, Tab, Tab, Enter. The
             | difficult part is to enable USB debugging to get the
             | authorization popup without adb though.
        
           | muyuu wrote:
           | in my case a simple USBC-2-USB adaptor allowed me to connect
           | a mouse and it worked right away
           | 
           | like this: https://www.youtube.com/watch?v=2wggP-e3A1Y
           | 
           | stupid as it looks it saved my data without any sophisticated
           | repair
        
           | textread wrote:
           | Not OP. I faced a similar problem once.
           | 
           | I found a friend that owned the same model of phone as mine.
           | I used his phone to approximately eye-measure where on the
           | screen I have to press after entering the Settings app.
           | 
           | Now I repeated these presses on my phone. Luckily, although
           | my phone was broken and the screen had become almost fully
           | black, the touches registered.
           | 
           | ----------- edit:- If you find it difficult to find a friend
           | that owns your unique phone, your local mobile shop might
           | have a demo phone for you to try out.
           | 
           | Or Youtube search for a video titled "How to enable debugging
           | permissions on Samsung S8?"
        
       | Dennip wrote:
       | Been using this for a while now - love it! Fantastic tool, simple
       | and super reliable, just works out of the box!
        
       | erichdongubler wrote:
       | It seems like the blog post link[1] would be better than a GitHub
       | release listing PRs?
       | 
       | [1]: https://blog.rom1v.com/2023/03/scrcpy-2-0-with-audio/
        
       | narenkmano wrote:
       | Scrcpy was a tool that I used everyday during my android dev
       | years!
       | 
       | Really cool to see audio integrated into scrcpy without having to
       | use sndcpy - https://github.com/rom1v/sndcpy
        
       ___________________________________________________________________
       (page generated 2023-03-14 23:03 UTC)