scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

[Help/Advice] scrcpy + reset with a broken screen

Open Atemo-C opened this issue 1 year ago • 2 comments

Introduction

Hardware

  • Samsung Galaxy S10+ SM-G975F/DS running One UI 4.1 / Android 12
  • USB-C to USB-C cable, connected to a keyboard/mouse combo device
  • USB-C to USB-A cable, connected to a desktop PC
  • Desktop PC running the NixOS Linux distribution

Hardware problems on the phone

  • Broken touchscreen (no area of the screen works)
  • Broken screen (no part of the screen is visible)

Goals

  • Being able to reset device
  • Installing a custom ROM (most likely impossible)

scrcpy currently

Always assume things will break

I am fortunate and preventive enough to have enabled USB debugging on this phone, and to have taken screenshots of how the settings page and the most important part of them look (notably, the Accessibility page). This was in case the screen of the phone would one day be broken, which, turns out, has happened.

How I allowed adb connection to the computer

As I had screenshots of the necessary settings page stored on my computer, I was able to, after a bit of trial and error thanks to some UI weirdness in Samsung's settings skin, find the right key combinations to do everything needed.

Enabling TalkBack (with my specific home screen)

With a physical keyboard plugged into the device, or with scrcpy --otg --hid-keyboard

  • 4 Tab
  • 1 Enter
  • 1 Down arrow
  • 1 Enter
  • 21 Down arrow
  • 1 Enter
  • 2 Down arrow
  • 1 Enter
  • 1 Down arrow
  • 1 Enter
  • 2 Tab
  • 1 Enter
  • 1 Escape

This allowed me to enable TalkBack, which I needed to be sure of what I was roughly doing on the screen.

Authorizing (permanently) ADB access

With a physical keyboard plugged into the device, or with scrcpy --otg --hid-keyboard

  • Plug the phone into the computer
  • Message for ADB debugging shows up
  • Tab (TalkBack says “always allow from this computer”)
  • Enter (TalkBack does not say anything)
  • Tab (TalkBack says “cancel button”)
  • Tab (TalkBack says “allow button”)
  • Enter (TalkBack does not say anything)

With all of this, I now have my computer permanently authorized, and I can mirror the screen with scrcpy, allowing me to use the phone properly via my computer.


scrcpy and possible impossibilities

Factory data reset

I wish to do a factory data reset of the phone. However, I do not know what the UI of the setup screen is, so I cannot predictably use my keyboard to select accessibility and to enable TalkBack to finish the setup and enable USB debugging, before doing all the steps above. If I somehow knew the exact key combination I needed to press, this would not be an issue, and I would easily be able to reset the phone.

Key combination

Well, if anyone would know the key combination necessary to do what is written just above, it would be awesome to know.

scrcpy on setup screen

Is there any possible way to have scrcpy somehow be able to work during the setup of the phone after a factory reset (without rooting), so that I can see the screen? I ask in the first place because plugging this phone to an HDMI monitor during the setup screen does not mirror it properly for me, for some reason (all of my other phones, including my old Samsung Galaxy S5, work properly in this situation).

Installing a custom ROM

This is impossible, is it not? It would require scrcpy to somehow be able to mirror the screen and be able to interact with the phone inside the bootloader and whatever program may be used during the installation of a custom ROM. Furthermore, its connection would most likely interfere with the installation process of the ROM itself. I have not heard of someone even trying that. If I am wrong, however, please feel free to correct me. I would much rather live with LineageOS than Samsung's OneUI skin.

Atemo-C avatar Mar 02 '24 23:03 Atemo-C

scrcpy --otg --hid-keyboard

adam12639 avatar Jun 22 '24 16:06 adam12639

scrcpy --otg --hid-keyboard

adam12639 avatar Jun 22 '24 16:06 adam12639

INFO: Killing adb server (if any)... ERROR: Could not find any USB device

I got this message

ghost avatar Aug 31 '24 02:08 ghost

See https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#otg-issues-on-windows

rom1v avatar Aug 31 '24 05:08 rom1v

@Atemo-C I did a root image install and custom recovery installation of my old broken screen samsung phone a little while ago (Screen doesn't displays anything but the touch works).

SETUP SCREEN: This I did with TalkBack, it takes time to get used to navigate with it but with some time spent it is very much possible.

CUSTOM ROM: Installing custom roms won't be a problem as everything could be done through ADB or the various Recovery Download Tools available for samsung phones. I only found the Android setup screen a tough challenge, going in blind with the talkback.

spotted-cat avatar Dec 21 '24 10:12 spotted-cat

CUSTOM ROM: Installing custom roms won't be a problem as everything could be done through ADB or the various Recovery Download Tools available for samsung phones. I only found the Android setup screen a tough challenge, going in blind with the talkback.

Could you share some of these tools? It would be greatly appreciated.

Atemo-C avatar Dec 21 '24 13:12 Atemo-C

Hey! I have a problem with my Samsung Galaxy A33. The touchscreen isn’t working, and the screen is completely black, so I can't see or do anything. How can I enable TalkBack in this situation? Which application or console should I use, and what button combination do I need?

Nebukka avatar Mar 29 '25 10:03 Nebukka

Hola

yo tuve un problema similar con la tactil roto. como no conecte nunca el telefono de mi padre a scrcpy use el comando "scrcpy --otg" para navegar pero tenia que poner mi mano encima de la pantalla para evitar los pulsos fantasma, asi otorge permisos necesarios y eureka! ya podia ver la pantalla y evitar los pulsos fantasma.

scrcpy --turn-sreen-off

me gustaria que scrcpy tuviera la opcion para desactivar el tactil pero con la pantalla encendida para evitar el flag_secure 😃

Mellaman-fernan avatar May 06 '25 16:05 Mellaman-fernan