Different Uses of Android debug bridge (ADB) ;Part 1, Use SCRCPY to Control Your Android from Your PC
This is my first utopian contribution and I brought dual open source projects that will solve a big problem for a lot of people. Today, smartphones have become a part of our everyday lives, some can’t stay minutes without their smartphones. This also applies to PCs, therefore creating the need to use both at the same time. With SCRCPY you can view and control your android screen even while on your PC. All scrcpy needs to work is a USB connection and ADB (Android Debug Bridge; this is present in all android phones from Android version 4.2 and above). It works on both Windows, Mac and Linux, but on this tutorial I’ll talk on how to connect it on Windows.
What I will learn
- Setup Android Debug Bridge (ADB) on pc
- Turn developer option on your Android phone
- Control your phone fully from PC (playing of games included)
Requirements
- Windows PC
- Android phone (Version 4.2 or Higher)
- Universal Serial Bus (USB) cable
- Download the ADB ZIP file for Windows here
- Download the SCRCPY here
- Download ADB Setup here
What is Android Debug Bridge (ADB)
ADB is a pre-installed Google software that comes with any android phone of version 4.2 or higher. The ADB software is a command-line tool that interacts with an android device. It can be used to do a lot of changes on the android operating software which includes;
Installing/uninstalling apps
Debugging of Apps
Flashings of images (.img files) e.g. recovery.img, boot.img etc
Rooting of android phones
Granting admin privileges to third party apps without voiding warranty
And lots more.
What is SCRCPY
SCRCPY is a tool that allows you cast your android screen on your pc without rooting your phone or installing any third party app on you android device. This can be accomplished by just a USB connection and ADB.
It doesn’t only cast the screen but also give you privilege to interact with the phone normally (like make call, play games etc.) All you have to is click for tap and click and drag for swipe. It also detects app orientation, i.e. stay rotates according to the phones current orientation. The good thing about scrcpy is that it does not require you to root your android phone.
Tutorial
Once you have all the requirements for the tutorial the first step is to setup Android Debug Bridge (ADB).
ADB setup comprises of two stages
- Phone Setup
- PC Setup
Phone Setup
- Open settings application on your phone.
- Navigate to about phone option. It’s usually at the bottom of the list.
- Look for Build Number and tap it 7 times to enable developer option. Once enabled you will get a toast message saying you are now a developer.
- Now go back to the main settings menu and you will see developer option.
- Enter it and turn it ON if it’s OFF. Scroll down and you will see USB Debugging. Activate it and you will get a prompt then tap ok.
PC Setup
- Download the ADB ZIP file for Windows
- Extract the contents of the zip file into any folder of your choice (E.g. ADB) this can done using WinRAR or any other zip file explorer.
- Download ADB setup and run it. This will require administrator privileges which you should grant. A command prompt will pop up like this;
- Type “Y” for yes and press enter. Do this until all installations are done including the drivers.
- The ADB setup is going to install the required divers to enable your system communicate with the android phone.
At this stage the ADB setup is done. Actually you wouldn’t be needing the ADB Zip file for this very tutorial but I just had to include for upcoming tutorials. Now over to scrcpy setup.
SCRCPY Setup
- Download the SCRCPY zip file here download 32 bit zip file if you are running on a 32 bit system and 64 bit for 64 bit system. To know what your system is running on, you can check it at system properties.
- Extract the contents of the zip file into an any folder of your choice (E.g. SCRCPY)
Now every setup is done, it is time too cast your phone screen on your pc.
CASTING YOUR PHONE SCREEN AND CONTROLLING IT FROM YOUR COMPUTER
The following steps will help attain the main aim of this tutorial;
- Connect your phone to your computer using a good USB cable. If it is the first time of connecting the phone to a pc while USB debugging is on you will get a prompt asking you to allow USB debugging for that very pc.
- To continue you have to allow it. You can also tick the always allow from this computer to stop the prompt in case of next time.
It is advisable to enable this feature because you might need to correct some things on phone while locked. Example reset your device pattern, pin, password or any form of security for situations when you have forgotten your current password. (NB. This is only advisable if the pc is your own, for security reasons) - This is not really necessary, but to be sure that all the previous steps were done properly, I will advise you to test if your pc detect the connected phone.
Locate folder where you extracted the ADB zip file for windows pc to and open it. Hold down the shift button and right click on the windows.
Click on open command window here. A command prompt window will pop up like this.
- Now type “adb devices” and press enter key. A list of all attached devices will show.
If you see your device serial number then you are good to go. If don’t see yours then you have recheck the steps to see where missed something.
- Locate the folder where you extracted the scrcpy and launch scrcpy.exe application by double clicking on.
You can also cast the screen by opening a command prompt from the scrcpy folder by holding down the shift button and right clicking then wait for the command prompt to pop up. Once the command prompt is up just type “scrcpy.exe” and press enter.
At this point your phone screen will display on your PC and you will have full control of your android from your PC.
- To stop casting just detach the phone from the pc and the window will close.
Summary
There are many the different ways to project your phone screen on your pc but I have seen scrcpy to be the easiest because it is totally free and does not require any installation of third party applications on phone which could slow down your phone or even take private information from your phone without you knowing. I will also like to let you know that most other methods of projecting your phone on your pc does not let you control everything, some only give you the privilege to cast the screen and access files stored on your phone. This is done by establishing a server either wirelessly or by USB tethering hotspot. Example of such method is the PC Remote Receiver which only lets you cast you screen but you won’t be able to control the phone.
The main concept of scrcpy is to let you operate your android phone very well when your screen is broken or even faulty, but remember that you would have had to have enabled USB debugging on the phone before the screen was damaged. Another utility of scrcpy is in situations where you are the can of person that’s always operating your system and want to still you be needing to control your phone at the same time. Instead of handling two devices, you can merged them as one.
Projects Repositories
https://github.com/Genymobile/scrcpy/releases/tag/v1.6
https://github.com/google/adb-sync
Github Profile
https://github.com/Jaydurella
Thank you for your contribution @jaydurella.
After analyzing your tutorial we suggest the following points:
While this can come in handy, basic on screen instructions are normally not the best content we look for under utopian tutorials.
The utopian tutorials are specifically to be used in a technical way to help the open source community learn new content.
Avoid installation steps which are already well documented.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thank you for your review, @portugalcoin! Keep up the good work!