I have been using a google pixel 6 pro for some time now, excellent phone, and it already got the android 16 update, so thanks to google for extending our support ! rumor has it that with this extended support, we will also get android 17 !
Now, my old Samsung S10+ that I had before the pixel 6 has a broken screen, the upper side of the screen works, but the touch is broken, the lower 30% of the screen are black but the touch screen works, it sustained this injury when a bottle of vodka went crashing down on the screen when the phone was fairly new ! the poor thing never stood a chance, and was only used for a few months (if even that)
Anyway, to avoid keeping my phone occupied when I am taking a video, I have been using a xiaomi note 4, not bad a camera, but the S10+ is obviously a better option for this task
So, how can I use it, turns out there is open source software called scrcpy that should be able to do both jobs, mirror the screen on a PC or another phone, and send the input to the phone ! scrcpy should be able to connect to the PC through WIFI (If your phone is recent enough) or USB (Whatever is ADB compatible)
Installing scrcpy on my PC
NOTE: I use Gnome on a Linux Debian machine, but installing it on windows should be straight forward !
sudo apt install scrcpy adb -y
This installs both Scrcpy and Android Debug Bridge (ADB), which are needed to communicate with your phone.
NOTE: The above does not work in bookworm as there is no such package (Both previous and next versions do have it), so instead, if you are on bookworm, follow the steps below
Bookworm installation
sudo apt install git ffmpeg libsdl2-dev adb gcc make meson ninja-build pkg-config libavcodec-dev libavformat-dev libavutil-dev libusb-1.0-0-dev libavdevice-dev
adb
sudo apt install openjdk-17-jdk gradle
Now, we need the SDK !
mkdir -p ~/Android && cd ~/Android
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip commandlinetools-linux-*.zip -d cmdline-tools
cd cmdline-tools
mv cmdline-tools latest
NOTE: You will have the folder cmdline-tools inside the folder cmdline-tools so we renamed the inner to latest
vi ~/.bashrc
export ANDROID_HOME=$HOME/Android
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH
source ~/.bashrc
Now, you need to accept all the license agreements
~/Android/cmdline-tools/latest/bin/sdkmanager --licenses
cd ~
mkdir src
cd ~/src
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
meson setup build
ninja -C build
sudo ninja -C build install
Now, I assume you know how to connect your phone to your PC via ADB, if not, there are tutorials all over the internet… You start by enabling developer tools mode on the phone by tapping the build number 7 times then enable debug (Either USB or WIFI or both)
Once that is done, you can get a clone of the screen with the following
adb devices
scrcpy -s device1_serial
You don’t need the -s serial part if there is only 1 device
Also, you can run multiple instances