02 March 2026

How to mirror android mobile phone screen to ubuntu laptop screen?

Here are the most practical and popular ways to **mirror your Android phone screen** to an **Ubuntu laptop** as of 2026. The methods vary in latency, wireless capability, and ease of setup.

### Best Overall Method (Recommended): Use **scrcpy** (low latency, free, open-source)

**scrcpy** remains the gold standard for mirroring + controlling Android → Linux in 2025–2026.  
It has very low latency (~30–70 ms), supports control with mouse & keyboard, works wired or wireless, and requires **no app** on the phone.

#### Quick wired setup (USB) – most reliable & lowest latency

1. **Enable USB debugging on Android**  
   Settings → About phone → tap Build number 7× → Developer options → USB debugging (ON)

2. **Install scrcpy on Ubuntu**  
   Most Ubuntu versions (22.04 / 24.04 / 25.04 / 26.xx) can do this easily:

   ```bash
   sudo apt update
   sudo apt install scrcpy adb
   ```

   (If the version in repositories is old, you can install the latest from GitHub releases or PPA.)

   Alternative one-liner for latest version (2025–2026 style):

   ```bash
   sudo apt install -y git meson ninja-build libsdl2-dev adb wget gcc pkg-config
   git clone https://github.com/Genymobile/scrcpy
   cd scrcpy
   ./install_release.sh
   ```

3. **Connect phone via USB cable**

4. **Authorize the computer** on the phone (pop-up appears → Allow)

5. **Run it**

   ```bash
   scrcpy
   ```

   That's it — your phone screen appears in a window. You can click, type, drag, etc.

   Nice extra flags people use a lot:

   ```bash
   scrcpy --turn-screen-off          # turns phone screen black (saves battery)
   scrcpy -m 1024                    # limit max resolution to 1024 (less lag on slow machines)
   scrcpy --window-title="My Phone" --always-on-top
   scrcpy --no-audio                 # if you don't want sound
   ```

#### Wireless (Wi-Fi) scrcpy (after initial USB setup)

1. Connect phone via USB once and run:

   ```bash
   adb tcpip 5555
   ```

2. Disconnect USB cable

3. Find your phone's IP (Settings → About phone → Status or Wi-Fi settings)

4. Connect wirelessly:

   ```bash
   adb connect 192.168.1.123:5555
   scrcpy
   ```

   (Replace with your phone's IP)

### Good Wireless-Only Alternative: **AirDroid Cast** (browser-based)

If you want something without USB ever and don't mind slightly higher latency:

1. On phone → install **AirDroid Cast** from Play Store

2. On Ubuntu → open Firefox/Chrome → go to https://webcast.airdroid.com

3. Scan QR code or enter 9-digit code shown in browser

4. Accept on phone

→ Works wirelessly, decent quality, but usually more delay than scrcpy and sometimes has resolution/bitrate limits on free tier.

### Other Options in 2025–2026

| Method              | Latency | Wireless? | Control phone? | Install on phone? | Recommendation |
|---------------------|---------|-----------|----------------|-------------------|----------------|
| scrcpy              | ★★★★★   | Yes (after setup) | Yes            | No                | Best overall   |
| AirDroid Cast       | ★★★☆☆   | Yes       | Yes            | Yes               | Easiest wireless-only |
| gnome-network-displays + MiracleCast | ★★☆☆☆   | Yes       | No             | No                | Complicated, often buggy |
| Vysor (chrome ext)  | ★★☆☆☆   | Yes       | Yes            | Yes               | Ads in free version |
| KDE Connect + plugin| ★★★☆☆   | Yes       | Limited        | Yes               | Casual use only |

**Quick choice guide**:
- You want **lowest latency + full control** → **scrcpy USB** (or wireless after setup)
- You hate cables and want something dead simple → **AirDroid Cast**
- You already use KDE Connect → try its screen sharing (but expect higher latency)

Let me know your Ubuntu version and whether you prefer wired or wireless — I can give more exact commands if needed!

 

Grok, after I ran the 'Alternative one-liner for latest version (2025-2026 style)', I got the following message, with an error message -

 

Did not find CMake 'cmake' Found CMake: NO Run-time dependency libavformat found: NO (tried pkgconfig) app/meson.build:116:4: ERROR: Dependency "libavformat" not found, tried pkgconfig A full log can be found at /home/shermanchen/scrcpy/build-auto/meson-logs/meson-log.txt

 

The error you're seeing (ERROR: Dependency "libavformat" not found, tried pkgconfig) occurs because the scrcpy build requires FFmpeg development libraries (specifically the libavformat component from FFmpeg), but those dev packages weren't installed by your initial command.

Your Ubuntu version appears to be 24.04 LTS (Noble) based on the package versions and repository paths in the output.

Quick Fix: Install the missing FFmpeg dev dependencies

Run this command to add the required build packages (these provide libavformat, libavcodec, libavutil, etc.):

Bash
sudo apt update
sudo apt install -y \
    libavcodec-dev \
    libavdevice-dev \
    libavformat-dev \
    libavutil-dev \
    libswresample-dev
  • These are the key ones for audio/video handling in scrcpy.
  • You already have most other deps (like meson, ninja-build, libsdl2-dev, etc.) from your first run.

Then retry the build

After installing those, go back to your cloned directory and re-run the installer script:

Bash
cd ~/scrcpy   # or wherever you cloned it
./install_release.sh
  • It should now detect libavformat via pkg-config and complete the build.
  • The script downloads the latest server JAR, builds the client binary, and installs everything (usually to /usr/local/bin/scrcpy).

 

 Grok, after I ran the './install_release.sh', I got the following message.

libusb1.0 not found.

 

Did not find CMake 'cmake' Found CMake: NO Run-time dependency libusb-1.0 found: NO (tried pkgconfig) app/meson.build:128:20: ERROR: Dependency "libusb-1.0" not found, tried pkgconfig

 

 

The new error (ERROR: Dependency "libusb-1.0" not found, tried pkgconfig) means the build now detects your FFmpeg libs correctly (great progress from last time!), but it's missing the libusb-1.0 development files — specifically the .pc file that Meson/pkg-config uses to find include paths and linker flags for libusb.

On Ubuntu 24.04 (Noble), the package that provides this is libusb-1.0-0-dev.

Step to fix it

Run this:

Bash
sudo apt update
sudo apt install libusb-1.0-0-dev
  • This installs the headers (/usr/include/libusb-1.0/libusb.h), the pkg-config file (/usr/lib/x86_64-linux-gnu/pkgconfig/libusb-1.0.pc), and static/shared libs needed for building.
  • It's a very small package (~few hundred KB) and safe/standard.

After installing

  1. Clean the previous failed build (good practice to avoid stale state):

    Bash
    cd ~/scrcpy
    rm -rf build-auto   # or whatever the build dir was (from your log: build-auto)
  2. Re-run the installer:

    Bash
    ./install_release.sh

It should now pass the libusb check, finish compiling the client binary, and install scrcpy (usually to /usr/local/bin).

Verify success

After it completes:

Bash
scrcpy --version

Should output something like scrcpy 3.3.4 (or the exact version it built).

If it still complains about libusb (very unlikely), you can manually check pkg-config sees it:

 

 shermanchen@serverlenovo:~/scrcpy$ scrcpy --version
scrcpy 3.3.4 <https://github.com/Genymobile/scrcpy>
Dependencies (compiled / linked):
- SDL: 2.30.0 / 2.30.0
- libavcodec: 60.31.102 / 60.31.102
- libavformat: 60.16.100 / 60.16.100
- libavutil: 58.29.100 / 58.29.100
- libavdevice: 60.3.100 / 60.3.100
- libusb: - / 1.0.27
 
Success! Thank you so much!
 
Next, how do I share my Android phone screen with my Ubuntu laptop screen, please?

 

 Congratulations on successfully building and installing **scrcpy 3.3.4** — that's the latest version as of early 2026!

Now let's get your Android phone screen mirrored to your Ubuntu laptop. scrcpy supports two main modes: **USB** (simplest, lowest latency) and **wireless** (after a quick setup).

### Prerequisites (do this once)
1. On your **Android phone**:
- Go to **Settings → About phone** → tap **Build number** 7 times to unlock Developer options.
- Go back to Settings → **System** → **Developer options** → enable **USB debugging**.
- (Optional but recommended for wireless later: also enable **Wireless debugging** if your Android is 11+.)

2. Connect your phone to your Ubuntu laptop with a **USB cable** (good quality cable helps avoid issues).

3. On the phone, a popup should appear: "Allow USB debugging?"
→ Check "Always allow from this computer" → tap **Allow**.

4. In your terminal, verify the connection:
```
adb devices
```
You should see something like:
```
List of devices attached
1234567890abcdef device
```
If it says "unauthorized", re-check the popup on the phone.

### Option 1: Mirror via USB (easiest & lowest latency – recommended to start with)
Just run:
```
scrcpy
```

Your phone screen should instantly appear in a window on Ubuntu.
You can control the phone with your mouse (click = tap) and keyboard.

Useful quick options (add them to the command):
- `scrcpy --turn-screen-off` → turns phone screen black (saves battery, still mirrors)
- `scrcpy -m 1024` → limits resolution to 1024px max (less lag on slow Wi-Fi later)
- `scrcpy --no-audio` → disable sound forwarding if not needed
- `scrcpy -w` or `--stay-awake` → keep phone awake
- `scrcpy --window-title="My Phone" --always-on-top`

Full example with popular flags:
```
scrcpy --turn-screen-off --stay-awake -m 1200
```

To quit: close the window or press **Ctrl+C** in terminal.

### Option 2: Mirror wirelessly (no cable after initial setup)
Both devices **must be on the same Wi-Fi network**.

**Method A: Classic ADB TCP/IP (works on all Android versions)**
1. Connect via USB once more (if not already).
2. Enable ADB over network:
```
adb tcpip 5555
```
Phone may show a confirmation — allow it.

3. Disconnect the USB cable.

4. Find your phone's IP address:
- Settings → About phone → Status → **IP address**
(or Settings → Network & internet → Wi-Fi → tap your network → Advanced → IP address)
Example: `192.168.1.105`

5. Connect wirelessly:
```
adb connect 192.168.1.105:5555
```
Should say "connected to 192.168.1.105:5555"

6. Launch mirroring (no cable needed anymore):
```
scrcpy
```
(or with flags like above)

To disconnect wireless mode later: `adb disconnect` or just reboot phone.

**Method B: Wireless debugging pairing (Android 11+ only – no initial USB needed after first time)**
1. On phone: Developer options → **Wireless debugging** → tap **Pair device with pairing code**.
- It shows: IP address & port (e.g. 192.168.1.105:37123) and a 6-digit pairing code.

2. In terminal on Ubuntu:
```
adb pair 192.168.1.105:37123 123456
```
(replace with your IP:port and code)

3. After pairing succeeds, connect normally:
```
adb connect 192.168.1.105:5555
scrcpy
```

Wireless usually has slightly higher latency (~50-150 ms vs ~30-70 ms on USB) and needs good Wi-Fi. If it lags, lower resolution with `-m 800` or `-m 960`.

### Troubleshooting quick tips
- No window appears? → Run `scrcpy` and check terminal for errors.
- "ERROR: Could not open device" → re-allow USB debugging or try another cable/port.
- Wireless fails? → Ensure same Wi-Fi, firewall allows ADB (port 5555), or restart adb: `adb kill-server && adb start-server`.
- Want to record screen? → `scrcpy --record=file.mp4`

Enjoy the mirroring — it's one of the smoothest ways to use your phone from the laptop!
If anything doesn't work, paste the exact error from the terminal and I'll help debug.


 

No comments:

Post a Comment