Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Install system packages
run: |
pacman -Syu --noconfirm --needed base-devel clang pkgconf ffmpeg pipewire libva git curl
pacman -Syu --noconfirm --needed base-devel clang pkgconf ffmpeg pipewire libva libusb git curl
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Install build tools and runtime libraries
run: |
pacman -Syu --noconfirm --needed base-devel sudo git clang pkgconf rust ffmpeg pipewire libva \
pacman -Syu --noconfirm --needed base-devel sudo git clang pkgconf rust ffmpeg pipewire libva libusb \
android-tools xdg-desktop-portal-kde libkscreen
- uses: actions/checkout@v4
- name: Build the package as a regular user
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
apt-get install -y --no-install-recommends build-essential clang libclang-dev pkg-config \
ca-certificates git curl dpkg-dev libavcodec-dev libavformat-dev libavfilter-dev \
libavutil-dev libswscale-dev libswresample-dev libpipewire-0.3-dev libva-dev \
libx11-dev libxkbcommon-dev libwayland-dev
libusb-1.0-0-dev libx11-dev libxkbcommon-dev libwayland-dev
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends build-essential clang libclang-dev pkg-config \
nasm curl ca-certificates git xz-utils unzip file patchelf binutils \
libva-dev libdrm-dev libpipewire-0.3-dev libvulkan-dev libxkbcommon-dev \
libva-dev libdrm-dev libpipewire-0.3-dev libvulkan-dev libusb-1.0-0-dev libxkbcommon-dev \
libwayland-dev libx11-dev glslang-tools glslang-dev spirv-tools
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates git jq libva2 libva-drm2 \
libdrm2 libvulkan1 libpipewire-0.3-0t64
libdrm2 libvulkan1 libpipewire-0.3-0t64 libusb-1.0-0
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
Expand Down
23 changes: 23 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ Working today, over USB with ADB:
| Tray app with settings and live statistics | ✅ | ✅ |
| Installer / packages | ✅ `.exe` | ✅ AppImage, `.deb`, Arch |

**Not yet:** Android Open Accessory and native Wi-Fi transports, audio, GNOME and wlroots backends,
X11.
**Not yet:** audio, GNOME and wlroots backends, X11.

## How it works

Expand All @@ -91,6 +90,23 @@ All channels share one prioritized, multiplexed link (ADB over USB today), so in
updates are never stuck behind a video frame. Details: [docs/architecture.md](docs/architecture.md),
wire format: [docs/protocol.md](docs/protocol.md), input path: [docs/input.md](docs/input.md).

## USB without developer mode

Besides adb, ezdisplay can talk to the tablet over USB with the Android Open Accessory protocol,
which does not need developer mode or USB debugging.

- **Linux:** needs the udev rule `packaging/linux/70-ezdisplay-usb.rules`, which the packages install
(from source or an AppImage, install it yourself, see
[packaging/linux/README.md](packaging/linux/README.md)).
- **Windows:** needs the optional UsbDk driver. The installer offers it as the unchecked task "USB
without developer mode (installs the UsbDk driver)". Without it, USB falls back to adb.
- The first time, Android asks which app should open the accessory. Pick ezdisplay; choosing "always"
avoids the question next time.
- In auto mode the host tries the accessory first and falls back to adb. Turn it off with
`--aoa off` or `aoa = "off"` in `config.toml`.
- A phone or tablet without the app is switched once and then left alone: it is reset back to normal
mode and not tried again while the host runs.

## Install

Everything is on the [Releases page](https://github.com/LibreStatic/ezdisplay/releases)
Expand Down Expand Up @@ -161,6 +177,9 @@ Build it (see [Building](#building)), then:
sudo udevadm control --reload && sudo udevadm trigger --name-match=uinput
```

For USB without developer mode, install `packaging/linux/70-ezdisplay-usb.rules` the same way and
run `sudo udevadm trigger --subsystem-match=usb`.

2. Install the app and its desktop entry:

```sh
Expand Down
12 changes: 12 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<!-- Wi-Fi discovery (NsdManager) and the multicast lock that keeps mDNS replies coming in. -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<!-- USB accessory (AOA) transport: optional, the app also works over adb and Wi-Fi without it. -->
<uses-feature
android:name="android.hardware.usb.accessory"
android:required="false" />
<!--
Raising targetSdk to 37 will need android.permission.ACCESS_LOCAL_NETWORK (a runtime permission for
reaching LAN hosts and for mDNS discovery). Not requested while targetSdk is 36.
Expand All @@ -21,11 +25,19 @@
android:name=".MainActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboard|keyboardHidden|navigation|density"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- The PC host switched the tablet into accessory mode; a running instance gets it in onNewIntent. -->
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="@xml/accessory_filter" />
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
Expand Down
Loading
Loading