AsteroidOS / AsteroidOSSync

Android application to synchronize a phone with a watch running asteroid-btsyncd.
GNU General Public License v3.0
101 stars 37 forks source link

GrapheneOS compatibility #173

Open changemenemo opened 2 years ago

changemenemo commented 2 years ago

Can't get any file permissions on grapheneOS

eLtMosen commented 2 years ago

Thanks for reporting! Could you clarify on which version of GrapheneOS that happens?

domkrm commented 2 years ago

Since version 0.23 the Tarket SDK 33 is used. With this newer target and on newer Android versions the WRITE_EXTERNAL_STORAGE permission has no effect anymore and you can't grant it anymore too:

https://developer.android.com/about/versions/11/privacy/storage

Currently I'm looking how we can fix this (but I have not enough time currently). We can save Screenshots etc. in the app-specific directory:

https://developer.android.com/reference/android/content/Context#getExternalFilesDirs(java.lang.String)

But if the App is uninstalled this directory will be deleted also.

Second option is to grant access to a specific user-selected directory:

https://developer.android.com/training/data-storage#scoped-storage

domkrm commented 2 years ago

I think until we have a solution, we should rollback the targetSdk to 30 and release a new version. Otherwise you can't install/configure the App, because you can't get over the permission activity, because you get always the error message, that you should grant the permission when giving the storage permission.

domkrm commented 2 years ago

The only solution I found to install the newest version of the App is, first install version 0.22, then configure the App and then update the App. This worked for me.

jrtberlin commented 2 years ago

The only solution I found to install the newest version of the App is, first install version 0.22, then configure the App and then update the App. This worked for me.

I'm now on GrapheneOS too and could reproduce your issue. My suspicion is that we implemented scoped storage but didn't remove the legacy permission check.

LordPax commented 2 years ago

I have same issue with calyxos

jrtberlin commented 2 years ago

I have same issue with calyxos

Yes. The issue is Android 13 specific and not Graphene specific.

jrtberlin commented 2 years ago

Please check if the issue persists with the latest version from F-Droid.

LordPax commented 2 years ago

This issue is solved for me

smilzo05 commented 1 year ago

hello, I have the latest version of graphene os, but I can't get a synchronization with asteroidOs. Are there any solutions today? installing version 22 of asteroidOs didn't solve the problem for me. Thank you

eLtMosen commented 1 year ago

@smilzo05 in case you mean 0.22, that is to be expected. There have been multple versions since that one with explicit fixes for newer Android versions. Latest version is 0.28 and available on F-Droid https://f-droid.org/de/packages/org.asteroidos.sync/

smilzo05 commented 1 year ago

hello, I have the latest version of graphene os, but I can't get a synchronization with asteroidOs. Are there any solutions today? Thank you

smilzo05 commented 1 year ago

0.28 didn't work so I searched for the solution. in this topic I read that it was solved by installing version 0.22, it was not like that for me

AmiiiiKo commented 1 year ago

I have a Pixel 7 with Graphene OS, latest update and a Ticwatch pro 2020, everything seems to work fine except for saving screenshots. I believe it is likely because it hasn't requested any permissions to save the file therefore I cannot configure storage scopes. I am running the f-droid version, 0.28. I also tried it with Gadgetbridge and that worked as well. I didn't have to do anything different to set it up.