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

# Configure udev Rules

> Allow the Qualcomm USB vendor ID on your Linux or WSL host — required for ADB and EDL communication.

## Why udev rules are needed

Linux restricts raw USB access by default. Without the correct `udev` rules your user account cannot communicate with the device over ADB or put it into EDL mode without `sudo`.

## Automatic setup (recommended)

Run the single command below. It writes both the EDL-mode and ADB-mode rules in one shot:

```bash theme={null}
printf 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"\nSUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9135", MODE="0666", GROUP="plugdev"\n' \
  | sudo tee /etc/udev/rules.d/51-qcom-usb.rules
```

Then restart `udev`:

```bash theme={null}
sudo systemctl restart udev
```

If your device is already connected, **unplug and replug** the USB cable.

## Manual setup

<AccordionGroup>
  <Accordion title="Step-by-step — create the rules file manually">
    1. Navigate to the udev rules directory:

    ```bash theme={null}
    cd /etc/udev/rules.d/
    ```

    2. Check whether the file already exists:

    ```bash theme={null}
    ls -l 51-qcom-usb.rules
    ```

    3. Create or open the file:

    ```bash theme={null}
    sudo vi 51-qcom-usb.rules
    ```

    4. Add (or verify) the following content:

    ```bash theme={null}
    # Qualcomm EDL mode
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"

    # Qualcomm ADB mode
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9135", MODE="0666", GROUP="plugdev"
    ```

    5. Restart `udev`:

    ```bash theme={null}
    sudo systemctl restart udev
    ```
  </Accordion>
</AccordionGroup>

## Confirm plugdev membership

<Warning>
  If your user account is not in the `plugdev` group, device access will fail even with correct udev rules.
</Warning>

Check your groups:

```bash theme={null}
groups $USER
```

If `plugdev` is missing, add yourself:

```bash theme={null}
sudo usermod -aG plugdev $USER
```

Log out and back in (or reboot) for the change to take effect.

Reference: [Android developer guide — hardware set up](https://developer.android.com/studio/run/device).
