[PR #202] [MERGED] android: multidevice capabilites and accessiblity features (and "liquid glass") #329

Closed
opened 2026-03-02 12:40:41 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kavishdevar/librepods/pull/202
Author: @kavishdevar
Created: 9/10/2025
Status: Merged
Merged: 10/26/2025
Merged by: @kavishdevar

Base: mainHead: multi-device-and-accessibility


📝 Commits (10+)

  • 86551be android: add accessibility stuff
  • 4ee9b27 docs: update transparency mode format
  • d1bf540 android: don't start service every time MainActivity is launched
  • df9f443 android: add basic multidevice capabilities
  • 0e9aadd android: clean up a bit of AI gen'd code
  • aecbb06 android: clean up main service and remove minimum API on head gestures
  • fa00620 android: clean up a lot of stuff
  • c53356f android: implement the accessiblity settings page
  • 9e6d971 android: add EQ settings for phone and media
  • 5bef8c3 android: add toggle for DID hook

📊 Changes

152 files changed (+17544 additions, -5672 deletions)

View changed files

📝 AAP Definitions.md (+14 -37)
📝 README.md (+47 -36)
📝 android/.gitignore (+1 -0)
📝 android/app/build.gradle.kts (+28 -5)
android/app/libs/backdrop-debug.aar (+0 -0)
android/app/libs/backdrop-release.aar (+0 -0)
📝 android/app/src/main/AndroidManifest.xml (+19 -17)
📝 android/app/src/main/cpp/l2c_fcr_hook.cpp (+68 -0)
📝 android/app/src/main/cpp/l2c_fcr_hook.h (+22 -0)
android/app/src/main/java/me/kavishdevar/librepods/CustomDeviceActivity.kt (+0 -188)
📝 android/app/src/main/java/me/kavishdevar/librepods/MainActivity.kt (+163 -89)
📝 android/app/src/main/java/me/kavishdevar/librepods/QuickSettingsDialogActivity.kt (+19 -1)
android/app/src/main/java/me/kavishdevar/librepods/composables/AboutCard.kt (+205 -0)
android/app/src/main/java/me/kavishdevar/librepods/composables/AccessibilitySettings.kt (+0 -221)
android/app/src/main/java/me/kavishdevar/librepods/composables/AdaptiveStrengthSlider.kt (+0 -158)
📝 android/app/src/main/java/me/kavishdevar/librepods/composables/AudioSettings.kt (+85 -37)
📝 android/app/src/main/java/me/kavishdevar/librepods/composables/BatteryIndicator.kt (+73 -80)
📝 android/app/src/main/java/me/kavishdevar/librepods/composables/BatteryView.kt (+81 -34)
android/app/src/main/java/me/kavishdevar/librepods/composables/CallControlSettings.kt (+470 -0)
android/app/src/main/java/me/kavishdevar/librepods/composables/ConfirmationDialog.kt (+217 -0)

...and 80 more files

📄 Description

The app now supports

  • Accessibility Features
    • customizing transparency mode
    • enabling loud sound reduction
    • eq settings for transparency mode
    • eq settings for media and phone
    • hearing aid customization (Help needed from users in supported regions 🙏)
    • implement adding hearing test results and display active audiogram data (hearing loss data for 8 frequencies)
  • Multi-device connectivity
    • connect your AirPods with up to two devices simultaneously (more devices can be connected in Apple's ecosystem probably by iCloud)
    • shows popups on phone when other device takes control
    • asks the other device to show popups the same way iDevices do (will show up as an iphone because unfortunately apple's OSes don't actually pick up the names other than Mac, iPad, and iPhone specifically.
    • replicates most of the behavior for multi-device pairing such as hijack requests, reverse connection on banner tap, etc.
    • quirk: connect your apple device before connecting your non-apple device.

(Accessibility features needs writing a ATTManager because I'd love to have more direct control over the connection, WIP) done

other chores (not specific to the PR):

  • remove READ_LOCAL_ADDRESS permission
  • figure out where MODIFY_PHONE_STATE is used
  • automatically switch to using alternate head tracking packets

How?

After hours of digging, I finally found that these things require the vendorId of the Device Identification Profile to be set to Apple's.

  • On Linux, this can be easily done by editing the /etc/bluetooth/main.conf file and setting the DeviceID parameter.
  • And for Android, we again fall back to xposed, where the function that adds this DID record to SDP (Service Display Protocol is hijacked). the hooks need to be reset to find the offset for the said function (and no, i'm not going for heuristics any time soon, this is just much more reliable, one-time setup).
    • add some indication for new features/updates for existing users so that they don't need to turn to the README and/or the release notes every update

oh, and i tried android studio's code inspection and cleaned up the code a little


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kavishdevar/librepods/pull/202 **Author:** [@kavishdevar](https://github.com/kavishdevar) **Created:** 9/10/2025 **Status:** ✅ Merged **Merged:** 10/26/2025 **Merged by:** [@kavishdevar](https://github.com/kavishdevar) **Base:** `main` ← **Head:** `multi-device-and-accessibility` --- ### 📝 Commits (10+) - [`86551be`](https://github.com/kavishdevar/librepods/commit/86551be86b2976526aad1cb39fc5a57432fb4173) android: add accessibility stuff - [`4ee9b27`](https://github.com/kavishdevar/librepods/commit/4ee9b2732fe048005c432fe464b602c48a2063d6) docs: update transparency mode format - [`d1bf540`](https://github.com/kavishdevar/librepods/commit/d1bf5407c9b4aa0d1b5f122803d28ea342e2360e) android: don't start service every time MainActivity is launched - [`df9f443`](https://github.com/kavishdevar/librepods/commit/df9f443173fcc6719cb7e40619385f233dfbaeb0) android: add basic multidevice capabilities - [`0e9aadd`](https://github.com/kavishdevar/librepods/commit/0e9aadd672526b4fd64442bc03d60d28f3116585) android: clean up a bit of AI gen'd code - [`aecbb06`](https://github.com/kavishdevar/librepods/commit/aecbb066b5d7093a38f6ac80651a0940fe22341e) android: clean up main service and remove minimum API on head gestures - [`fa00620`](https://github.com/kavishdevar/librepods/commit/fa00620b5b411962bf39197365e96820de718ef4) android: clean up a lot of stuff - [`c53356f`](https://github.com/kavishdevar/librepods/commit/c53356f77ed267cb3a7f69079a84352c390ea9c2) android: implement the accessiblity settings page - [`9e6d971`](https://github.com/kavishdevar/librepods/commit/9e6d97198b5c9ab8678a06ca113405d79ff13e89) android: add EQ settings for phone and media - [`5bef8c3`](https://github.com/kavishdevar/librepods/commit/5bef8c384e4e48cf1800d139e891f58e401976c1) android: add toggle for DID hook ### 📊 Changes **152 files changed** (+17544 additions, -5672 deletions) <details> <summary>View changed files</summary> 📝 `AAP Definitions.md` (+14 -37) 📝 `README.md` (+47 -36) 📝 `android/.gitignore` (+1 -0) 📝 `android/app/build.gradle.kts` (+28 -5) ➕ `android/app/libs/backdrop-debug.aar` (+0 -0) ➕ `android/app/libs/backdrop-release.aar` (+0 -0) 📝 `android/app/src/main/AndroidManifest.xml` (+19 -17) 📝 `android/app/src/main/cpp/l2c_fcr_hook.cpp` (+68 -0) 📝 `android/app/src/main/cpp/l2c_fcr_hook.h` (+22 -0) ➖ `android/app/src/main/java/me/kavishdevar/librepods/CustomDeviceActivity.kt` (+0 -188) 📝 `android/app/src/main/java/me/kavishdevar/librepods/MainActivity.kt` (+163 -89) 📝 `android/app/src/main/java/me/kavishdevar/librepods/QuickSettingsDialogActivity.kt` (+19 -1) ➕ `android/app/src/main/java/me/kavishdevar/librepods/composables/AboutCard.kt` (+205 -0) ➖ `android/app/src/main/java/me/kavishdevar/librepods/composables/AccessibilitySettings.kt` (+0 -221) ➖ `android/app/src/main/java/me/kavishdevar/librepods/composables/AdaptiveStrengthSlider.kt` (+0 -158) 📝 `android/app/src/main/java/me/kavishdevar/librepods/composables/AudioSettings.kt` (+85 -37) 📝 `android/app/src/main/java/me/kavishdevar/librepods/composables/BatteryIndicator.kt` (+73 -80) 📝 `android/app/src/main/java/me/kavishdevar/librepods/composables/BatteryView.kt` (+81 -34) ➕ `android/app/src/main/java/me/kavishdevar/librepods/composables/CallControlSettings.kt` (+470 -0) ➕ `android/app/src/main/java/me/kavishdevar/librepods/composables/ConfirmationDialog.kt` (+217 -0) _...and 80 more files_ </details> ### 📄 Description The app now supports - Accessibility Features - [x] customizing transparency mode - [x] enabling loud sound reduction - [x] eq settings for transparency mode - [x] eq settings for media and phone - [x] hearing aid customization (**Help needed from users in supported regions** :pray:) - [x] implement adding hearing test results and display active audiogram data (hearing loss data for 8 frequencies) - Multi-device connectivity - connect your AirPods with up to two devices simultaneously (more devices can be connected in Apple's ecosystem probably by iCloud) - [x] shows popups on phone when other device takes control - [x] asks the other device to show popups the same way iDevices do (will show up as an iphone because unfortunately apple's OSes don't actually pick up the names other than Mac, iPad, and iPhone specifically. - [x] replicates most of the behavior for multi-device pairing such as hijack requests, reverse connection on banner tap, etc. - [ ] quirk: connect your apple device before connecting your non-apple device. ~(Accessibility features needs writing a ATTManager because I'd love to have more direct control over the connection, WIP)~ done other chores (not specific to the PR): - [x] remove `READ_LOCAL_ADDRESS` permission - [ ] figure out where `MODIFY_PHONE_STATE` is used - [ ] automatically switch to using alternate head tracking packets ## How? After hours of digging, I finally found that these things require the [vendorId of the Device Identification Profile](https://www.bluetooth.com/specifications/specs/html/?src=DID_v1.3/out/en/index-en.html#UUID-95bf9736-7a89-5630-9ede-e80e92744efc) to be set to Apple's. - On Linux, this can be easily done by editing the `/etc/bluetooth/main.conf` file and setting the DeviceID parameter. - And for Android, we again fall back to xposed, where the function that adds this DID record to SDP (Service Display Protocol is hijacked). the hooks need to be reset to find the offset for the said function (and no, i'm not going for heuristics any time soon, this is just much more reliable, one-time setup). - [ ] add some indication for new features/updates for existing users so that they don't need to turn to the README and/or the release notes every update oh, and i tried android studio's code inspection and cleaned up the code a little --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 12:40:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librepods#329
No description provided.