Skip to content
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

Android 11 compatibility #106

Closed
adolfintel opened this issue Nov 7, 2020 · 42 comments
Closed

Android 11 compatibility #106

adolfintel opened this issue Nov 7, 2020 · 42 comments
Assignees
Labels
API ≥ 30 Issues/PRs relating to API 30 and lower bug Something isn't working

Comments

@adolfintel
Copy link
Owner

There have been reports of OpenPods having issues with Android 11 (API 30), namely excessive battery usage due to intense BLE scanning.

I don't have a device with Android 11 yet, and I wasn't able to trace the issue so I decided to open this issue so that Android 11 users can provide feedback.

Possibly related issues: #88, #27

@adolfintel adolfintel added bug Something isn't working help wanted Extra attention is needed labels Nov 7, 2020
@Electric1447
Copy link
Collaborator

Can confirm the app is functioning abnormally on my OnePlus 8 Pro running Android 11

@Electric1447 Electric1447 added the API ≥ 30 Issues/PRs relating to API 30 and lower label Nov 7, 2020
@Electric1447
Copy link
Collaborator

Electric1447 added a commit to Electric1447/OpenPods that referenced this issue Nov 16, 2020
@Tanddant
Copy link

I've cloned and installed the fix - will report back.

@Tanddant
Copy link

15 minutes in and 15 minutes of Bluetooth wakelocks.

@Electric1447 Electric1447 self-assigned this Nov 16, 2020
@kghost
Copy link

kghost commented Nov 18, 2020

Pixel4 with Android 11, not only battery consuming problem, but also random system freeze, system process unresponsive, literal unable to use. Verified by install the app and uninstall several time. Always have problem when installed.

@adolfintel
Copy link
Owner Author

Well, looks like we have a proof of concept for a denial of service attack on our hands 😂

Seriously, Google's ability to break their own shit will never cease to amaze me

@quot
Copy link

quot commented Dec 2, 2020

I'm having almost the exact same issues @kghost is having on my Pixel 5. The freezing seems to mostly happen when waking the device, which makes it difficult to unlock.

If you need any help testing a fix, I'd be glad to install it on my Pixel and upload any logs you'd need.

@mkeedlinger
Copy link

+1 I am having the exact same behaviour as @kghost on a Pixel 3a with Android 11. Also took the same debugging measures to ensure it was this app.

BTW I love this app! Can't wait to have this issue resolved 😄

@PablosCorner
Copy link

I had been scratching my head for weeks figuring out why my phone was bugging out with the lock screen and system UI, and now I finally figured it out, after seeing this page. Hopefully this gets fixed soon.

@kghost
Copy link

kghost commented Dec 10, 2020

The problem may not coming from bluetooth part.

You may using remote view for the systray notifications, it used to be very buggy with the remote view, if the application doesn't response (due to background CPU usage limitations), it can freeze the widget, if it is used inside the notifications, to can freeze the system process.

If you can make a temporary build which doesn't use the notification, but an activity, I can try it to check if the problem still exists.

@Tanddant
Copy link

Tanddant commented Dec 10, 2020

The problem may not coming from bluetooth part.

The fact that there are hundreds of bluetooth scans a minute from the second you turn on bluetooth would indicate otherwise.

image

@Electric1447
Copy link
Collaborator

I've reverted target api back to 29.
Will need to see if it even changes anything.

@Kurun-pan
Copy link

After updating to the latest android 11 OS on Pixel 3XL, this app doesn't work at all. onScanResult seems be not called. Do you have any idea?

@Tanddant
Copy link

Tanddant commented Feb 18, 2021

I Just saw your comment @Electric1447

Issue is still pressent it seems:

`
2-18 23:53:28.535 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472014

2021-02-18 23:53:28.545 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472024

2021-02-18 23:53:28.558 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472037

2021-02-18 23:53:28.569 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472048

2021-02-18 23:53:28.580 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472060

2021-02-18 23:53:28.593 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472072

2021-02-18 23:53:28.608 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472087

2021-02-18 23:53:28.625 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472104

2021-02-18 23:53:28.638 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472118

2021-02-18 23:53:28.653 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472133

2021-02-18 23:53:28.665 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472144

2021-02-18 23:53:28.676 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472155

2021-02-18 23:53:28.689 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472169

2021-02-18 23:53:28.703 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472182

2021-02-18 23:53:28.713 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472192

2021-02-18 23:53:28.724 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472203

2021-02-18 23:53:28.735 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472215

2021-02-18 23:53:28.747 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472226

2021-02-18 23:53:28.757 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472237

2021-02-18 23:53:28.771 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472250

2021-02-18 23:53:28.783 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472262

2021-02-18 23:53:28.795 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472274

2021-02-18 23:53:28.806 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472285

2021-02-18 23:53:28.813 12341-12700/com.dosse.airpods D/AirPods: Left: 9$ Right: 9$ Case: 15 Model: airpodspro

2021-02-18 23:53:28.817 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472297

2021-02-18 23:53:28.826 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472306

2021-02-18 23:53:28.836 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472316

2021-02-18 23:53:28.848 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472327

2021-02-18 23:53:28.858 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472337

2021-02-18 23:53:28.870 1782-1782/? D/BtGatt.ScanManager: awakened up at time 472349
`

@ghost
Copy link

ghost commented Apr 14, 2021

Updated OnePlus 7T Pro (hotdog) to Android 11 with microg4lineageos and found OpenPods not functioning with my AirPods Pro even on v1.5.1, thought I get a logcat to see if the issue can be fixed.

@woolmonkey
Copy link

Just wondering any update on this?

@Electric1447
Copy link
Collaborator

Nope

@adolfintel
Copy link
Owner Author

I don't have my airpods anymore so I can't test it. I didn't get any complaints though so maaaaybe it works?

@Electric1447
Copy link
Collaborator

@Electric1447
Copy link
Collaborator

@adolfintel Managed to fix android 11 compatibility.
However, this solution is kinda fucked up and might destroy battery life.

@adolfintel
Copy link
Owner Author

It's better than nothing, can I see your code?

@Electric1447
Copy link
Collaborator

I'll need to clean it a bit first and then I will push a commit.

@adolfintel
Copy link
Owner Author

Alright. If you think it's bad for battery life, you should probably only enable that code if SDK>=30

@Electric1447
Copy link
Collaborator

That should fix android 11 compatibility.
Took exactly 7 months to fix what google broke.

@adolfintel
Copy link
Owner Author

So basically you're using a foreground service instead of a background service. A lot of messaging apps are doing this to run on degoogled phones, it's not really a problem battery-wise.

@Electric1447
Copy link
Collaborator

But this also requires having Location Access all the time

@Electric1447
Copy link
Collaborator

debug apk for anyone who want to test it out on their device

app-debug.zip

@kghost
Copy link

kghost commented Jun 7, 2021

Can you make the app as an activity which only works when I open it instead of consistent working in the background.

@woolmonkey
Copy link

IF your running 11 that is how it is working now. Shouldn’t be but you can’t give it location access permanently so you have to run the app then connect your headphones for it to work. At least that is how I have had to do it.

@Electric1447 Electric1447 removed the help wanted Extra attention is needed label Jun 11, 2021
@Electric1447
Copy link
Collaborator

Fixed in release 1.6

@ghost
Copy link

ghost commented Jun 16, 2021

Thought I try to see if v1.6 fixed my problem and it doesn't show up for me for some reason.
logcat.txt

@Electric1447
Copy link
Collaborator

What is your phone, android version, android rom ect?

@adolfintel
Copy link
Owner Author

Found this in the log
[ 06-16 20:02:36.687 1494: 1724 W/BroadcastQueue ]
Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_RESTARTED dat=package:com.dosse.airpods flg=0x10 (has extras) } to com.google.android.gms/org.microg.nlp.service.PackageChangedReceiver

@ghost
Copy link

ghost commented Jun 16, 2021

It's a Pixel 4a with android 11 by LineageOS.

@Electric1447
Copy link
Collaborator

Weird as I also using LineageOS 18.1 and everything works fine.
I really do not understand what is written in the log

@ghost
Copy link

ghost commented Jun 16, 2021

Should I get another log?
I'm not sure why it doesn't work despite me enabling all the permissions it needs.

@Electric1447
Copy link
Collaborator

I don't know as I am not really great with logs.
Is it an offical or unofficial lineage build?

@Electric1447
Copy link
Collaborator

If you can use adb and read verbose logs from the app it might help

@Electric1447
Copy link
Collaborator

As if you would see transmissions from the airpods we'll know the problem is with the notification part

@ghost
Copy link

ghost commented Jun 16, 2021

It is official, https://wiki.lineageos.org/devices/sunfish.
I'll try to get that.

@ghost
Copy link

ghost commented Jun 16, 2021

I tried doing that, not sure if this one helps or not.
Always happy to get more logs though.
logcat.txt

@mkeedlinger
Copy link

Just to +1, I have a Pixel 4a, stock Android 11 (up-to-date), and I am experiencing the same thing as @lurkingaroundagain (being that the notification does not seem to detect my airpods).

Thanks for all the work that's being done to fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API ≥ 30 Issues/PRs relating to API 30 and lower bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants