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

Restore access to logfiles in Android 11 to 15,...? (API level 30+) #3458

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Gohtraw
Copy link

@Gohtraw Gohtraw commented Oct 7, 2024

Several new features in Android 11 made it nigh impossible to access and use the AAPS logfiles.
The changes were introduced with Android 11 but so far seem to (only) affect devices running Android 14 since the end of August 2024.
This fix works on my Pixel 8 and 5 (both running Android 14) and I tested it with success on an emulated Pixel 3 running Android 9.
I regained access by moving the AAPS user files in the Documents folder.
Further I renamed the logs folder in aapsLogs - a bit redundant but searching for "logs" kept spamming me with "dialogs".

Background: Storage updates in Android 11
https://developer.android.com/about/versions/11/privacy/storage#file-directory-restrictions

The overview here: https://developer.android.com/training/data-storage lists what can be accessed and what can't.

Copy link

sonarcloud bot commented Oct 7, 2024

@Gohtraw Gohtraw changed the title Restore access to logfiles Restore access to logfiles in Android 11 (API level 30+) Oct 7, 2024
@MilosKozak
Copy link
Contributor

Changing this is counterproductive. It would mean update wiki, explain to users etc. and it would be for maybe only year only
What we need is solution for Android 14

@vanelsberg
Copy link
Contributor

vanelsberg commented Oct 9, 2024

Agree,
And can't see the problem anyway?

  • Users can get access to recent logfiles using "SEND-LOGS BY EMAIL" (or by connecting an USB cable and go to \Internal storage\Android\data\info.nightscout.androidaps\files). In general, only recent logfiles are useful and dev's will have access this way anyway)

  • Imho logfiles (=application system files) should not be in the phones "Documents" folder.

This PR only adds unnecessary code complexity.

@Gohtraw Gohtraw changed the title Restore access to logfiles in Android 11 (API level 30+) Restore access to logfiles in Android 11 to 15,...? (API level 30+) Oct 9, 2024
@Gohtraw
Copy link
Author

Gohtraw commented Oct 9, 2024

Changing this is counterproductive. It would mean update wiki, explain to users etc. and it would be for maybe only year only What we need is solution for Android 14

It works in Android 9 to 14

@MilosKozak
Copy link
Contributor

it will not work once we compile for API level 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants