-
-
Notifications
You must be signed in to change notification settings - Fork 140
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/NETLINK_ROUTE Issue] Torrent download not working on Poco F1, Realme RMX1921 (Android 11) and probably other devices too #254
Comments
It'd be great if you could share the code of your |
Code
Stacktrace
|
are these methods thread safe?
|
I think this may have something to do with API 24, I think our next build might fix this |
Yes they are thread safe |
Okay, I'll ask the user to test it out |
API 30 fails with a bind permission error. API 29 <= on 1.2.10 is working. (from an S21 Ultra on API 30 right after trying to load magnet) |
Unfortunately the user is still having the same issue with version 1.2.13.0 |
Did you test on a custom ROM? |
Perhaps this might be helpful |
@gubatron |
@gubatron I have this problem too |
Apparently more restrictions after Android 11 https://developer.android.com/training/articles/user-data-ids#mac-11-plus |
Any workaround for this? |
Investigating issue. Here's a few references to
The jlibtorrent java source code has no mention of Reading about Linux, I find that NETLINK sockets are used for IPC communication between kernel space and user-space
Gotta read or ask libtorrent devs if they're using NETLINK_ROUTE sockets to update kernel routing tables and if this is necessary for libtorrent or if there might be a workaround, and we'll probably have to submit a patch to get this to work for Android. I'll also check the issues over at libtorrent, perhaps somebody has already raised this issue. |
On By looking at FrostWire's compilation scripts, we are not explicitly setting the
In the meantime I'm asking questions at libtorrent. Hopefully this will be as simple as making sure that compilation flag is not set and hopefully the library will continue to work just fine on Android. We are testing jlibtorrent on Android 11, 12 and we cannot replicate this crash, and the app is downloading torrents fine. |
Not sure if this is related, but when I run on Android 11, with target SDK 30, I'm getting a Permission Denied error message on a
What's also weird is that I'm not attempting to Listen on With no code changes, this works perfectly fine on Android 10 (SDK 29) Things I'll be trying
If anybody has come across a similar issue would love any advice. |
Unfortunately the logs i attached is the only stacktrace I had because it was sent by a user. I think the issue is hapening on custom ROMS. Below are some of the affected devices/roms
|
I guess this is related to #238 |
that's as low as it goes. |
Closing this issue. |
Binaries for jlibtorrent 1.2.14.0 are now available, these should be good for android developers to keep supporting libtorrent sessions on Android 11 and above. |
Thank you everybody for your continued support, this was one tough ticket to close. |
That is excellent news. I'll update the library and confirm. Thank you for your hard work |
fingers crossed this will work for you @vickyoo7 |
Thanks. btw is support for api < 24 dropped? |
yes, there was no other way |
even google I believe is dropping support for gmail to such old devices |
I'm still testing, so there's a chance I'll be uploading a |
Ok thanks for the info. According to google almost 27% device still use api 23 or below so it'll be a tough decision whether to update it or not |
Okay |
yup, will have to re-upload a few binaries that I compiled with api < 24, duh. |
That would be awesome. Thanks |
Is it possible to have only one build? Not sure aab format supports .so files based on api version |
Working android binaries are up, just tested on Android 11 and arm64, working perfectly. |
We've always had different builds, some with API 19, some with API 21 in the past. Now they're all built with api level 24. |
We had less than that (under 10% If I remember), but the decision will be made easy after November, they're pushing aggressively towards Android 11 and 12, I believe they have regulatory pressure towards stronger privacy policies, this I think might be a reason why they blocked netlink sockets and why after november they're allowing WRITE_EXTERNAL permissions for apps that file a petition and which can demonstrate they need to have such permission or else break. We've been refactoring all summer to use their new Media Store api to work with jlibtorrent. |
I meant in a single aab package can we have multiple arm64 libs (one for api >= 24 and other for api < 24)? I think not, I may be wrong though PS: lollipop+ supports 64 bit arch |
that makes sense, I need to see how to do this from a gradle script though. A patch on |
is it possible to check for api version or ifdef and call the available function in the source code itself so multiple builds are not required? |
I'm using version 1.2.11.0 (targetSdk 29) and Torrent download is not working on some (Poco F1, Realme RMX1921) Android 11 devices possibly due to below error.
E mac-restrictions: com.package.name:DownloadService tried to call bind() on a NETLINK_ROUTE socket, which is not allowed. Please follow instructions at go/netlink-bug if this app behaves incorrectly.
Related SO post - https://stackoverflow.com/questions/64884994/cannot-bind-netlink-socket-when-targeting-android-api-30
Note: version 1.2.10.0 with targetSdk 28 works fine
The text was updated successfully, but these errors were encountered: