How to Cast Your Phone Screen and sound to PC without Using any third party app?

How to Cast Your Phone Screen and sound to PC without Using any third party app?

14.6K views
Summary
Mirroring your Android phone screen to a PC with ADB is simple. Enable USB debugging, install ADB on your PC, connect your phone, verify the connection with adb devices, and use adb platform tools to mirror screen.

How to Mirror Your Phone Screen to PC Using ADB

Mirroring your phone screen to a PC can be useful for various purposes, such as presentations, demonstrations, or simply viewing content on a larger screen. One efficient way to achieve this is by using ADB (Android Debug Bridge). Follow the steps below to mirror your phone screen to your PC using ADB commands.

Download Source Code

▶ Follow These Steps to Cast your phone screen.

  1. Turn on usb debugging on your phone by going in developer mode.
  2. Downlaod the above source code.
  3. Extract into you root directory of your Computer.
  4. open scrcpy.exe file.

Prerequisites

  • An Android phone with USB debugging enabled.
  • A USB cable to connect your phone to the PC.
  • ADB installed on your PC.

Steps to Mirror Your Phone Screen to PC

  1. Enable USB Debugging on your Phone:
    • Go to Settings > About Phone.
    • Tap Build Number seven times to enable developer options.
    • Go back to Settings > Developer Options.
    • Enable USB Debugging.
  2. Install ADB on your PC: Download and install ADB from the official Android developer website. Follow the instructions provided for your operating system.
  3. Connect Your Phone to Your PC: Use the USB cable to connect your phone to your PC. Ensure that the phone is set to transfer files (MTP mode).
  4. Verify the Connection: Open a command prompt or terminal on your PC and type:
    adb devices
    You should see your device listed. If not, ensure that the USB debugging is enabled and try again.
  5. Start Screen Recording: Type the following command in the command prompt or terminal:
    adb exec-out "screenrecord --output-format=h264 --size 1280x720 - | ffplay -framerate 60 -"
    This command will start mirroring your phone screen to your PC. You can adjust the resolution and frame rate as needed.