These instructions will show you how to fully mirror your Android phone screen to your Linux computer; this means that everything on the phone will be rendered on the computer, including video playback from any application, including proprietary player-based applications (like NowTV).
- Android phone (Android>5.0);
- Linux computer (tested with Ubuntu 18.04)
- USB cable;
- Make sure that you have installed all the latest updates on your Linux box; on Ubuntu:
sudo apt-get update
sudo apt-get upgrade
also important is your sytem be a recent version of the OS (example: this method has been tested succesfully on Ubuntu 18.04LTS but also found impossible to use for 14.04LTS);
- You need to enter the Developer Mode of your Android phone (note: this does not mean you are rooting it!); follow the steps in this post; this enables Debugging and USB connection;
The only two needed software packages you'll need are:
adbAndroid Debug Bridge; deb; install withsudo apt-get install adbscrcpy- main application - see their gitHub page;
After you've installed adb, install scrcpy as a snap package; first install snapd:
sudo apt-get install snapd
then install scrcpy:
sudo snap install scrcpy
(see instructions here).
Once all the software packages have been installed correctly, connect the phone
to the computer via the USB cable and check the adb daemon starts:
- with the screen unlocked on the phone, type
adb start-server(if, for some reason, the server is running, kill it first byadb kill-server); - the phone will display a sha code and ask you to accept authentication - say yes and also tick the box saying do not display this message again;
- type
scrcpyand the application should start immediately!
Do not even try to install scrcpy on older OS's (I tried on Ubuntu 14.04 and tried
both as a snap package and build from source) - the problem is that dependency libraries
are old and if the OS is not supported anymore you will have to download and build them
manually one by one. A few issues I encountered:
- install as a snap package:
snapdandscrcpyinstall fine but when runningscrcpyall fails sincelibmirclient.so.9is not found (I havelibmirclient.so.7on Ubuntu 14.04 and updating it to 9 is close to impossible sincemirneeds a whole lot of other dependencies); - build from source: you will need
python3; you will also benefit from a virtual environment you can create using e.g. Anaconda; this is because you will need a host of newer packages and compilers:gcc > 4.8ninjamesonffmpeg(note that on Ubuntu 14.04ffmpeghad been temporarily replaced with another package and you'll need to do a lot of gymnastics to get it installed);
In brief - if you are trying to get it working on an unsupported OS, better not :)