WIP: Android: adaptive triggers over Bluetooth (experimental, opt-in) #831
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
stale
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-streetpea/chiaki-ng!831
Loading…
Reference in a new issue
No description provided.
Delete branch "aoleg94/android-dualsense-triggers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #830 (includes #828 and #830 until they are merged).
Summary
Adaptive triggers need DualSense output reports, which Android's public APIs can't send. This
adds an opt-in setting, Adaptive triggers (experimental), off by default, Android 12+,
that writes Bluetooth output reports (
0x31) to a paired DualSense directly. With it on, thepad gets adaptive triggers, fine-grained rumble (vibration v2), lightbar colour and player LEDs.
How
BluetoothHidHost.sendData(HID host profile proxy), reached throughorg.lsposed.hiddenapibypass:hiddenapibypass4.3 (Apache-2.0). This is a non-SDK API: it maystop working on some OS versions or OEM builds, which is why it is opt-in and falls back.
DualSenseReportbuilds the full 78-byte report (CRC32, valid flags, triggers, motors, LEDs);ReportCoalescersends at most one report per 4 ms, latest wins.motors stopped before the proxy is closed.
BLUETOOTH_CONNECT; the manifest adds that permission and a<queries>entry for the Bluetooth HID host service.
Testing
DualSenseReportTest(golden byte arrays incl. CRC),DualSenseBtOutputTest,ReportCoalescerTest,OutputRouterFallbackTest.Playroom, rumble indistinguishable from desktop, lightbar follows the game, player 1 LED lit,
triggers released on leaving the stream.
Notes
Per
CONTRIBUTOR_GUIDE.md: the new dependency is declared only inandroid/(
libs.versions.toml), nothing inCMakeLists.txt,scripts/or workflows refers to it.Developed with the assistance of Claude Code, and tested on real hardware as described above.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.