LNSSPsd / PodsGrant

Treat AirPods Pro 2 as AirPods Pro to get it working better on older operating systems (for a few iOS versions only)
MIT License
138 stars 13 forks source link

14.8 support? 🙏 (bluetoothd attached) #5

Closed rastafaa closed 1 year ago

rastafaa commented 1 year ago

This tweak is exactly what I was looking for but I see 14.8 isn’t currently supported :(

I'm attaching my bluetoothd.. I had to add file extension to get it to upload but just remove it

bluetoothd.md

Thank you!!!

rastafaa commented 1 year ago

bluetoothd.zip

Here’s the zip if you prefer

LNSSPsd commented 1 year ago

Done, and thanks for binary.

rastafaa commented 1 year ago

Any idea when this will get released to or by bigboss? Or should I try compiling it myself again.. I wasn’t able to compile without errors on my previous attempts

LNSSPsd commented 1 year ago

Could be in a week.

rastafaa commented 1 year ago

I was able to compile the tweak now and install it, my airpods are showing up (and appears in accessibility) but the popup and volume control aren't working.

Also when I close the case the battery widget switches to showing generic headphones.

LNSSPsd commented 1 year ago

I was able to compile the tweak now and install it, my airpods are showing up (and appears in accessibility) but the popup and volume control aren't working.

Also when I close the case the battery widget switches to showing generic headphones.

For volume control you would have to install rocketbootstrap and respring, not really sure why it wasn't working as it works in my device. But it's going to be reimplemented, either in the correct way (may require extra binaries so it's kind of hard) or just by a socket, as IPC doesn't work for iOS 15.

The popup was implemented in a buggy way as well, hopefully it would be reimplemented soon, if possible. EDIT: Just made the popup fully functional, try it out.

rastafaa commented 1 year ago

Thanks I'll check it out soon! Fyi, I noticed that tweak isn't getting injected into sharingd for some reason so maybe had something to do with issue? I killed the daemon but it restarts without the module loaded in

I'll try with new version though in a bit

rastafaa commented 1 year ago

After installing new tweak and restarting phone the popup works perfectly! Except volume control still doesn't and then after re-pairing the airpods it no longer shows up as airpods icons and doesn't appear in accessibility menu haha.. seems popup was fixed but everything else stopped working. I'll try messing with it some more.

LNSSPsd commented 1 year ago

What's your iOS version, is it exactly iOS 14.8.0? I think it could be caused by the strict version check in my code.

rastafaa commented 1 year ago

After going back to old version forgetting, changing name of airpods re-pairing etc., and re-installing newest version of tweak all the old stuff works again, plus the pop-up, but still no volume changing. I think the issue above was caused by accessory model somehow getting changed to "accessory_something" instead of "airpod Pros" when I paired on the new version, but now it's back to normal. However it might only be fixed because I paired it while on older version.

My version just says 14.8 (18H17)

fyi spatial tracking also doesn't seem to track anywhere just stays virtually in one spot

rastafaa commented 1 year ago

image

I do get this warning several times when I compile is this any problem?

LNSSPsd commented 1 year ago

That's fine, ignore it.

LNSSPsd commented 1 year ago

After going back to old version forgetting, changing name of airpods re-pairing etc., and re-installing newest version of tweak all the old stuff works again, plus the pop-up, but still no volume changing. I think the issue above was caused by accessory model somehow getting changed to "accessory_something" instead of "airpod Pros" when I paired on the new version, but now it's back to normal. However it might only be fixed because I paired it while on older version.

My version just says 14.8 (18H17)

fyi spatial tracking also doesn't seem to track anywhere just stays virtually in one spot

Have you tried that one in the Releases?

rastafaa commented 1 year ago

Have you tried that one in the Releases?

No I didn't see that I'll try it now

rastafaa commented 1 year ago

Unfortunately no difference

Here’s log of me swiping airpod volume gesture one time (down) 3C78D120-E817-46EF-9790-6534446E6153

rastafaa commented 1 year ago

Also seeing it from mediaserver

63EFE4A9-7026-47EF-93EC-A13F39D85F0A

rastafaa commented 1 year ago

D277A799-68A4-4559-B64A-7C28BE63AEF2

rastafaa commented 1 year ago

I'm not an expert but as far as I can tell, bluetoothd instructs mediaserverd to change volume (YES).. mediaserver rejects the request, bluetoothd then switches sendvolume to NO

LNSSPsd commented 1 year ago

No it's fine, the problem is on the kBTAudioMsgPropertySupportRemoteVolumeChange=NO property being sent right when the earbuds connect, which blocks mediaserverd from accepting bluetoothd's volume data afterwards.

rastafaa commented 1 year ago

Yeah I see that, fyi the new latest edits don't seem to fix it in case you didn't already know. Possible to directly override mediaserver from ignoring the data? I guess you're not sure why it's being set to No value.

LNSSPsd commented 1 year ago

It's kind of an indirect way, and requires hooking on extra binaries. Would try that if no other workable way found.

rastafaa commented 1 year ago

Yeah direct wasn't the right word I realize that's a bit of a hacky method I just meant it as a last resort I guess thanks for response.

LNSSPsd commented 1 year ago

I found the cause, probably: I forgot to initialize the variable len!

char exec_path[512];
uint32_t len;
_NSGetExecutablePath(exec_path, &len);

Which end up with a random-length and make the path comparison fails occasionally

LNSSPsd commented 1 year ago

Have a try on the latest one.

rastafaa commented 1 year ago

It works!! It only works while music/media is playing which I assume is normal? But this is awesome, thanks so much!

I'm not sure that optimized charging function is working as far as I can tell, but I'll have to use it more.

Symplicityy commented 1 year ago

It works!! It only works while music/media is playing which I assume is normal? But this is awesome, thanks so much!

I'm not sure that optimized charging function is working as far as I can tell, but I'll have to use it more.

Volume works for me regardless of if any media is playing.

rastafaa commented 1 year ago

hm, yeah it doesn't work for me unless I have something playing.. that's why it didn't seem to be working at first. I'll restart phone though

Symplicityy commented 1 year ago

hm, yeah it doesn't work for me unless I have something playing.. that's why it didn't seem to be working at first. I'll restart phone though

Well, that's better than it not working at all in calls like it does for me lol.

rastafaa commented 1 year ago

Well, that's better than it not working at all in calls like it does for me lol.

Oh I thought you were LNSSPsd oops, but yeah at least it works with music. Does optimized charging work for you? I'm pretty sure mine isn't because it seems to always goto 100% charge which will degrade battery quicker so that sucks

LNSSPsd commented 1 year ago

Well, that's better than it not working at all in calls like it does for me lol.

Oh I thought you were LNSSPsd oops, but yeah at least it works with music. Does optimized charging work for you? I'm pretty sure mine isn't because it seems to always goto 100% charge which will degrade battery quicker so that sucks

I won't even care about mine's battery lol

Symplicityy commented 1 year ago

Well, that's better than it not working at all in calls like it does for me lol.

Oh I thought you were LNSSPsd oops, but yeah at least it works with music. Does optimized charging work for you? I'm pretty sure mine isn't because it seems to always goto 100% charge which will degrade battery quicker so that sucks

Haha all good. I can't tell if optimized charging works and I honestly don't even know what to look for.

Symplicityy commented 1 year ago

Well, that's better than it not working at all in calls like it does for me lol.

Oh I thought you were LNSSPsd oops, but yeah at least it works with music. Does optimized charging work for you? I'm pretty sure mine isn't because it seems to always goto 100% charge which will degrade battery quicker so that sucks

I won't even care about mine's battery lol

AppleCare+ for AirPods is a super good deal so I got it for that exact reason. I'll just get a replacement in about a year if I'm having issues. I had my entire AirPods Pro 1st gen replaced right before the warranty was up. I was having an issue with the charging case not charging the AirPods and every time I went they kept telling me I had to replace the AirPods not the case so they replaced the buds about 3-5 times before they gave me a new case lol. So in the end I had brand new AirPods and a brand new case 2 years later.

rastafaa commented 1 year ago

I can't tell if optimized charging works and I honestly don't even know what to look for.

It learns how you use the airpods and waits to charge fully to avoid battery wear. On my 1st gen pros it will typically goto 80% and the popup display will show that it's in optimized charging mode and presents a button to make it charge fully if you want.

Usually don't need it fully charged it helps give it a longer lifespan. Airpod batteries aren't replaceable. I see the option in settings and have it enabled but don't think it's working on 2nd gen.

Symplicityy commented 1 year ago

I can't tell if optimized charging works and I honestly don't even know what to look for.

It learns how you use the airpods and waits to charge fully to avoid battery wear. On my 1st gen pros it will typically goto 80% and the popup display will show that it's in optimized charging mode and presents a button to make it charge fully if you want.

Usually don't need it fully charged it helps give it a longer lifespan. Airpod batteries aren't replaceable. I see the option in settings and have it enabled but don't think it's working on 2nd gen.

Oh yea I'd want that disabled either way. My phone does that and it's always when I'm like 20% away from 100% and I'm trying to get it to 100 before I go to sleep and the disable button only works like 1/2 the time. But I'll let you know when I plug them in tonight if I get a pop up like that.

rastafaa commented 1 year ago

I restarted phone and still doesn't change volume unless media is playing 🤷‍♂️

rastafaa commented 1 year ago

I guess I mainly would use it to change volume while media is playing anyway so it's not a big deal, I'll see if it works during a call though

edit: it does!