Android Debug Bridge (
ADB) is a versatile command-line tool that allows users to interact with Android devices.
scrcpyis a powerful tool that allows users to control and mirror Android device’s screen on computer.
Prerequisites:
Enable Developer Options on Android device:

- Go to Settings > About phone.
- Tap Build number 7 times until you see a message saying “You are now a developer!”
Enable USB Debugging:

- Go to Settings > System > Developer options.
- Enable USB debugging.
Install ADB on computer:
Windows Platform (via Chocolatey)
Open an elevated Command Prompt (Run as Administrator).
| |
Close and reopen the Command Prompt to ensure the installation is recognized.
| |
- Linux Platform (Ubuntu/Debian)
| |
Part 1: Pushing Files to an Android Device Using ADB
Connect Android device to computer via USB.
Make sure the device is recognized by running:
1adb devicesIf device is listed, you’re ready to proceed. If not, check USB connection and drivers.
Push File(s) to the device:
Use the
adb pushcommand to copy the file to a directory on device. For example:1adb push path/to/app.apk /sdcard/

1adb push .\Cover.jpeg /storage/emulated/0/Backup/This command copies
Cover.jpegto the/storage/emulated/0/Backup/directory on device.Install the APK:
Use the
adb installcommand to install the APK directly:1adb install path/to/app.apkIf the APK is already on the device (e.g., in
/sdcard/), you can install it using:1adb shell pm install /sdcard/app.apk
Verify the installation:
Check if the app is installed by searching for it on device or using:
1adb shell pm list packages | grep package.name
Notes:
If you encounter permission issues, you may need to remount the system partition as read-write (requires root access):
1 2adb root adb remountFor system apps, you may need to push the APK to
/system/app/or/system/priv-app/and set the correct permissions.
Example:
- Push the APK to the device
| |
- Install the APK
| |
- Alternatively, install directly from computer
| |
That’s it! You’ve successfully pushed and installed an APK using ADB.
Part 2: Using Scrcpy to Mirror and Control Android Device
Prerequisites
Enable USB Debugging on Android device:

- Go to Settings > About phone > Tap Build number 7 times to enable Developer Options.

- Go to Settings > System > Developer options > Enable USB debugging (also with Wireless debugging).
Install
ADBandscrcpy:Windows via Chocolatey(Run as Administrator)
1choco install adb scrcpy -yLinux Platform (Ubuntu/Debian)
1sudo apt install adb scrcpy -y
Use scrcpy via ADB
Connect Android device to computer via USB.
Ensure the device is recognized by running:
1adb devicesIf device is listed, you’re ready to proceed. If not, check USB connection and drivers.
Run
scrcpy:Open a terminal or command prompt and simply run:
1scrcpyThis will launch the
scrcpywindow, mirroring Android device’s screen.
Wireless Connection (Optional):
If you want to use
scrcpywirelessly, follow these steps:Connect device via USB initially.
Enable wireless debugging:

- Go to Settings > Developer options > Enable Wireless debugging.
Pair device with computer:

1adb pair <IP>:<PORT>(Replace
<IP>and<PORT>with the values shown in the Wireless debugging settings on device.)1adb pair 172.16.8.56:34121Enter pairing code:
672265Successfully paired to 172.16.8.56:34121 [guid=adb-DYDMMFWC6XFAX4MN-2bJXjj]
Disconnect the USB cable.
Connect wirelessly:

1adb connect <IP>:<PORT>1adb connect 172.16.8.56:34121connected to 172.16.8.56:34041
Run
scrcpyas usual:
1scrcpyRun
scrcpywith TCP/IP:1scrcpy --tcpip=<IP>:<PORT>1scrcpy --tcpip=172.16.8.56:34121scrcpy --tcpip=<IP>:<PORT>allows direct connection to Android device over Wi-Fi.
Common scrcpy Commands and Options
scrcpy supports many command-line options for customization. Here are some useful ones:
Reduce resolution:
1scrcpy -m1024(Scales the device screen to a maximum width of 1024 pixels.)
Limit frame rate:
1scrcpy --max-fps 30(Limits the frame rate to 30 FPS.)
Record the screen:
1scrcpy --record file.mp4(Records the screen to a file named
file.mp4.)Disable screen mirroring (only control):
1scrcpy --no-display(Useful for controlling the device without displaying its screen.)
Turn off the device screen:
1scrcpy --turn-screen-off(Mirrors the device but turns off its screen.)
Copy device clipboard to computer:
1scrcpy --forward-all-clipboard(Syncs the clipboard between the device and computer.)
Rotate the device screen:
1scrcpy --rotation 1(Rotates the device screen. Values:
0(no rotation),1(90°),2(180°),3(270°).)
Keyboard and Mouse Controls
- Right-click triggers
BACK - Middle-click triggers
HOME - Alt+f toggles fullscreen
- There are many other shortcuts
Conclusion
ADBandScrcpyare powerful tools for managing and controlling Android devices.With
ADB, can push and install APKs, whileScrcpyallows to mirror and control device’s screen with ease.
