Skip to content

Repository files navigation

Thor to DS4

Enables the built-in controller of the AYN Thor to work with the official PS Remote Play app by exposing it as a virtual DualShock 4 controller.

AYN Thorの内蔵コントローラーを仮想DualShock 4コントローラーとして認識させ、公式PS Remote Playアプリで使用できるようにします。

日本語 · English

Important

Thor To DS4はSony Interactive Entertainment、Sony Group、AYNのいずれとも無関係・非公認です。製品名と互換識別子は対応機器・サービスを説明する目的でのみ使用しています。

Warning

AYN純正ファームウェアの特権サービスを利用します。AYN Thor以外への導入や、仕組みを理解しない状態での改変版APKの使用は推奨しません。

Thor To DS4 icon

紹介記事 / Related article

Ayn Thorの本体コントローラーをPS Remote Playで使えるようにした

日本語

できること

  • AYN Thorの物理ボタン、スティック、トリガーをDS4互換入力へ変換
  • 公式PS Remote Playなど、Androidが認識した外部コントローラーを利用するアプリへ入力を橋渡し
  • 大きなON/OFFボタンだけでブリッジを開始・停止
  • 停止時にAYN側へ追加した入力除外設定を復元

このアプリはPSNへのログイン、PSNトークンの取得、リモートプレイ通信の中継を行いません。ネットワーク権限も要求しません。

対応環境

  • AYN Thor純正ファームウェア
  • arm64-v8a
  • Android 9(API 28)以降
  • 純正ファームウェアのcontroller mapping serviceとPServerBinderが利用可能であること

AYNのファームウェア更新により動作しなくなる可能性があります。他機種はサポート対象外です。

仕組み

  1. AYN controller serviceから内蔵コントローラーの状態を受け取ります。
  2. Android側で入力を正規化し、アプリ専用の状態ファイルへ書き出します。
  3. 小さなnative daemonがUHIDを通じてDS4互換入力デバイスを生成します。
  4. ブリッジ停止時にnative daemonとAYN側の一時設定を片付けます。

公開ソースには実機から取得したMACアドレス、校正値、firmware-version応答、SonyまたはAYNの実行バイナリを含めていません。DS4互換性に必要なVID/PIDとデバイス名は内部識別子として使用しています。

インストールと使い方

  1. GitHub ReleasesからAPKを取得します。
  2. SIGNING.mdに記載された署名証明書と、Releaseに掲載されたSHA-256を確認します。
  3. Androidの確認画面に従ってAPKをインストールします。
  4. Thor To DS4を開き、中央のDS4 OFFをタップします。
  5. 表示がDS4 ONになってから対象アプリを操作します。
  6. 終了時はもう一度タップしてOFFにします。

同じ端末へ別application IDの私用ビルドを共存させることはできますが、ブリッジを同時に2つ起動しないでください。

ビルド

必要な環境:Android SDK 35、NDK 27.2.12479018、JDK 17。

./scripts/build-native.sh
./gradlew :app:assembleDebug

ライセンス

プロジェクト独自部分はThor To DS4 Non-Commercial Attribution License 1.0で公開しています。

  • 無料での利用、調査、改変、複製、再配布が可能です。
  • 有料販売、課金バンドル、ペイウォール経由の配布は禁止です。
  • 複製・再配布時は元プロジェクト、ライセンス、完全なNOTICEを保持してください。
  • 改変版は改変済みであることを明記してください。

これは非商用条件を含むsource-availableライセンスであり、OSI認定のオープンソースライセンスではありません。第三者部分にはNOTICELICENSESに記載された各ライセンスが適用されます。

セキュリティ報告

純正ファームウェアの特権Binderを利用するため、脆弱性や意図しない権限利用を見つけた場合は公開Issueへ悪用手順を投稿せず、SECURITY.mdの手順で連絡してください。


English

What it does

  • Converts the physical buttons, sticks, and triggers built into the AYN Thor into DS4-compatible input.
  • Bridges input to apps that accept an Android-recognized external controller, including the official PS Remote Play app.
  • Starts and stops the bridge with one large ON/OFF button.
  • Restores the temporary AYN input-exclusion setting when the bridge stops.

Thor To DS4 does not sign in to PSN, obtain PSN tokens, proxy Remote Play traffic, or request Android network permission.

Requirements

  • An AYN Thor running the stock firmware
  • arm64-v8a
  • Android 9 (API 28) or later
  • The controller mapping service and PServerBinder provided by the stock firmware

An AYN firmware update may break compatibility. Other devices are not supported.

How it works

  1. The app receives built-in controller state from the AYN controller service.
  2. The Android component normalizes the input and writes an app-private state file.
  3. A small native daemon creates a DS4-compatible input device through UHID.
  4. Stopping the bridge cleans up the daemon and temporary AYN configuration.

The public source does not contain a hardware-derived MAC address, calibration dump, firmware-version response, or Sony/AYN executable binary. The VID/PID and device name required for DS4 interoperability remain as internal compatibility identifiers.

Install and use

  1. Download the APK from GitHub Releases.
  2. Check its signing certificate against SIGNING.md and its SHA-256 checksum against the Release notes.
  3. Install the APK after reviewing Android's confirmation screen.
  4. Open Thor To DS4 and tap the large DS4 OFF button.
  5. Use the target app after the display changes to DS4 ON.
  6. Tap the button again to stop the bridge when finished.

A private build with a different application ID can coexist on the same device, but never run two bridge instances at once.

Build

Required tools: Android SDK 35, NDK 27.2.12479018, and JDK 17.

./scripts/build-native.sh
./gradlew :app:assembleDebug

License

Original project code is released under the Thor To DS4 Non-Commercial Attribution License 1.0.

  • Free use, study, modification, copying, and redistribution are permitted.
  • Sale, paid bundles, paywalls, and other distribution for consideration are prohibited.
  • Copies and redistributions must retain the original project attribution, license, and complete NOTICE.
  • Modified versions must clearly state that they were modified.

This is a source-available license with a non-commercial restriction and is not an OSI-approved open-source license. Third-party components remain under the licenses listed in NOTICE and LICENSES.

Security reports

Because this project uses a privileged Binder supplied by the stock firmware, please do not post exploitation steps in a public issue. Follow SECURITY.md for security-sensitive reports.

About

Use the built-in AYN Thor controller with the official PS Remote Play app through a virtual DualShock 4.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages