-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
android: multidevice capabilites and accessiblity features (and "liquid glass") #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
adds option for customizing transparency mode, amplification, tone, etc.
use at your own risk, may or may not work
android/app/src/main/java/me/kavishdevar/librepods/utils/RadareOffsetFinder.kt
Fixed
Show fixed
Hide fixed
android/app/src/main/java/me/kavishdevar/librepods/utils/RadareOffsetFinder.kt
Fixed
Show fixed
Hide fixed
This comment was marked as outdated.
This comment was marked as outdated.
android/app/src/main/java/me/kavishdevar/librepods/utils/RadareOffsetFinder.kt
Fixed
Show fixed
Hide fixed
android/app/src/main/java/me/kavishdevar/librepods/utils/RadareOffsetFinder.kt
Fixed
Show fixed
Hide fixed
android/app/src/main/java/me/kavishdevar/librepods/utils/RadareOffsetFinder.kt
Fixed
Show fixed
Hide fixed
android/app/src/main/java/me/kavishdevar/librepods/utils/RadareOffsetFinder.kt
Fixed
Show fixed
Hide fixed
|
the work done here is amazing, i hope the pros 3 keep the same packet format |
thanks!
Hopefully, Apple will not go all the way to change their entire protocol that they've been using over so many years Have you been able to try this build out, @Leclowndu93150? The accessibility fetures and stuff? I'm waiting for a few more days just to test it out myself before merging it. |
not yet not yet ! i was looking for this kind of apps cuz i'm getting my first ever airpods (pros 3) on the 19th, i never had an apple product before so i'll see how it goes. but i'd be happy to help ! |
|
pfft the store is late, tomorow for sure |
|
I've realised that the latest nightly is not packaged as a magisk module, so I've used the zip from v0.1.0-rc.4 and replaced the APK binary with the nightly. For starters, there's bootloop when flashing the magisk module on my A16 device: So I've changed the XML permission as follows which fixes it: <?xml version="1.0" encoding="utf-8"?>
<permissions>
<privapp-permissions package="me.kavishdevar.librepods">
<permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
<permission name="android.permission.LOCAL_MAC_ADDRESS"/>
<permission name="android.permission.READ_PHONE_STATE"/>
</privapp-permissions>
</permissions>The
I think this should be correct afaik.
I think this is also correct.
I've enabled the iPhone feature. Anyway, what I meant is that LibrePods doesn't show the popup when the control goes to the iPhone. The iPhone correctly shows the popup when the control goes to LibrePods and Android. This was before. Now with the nightly and with the correct permissions set by the root module, I see the popup of LibrePods. However, I'm experiencing a new issue. The switch happens Android -> iPhone, but then it doesn't come back iPhone -> Android anymore. I can still change the settings on LibrePods, e.g., enable noise cancellation, but there's no audio. It's worth noting that the system bluetooth widget shows no connected device, while LibrePods shows in-app the AirPods but does send a notification for disconnected AirPods. Lastly, I can enable now Hearing Aid without crashing, but the settings don't work at all, for example amplification. When I switch to iPhone I can see that hearing aid was enabled, so something did happen (I couldn't tell the difference just by listening, perhaps cause it was on default amplification settings). Recap:
I haven't retested the transparency and EQs. |
|
I'll attach a logcat here to help narrow down other remaining issues. logcat_2025-10-04_15-20-08.txt A few things to note:
|
I accidentally kept that
I added disconnecting the audio source when other device takes over and reconnect when media starts playing. Else, when other device wants to start playing, AirPods pause the media for some reason. So when a request to lose ownership is received, the app had to disconnect A2DP. I'll add this as an option instead of forcing it.
Not sure at this point where that was needed, but I'll have a look and clean it up. Hearing aid stuff: Did you have any hearing test active? If a hearing test hasn't been sent to the AirPods, the app just defaults to zero gains for all frequency (I just copy all the audiogram data that's on the AirPods because of the reason I mentioned previously- I haven't implemented actual hearing tests, just "adjustments"). Since your iPhone did show it enabled, probably the adjustments are also updated, unless something went wrong.
Is that when any audio is playing from Android? I have had this issue where if another device is playing audio for some time, then AirPods just disconnect the Android device, but not if it's actively playing audio or something. Don't know how to fix this, maybe it's cloud-based. Oh, and yeah- I'll implement automatically switching to using alternate head tracking packets on this branch itself, not a major change. I haven't done it yet because that opcode isn't just for the head positioning information, so probably need to figure out another way than just length. |
should've done this a long time ago!
|
Perhaps a little unrelated: I've recently bumped into a payed software for controlling AirPods at https://magicpods.app/. I doubt that someone else took the effort to reverse engineer the protocol from scratch when you already did plenty of work, so I suspect it could be based on LibrePods. I don't have the time to check it better, so I'm sharing for you to know. Edit. One of the public repos seems to be at https://github.com/steam3d/MagicPodsCore/. |
Thanks for sharing-- I have actually shared a few things (conversational awareness, adaptive transparency, encrypted LE advertisments which I have also shared with CAPod’s developer because CAPod has a greater number of users and it was definitely an improvement for non-rooted devices) with steam3d, the developer of MagicPods. And they Though I have written the entire documentation myself and reverse engineered the protocol myself, MagicPods had a few features before LibrePods even existed :) |
Not at all! 🙂
Yes, I did have a hearing test done. Not sure what happened then.
I don't remember if it's also when playing. 🤔
Thanks! I was curious about it. I don't think I'll be able to test this MR anytime soon, so I hope I could be of help so far. |
You've been great help-- thank you very much! I think I am done with the original goal of this PR now that I have adding hearing test results. Going to clean up the patch/hook mess and the root modules and going to merge it. |
still need to update images or find a way to fetch from apple's cdn
to not be invasive, this only shows up once, and never again.
…id glass") (#202) many thanks to @rithvikvibhu for help with the hearing aids feature adds: hearing aid two-device connection new UI transparency mode customization commits: * android: add accessibility stuff adds option for customizing transparency mode, amplification, tone, etc. * docs: update transparency mode format * android: don't 'start' service every time MainActivity is launched * android: add basic multidevice capabilities use at your own risk, may or may not work * android: clean up a bit of AI gen'd code * android: clean up main service and remove minimum API on head gestures * android: clean up a lot of stuff * android: implement the accessiblity settings page * android: add EQ settings for phone and media * android: add toggle for DID hook * docs: add 'has ownership' control cmd * android: fix balance NaN error when amplification L/R is both zero * android: bring back some accessiblity settings and add listeners for all config * android: add header to ATTManager * android: use device name sent by the connected device in island * android: fix track color in tone volume * android: remove unused composable * android: update eq sliders style * android: fix text color in selectors * android: add delay before starting head tracking again * android: add a few options ik not the right branch/pr but, eh, i am not merging this hook until i test further, and if i don't merge, conflicts, a lot of 'em * android: a small ui fix * docs: a few more control cmds * android: add microphone setting also, un-hardcoded strings, and updated text sizes * android: improve dropdowns ai generated * android: move attmanager to service to avoid trying to connect multiple times * android: add ui for hearing stuff mostly copied from the transparency settings, which are now updated to match ios <26 ui * android: add media assist options in hearing aid ui only * android: add hearing aid adjustments * android: liquidglass sliders * android: improve liquid glass sliders * android: little more liquid glass * android: fix hearing aid parsing * android: remove customdeviceactivity from manifest * android: remove unused strings * android: small ui tweaks * android: a very big commit refactoring ui, mostly * android: move padding to StyledScaffold's content because haze needs it * android: revert accidental capitalization on toggle label * android: update usages for toggle * android: liquidglass, maybe? the switch and icon button took quite a while. i forgot the order of modifiers matters! * remove bleonly mode, use CAPod instead * remove bleonly mode, use CAPod instead * android: fix switch styling * android: remove fade from transition * android: add A16's new bluetooth identifier for log collection just why... * android: fix crash in head gestures screen * android: show head gestures status in the navigation button * android: don't crash if att not available * android: use lazycolumn in airpods settings for better performance and navigation transitions * android: fix text color in troubshooting button and pressandhold settings * android: bring back original confirmation dialog too lazy to fix/implement properly the glassy one * android: prevent hearing aid turning off itself * android: hide media assist, not implemented * docs: update README with new features * docs: add demo video * docs: add new screenshots for android * docs: update demo video position * docs: app3 compatibility * docs: new control cmds '25 (again) * docs: change section title in control cmd doc Updated section title from 'Control Commands' to 'Identifiers and details'. * android: ui tweaks * android: update styled slider thumb * android: add accessiblity service for camera control * android: add camera control, finally i got too lazy to find out how to listen to app openings earlier, wasn't too hard * android: add option to change camera app id * android: not use relative paths for executing commands i hope it's the same across all skins * android: fix transparency and noise cancellation flags huh... was it always like this? * android: revert to using relative paths for su compatibility issues with magisk * android: bump version * android: don't crash if self MAC is not available * android: remove unused LOCAL_ADDRESS permission * android: add opensource licenses should've done this a long time ago! * android: move navigation button to activity level * android: update animation time on switch tap * android: implement setting hearing test results * android: update title in hearing test screen * docs: add screenshot for hearing test * android: fix haze for dialog when enabling hearing aid * android: parse device info * android: add support for various models still need to update images or find a way to fetch from apple's cdn * android: fix a2dp connection * android: remove stray eq config in accessibility settings * android: improve connection handling * android: add a (very important) support dialog to not be invasive, this only shows up once, and never again. * docs: add note for DID hook on android
The app now supports
(Accessibility features needs writing a ATTManager because I'd love to have more direct control over the connection, WIP)doneother chores (not specific to the PR):
READ_LOCAL_ADDRESSpermissionMODIFY_PHONE_STATEis usedHow?
After hours of digging, I finally found that these things require the vendorId of the Device Identification Profile to be set to Apple's.
/etc/bluetooth/main.conffile and setting the DeviceID parameter.oh, and i tried android studio's code inspection and cleaned up the code a little