UPDATE THE SOFTWARE https://github.com/Xnuvers007/screenmirror-python/releases/tag/v6.1.0
See and control your Android phone screen live on your laptop — via USB cable or wirelessly (WiFi)!
Supports Windows & Linux | USB / WiFi / Wireless Debugging | With Audio | Free & Open Source
📘 This guide is written for everyone, including those with no IT background. Follow each step slowly and carefully. If anything is confusing, read the 💡 tips below each step.
ScreenMirror is a program made by Xnuvers007 that lets you display your Android phone's screen live on your laptop or desktop computer.
Think of it like this: everything that appears on your phone screen will also appear on your laptop screen in real-time (instantly, with no delay). Not only that, you can also click, type, and scroll on your phone using your laptop's mouse and keyboard.
This program uses a technology called ADB (Android Debug Bridge), which is an official tool from Google/Android. It is very safe and requires absolutely no modification to your phone.
✅ No root required
✅ No special app to install on your phone
✅ Completely free
✅ High-quality output, up to 60 FPS
| Use Case | Description |
|---|---|
| 🎮 Play Games on a Big Screen | Enjoy mobile games on a larger monitor with keyboard & mouse control |
| 📊 Presentations | Display your phone screen to an audience via laptop or projector |
| 📹 Screen Recording | Save your phone screen as a high-quality MP4 video directly on your laptop |
| 💻 Productivity | Reply to chats, open apps, transfer files — all from your laptop |
| 🛠️ App Development | Test and debug Android apps quickly from your computer |
| 📚 Online Classes | Share your phone screen on your laptop for Zoom/Google Meet screen sharing |
Before you start, make sure you have everything on this list:
| Component | Minimum Requirement | Notes |
|---|---|---|
| Android Phone | Android 5.0 or newer | Android 9+ recommended for best performance |
| Windows Laptop/PC | Windows 7/8/10/11 (64-bit) | 32-bit works too, but 64-bit is recommended |
| Linux Laptop/PC | Ubuntu 18.04+ / Debian / Mint / Kali | Debian-based distributions |
| USB Cable | Data cable (not charge-only) | A cable that can transfer photos to a computer ✓ |
| Internet Connection | Minimum for initial download | Only needed once to download scrcpy |
| WiFi (optional) | Phone & Laptop on the same network | For wireless connection |
⚠️ Important Note About USB Cable: Make sure you use a cable that can transfer data, not just one that charges. Easy test: plug your phone into the computer. If you see an option like "File Transfer" on your phone, the cable works!
| Android Version | Name | Features Available |
|---|---|---|
| Android 5.0 – 8.1 | Lollipop – Oreo | |
| Android 9 – 10 | Pie – Q | ✅ Full (USB + WiFi + audio) |
| Android 11 – 12 | R – S | ✅ Full + cable-free Wireless Debugging |
| Android 13 – 15+ | T – and above | ✅ Full + latest video codecs (AV1) |
| Phone Brand | Path to "Build Number" |
|---|---|
| Samsung | Settings → About Phone → Software Information → Build Number |
| Xiaomi / MIUI / HyperOS | Settings → About Phone → All Specs → MIUI/HyperOS Version |
| Poco | Settings → About Phone → MIUI Version |
| Oppo / ColorOS | Settings → About Phone → Build Version |
| Realme / Realme UI | Settings → About Phone → Build Version |
| Vivo / FunTouch | Settings → About Phone → Build Version |
| OnePlus / OxygenOS | Settings → About Phone → Build Number |
| Google Pixel / Stock Android | Settings → About Phone → Build Number |
| TECNO / Infinix / itel | Settings → About Phone → Build Number |
This step only needs to be done once.
-
Open the main page of this repository: https://github.com/Xnuvers007/ScreenMirror
-
Find and click the green button that says
<> Code(usually in the upper-right area of the page). -
From the menu that appears, click
Download ZIP. -
Once the download is complete, open your laptop's
Downloadsfolder. -
Find the file named
ScreenMirror-main.zip. Right-click on it. -
Choose
Extract All.... -
Click the
Extractbutton. A new folder calledScreenMirror-mainwill appear. -
Open that folder. This is where the
run.bat(Windows) orrun.sh(Linux) file lives.
💡 Do NOT run the program directly from inside the ZIP file! You must extract it (unzip it) into a regular folder first, then run it from there.
git clone https://github.com/Xnuvers007/ScreenMirror.git
cd ScreenMirror🗣️ What is USB Debugging?
USB Debugging is a hidden feature in Android phones designed for developers. Enabling it allows your laptop to "communicate" with your phone via USB cable or WiFi. It is completely safe and does not harm your phone. You can disable it again anytime you want.
Part A: Unlock the Hidden Menu (Developer Options)
Developer Options is a hidden menu that needs to be "unlocked" first.
-
Open the Settings app (⚙️) on your phone.
-
Scroll all the way down and tap "About Phone".
-
Look for "Build Number". Refer to the table above for your specific phone brand.
-
Tap "Build Number" 7 times in a row quickly.
- If asked for your PIN/Pattern, enter it first.
- You'll see a countdown: "You are 3 steps away from being a developer..."
-
✅ Done! You'll see: "You are now a developer!"
Now that Developer Mode is on, enable USB Debugging inside it.
-
Go back to the main Settings screen.
-
Find "Developer Options". It's usually:
- At the very bottom of the Settings list, OR
- Inside "System" or "Additional Settings"
-
Open Developer Options. Make sure the toggle at the top is ON (blue or green).
-
Scroll down, find "USB Debugging".
-
Tap the toggle to turn it on. A warning popup will appear.
-
Tap "OK" or "Allow" to confirm.
💡 Tip: On Samsung devices: Settings → Developer Options → Debugging → USB Debugging
-
Plug your phone into your laptop using a USB cable.
-
A popup will appear on your phone: "Allow USB Debugging?"
-
Important: Check the box that says "Always allow from this computer".
-
Tap "Allow".
❓ No popup appeared? Try: Settings → Developer Options → Revoke USB Debugging Authorizations → then unplug and reconnect the cable.
This program needs a small application called scrcpy (pronounced "screen copy") to work. We'll download and install it automatically through the script.
Make sure your laptop is connected to the internet before starting this step.
-
Open the folder from Step 1.
-
Find the file named
run.batand double-click it to run it. -
If a Windows warning appears (Windows Defender / UAC) saying "Windows protected your PC...", click "More info" and then "Run anyway".
💡 This warning appears because the
.batfile hasn't been run on your laptop before. This is normal and safe. -
A black window (Command Prompt) will open. Type
2to choose English, then pressEnter. -
The main menu will appear. Type
8(Download & Install Dependencies), then pressEnter. -
The script will automatically check for the latest
scrcpyversion online. Once checked, type:1if your laptop is 64-bit (almost all modern laptops are 64-bit)2if your laptop is 32-bit
💡 How to check 32 or 64-bit: Right-click "This PC" → Properties → look for "System type". If it says "64-bit operating system", type
1. -
The download will begin. Wait until it finishes (usually 1–5 minutes depending on your internet speed).
-
Once done, press any key to return to the Main Menu.
🌟 Smart Feature: The downloaded
scrcpyfolder will be automatically registered to Windows Environment PATH permanently. This means your laptop can now runscrcpyfrom anywhere without any additional configuration!
Once all preparations are complete, it's time to connect your phone!
There are 3 connection methods to choose from:
| Method | Best For | Quality |
|---|---|---|
| 🔌 USB Cable | All Android phones, most stable | ⭐⭐⭐⭐⭐ |
| 📡 WiFi (TCP/IP) | All Android phones, USB needed once | ⭐⭐⭐⭐ |
| 📶 Wireless Debugging | Android 11+ only, 100% cable-free | ⭐⭐⭐⭐ |
This is the easiest and most stable method. Highly recommended for beginners!
Prerequisites: Phone connected to laptop via USB cable, and USB Debugging enabled.
-
In the ScreenMirror folder, double-click
run.bat. -
Type
2(English) and pressEnter. -
In the Main Menu, type
1(USB Connection) and pressEnter. -
The script will automatically detect your phone and display its info (phone name, Android version, etc.).
-
You'll be asked a few configuration questions:
- Video Codec: Press
Enterto use H.264 (default, most compatible). - Bitrate (Video Quality): Press
Enterfor 8M (default). Higher = better quality but uses more bandwidth. - Max FPS: Press
Enterfor 60 FPS (default). Smoother motion. - Max Resolution: Press
Enterfor 1080p (default). Lower to 720 if you experience lag. - Video Buffer: Press
Enter(default 50ms is already optimized). - Stay Awake (Keep phone screen on): Type
ythenEnter(highly recommended!). - Record Screen to File: Type
nthenEnterif you don't need recording. - View-Only Mode (No Control): Type
nthenEnterto allow laptop control of phone. - Turn Phone Screen Off: Type
nthenEnter(chooseyif you want the phone screen off while mirroring continues).
- Video Codec: Press
-
✅ Done! A new window will appear showing your phone's screen. You can now control it with your mouse and keyboard!
This method lets you move freely without any cable in the way. Your phone and laptop must be on the same WiFi network.
⚠️ Important Note: For the very first time, you STILL need a USB cable for the initial setup. After that, you can unplug it.
Step 1: Find Your Phone's IP Address
An IP address is like your phone's "home address" on your WiFi network. Here's how to find it:
- Open Settings → WiFi → Tap the name of your active WiFi → Look for "IP Address"
- Example:
192.168.1.105(the numbers will be different for each phone)
Step 2: Run the Script
- Connect your phone to the laptop with a USB cable (only for this step).
- Double-click
run.batand choose English. - In the Main Menu, type
2(WiFi Connection) and pressEnter. - The script will activate TCP/IP mode on your phone.
- When asked for "Enter Android phone IP address:", type the IP you found in Step 1 and press
Enter. Example:192.168.1.105 - The script will attempt to connect.
Step 3: Unplug the Cable & Enjoy
- Once connection is successful, unplug the USB cable from your laptop.
- Follow the configuration questions just like the USB method.
- ✅ Done! Your phone is now connected to your laptop wirelessly!
💡 Important: Every time your phone restarts or disconnects from WiFi, you'll need to repeat this process (because the IP address can change). Save the configuration so you don't have to retype it each time.
This is the most advanced method — 100% cable-free from start to finish! However, it only works on phones with Android 11 or newer.
- Open Settings → Developer Options.
- Scroll down, find "Wireless Debugging" (may also appear as "Wi-Fi Debugging").
- Enable the toggle. Tap "Allow" on the confirmation popup.
- Tap on the text "Wireless Debugging" (not the toggle, but the text itself) to enter its sub-menu.
- Note the IP address and Port shown at the top (example:
192.168.1.5:39465). This port is for connecting.
Before connecting, your laptop and phone need to "introduce themselves" to each other:
- Inside the Wireless Debugging menu on your phone, tap "Pair device with pairing code".
- Your phone will display:
- IP:Port for pairing (example:
192.168.1.5:43521) — this is DIFFERENT from the port above! - 6-digit code (example:
123456)
- IP:Port for pairing (example:
- On your laptop, double-click
run.bat→ choose English → type3(Wireless Debugging). - When prompted, choose the pairing option and enter the pairing IP:Port and 6-digit code from your phone.
- ✅ You'll see: "Successfully paired". Pairing complete!
💡 Pairing only needs to be done once! After pairing, next time you can connect directly without pairing again — as long as you're using the same laptop.
- Run
run.bat→ English →3(Wireless Debugging). - Enter the connection IP and Port (not the pairing port!) shown at the top of the Wireless Debugging screen on your phone.
- ✅ Done! The mirror window will appear!
For Linux users, the process is slightly different since it uses the Terminal.
Open a Terminal and run the following commands:
# Update package list
sudo apt-get update
# Install adb and scrcpy
sudo apt-get install -y adb scrcpy
# Optional: install the latest scrcpy via snap
sudo snap install scrcpy
# Add yourself to the plugdev group (important for USB recognition)
sudo usermod -aG plugdev $USER
# Log out and log back in for group changes to take effect# Navigate to the ScreenMirror folder
cd ScreenMirror
# Give all scripts execute permission
chmod +x *.sh Linux-ID/*.sh
# Run English version
./run.sh
# --- OR run Indonesian version ---
# cd Linux-ID && ./run.shThe Terminal menu will appear just like on Windows (you will be asked to choose a language first). Simply follow the prompts!
💡 Linux Tip: If your phone isn't detected, try running
adb kill-server && adb start-serverfirst, then reconnect the USB cable.
No need to navigate to the ScreenMirror folder every time you want to cast your screen! This program features Auto-Path injection and built-in Shortcuts.
- After you run
run.batfor the first time, the program's folder is automatically added to your Windows Environment PATH. - Next time, simply press
Windows + Ron your keyboard, typemulaismorrun, and hit Enter. - The ScreenMirror program will launch instantly! (You can also type
mulaismin any CMD window).
- Run
run.shfor the first time. The script will automatically add the folder to your~/.bashrcand~/.zshrc. - After restarting your terminal (or opening a new tab), you can type
mulaismorrun.shfrom any directory to launch it! - Alternative System Install: From the main Linux menu (Option 10), you can select Install Shortcut. This will create global
screenmirrorandmulaismcommands inside/usr/local/bin, making it accessible for all users on your computer.
ScreenMirror comes with many powerful features you can enable from its interactive menu:
| Feature | Description | How to Access |
|---|---|---|
| 🔗 USB Connection | Mirror via cable, highest quality | Menu → 1 |
| 📡 WiFi Connection | Wireless mirror for all Android | Menu → 2 |
| 📶 Wireless Debug | Fully wireless for Android 11+ | Menu → 3 |
| 📸 Screenshot | Capture phone screen directly to laptop | Menu → 7 |
| ⬇️ Auto Install | Download latest scrcpy version automatically | Menu → 8 |
| 💾 Save Configuration | Save settings so you don't have to redo them | Saved automatically |
| Feature | Description |
|---|---|
| 🌙 Stay Awake | Prevents phone screen from turning off while mirroring |
| 🎬 Record Screen | Record phone display as an .mp4 file saved to your laptop |
| 🖥️ No Control Mode | View-only — keyboard & mouse can't control the phone (great for presentations) |
| 🌑 Turn Screen Off | Physical phone screen turns off, but mirror continues (saves phone battery) |
| 🔊 Audio Mirroring | Phone audio streams to laptop speakers (requires sndcpy + VLC for Android < 11) |
| 🔲 Fullscreen | Mirror window goes fullscreen on your laptop |
| Parameter | Default Value | Options | Description |
|---|---|---|---|
| Codec | H.264 | H.264, H.265, AV1 | Video compression format |
| Bitrate | 8M | 2M – 50M | Video quality (higher = clearer) |
| FPS | 60 | 15, 30, 60 | Frames per second (smoothness) |
| Resolution | 1080p | 480, 720, 1080, 1440, custom | Streamed image size |
| Buffer | 50ms | Custom | Buffer delay for stable connection |
When the mirror window is active, you can use these keyboard shortcuts:
| Keyboard Shortcut | Function |
|---|---|
Ctrl + H |
Press the Home button on phone |
Ctrl + B |
Press the Back button on phone |
Ctrl + M |
Press the Menu / Overview button |
Ctrl + S |
Take Screenshot (saved to the folder where the script was run) |
Ctrl + R |
Rotate the screen orientation (portrait/landscape) |
Ctrl + F |
Toggle Fullscreen mode |
Ctrl + W |
Close the mirror window |
Ctrl + N |
Turn off phone screen (mirror continues) |
Ctrl + Shift + N |
Turn on phone screen |
MOD + ↑ |
Increase volume on phone |
MOD + ↓ |
Decrease volume on phone |
MOD + P |
Toggle phone screen on/off |
F11 |
Fullscreen (alternative shortcut) |
MOD + Q |
Quit scrcpy |
💡 Note:
MODis usually the leftAltkey on a Windows keyboard. scrcpy also supports multi-finger gestures: holdCtrlwhile clicking to simulate pinch-to-zoom.
If the screen on your laptop looks choppy or isn't smooth, follow this guide:
| Step | What to Change | Recommended Value |
|---|---|---|
| 1️⃣ | Lower Resolution | From 1080p → try 720p |
| 2️⃣ | Lower Bitrate | From 8M → try 4M or 6M |
| 3️⃣ | Lower FPS | From 60 → try 30 |
| 4️⃣ | Change Codec | From H.265 → try H.264 |
| 5️⃣ | Change Connection | From WiFi → use USB cable |
| Problem | Likely Cause | Solution |
|---|---|---|
| Stuttering screen | Weak WiFi signal | Move closer to router, or use USB |
| Unnatural colors | Codec mismatch | Switch codec to H.264 |
| Connection keeps dropping | Bad USB port | Try a different USB port, prefer USB 3.0 |
| Black screen | Phone locked / screen off | Unlock phone, enable Stay Awake |
| Audio delay | Buffer too small | Increase video buffer value |
A very reasonable question! Let's discuss it honestly and transparently:
When ScreenMirror is active, the laptop sends virtual signals (touches, keyboard keystrokes) to the phone through the ADB protocol. This is called Input Event Injection. ADB is an official technology from Google, used by millions of Android developers worldwide.
| ✅ Safe when... | |
|---|---|
| You're using your own laptop | Using someone else's or a public computer |
| Connected via direct USB cable | Using public WiFi (cafe, mall, airport) |
| On your private/home WiFi network | Your laptop can be accessed remotely by others |
| The phone only contains your data | The phone contains sensitive data from others |
If you only want to display your phone screen without the risk of someone controlling it from the laptop, enable No Control mode when prompted during setup. In this mode:
- ✅ Phone screen is still visible on the laptop
- ❌ Laptop mouse and keyboard cannot control the phone at all
# Manual scrcpy command for this mode:
scrcpy --no-control✔ Make sure USB cable is properly connected (try unplugging and replugging)
✔ Ensure USB Debugging is enabled on the phone (see Step 2)
✔ Watch your phone screen — tap "Allow" if a popup appears
✔ Restart ADB server: open Command Prompt, type: adb kill-server && adb start-server
✔ Try a different USB port on your laptop (USB 3.0 is better than USB 2.0)
✔ Try a different USB cable (the cable itself might be the issue)
✔ Reset authorization: Settings → Developer Options → Revoke USB Debugging Authorizations → reconnect
✔ Check USB cable connection (may be loose)
✔ Make sure phone isn't locked/screen isn't off when mirroring starts
✔ Try lowering bitrate and resolution to reduce processor load
✔ Check if phone is showing a notification requiring confirmation
✔ Try restarting the script from the beginning
✔ Use USB connection instead of WiFi (far more stable)
✔ Lower the resolution (use 720p)
✔ Lower the bitrate (use 4M)
✔ Lower the FPS (use 30)
✔ Switch codec to H.264 (most compatible)
✔ Close heavy applications running in the background on your laptop
✔ Run menu "8. Download & Install Dependencies" in the script to auto-install
✔ Or download manually from: https://github.com/Genymobile/scrcpy/releases/latest
✔ Extract the ZIP to: C:\scrcpy-win64-vX.X\
✔ Restart the script (run.bat) after installation
✔ Make sure phone and laptop are on the SAME WiFi network (not different hotspots)
✔ Temporarily disable Windows Defender Firewall to test
✔ Check that port 5555 isn't blocked by antivirus or firewall
✔ Try reconnecting the phone to WiFi, then check the IP again
✔ Run menu "8. Download & Install Dependencies" to reinstall
✔ Make sure scrcpy is installed and the path is registered
✔ Try restarting your laptop after installation so PATH is refreshed
✔ Unlock your phone first, then try again
✔ Disable "Don't Keep Activities" in Developer Options
✔ Some banking/secure apps block screenshots — this is normal
✔ Try switching the codec
✔ Audio auto-forwarding works on Android 11+ (using latest scrcpy)
✔ For Android 10 and below: install VLC and use sndcpy (separate menu)
✔ Check that laptop volume isn't muted
✔ Make sure laptop audio drivers are working normally
Q: Does my phone need to be rooted?
A: No, not at all. ScreenMirror uses ADB, an official debugging tool from Google. No phone modifications are required.
Q: Can this be used on an iPhone or iPad?
A: No. This program is specifically for Android phones and tablets only. iPhones and iPads don't support ADB.
Q: Is ScreenMirror free?
A: Yes, 100% free and open source. The source code is available directly on this GitHub page.
Q: Is my phone data safe?
A: Yes, as long as you use it on your own device and your private network. Never enable USB Debugging on someone else's computer or on an untrusted public WiFi network.
Q: Can it be used while the phone is locked?
A: No. The phone screen must be active (unlocked) for mirroring to work. Enable the Stay Awake feature to prevent the phone screen from turning off automatically while mirror is active.
Q: Can it be used with the phone's own hotspot?
A: Yes! Enable hotspot on your phone, connect your laptop to that hotspot, then use the WiFi connection method. Useful when there's no home WiFi available.
Q: What's the difference between WiFi mode and Wireless Debugging?
A: WiFi (TCP/IP) mode works on all Android versions (5+) but requires a USB cable for the first-time setup. Wireless Debugging requires no cable at all from the start, but is only available on Android 11 and above.
Q: The screen appears but there are black borders on the sides (letterboxing)?
A: This happens because the phone's aspect ratio differs from the laptop's mirror window. Press Ctrl+R to rotate the display, or manually resize the mirror window.
Q: Can I mirror more than one phone at the same time?
A: Yes, technically possible, but only through manual Terminal commands using the -s [device-serial] argument. This feature is not available in ScreenMirror's interactive menu.
Q: Can I use it to stream to YouTube/Twitch?
A: ScreenMirror itself only displays the phone screen on your laptop. For streaming, you need to use streaming software like OBS Studio to capture the ScreenMirror window as a video source.
Here's what's inside the ScreenMirror folder you downloaded:
ScreenMirror/
│
├── 📄 run.bat ← [WINDOWS] MAIN FILE — Double-click to start!
├── 📄 run.sh ← [LINUX/MAC] Main file English version
│
├── 📁 Windows-ID/ ← Windows scripts in Indonesian language
│ ├── 📄 scrcpy.bat ← Main mirroring script (ID version)
│ └── 📄 sndcpy.bat ← Audio mirroring script (ID version)
│
├── 📁 windows/ ← Windows scripts in English language
│ ├── 📄 scrcpy.bat ← Main mirroring script (EN version)
│ └── 📄 sndcpy.bat ← Audio mirroring script (EN version)
│
├── 📁 Linux-ID/ ← Linux scripts in Indonesian language
│ ├── 📄 run.sh ← Linux Indonesia entry point
│ ├── 📄 screenmirror.sh ← Main mirroring script
│ ├── 📄 info.sh ← System information
│ └── 📄 sndcpy.sh ← Audio mirroring
│
├── 📄 screenmirror.sh ← Linux English main script
├── 📄 sndcpy.sh ← Linux English audio mirroring
├── 📄 README.md ← This guide (English version)
├── 📄 README-ID.md ← This guide (Indonesian version)
└── 📄 LICENSE ← MIT License
The script automatically remembers your last settings:
- Windows:
C:\Users\[YourName]\AppData\Roaming\screenmirror_config.ini - Linux:
~/.screenmirror.conf
Settings that are saved:
- Last IP address and Port
- FPS, bitrate, resolution, and codec
- Feature toggles (Stay Awake, No Control, etc.)
To view or delete saved configuration, use menu 9 (View/Delete Saved Configuration) in the main menu.
This program uses several great technologies from other developers:
| Technology | Creator | Link | Description |
|---|---|---|---|
| scrcpy | Genymobile (rom1v) | github.com/Genymobile/scrcpy | Core engine for screen & audio mirroring |
| sndcpy | rom1v | github.com/rom1v/sndcpy | Audio mirroring for Android < 11 |
| ADB | Google / Android Open Source | developer.android.com | Official Android communication protocol |
| ScreenMirror Scripts | Xnuvers007 | github.com/Xnuvers007/ScreenMirror | These interactive scripts & interface |
This project is licensed under the MIT License — meaning you're free to use it, modify it, and distribute it, as long as you keep credit to the original creator.
See the LICENSE file for full details.
Found a problem or have an idea for a new feature?
- 🐛 Report a Bug: Open a New Issue
- 💡 Suggest a Feature: Discuss in Issues
- 🤝 Contribute Code: Send a Pull Request
Made with ❤️ by Xnuvers007
If this program helped you, please click the ⭐ Star button in the top right corner of this page! That's the best way to support the developer.