TRON-US / go-btfs

BTFS - The First Scalable Decentralized Storage System - A Foundational Platform for Decentralized Applications
https://www.btfs.io
Other
285 stars 62 forks source link

BTFS compatibility on Android 11 (SDK 30) is broken #1214

Closed simbadMarino closed 2 years ago

simbadMarino commented 2 years ago

Background : Due to recent changes on Google Play policies it is now mandatory for mobile developers to target their apps to SDK 30 (Android 11). Android 11 introduced a "security" feature which limits certain network interaction calls, causing BTFS to be unusable. A similar issue has been raised in the golang repo itself already however looks like not in a hurry to fix it or at least create a temporary workaround.

Test Steps:

  1. Compile latest go-btfs on linux using Termux or dCloud terminal emulators on Android.
  2. Run "btfs init" command.
  3. Run "btfs daemon" command.

Expected Result: BTFS daemon starts normally without halts.

Actual Result:

btfsSD30Error

Full log:

go-btfs version: 1.5.2-9fd8fa586
Repo version: 10
System version: amd64/android
Golang version: go1.16.9
Repo location: /data/data/com.justshare/files/home/.btfs
Peer identity: 16Uiu2HAkzTZFMb2dF1hZeYoKeBm4jeQggbciMQtmmx34D3VCgnbw
2022-01-03T18:42:23.797Z        ERROR   cmd/btfs       Operating system [android], arch [amd64] does not support automatic updates
2022-01-03T18:42:24.009Z        ERROR   basichost      failed to resolve local interface addresses      {"error": "route ip+net: netlinkrib: permission denied"}
2022-01-03T18:42:24.137Z        ERROR   basichost      failed to resolve local interface addresses      {"error": "route ip+net: netlinkrib: permission denied"}
2022-01-03T18:42:24.138Z        ERROR   basichost      failed to resolve local interface addresses      {"error": "route ip+net: netlinkrib: permission denied"}
2022-01-03T18:42:24.139Z        ERROR   basichost      failed to resolve local interface addresses      {"error": "route ip+net: netlinkrib: permission denied"}
2022-01-03T18:42:24.187Z        ERROR   basichost      failed to resolve local interface addresses      {"error": "route ip+net: netlinkrib: permission denied"}
2022-01-03T18:42:24.189Z        ERROR   cmd/btfs       error from node construction: route ip+net: netlinkrib: permission denied

Error: route ip+net: netlinkrib: permission denied

Additional notes: Even tough I understand this is not an specific issue with BTFS itself I'm looking to collaborate with you (you are the go and networking experts) in a workaround so I can finally release the mobile version in the Google Play store. Any suggestions, ideas or collaboration is more than welcome :smiley:

Sophia-yu-kk commented 2 years ago

Hi, thank you very much for your feedback. Having communicated with the team about this issue, the team is unable to assist you with it at this time. Thank you for your feedback.

simbadMarino commented 2 years ago

Thanks for the feedback, are you guys accepting Push Requests if I can find a solution? Im moving to BTFS 2.0 of course

m1rv9n41v5 commented 1 year ago

I am waiting for the mobile version.

simbadMarino commented 1 year ago

I am waiting for the mobile version.

Hello @m1rv9n41v5 , I'm developing an Android/iOS version which is currently not in the Google Play store due to a Go issue but you can find the apk available now in here: https://github.com/simbadMarino/dCloud/releases/tag/v1.5.3_dCloud