It is always great for a developer to showcase the product that they have developed. Most of the time we find ourselves in front of multiple screens, including developer enabled test devices. There comes a time that you have to face human beings!
Of late we have been developing a lot of nifty tools on Android. And naturally, we need to showcase these tools/products to end-users, to get that much-needed feedback and in some cases support the team that finally delivers the finished product to an audience, in some training facility with all manner of projections and PowerPoint presentations going.
We have in the past used Vysor, the freemium version for most of the presentations. It is a great product. We however stumbled upon a nifty tool that we recommend any time any day, scrcpy. Especially if you fancy yourself a developer and you are running on a budget that saving a cent contributes to the positive performance of the company :).
scrcpy provides display and control of Android devices connected via USB (or over TCP/IP). It does not require any root access. It works on GNU/Linux, Windows and macOS.
So to get this little, and by little as at version 1.22, this sits at 33MB, going, you will need to do the following: –
- Get your house in order
-
- Get your Android ADB tools. If you are running Android Studio, this should already be sorted out for you. Check this location to confirm (on Windows 10) %LOCALAPPDATA%\Android\sdk\platform-tools. You might want to add this location to your environment variables path so adb commands can be executed across your environment.
- Ensure your device USB Debugging is enabled. There is plenty of material on how to get this done on the Internet.
-
- Install, more like download scrcpy on your machine
-
- Get your latest copy of the executables and download them in your fav location. Extract the contents
- Hook your device onto your development machine via USB
- Enable USB Debugging on your device. This took us a bit of time the first time we did this. Ensure the check box is enabled.
- Test running adb commands and ensure the device is visible
- Voila, run scrcpy and you are good to play.
-
- Bonus, Wifi connection
-
- Connect your device to your PC and allow USB debugging confirmation.
- Enter the command “adb devices” to confirm the connection.
- Now, enter the command “adb tcpip 5555” to enable WiFi Debug mode.
- Remove the USB cable.
- Enter the command “adb connect 192.168.1.8” – of course change that to the IP of the gadget
- You can locate your Android device’s IP address in Settings — About phone — IP address.
- Enter the command “scrcpy”
-
That’s it and you are good to go. As mentioned, this should be pretty much the same effort required to set up on Linux and Mac and if you love free things, this is worth the effort.
There are plenty of other tools that you can use for screen mirroring apart from the ones mentioned here. Ultimately, get the tool that makes life easier for you.