diff --git a/.coderabbit.yaml b/.coderabbit.yaml
index ef66d13d7..c83ae0e95 100644
--- a/.coderabbit.yaml
+++ b/.coderabbit.yaml
@@ -18,7 +18,7 @@ reviews:
enabled: true
auto_incremental_review: true
auto_pause_after_reviewed_commits: 0
- drafts: false
+ drafts: true
pre_merge_checks:
docstrings:
mode: "off"
diff --git a/.gitattributes b/.gitattributes
index 940dbb5f1..43e03c53c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -10,3 +10,6 @@ tools/mangoapp/mangoapp text eol=lf
app/src/main/assets/desktop-removal/*.json text eol=lf
app/src/main/assets/desktop-removal/*.txt text eol=lf
*.pdf binary
+
+app/src/main/resources/ea/graphql/*.gql -text
+app/src/main/assets/agent/* text eol=lf
diff --git a/.github/trusted-test-builds.txt b/.github/trusted-test-builds.txt
index 8f7b0148c..fa4cff110 100644
--- a/.github/trusted-test-builds.txt
+++ b/.github/trusted-test-builds.txt
@@ -1,5 +1,7 @@
ASEbrahim
FX192
K11MCH1
+KeegantheVeganat0r
kingokksa
ovurrsl
+KeegantheVeganat0r
diff --git a/.github/workflows/build-gamescope.yml b/.github/workflows/build-gamescope.yml
index 57dd57501..f18c9ad84 100644
--- a/.github/workflows/build-gamescope.yml
+++ b/.github/workflows/build-gamescope.yml
@@ -39,11 +39,25 @@ jobs:
path: |
gamescope.tzst
gamescope.tzst.sha256
+ - uses: actions/create-github-app-token@v2
+ id: components-token
+ if: github.event_name == 'workflow_dispatch' && inputs.tag != ''
+ with:
+ app-id: ${{ vars.DROIDDECK_CI_APP_ID }}
+ private-key: ${{ secrets.DROIDDECK_CI_APP_KEY }}
+ owner: Droid-Deck
+ repositories: DroidDeck-Components
- name: Publish
if: github.event_name == 'workflow_dispatch' && inputs.tag != ''
env:
- GH_TOKEN: ${{ github.token }}
+ GH_TOKEN: ${{ steps.components-token.outputs.token }}
+ GH_REPO: Droid-Deck/DroidDeck-Components
+ TAG: ${{ inputs.tag }}
run: |
set -euo pipefail
- gh release create "${{ inputs.tag }}" --latest=false --prerelease=false --title "${{ inputs.tag }}" --notes "gamescope 3.16.29 with tools/gamescope/patches; staged by the apk over /usr/local/bin/gamescope. sha256 $(cut -d' ' -f1 gamescope.tzst.sha256)" gamescope.tzst gamescope.tzst.sha256 || gh release upload "${{ inputs.tag }}" gamescope.tzst gamescope.tzst.sha256 --clobber
- gh release edit "${{ inputs.tag }}" --latest=false --prerelease=false
+ if gh release view "$TAG" >/dev/null 2>&1; then
+ echo "::error::$TAG is already published in DroidDeck-Components, and published tags are never replaced: use a new tag"
+ exit 1
+ fi
+ gh release create "$TAG" --latest=false --prerelease=false --title "$TAG" --notes "gamescope 3.16.29 with tools/gamescope/patches ($GITHUB_REPOSITORY $GITHUB_SHA, run $GITHUB_RUN_ID); staged by the apk over /usr/local/bin/gamescope. sha256 $(cut -d' ' -f1 gamescope.tzst.sha256)" gamescope.tzst gamescope.tzst.sha256
+ gh release edit "$TAG" --latest=false --prerelease=false
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fcb30d8ac..555d8b673 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -136,11 +136,18 @@ jobs:
if-no-files-found: error
retention-days: 14
- components:
- name: Prepare verified components
+ components-runner:
needs: source
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
- runs-on: ubuntu-24.04
+ uses: ./.github/workflows/pick-runner.yml
+ secrets:
+ RUNNER_STATUS_TOKEN: ${{ secrets.RUNNER_STATUS_TOKEN }}
+
+ components:
+ name: Prepare verified components
+ needs: [source, components-runner]
+ if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
+ runs-on: ${{ fromJSON(needs.components-runner.outputs.labels) }}
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
@@ -188,6 +195,7 @@ jobs:
!app/src/main/assets/linuxfs/i386/libfaultreport.so
!app/src/main/assets/linuxfs/libblaudit.so
!app/src/main/assets/linuxfs/libblfastpath.so
+ !app/src/main/assets/linuxfs/libddnatv-hook.so
!app/src/main/assets/linuxfs/libblsession.so
!app/src/main/assets/linuxfs/libfakeinput.so
!app/src/main/assets/linuxfs/libssbs.so
@@ -306,6 +314,11 @@ jobs:
- name: Build the DiRT 3 / DiRT Showdown ws2_32 stand-in
run: python3 tools/components/prepare.py dirt-ws2
+ - name: Cache graphics driver inputs
+ uses: actions/cache@v4
+ with:
+ path: app/build/quest-inputs
+ key: quest-inputs-${{ hashFiles('tools/quest/build-driver.py') }}
- name: Prepare graphics driver variants
run: python3 tools/quest/build-driver.py "$ANDROID_HOME/ndk/$NDK_VERSION"
- name: Record and pack prepared components
@@ -318,11 +331,18 @@ jobs:
compression-level: 0
retention-days: 14
+ build-runner:
+ needs: [components]
+ if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
+ uses: ./.github/workflows/pick-runner.yml
+ secrets:
+ RUNNER_STATUS_TOKEN: ${{ secrets.RUNNER_STATUS_TOKEN }}
+
build:
- needs: [source, components, xbox]
+ needs: [source, components, xbox, build-runner]
name: Compile APK and Android tests
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
- runs-on: ubuntu-24.04
+ runs-on: ${{ fromJSON(needs.build-runner.outputs.labels) }}
timeout-minutes: 45
outputs:
variants: ${{ steps.variants.outputs.list }}
@@ -536,6 +556,12 @@ jobs:
SOURCE_TREE: ${{ needs.source.outputs.tree-sha }}
run: python3 tools/components/prepare.py unpack --tree "$SOURCE_TREE"
+ - name: Ubisoft launcher service (x86_64-pc-windows-gnu)
+ run: |
+ set -euo pipefail
+ command -v x86_64-w64-mingw32-gcc >/dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq gcc-mingw-w64-x86-64; }
+ bash tools/ubisoft-launcher/build.sh
+
- uses: actions/download-artifact@v4
with:
name: xbox-arm64
@@ -544,9 +570,11 @@ jobs:
- name: Cache checksum-pinned pack inputs
uses: actions/cache@v4
with:
- path: ~/.cache/droiddeck-pack-inputs
- key: pack-inputs-v1-${{ hashFiles('tools/packs/build.sh', 'tools/packs/fetch-verified.sh', 'tools/packs/tracking/release.env') }}
- restore-keys: pack-inputs-v1-
+ path: |
+ ~/.cache/droiddeck-pack-inputs
+ ~/.cache/droiddeck-build
+ key: pack-inputs-v2-${{ hashFiles('tools/packs/build.sh', 'tools/packs/fetch-verified.sh', 'tools/packs/tracking/release.env', 'tools/powervr/release.json') }}
+ restore-keys: pack-inputs-v2-
- name: Build the add-on packs
run: |
python3 tools/powervr/fetch.py
@@ -770,6 +798,9 @@ jobs:
set -o pipefail
cd app/src/main/rust/stores
cargo test --locked 2>&1 | tail -60
+ - name: Ubisoft launcher service host unit tests
+ timeout-minutes: 10
+ run: cargo test --locked --manifest-path tools/ubisoft-launcher/Cargo.toml
python-tests:
name: Python and native regression tests
@@ -862,6 +893,17 @@ jobs:
variants: ${{ needs.build.outputs.variants }}
secrets: inherit
+ scan:
+ needs: sign
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
+ permissions:
+ contents: read
+ uses: ./.github/workflows/scan.yml
+ with:
+ artifact: droiddeck-signed
+ variant: standard
+ secrets: inherit
+
packs:
needs: [build, checks]
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
diff --git a/.github/workflows/pick-runner.yml b/.github/workflows/pick-runner.yml
new file mode 100644
index 000000000..cb2a0b0ff
--- /dev/null
+++ b/.github/workflows/pick-runner.yml
@@ -0,0 +1,60 @@
+name: Pick runner
+
+on:
+ workflow_call:
+ outputs:
+ labels:
+ value: ${{ jobs.pick.outputs.labels }}
+ secrets:
+ RUNNER_STATUS_TOKEN:
+ required: false
+
+permissions: {}
+
+jobs:
+ pick:
+ name: Pick runner
+ runs-on: ubuntu-24.04
+ timeout-minutes: 2
+ outputs:
+ labels: ${{ steps.runner.outputs.labels || steps.fork.outputs.labels || '"ubuntu-24.04"' }}
+ steps:
+ - name: Pick the compile runner
+ id: runner
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
+ continue-on-error: true
+ env:
+ GH_TOKEN: ${{ secrets.RUNNER_STATUS_TOKEN }}
+ run: |
+ set -euo pipefail
+ labels='"ubuntu-24.04"'
+ if [ -n "$GH_TOKEN" ]; then
+ idle=$(gh api "orgs/${GITHUB_REPOSITORY_OWNER}/actions/runners" --jq '[.runners[] | select(.status == "online" and .busy == false and any(.labels[]; .name == "droiddeck-ws"))] | length' 2>/dev/null || echo 0)
+ if [ "${idle:-0}" -gt 0 ]; then
+ labels='["self-hosted","droiddeck-ws"]'
+ fi
+ fi
+ echo "labels=$labels" >> "$GITHUB_OUTPUT"
+ echo "Compile runner: \`$labels\`" >> "$GITHUB_STEP_SUMMARY"
+ - name: Pick the fork runner
+ id: fork
+ if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
+ continue-on-error: true
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ set -euo pipefail
+ labels='"ubuntu-24.04"'
+ gist=https://api.github.com/gists/0c7ed7ad6d6493de84f5123689c64ae6
+ body=$(curl -fsS --max-time 15 -H "Authorization: Bearer $GH_TOKEN" "$gist" 2>/dev/null || curl -fsS --max-time 15 "$gist" 2>/dev/null || echo '{}')
+ IDLE_AT=$(jq -r 'select(.owner.login == "maxjivi05") | .files["idle-at"].content // "0"' <<< "$body" 2>/dev/null || echo 0)
+ echo "Heartbeat: ${IDLE_AT:-none}"
+ age=-1
+ if [[ "${IDLE_AT:-0}" =~ ^[0-9]+$ ]] && [ "${IDLE_AT:-0}" -gt 0 ]; then
+ age=$(( $(date +%s) - IDLE_AT ))
+ fi
+ if [ "$age" -ge 0 ] && [ "$age" -lt 180 ]; then
+ labels='"droiddeck-fork"'
+ fi
+ echo "labels=$labels" >> "$GITHUB_OUTPUT"
+ echo "Compile runner: \`$labels\`" >> "$GITHUB_STEP_SUMMARY"
diff --git a/.github/workflows/pr-release-cleanup.yml b/.github/workflows/pr-release-cleanup.yml
index edb76a778..3a2580d0e 100644
--- a/.github/workflows/pr-release-cleanup.yml
+++ b/.github/workflows/pr-release-cleanup.yml
@@ -47,10 +47,18 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
+ retry() {
+ for attempt in 1 2 3 4; do
+ "$@" && return 0
+ [ "$attempt" = 4 ] || sleep $((attempt * 20))
+ done
+ return 1
+ }
+ existing=$(retry gh api --paginate "repos/Droid-Deck/DroidDeck-CI/releases?per_page=100" --jq '.[].tag_name')
found=0
for tag in "pr-$PR_NUMBER" "pr-$PR_NUMBER.0"; do
- if gh release view "$tag" -R Droid-Deck/DroidDeck-CI >/dev/null 2>&1; then
- gh release delete "$tag" -R Droid-Deck/DroidDeck-CI --yes --cleanup-tag
+ if grep -qxF "$tag" <<<"$existing"; then
+ retry gh release delete "$tag" -R Droid-Deck/DroidDeck-CI --yes --cleanup-tag
echo "Deleted $tag"
found=1
fi
diff --git a/.github/workflows/pr-release-sweep.yml b/.github/workflows/pr-release-sweep.yml
new file mode 100644
index 000000000..6ea1874e2
--- /dev/null
+++ b/.github/workflows/pr-release-sweep.yml
@@ -0,0 +1,57 @@
+name: PR Release Sweep
+run-name: sweep test builds of closed PRs
+
+on:
+ schedule:
+ - cron: '17 */6 * * *'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pull-requests: read
+
+concurrency:
+ group: pr-release-sweep
+ cancel-in-progress: false
+
+jobs:
+ sweep:
+ runs-on: ubuntu-24.04
+ timeout-minutes: 15
+ steps:
+ - uses: actions/create-github-app-token@v2
+ id: ci-token
+ with:
+ app-id: ${{ vars.DROIDDECK_CI_APP_ID }}
+ private-key: ${{ secrets.DROIDDECK_CI_APP_KEY }}
+ owner: Droid-Deck
+ repositories: DroidDeck-CI
+ - name: Delete test builds whose PR is no longer open
+ env:
+ CI_TOKEN: ${{ steps.ci-token.outputs.token }}
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ set -euo pipefail
+ retry() {
+ for attempt in 1 2 3 4; do
+ "$@" && return 0
+ [ "$attempt" = 4 ] || sleep $((attempt * 20))
+ done
+ return 1
+ }
+ tags=$(GH_TOKEN="$CI_TOKEN" retry gh api --paginate "repos/Droid-Deck/DroidDeck-CI/releases?per_page=100" --jq '.[].tag_name' |
+ grep -E '^pr-[0-9]+(\.0)?$' || true)
+ failed=0
+ for tag in $tags; do
+ number=${tag#pr-}
+ number=${number%.0}
+ state=$(retry gh api "repos/$GITHUB_REPOSITORY/pulls/$number" --jq .state) || { failed=1; continue; }
+ if [ "$state" != open ]; then
+ if GH_TOKEN="$CI_TOKEN" retry gh release delete "$tag" -R Droid-Deck/DroidDeck-CI --yes --cleanup-tag; then
+ echo "Deleted $tag (PR #$number is $state)"
+ else
+ failed=1
+ fi
+ fi
+ done
+ exit "$failed"
diff --git a/.github/workflows/publish-packs.yml b/.github/workflows/publish-packs.yml
index ca61616d1..53e26f4ed 100644
--- a/.github/workflows/publish-packs.yml
+++ b/.github/workflows/publish-packs.yml
@@ -55,7 +55,7 @@ jobs:
jq -r --arg n "$2" '.assets // [] | .[] | select(.name == $n) | .digest // empty'
}
commit=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$BUILD_RUN" --jq .head_sha 2>/dev/null || echo "$GITHUB_SHA")
- for name in proot directaudio tracking xbox comet butler powervr; do
+ for name in proot directaudio tracking xbox comet butler powervr ubisoft; do
file="packs/$name.tar.zst"
[ -f "$file" ] || { echo "::error::$name.tar.zst is missing from Build APK run $BUILD_RUN"; exit 1; }
sha=$(sha256sum "$file" | cut -d' ' -f1)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a15159268..eabc77a35 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -63,6 +63,15 @@ jobs:
artifact: droiddeck-release
secrets: inherit
+ scan:
+ needs: sign
+ permissions:
+ contents: read
+ uses: ./.github/workflows/scan.yml
+ with:
+ artifact: droiddeck-release
+ secrets: inherit
+
packs:
needs: find
permissions:
diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml
new file mode 100644
index 000000000..9790f40c7
--- /dev/null
+++ b/.github/workflows/scan.yml
@@ -0,0 +1,49 @@
+name: Scan APKs
+
+on:
+ workflow_call:
+ inputs:
+ artifact:
+ description: Prefix of the signed artifacts to scan, as passed to sign.yml
+ type: string
+ required: true
+ variant:
+ description: Variant to scan, as listed in tools/release/variants.txt; every variant when omitted
+ type: string
+ default: '*'
+ fail_on_detection:
+ type: boolean
+ default: false
+
+permissions:
+ contents: read
+
+jobs:
+ virustotal:
+ name: VirusTotal
+ runs-on: ubuntu-24.04
+ timeout-minutes: 90
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ sparse-checkout: tools/release
+
+ - uses: actions/download-artifact@v4
+ with:
+ pattern: ${{ inputs.artifact }}-${{ inputs.variant }}
+ merge-multiple: true
+ path: scan
+
+ - name: Scan
+ continue-on-error: ${{ !inputs.fail_on_detection }}
+ env:
+ VT_API_KEY: ${{ secrets.VIRUSTOTAL_API_KEY }}
+ FAIL_ON_DETECTION: ${{ inputs.fail_on_detection && '1' || '0' }}
+ run: |
+ set -euo pipefail
+ if [ -z "$VT_API_KEY" ]; then
+ echo "::warning title=VirusTotal::no VIRUSTOTAL_API_KEY secret; skipping the scan"
+ exit 0
+ fi
+ bash tools/release/virustotal-scan.sh scan/*.apk
diff --git a/README.md b/README.md
index e9f172bfa..73c18762b 100644
--- a/README.md
+++ b/README.md
@@ -7,10 +7,10 @@
DroidDeck brings the SteamOS experience to Android: Steam Gaming Mode, full Linux desktop, integration with GOG, Epic Games, Xbox, and other storefronts, Steam VR, and more!
-
100% open source. No ads. No telemetry. No source withheld.
+100% open source. No ads. No telemetry. No proprietary components. No source withheld.
-
+
@@ -36,9 +36,9 @@ DroidDeck brings the SteamOS experience to Android: Steam Gaming Mode, full Linu
## Install
-1. Android 9 or newer on Adreno 730 or newer, or any 8xx. Adreno 6xx is experimental. Mali, Xclipse, PowerVR and Adreno 710 are unsupported. No root needed.
+1. Android 9 or newer on Adreno 730 or newer, or any 8xx. Adreno 6xx, Mali, Xclipse and PowerVR are experimental. Adreno 710 is currently unsupported. No root needed.
2. About 3 GB free for the runtime, plus 1.1 GB for the desktop and emulators.
-3. Install the [APK](https://github.com/Droid-Deck/DroidDeck/releases/download/0.6.9/DroidDeck-0.6.9.apk), install the Linux runtime, press **Play** and sign in to Steam.
+3. Install the [APK](https://github.com/Droid-Deck/DroidDeck/releases/download/0.7.1/DroidDeck-0.7.1.apk), install the Linux runtime, press **Play** and sign in to Steam.
4. On Android 14 and newer, turn on **Disable child process restrictions** in Developer options. On Android 12 and 13, Steam's first launch shows a **Fix it for me** button that walks you through it.
Smart glasses setup is in the [support matrix](docs/smart-glasses-support.md). Release notes are in [docs/releases](docs/releases).
@@ -79,7 +79,8 @@ DroidDeck is [GPL-3.0](LICENSE). Steam and Proton belong to Valve Corporation. V
- droiddeck-ntsync follows the [Linux](https://github.com/torvalds/linux) ntsync semantics in `Documentation/userspace-api/ntsync.rst` (GPL-2.0).
- The proot fast path orders bindings like [PRoot](https://github.com/proot-me/proot)'s `path/binding.c` (GPL-2.0-or-later).
- DiRT 3 and DiRT Showdown keep their telemetry socket the way RoccoC's DiRTTelemetryErrorFix (MIT) does, based on the fix by Carsten Gottschling.
-- Games use [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's per render pass memory choice. The Steam client keeps `TU_DEBUG=sysmem`.
+- Zink on PowerVR keeps colour textures in colour with Icenowy Zheng's upstream [Mesa](https://gitlab.freedesktop.org/mesa/mesa) fix d55418dae7 (MIT), carried as a runtime patch.
+- Games and AppImage, Flatpak and Snap programs such as emulators use [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's per render pass memory choice. The Steam client and Chromium-based apps keep `TU_DEBUG=sysmem`.
- Black Ops III and Dark Souls Remastered start without [umu-protonfixes](https://github.com/Open-Wine-Components/umu-protonfixes) (BSD-2-Clause), whose `311210.py` and `570940.py` fail under ARM64 Proton.
- [ReSkate](https://github.com/Dingo-Shenanigans/ReSkate) (GPL-3.0) by Dingo Shenanigans uses the launch option from its README and D3D12 feature level 12_1.
- The arm64 client's sign in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest).
@@ -92,8 +93,10 @@ DroidDeck is [GPL-3.0](LICENSE). Steam and Proton belong to Valve Corporation. V
- Epic Games and GOG build on [Phobos](https://github.com/phobos665)'s adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl). GOG install script registry entries are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher) (GPL-3.0) reads them.
- Epic's official Linux launcher preview runs through FEX. That setup is outside Epic's listed Linux support.
- Battle.net is by [@kayakyakr](https://github.com/kayakyakr). It runs Blizzard's own client in Proton (downloaded from Blizzard, not included) and shows key art from the [Battle.net Shop](https://shop.battle.net). Without Steam, its games see the pad as an Xbox 360 controller via `PROTON_SPOOF_STEAMINPUT_VIDPID` in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/winebus.sys`.
+- The EA store follows the EA app's protocols as documented by [ArmchairDevelopers](https://github.com/ArmchairDevelopers)' [Maxima](https://github.com/ArmchairDevelopers/Maxima) (GPL-3.0): sign-in, the GraphQL queries (included verbatim, since EA matches them by hash), build archives, online activation licences and the LSX game endpoint. The code is DroidDeck's own.
- Battle.net installs drive Blizzard's Agent the way [@barncastle](https://github.com/barncastle)'s [Battle.Net-Installer](https://github.com/barncastle/Battle.Net-Installer) does, with requests from [wowdev.wiki](https://wowdev.wiki/Agent). Read without taking code: [@mubaraknumann](https://github.com/mubaraknumann)'s [unifideck](https://github.com/mubaraknumann/unifideck), [@djmittens](https://github.com/djmittens)'s [neo-mittens](https://github.com/djmittens/neo-mittens) `bnetswitch`, [@BCD1210](https://github.com/BCD1210)'s [soju](https://github.com/BCD1210/soju) and [Lutris](https://github.com/lutris/lutris)'s `product.db` reader.
- World of Warcraft addon imports replace an addon's folder from a temporary copy, as [WowUp](https://github.com/WowUp/WowUp) does, and read flavour folders the way [WoWDeck](https://github.com/sigboe/wowdeck) does. No code from either is used.
+- The World of Warcraft addon Download window searches [WoWInterface](https://www.wowinterface.com) through its MMOUI API. [CurseForge](https://www.curseforge.com/wow) opens in the user's browser, with no API and no key.
- Xbox games load [@domsvoboda](https://github.com/domsvoboda)'s [xodus-nexus](https://github.com/domsvoboda/xodus-nexus) modules (LGPL-2.1-or-later), including `wintypes.dll`. Minecraft's GameInput setup was checked against [@Wyze3306](https://github.com/Wyze3306)'s [BedrockOnLinux](https://github.com/Wyze3306/BedrockOnLinux) (MIT).
- The Xbox Cloud Gaming player uses the WebRTC client of [@unknownskl](https://github.com/unknownskl)'s [Greenlight](https://github.com/unknownskl/greenlight) (MIT), and its offer tweaks and sharpening follow [@redphx](https://github.com/redphx)'s [Better xCloud](https://github.com/redphx/better-xcloud) (MIT). See `tools/xcloud-player/NOTICE.md`.
- The itch.io butler pack ships butler's `7z.so`, itch.io's build of [7-Zip](https://www.7-zip.org) by Igor Pavlov (LGPL-2.1, unRAR restriction on RAR code), unmodified. Other archives use Apache Commons Compress and the runtime's bsdtar (libarchive).
diff --git a/app/build.gradle b/app/build.gradle
index 743ad2a84..28bf184e3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -93,7 +93,7 @@ def trackingPack = rootProject.file('tools/packs/tracking/release.env').readLine
def prootPackPin = rootProject.file('tools/packs/proot/release.env').readLines()
.findAll { it.contains('=') && !it.startsWith('#') }
.collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] }
-def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr'].collectEntries { name ->
+def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr', 'ubisoft'].collectEntries { name ->
def pack = file("build/packs/${name}.tar.zst")
if (!pack.isFile()) {
if (ciBuild) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs")
@@ -131,8 +131,8 @@ android {
applicationId "com.droiddeck.launcher"
minSdkVersion 26
targetSdkVersion 28
- versionCode 17
- versionName "0.6.9"
+ versionCode 19
+ versionName "0.7.1"
buildConfigField "String", "BUILD_LABEL", "\"${escapedBuildLabel}\""
buildConfigField "String", "SOURCE_COMMIT", "\"${sourceCommit}\""
buildConfigField "int", "PR_NUMBER", "${prNumber}"
@@ -205,7 +205,7 @@ android {
}
androidResources {
- ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*~:droiddeck-xbox:droiddeck-comet:directaudio:hybris'
+ ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*~:droiddeck-xbox:droiddeck-comet:droiddeck-ubisoft:directaudio:hybris'
}
packagingOptions {
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 494acac5f..4ae8741a4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -95,14 +95,6 @@
-
-
-
-
-
@@ -207,7 +199,6 @@
-
-
@@ -330,6 +315,7 @@
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboard|keyboardHidden|navigation|uiMode|density"
android:theme="@style/SessionTheme" />
+
+
+
+
+
+
/dev/null
+if [ -d "$inbox" ] && printf '%s\n' "$url" > "$inbox/open-url.part" && mv -f "$inbox/open-url.part" "$inbox/open-url"; then
+ i=0
+ while [ $i -lt 30 ] && [ -e "$inbox/open-url" ]; do
+ sleep 0.2
+ i=$((i + 1))
+ done
+ if [ -e "$inbox/open-url" ]; then
+ rm -f "$inbox/open-url"
+ elif [ -e "$inbox/open-url.failed" ]; then
+ rm -f "$inbox/open-url.failed"
+ else
+ sleep 0.3
+ [ -e "$inbox/open-url.failed" ] && rm -f "$inbox/open-url.failed" || exit 0
+ fi
+fi
+serial=${ADB_SERIAL:-127.0.0.1:5555}
+adb connect "$serial" >/dev/null 2>&1
+quoted=$(printf "%s" "$url" | sed "s/'/'\\\\''/g")
+adb -s "$serial" shell "am start --display ${DD_BROWSER_DISPLAY:-0} -a android.intent.action.VIEW -d '$quoted'" >/dev/null 2>&1 ||
+ echo "Open this on any device: $url" >&2
diff --git a/app/src/main/assets/agent/dd-gh-login b/app/src/main/assets/agent/dd-gh-login
new file mode 100644
index 000000000..86ff4707e
--- /dev/null
+++ b/app/src/main/assets/agent/dd-gh-login
@@ -0,0 +1,27 @@
+#!/bin/bash
+# GitHub sign-in through Android's browser, with the one-time code typed in for the person.
+serial=${ADB_SERIAL:-127.0.0.1:5555}
+display=${DD_BROWSER_DISPLAY:-0}
+adb connect "$serial" >/dev/null 2>&1
+coproc GH { BROWSER=true gh auth login --hostname github.com --git-protocol https --web 2>&1; }
+# bash drops GH and GH_PID once gh exits, which can be before the loop reads its last line.
+ghpid=$GH_PID
+exec {ghout}<&"${GH[0]}" {ghin}>&"${GH[1]}"
+typed=
+while IFS= read -r line <&"$ghout"; do
+ printf '%s\n' "$line"
+ code=$(grep -oE '[A-Z0-9]{4}-[A-Z0-9]{4}' <<<"$line" | head -1)
+ if [ -n "$code" ] && [ -z "$typed" ]; then
+ typed=1
+ echo >&"$ghin"
+ adb -s "$serial" shell "am start --display $display -a android.intent.action.VIEW -d https://github.com/login/device" >/dev/null 2>&1
+ # Chrome drops characters from `input text` and from fast key events on this page.
+ keys=
+ for ((i = 0; i < ${#code}; i++)); do
+ c=${code:i:1}
+ [ "$c" = - ] || keys+="input -d $display keyevent KEYCODE_$c; sleep 0.4; "
+ done
+ (sleep 7; adb -s "$serial" shell "$keys" >/dev/null 2>&1) &
+ fi
+done
+wait "$ghpid"
diff --git a/app/src/main/cpp/fakeinput_steam.cpp b/app/src/main/cpp/fakeinput_steam.cpp
index 8906b01f7..8941abda2 100644
--- a/app/src/main/cpp/fakeinput_steam.cpp
+++ b/app/src/main/cpp/fakeinput_steam.cpp
@@ -30,6 +30,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -208,23 +209,33 @@ struct FakeConfig {
bool uinput_enabled;
};
+// The first allocation here can start the host program's own allocator, which may call a hooked
+// function (mimalloc probes NUMA nodes with access()) and land back in config(). A guarded static
+// would throw a recursive-init error there, so the fields are filled without allocating, and a
+// reentry on the initializing thread gets them while other threads wait for the fork handlers.
static FakeConfig &config() {
- static FakeConfig *cfg = [] {
- auto *c = new FakeConfig();
- const char *dir = getenv("FAKE_EVDEV_DIR");
- c->hook_dir = dir ? dir : "/data/data/com.termux/files/home/fake-input";
- c->udev_data_dir = getenv("FAKE_UDEV_DATA_DIR");
- c->vibration_enabled =
- getenv("FAKE_EVDEV_VIBRATION") && atoi(getenv("FAKE_EVDEV_VIBRATION"));
- const char *identity = getenv("FAKE_EVDEV_IDENTITY");
- c->xbox360_identity = identity && !strcmp(identity, "xbox360");
- c->uinput_enabled = getenv("FAKE_EVDEV_UINPUT") && atoi(getenv("FAKE_EVDEV_UINPUT"));
- pthread_atfork(controller_fork_prepare, controller_fork_parent,
- controller_fork_child);
- Logger::init();
- return c;
- }();
- return *cfg;
+ static FakeConfig cfg;
+ static std::atomic state{0};
+ static __thread bool initializing __attribute__((tls_model("initial-exec")));
+ if (state.load(std::memory_order_acquire) == 2 || initializing) return cfg;
+ int expected = 0;
+ if (!state.compare_exchange_strong(expected, 1, std::memory_order_acq_rel)) {
+ while (state.load(std::memory_order_acquire) != 2) sched_yield();
+ return cfg;
+ }
+ initializing = true;
+ const char *dir = getenv("FAKE_EVDEV_DIR");
+ cfg.hook_dir = dir ? dir : "/data/data/com.termux/files/home/fake-input";
+ cfg.udev_data_dir = getenv("FAKE_UDEV_DATA_DIR");
+ cfg.vibration_enabled = getenv("FAKE_EVDEV_VIBRATION") && atoi(getenv("FAKE_EVDEV_VIBRATION"));
+ const char *identity = getenv("FAKE_EVDEV_IDENTITY");
+ cfg.xbox360_identity = identity && !strcmp(identity, "xbox360");
+ cfg.uinput_enabled = getenv("FAKE_EVDEV_UINPUT") && atoi(getenv("FAKE_EVDEV_UINPUT"));
+ pthread_atfork(controller_fork_prepare, controller_fork_parent, controller_fork_child);
+ Logger::init();
+ state.store(2, std::memory_order_release);
+ initializing = false;
+ return cfg;
}
static std::recursive_mutex &controller_mutex() {
@@ -2311,7 +2322,15 @@ __attribute__((visibility("hidden"))) static bool is_deck_sysfs_path(const char
if (!path) return false;
if (!strncmp(path, "/sys/devices/droiddeck", 22) || !strncmp(path, "/sys/class/hidraw", 17)) return true;
const char *listing = deck_listing_dir();
- return listing && !strncmp(path, listing, strlen(listing));
+ if (!listing) return false;
+ if (!strncmp(path, listing, strlen(listing))) return true;
+ // Without proot, a descriptor's /proc/self/fd link names the stand-in where it really is (the
+ // listing's parent holds devices/ and class-hidraw/), not /sys
+ const char *slash = strrchr(listing, '/');
+ if (!slash || slash == listing) return false;
+ size_t root = static_cast(slash - listing);
+ return !strncmp(path, listing, root) && path[root] == '/' &&
+ (!strncmp(path + root, "/devices", 8) || !strncmp(path + root, "/class-hidraw", 13));
}
__attribute__((visibility("hidden"))) static bool is_deck_sysfs_fd(int fd) {
@@ -2953,15 +2972,19 @@ EXPORT DIR *opendir(const char *name) {
return dir;
}
+static bool open_has_mode(int flags) {
+ return (flags & O_CREAT) != 0 || (flags & O_TMPFILE) == O_TMPFILE;
+}
+
EXPORT int open(const char *pathname, int flags, ...) {
va_list va;
- mode_t mode;
+ mode_t mode = 0;
int fd;
bool hasMode;
va_start(va, flags);
- hasMode = flags & O_CREAT;
+ hasMode = open_has_mode(flags);
if (hasMode) {
mode = va_arg(va, mode_t);
@@ -3033,13 +3056,13 @@ EXPORT int open(const char *pathname, int flags, ...) {
EXPORT int openat(int dirfd, const char *pathname, int flags, ...) {
va_list va;
- mode_t mode;
+ mode_t mode = 0;
int fd;
bool hasMode;
va_start(va, flags);
- hasMode = flags & O_CREAT;
+ hasMode = open_has_mode(flags);
if (hasMode) {
mode = va_arg(va, mode_t);
@@ -4251,7 +4274,7 @@ EXPORT int select(int nfds, fd_set *readfds, fd_set *writefds,
#ifdef __GLIBC__
static mode_t open_mode(int flags, va_list va) {
- return (flags & (O_CREAT | O_TMPFILE)) ? va_arg(va, mode_t) : 0;
+ return open_has_mode(flags) ? va_arg(va, mode_t) : 0;
}
EXPORT int open64(const char *pathname, int flags, ...) {
diff --git a/app/src/main/cpp/waylandcomp/src/vk_present.c b/app/src/main/cpp/waylandcomp/src/vk_present.c
index 8d0267cc1..44fea0c76 100644
--- a/app/src/main/cpp/waylandcomp/src/vk_present.c
+++ b/app/src/main/cpp/waylandcomp/src/vk_present.c
@@ -213,7 +213,7 @@ static struct {
} g_map;
static pthread_mutex_t g_game_picture_lock = PTHREAD_MUTEX_INITIALIZER;
static float g_game_picture_rect[4];
-static int g_game_picture_top;
+static int g_game_picture_placed;
static int64_t g_swap_retry_at_ns;
static int g_swap_fail_logged;
@@ -362,7 +362,7 @@ int vkp_completion_unknown(void) { return g_dev_state == -3; }
void vk_present_set_scale_mode(int mode, int alignment) {
if (mode < VKP_MODE_OFF || mode > VKP_MODE_INTEGER) mode = VKP_MODE_FIT;
- if (alignment < VKP_ALIGN_CENTER || alignment > VKP_ALIGN_PICTURE_BOTTOM) alignment = VKP_ALIGN_CENTER;
+ if (alignment < VKP_ALIGN_CENTER || alignment > VKP_ALIGN_PICTURE_RIGHT) alignment = VKP_ALIGN_CENTER;
g_mode = mode;
g_align = alignment;
}
@@ -383,6 +383,8 @@ static const char *align_name(int a) {
case VKP_ALIGN_BOTTOM: return "bottom";
case VKP_ALIGN_PICTURE_TOP: return "picture top";
case VKP_ALIGN_PICTURE_BOTTOM: return "picture bottom";
+ case VKP_ALIGN_PICTURE_LEFT: return "picture left";
+ case VKP_ALIGN_PICTURE_RIGHT: return "picture right";
default: return "center";
}
}
@@ -420,9 +422,11 @@ static void update_map(int scene_w, int scene_h) {
}
if (align == VKP_ALIGN_PICTURE_TOP) g_map.off_y = 0;
else if (align == VKP_ALIGN_PICTURE_BOTTOM) g_map.off_y = H - scene_h * g_map.ky;
+ else if (align == VKP_ALIGN_PICTURE_LEFT) g_map.off_x = 0;
+ else if (align == VKP_ALIGN_PICTURE_RIGHT) g_map.off_x = W - scene_w * g_map.kx;
g_map.valid = 1;
pthread_mutex_lock(&g_game_picture_lock);
- g_game_picture_top = align == VKP_ALIGN_PICTURE_TOP || align == VKP_ALIGN_PICTURE_BOTTOM;
+ g_game_picture_placed = align == VKP_ALIGN_PICTURE_TOP || align == VKP_ALIGN_PICTURE_BOTTOM || align == VKP_ALIGN_PICTURE_LEFT || align == VKP_ALIGN_PICTURE_RIGHT;
g_game_picture_rect[0] = g_map.off_x;
g_game_picture_rect[1] = g_map.off_y;
g_game_picture_rect[2] = g_map.off_x + scene_w * g_map.kx;
@@ -436,7 +440,7 @@ static void update_map(int scene_w, int scene_h) {
int vkp_game_picture_rect(float rect[4]) {
pthread_mutex_lock(&g_game_picture_lock);
- int active = g_game_picture_top;
+ int active = g_game_picture_placed;
if (active) memcpy(rect, g_game_picture_rect, sizeof(g_game_picture_rect));
pthread_mutex_unlock(&g_game_picture_lock);
return active;
diff --git a/app/src/main/cpp/waylandcomp/src/vk_present.h b/app/src/main/cpp/waylandcomp/src/vk_present.h
index 3a76b4c0b..2a363979e 100644
--- a/app/src/main/cpp/waylandcomp/src/vk_present.h
+++ b/app/src/main/cpp/waylandcomp/src/vk_present.h
@@ -15,7 +15,9 @@ int vkp_quest_layer_presentation(void);
enum vkp_scale_mode { VKP_MODE_OFF = 0, VKP_MODE_FIT = 1, VKP_MODE_STRETCH = 2, VKP_MODE_FILL = 3,
VKP_MODE_INTEGER = 4 };
-enum vkp_align { VKP_ALIGN_CENTER = 0, VKP_ALIGN_TOP = 1, VKP_ALIGN_BOTTOM = 2, VKP_ALIGN_PICTURE_TOP = 3, VKP_ALIGN_PICTURE_BOTTOM = 4 };
+enum vkp_align { VKP_ALIGN_CENTER = 0, VKP_ALIGN_TOP = 1, VKP_ALIGN_BOTTOM = 2,
+ VKP_ALIGN_PICTURE_TOP = 3, VKP_ALIGN_PICTURE_BOTTOM = 4,
+ VKP_ALIGN_PICTURE_LEFT = 5, VKP_ALIGN_PICTURE_RIGHT = 6 };
void vk_present_set_scale_mode(int mode, int alignment);
int vkp_game_picture_rect(float rect[4]);
int vkp_output_to_scene(double ox, double oy, double *sx, double *sy);
diff --git a/app/src/main/java/com/droiddeck/launcher/App.kt b/app/src/main/java/com/droiddeck/launcher/App.kt
index 5ef39f6b6..79f42d118 100644
--- a/app/src/main/java/com/droiddeck/launcher/App.kt
+++ b/app/src/main/java/com/droiddeck/launcher/App.kt
@@ -7,8 +7,11 @@ import com.droiddeck.launcher.session.EnhancedSessionLogShare
import com.droiddeck.launcher.session.GpuClockPin
class App : Application() {
- override fun attachBaseContext(base: android.content.Context) =
+ override fun attachBaseContext(base: android.content.Context) {
super.attachBaseContext(com.droiddeck.launcher.core.AppLanguage.wrap(base))
+ val process = if (android.os.Build.VERSION.SDK_INT >= 28) Application.getProcessName() else packageName
+ com.droiddeck.launcher.lab.LabOverlay.load(this, process == packageName)
+ }
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
super.onConfigurationChanged(newConfig)
@@ -39,6 +42,9 @@ class App : Application() {
if (process == "$packageName:vr_recovery" || process == "$packageName:rgb_diagnostic" ||
process == "$packageName:shortcuts_sync" || process == "$packageName:bottom_desktop") return
CrashHandler.install(this)
+ com.droiddeck.launcher.agent.AgentHost.refresh(this)
+ if (com.droiddeck.launcher.agent.AgentHost.available) com.droiddeck.launcher.lab.LabNotice.openOnInstall = "agent"
+ com.droiddeck.launcher.lab.LabNotice.started(this)
com.droiddeck.launcher.core.SteamIntegration.syncShortcutsListing(this)
com.droiddeck.launcher.session.QuestExperimental.initialize(this)
com.droiddeck.launcher.session.SessionPrefs.applyNtsyncDefault(this)
@@ -61,6 +67,9 @@ class App : Application() {
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.xbox.XboxBackend)
com.droiddeck.launcher.sync.Syncthing.init(this)
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.battlenet.BattleNetBackend)
+ com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.ubisoft.UbisoftBackend)
+ com.droiddeck.launcher.stores.ea.EaBackend.app = this
+ com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.ea.EaBackend)
}
private fun prefetchAddonPacks() {
@@ -74,6 +83,8 @@ class App : Application() {
if (com.droiddeck.launcher.stores.gog.GogComet.enabled(app)) com.droiddeck.launcher.core.AddonPack.COMET.ensure(app)
if (com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, com.droiddeck.launcher.stores.Store.XBOX) != null)
com.droiddeck.launcher.core.AddonPack.XBOX.ensure(app)
+ if (com.droiddeck.launcher.stores.StoreAccounts.signedInAs(app, com.droiddeck.launcher.stores.Store.UBISOFT) != null)
+ com.droiddeck.launcher.session.SessionFiles.ensureUbisoftService(app)
com.droiddeck.launcher.handtracking.HandTracking.load(app)
}.onFailure { android.util.Log.w("App", "add-on pack prefetch failed", it) }
}, "addon-packs").start()
diff --git a/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt b/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt
index cbd760370..e5e74f791 100644
--- a/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt
+++ b/app/src/main/java/com/droiddeck/launcher/ComponentsMenu.kt
@@ -5,8 +5,11 @@ import android.util.Log
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
+import com.droiddeck.launcher.session.ComponentUpdater
+import com.droiddeck.launcher.session.ComponentUpdates
import com.droiddeck.launcher.session.ComponentsManager
import com.droiddeck.launcher.session.ProtonDefault
+import com.droiddeck.launcher.session.SessionPrefs
internal class ComponentsMenu(private val activity: android.app.Activity, private val ui: Handler) {
var compSnapshot by mutableStateOf(null)
@@ -20,6 +23,10 @@ internal class ComponentsMenu(private val activity: android.app.Activity, privat
get() = downloads
private set(value) { downloads = value }
val compDownloadRevision: Long get() = downloadRevision
+ var compModes by mutableStateOf