Skip to content

feat(android): declare all files access permission - #10

Closed
Anderinfera wants to merge 1 commit into
Valenced:mainfrom
Anderinfera:feat/all-files-access
Closed

Anderinfera wants to merge 1 commit into
Valenced:mainfrom
Anderinfera:feat/all-files-access

Conversation

@Anderinfera

Copy link
Copy Markdown

Hi! This adds a patch that declares MANAGE_EXTERNAL_STORAGE in the patched Discord.

Without it, the app is missing from Android's "All files access" list.
Native plugins can then only save to public folders like Pictures, DCIM and Download.
Old Revenge-Next declared this permission, so I thought Valenced could add this too.

Declaring it doesn't grant anything. The user still has to turn it on manually
in Android's settings, so nothing changes for anyone who doesn't.

I couldn't run the Reseam toolchain, so I didn't compile this.
I based it on ValencedIcon.kt and Debuggable.kt.
I assumed manifest.edit gives root and createElement like files.editXml does.
Happy to fix it if not.

Thanks for Valenced!

@Ushie

Ushie commented Nov 10, 2026

Copy link
Copy Markdown

This also means that plugins are able to dump the entire internal storage if they want to, what benefit is there to adding this permission? Instead of just triggering a normal download that sends the file to Download

@Anderinfera

Copy link
Copy Markdown
Author

It's about downloading into folders. I made a plugin for Revenge (both normal and Next) that lets you download files from a given channel into a given folder.

For example, when I download memes, they go to my memes folder on the phone, and when I download art from a server's gallery channel, it goes to my art folder.

It's about organizing content: downloaded files get sorted automatically instead of everything landing in one folder.

Without this permission it only works inside Pictures, DCIM, Download etc., not in custom folders like /storage/emulated/0/Memes.

@Ushie

Ushie commented Nov 10, 2026

Copy link
Copy Markdown

Why would you not save them to Pictures/Memes instead in that case? There doesn't seem to be sufficient motivation to give this much extra capability to the app

@Anderinfera

Copy link
Copy Markdown
Author

I'd rather not reorganize my phone's folders around an app limitation. My layout is already set up the way I need it.

Revenge already had this permission, so it shouldn't be a big change. It's also off by default, so most users are never affected.

@Ushie

Ushie commented Nov 10, 2026

Copy link
Copy Markdown

This isn't an app limitation, you're trying to work around an explicit OS design, there's a reason this permission isn't allowed for apps present in the PlayStore anymore and your folders should already be organized this way, or do you mod every single app that you can saves images from to work the way you think it should work?

Since you're savvy enough, it shouldn't be a problem being able to use this yourself, but this isn't beneficial to Valenced and if anything it's more dangerous than not, it being off by default doesn't mean a plugin can't trigger the permission request and exploit a user's naivety, I would reconsider this if I saw that this would be beneficial to a large number of users, but I don't know anyone who would prefer to organize things similarly to the way you describe

@Ushie Ushie closed this Nov 10, 2026
@Ushie

Ushie commented Nov 10, 2026

Copy link
Copy Markdown

If declaring it doesn't mean that an intent requesting to turn it on can be launched then I'd be open to this

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.

2 participants