Skip to main content

Scrcpy: Not just a mirroring tool!

A little backstory #

About a year ago, my father’s phone suddenly went blank, So I needed to somehow get the files off of it without seeing anything on the screen.

OTG cable torture #

My first idea was to use an OTG cable that I had lying around, but unfortunetely It was pretty unreliable. Barely transmitted my keystrokes and it was painful to use.

Open source to the rescue #

After some digging I came across an excellent open-source tool for Android phones called Scrcpy. It’s mainly used for mirroring a phone’s screen to a PC, but that requires the phone to have USB Debugging enabled and the PC to be authorized, which is impossible to set because of the screen, or is it?

Luckily this tool can work in OTG-mode, which means I can pass my computer’s keyboard to the phone temporarily using this command:

$ scrcpy --otg --hid-keyboard

Although I solved the input problem, I also needed to enable USB Debugging to be able to see the screen using Scrcpy. I somehow managed to navigate blindly through the launcher while taking screenshots and checking them to keep track where I was in the menu. I eventually succeeded and I was able to mirror the screen by running the above command without any flags.

TheFocusDev
Author
TheFocusDev
Student, thinker and computer enthusiast from Hungary