> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/zwc456baby/ScrcpyForAndroid/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

> Connect to your first Android device with Scrcpy for Android

## Before you begin

Make sure you have:

* Scrcpy for Android installed on your **controller device** (the device you'll use to control)
* A **target device** you want to mirror and control
* Both devices connected to the **same Wi-Fi network**

<Note>
  Both devices must be on the same local network. Public network connections are possible but require port forwarding configuration.
</Note>

## Enable ADB wireless debugging on the target device

The target device needs to have ADB wireless debugging enabled.

<Steps>
  <Step title="Enable Developer Options">
    On your target device:

    1. Open **Settings**
    2. Navigate to **About phone**
    3. Tap **Build number** 7 times
    4. You should see a message: "You are now a developer!"
  </Step>

  <Step title="Enable ADB over network">
    1. Go back to **Settings**
    2. Navigate to **Developer options** (usually under System)
    3. Scroll down to find **Wireless debugging** or **ADB over network**
    4. Enable the toggle

    <Warning>
      The exact location and name varies by manufacturer:

      * Stock Android: "Wireless debugging" or "Wireless ADB"
      * Samsung: "USB debugging" (must be on same network)
      * Xiaomi/MIUI: "USB debugging (Security settings)" → "Install via USB"
      * OnePlus: "ADB over network"
    </Warning>
  </Step>

  <Step title="Note the IP address">
    Some devices display the IP address directly in the wireless debugging menu. If not:

    1. Go to **Settings** → **About phone** → **Status**
    2. Look for **IP address** (e.g., `192.168.1.73`)
    3. Write down this IP address

    Alternatively, go to **Settings** → **Wi-Fi** → Tap your connected network → View IP address
  </Step>

  <Step title="Set ADB port (if needed)">
    If your device doesn't automatically enable ADB on port 5555, you can set it manually using a computer:

    ```bash theme={null}
    # Connect via USB first
    adb devices

    # Enable TCP/IP on port 5555
    adb tcpip 5555

    # Disconnect USB cable after this
    ```

    <Tip>
      You only need to do this once. The setting persists until you reboot the device.
    </Tip>
  </Step>
</Steps>

## Connect to the target device

<Steps>
  <Step title="Launch Scrcpy for Android">
    Open the app on your controller device. You'll see the main screen with connection options.
  </Step>

  <Step title="Enter the target device IP">
    In the **Remote Device IP address** field, enter the IP address of your target device.

    **Supported formats**:

    ```
    192.168.1.73          # IP only (uses default port 5555)
    192.168.1.73:5555     # IP with custom port
    hostname.local:5555   # Hostname with port
    [2000::2000]:5555     # IPv6 address with port
    ```

    <Tip>
      The app saves your connection history. Tap the history icon to quickly select previously used addresses.
    </Tip>
  </Step>

  <Step title="Configure settings">
    Select your preferred settings:

    * **Resolution**: Start with `1280x720` (recommended)
    * **Bitrate**: Start with `2 Mbps` (recommended)
    * **Delay Control**: Start with `Medium (60ms)`

    Leave the switches disabled for your first connection.
  </Step>

  <Step title="Tap Start">
    Tap the **Start** button. You'll see a "Connecting…" dialog.

    The app will:

    1. Connect to the target device via ADB
    2. Push `scrcpy-server.jar` to `/data/local/tmp/`
    3. Set up port forwarding (local port 7008 → remote port 7007)
    4. Launch the server component
    5. Establish the mirroring connection

    This process typically takes 3-5 seconds.
  </Step>

  <Step title="Accept ADB authorization">
    On your **target device**, you'll see an authorization prompt:

    ```
    Allow USB debugging?
    The computer's RSA key fingerprint is:
    XX:XX:XX:XX...

    [Always allow from this computer] [Cancel] [OK]
    ```

    1. Check **Always allow from this computer**
    2. Tap **OK**

    <Note>
      Some custom ROMs don't show this prompt. If you don't see it and the connection succeeds, you're good to go.
    </Note>
  </Step>

  <Step title="Start mirroring">
    Once connected, you'll see the target device's screen in full screen on your controller device.

    The interface enters immersive mode with navigation bars hidden.
  </Step>
</Steps>

## Basic controls

Once mirroring is active, you can interact with the target device:

### Touch and gestures

* **Single tap**: Tap on the screen (same as tapping the target device)
* **Drag**: Touch and drag (same as swiping on the target device)
* **Multi-touch**: Use multiple fingers (fully supported)
* **Pinch to zoom**: Works just like on the target device

### Special gestures

<AccordionGroup>
  <Accordion title="Wake the target device" icon="sun">
    **Double-tap anywhere on the screen** to wake the target device from sleep.
  </Accordion>

  <Accordion title="Put target device to sleep" icon="moon">
    1. Cover the proximity sensor on your controller device
    2. Double-tap anywhere on the screen

    The target device will go to sleep (equivalent to pressing the power button).
  </Accordion>

  <Accordion title="Show local navigation bar" icon="bars">
    **Swipe up from the bottom edge** of the screen to reveal your controller device's system navigation bar.

    This allows you to exit the app or switch to another app without disconnecting.
  </Accordion>

  <Accordion title="Exit mirroring" icon="right-from-bracket">
    Press the back button twice quickly. You'll see a "Press again to exit" toast on the first press.

    This disconnects from the target device and returns to the main screen.
  </Accordion>
</AccordionGroup>

### Navigation buttons (optional)

If you enabled "Bottom control button" in settings, you'll see three navigation buttons:

* **\< (Back)**: Sends Back key to target device
* **○ (Home)**: Sends Home key to target device
* **= (Recent Apps)**: Sends App Switcher key to target device

<Tip>
  These buttons automatically adjust padding to avoid covering content. The padding is 96 pixels (12dp) to accommodate the button bar.
</Tip>

## Troubleshooting your first connection

<AccordionGroup>
  <Accordion title="Connection timed out" icon="clock">
    If you see "Connection Timed out 2" or "Network OR ADB connection failed":

    **Check network connectivity:**

    * Verify both devices are on the same Wi-Fi network
    * Ping the target device: `ping 192.168.1.73` (from a computer)
    * Try disabling VPN on both devices

    **Check ADB:**

    * Make sure ADB wireless debugging is enabled on the target device
    * Verify the IP address is correct
    * Try rebooting the target device
    * Run `adb tcpip 5555` again if you previously set it up via USB

    **Check firewall:**

    * Some devices have built-in firewalls that block ADB
    * Check if your router has AP isolation enabled (disable it)
  </Accordion>

  <Accordion title="Black screen after connecting" icon="desktop">
    If the connection succeeds but you see a black screen:

    1. **Wait 5-10 seconds** - initial setup can take time
    2. **Try a lower resolution** - start with 640x360
    3. **Check orientation** - the app detects portrait/landscape automatically
    4. **Disconnect and reconnect** - press back twice, then Start again

    <Note>
      Screen rotation during mirroring triggers an automatic reconnection. This is normal and takes 1-2 seconds.
    </Note>
  </Accordion>

  <Accordion title="Server address empty" icon="input-text">
    If you see "Server Address Empty" toast:

    * Make sure you entered an IP address in the input field
    * The field cannot be blank or contain only spaces
    * Verify the format matches one of the supported formats (see Step 2)
  </Accordion>

  <Accordion title="ADB authorization rejected" icon="ban">
    If you denied the ADB authorization prompt:

    1. Disconnect from the target device
    2. On the target device, go to **Developer options**
    3. Tap **Revoke USB debugging authorizations**
    4. Try connecting again and tap **OK** on the authorization prompt
  </Accordion>

  <Accordion title="Touch not working" icon="hand-pointer">
    If mirroring works but touch doesn't respond:

    * Check if "Viewing mode (no control)" is enabled - disable it
    * Make sure you're tapping within the mirrored screen area
    * The app calculates touch coordinates based on aspect ratio - if the remote device has an unusual aspect ratio, touch may be offset
    * Try disconnecting and reconnecting
  </Accordion>

  <Accordion title="Lag or stuttering" icon="gauge-high">
    If the mirroring is laggy:

    1. **Lower the resolution**: Try 800x448 or 640x360
    2. **Lower the bitrate**: Try 1 Mbps
    3. **Increase delay control**: Try High (100ms)
    4. **Check network quality**: Move closer to your Wi-Fi router
    5. **Close other apps**: Free up resources on both devices

    <Tip>
      The app includes adaptive frame dropping. If you see dropped frames in the logs, reduce resolution and bitrate.
    </Tip>
  </Accordion>
</AccordionGroup>

## Connection history

Scrcpy for Android automatically saves up to 30 recent connections. To access history:

1. Tap the **history list icon** next to the IP address field
2. Select a previously used address from the popup
3. The field is automatically filled with your selection

<Note>
  Connection history is stored locally on your device and is not shared or synced.
</Note>

## Public network connections

While Scrcpy for Android is designed for local network use, you can connect over public networks if:

* The target device's ADB port (5555) is accessible from the internet
* You know the public IP address or hostname
* Port forwarding is configured on the target device's network

<Warning>
  **Security risk**: Exposing ADB to the public internet is dangerous. Anyone who can reach the IP and port can fully control the device. Use a VPN or SSH tunnel instead.
</Warning>

**Example public connections:**

```text theme={null}
203.0.113.42:5555              # Public IP with port
remote.example.com:5555        # Domain name with port  
[2001:db8::1]:5555             # IPv6 public address
```

## Next steps

Now that you've successfully connected, explore more features:

<CardGroup cols={2}>
  <Card title="Advanced configuration" icon="gear" href="/guides/configuration">
    Customize resolution, bitrate, and delay for optimal performance
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/guides/troubleshooting">
    Solve common connection and performance issues
  </Card>
</CardGroup>
