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.
Introduction
Hardware
Hardware problems on the phone
Goals
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-keyboardThis 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-keyboardWith 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.