File Selection Fails on MIUI & Some Android Flavors --> Implement in-app file browser
Please agree to the following
- [X] I have searched existing issues for duplicates
- [X] I agree to follow this project's Code of Conduct
Summary
File Selection Fails on Many Android Versions --> Implement an in-app file browser
System Setup
- Android: [Version shown in the settings of Android"]
- Cryptomator: [Version shown in the settings of Cryptomator]
- …
Many recent Android Versions including latest MIUI.
Cloud Type
No response
Steps to Reproduce
Adding Any File(s) Simply Fails. It goes to files selection and you can click one or multi files and click Select button. It goes back to app. But nothing happens. App permission is only one and it's granted: Files and Media. Remove if not used is disabled too.
Expected Behavior
Should process file(s) after getting back to app.
Actual Behavior
But nothing is processed after files selection goes back to cryptomator.
Reproducibility
Always
Relevant Log Output
No response
Anything else?
This is a well known with many apps. It's security feature in many latest versions. Including many recent MIUI which is Xiaomi Android OS flavor. Xiaomi is probably biggest Android device seller in the world. This restriction, disabling many apps file Selection, applies to other phone brands too. Probably affects about half Android phones & tablets. So it's an urgent problem. I think over 50% of phones will have this big within this year.
SOLUTION: A few apps use a fix. For example Tivimate app which is used as a video streaming client. In file selections dialog box (you can have 2nd option in drop-down menu), next to usual file Selection button another option is:
SYSTEM PICKER for files selection
This is different to the default file Selection launched by apps IDE coders processes. It launchers the OS flavor's own system file picker.
These security restrictions won't go away. They're getting stricter and adopted by ever growing versions of Android by big phone makers. Because all others are following Xiaomi and Samsung in doing this.
All app makers are facing this issue. Many are not functioning as a result. Some do temporary workarounds for latest security restrictions.
But the file SYSTEM PICKER is guaranteed to work and not break with latest Android OS updates by makers, or security patch updates.
So currently many can't add files to vaults in Cryptomator. It's simply not working on adding files to either local storage or cloud platforms.
After choosing a folder with System Picker, a security dialog box in many new Android Versions asks to: DENY or ALLOW, this permission. This allows file operations in that folder. Selecting one or more files is another step. Some Android Versions only ask this permission ONCE for an app, often it's asked Everytime.
Some Android flavors allow granting file access to an app for the root (root of internal storage or SD_Card). Some flavors don't grant this for whole root (all folders). You have to select a folder (in root or deeper subfolders), then file picking is allowed for that folder or subfolder only.
Boxcryptor app file Selection is currently working on MIUI without System Picker. Many other apps stop working regularly but are updated to work, this is a lot of ongoing work by many devs. System Picker as by Tivimate and a few others seem to fix this ongoing problem permanently regardless of whatever every new security patch or Android update by makers. Otherwise lots of work and keeping tabs on many Android flavors. Thanks.
Some users did report already this problem on some MIUI devices. We have already created a topic in our community about this problem with a workaround and we haven't heard from anyone that it didn't work after that. Can you please try this as well?
Hi, thanks for reply.
I tried it and it works. Uploads files now to local storage & cloud. Thanks.
However I'd like to point out a few factors to keep in mind:
-
Some apps, minority of security like banking apps & financial, don't work or have problems or don't install. Most banking apps work ok though with MIUI optimization.
-
Most apps: i) don't need to as don't have this problem ii) Use permission granting for a folder (most use this) on each upload (too many, this is very inconvenient) iii) Few call only system Picker as mentioned
-
Most analysts believe Xiaomi has the biggest share of Android phone in the world. Estimates vary from 30+% to over 40+% so this can't be ignored. & It's not just MIUI, others are joining this security tend. So you're looking at over half phones in the world! And growing. This is the future now.
-
There are disadvantages to turning on MIUI optimization, see list of disadvantages down this page:
https://yoodley.com/what-is-miui-optimization-should-you-enable-it/
So many will not turn it on.
- Many users will not find out about this problem as they don't visit GitHub issues (open & less visit closed ones) or forums.
So I think this issue should remain open and the following done:
-
regularly test on latest MIUI versioned devices by users
-
Ask users with problems to test on competitor apps. Then find out how they're going round this. For example RCX and Boxcryptor don't have this problem. Might look into open source codes on GitHub for apps that offer open source, from other genres too.
-
Not do what most apps do which is for each session either:
a) Permission is granted b) Worse, permission is granted to a folder only and not whole system (internal or SD)
Either of these two, similar interface but second needs folder select & extra button too, is what most apps do. However most of these apps are not heavy file manager type users, like Cryptomator. Cryptomator uses file manager access heavily so neither is convenient.
-
I think a second upload option for SYSTEM PICKER is best. This is guaranteed to work. The code has to be found. Should be somewhere in GitHub. Tivimate uses this, for example backing up settings etc. This second option can be in top-right drop-down menu as optional system file Picker. This can be off by default. It can be enabled in settings with explanation: Some Android Versions like MIUI have problems selecting files so can use this option. With a tickbox option which is off by default install.
-
also keeping this issue open will attract: i) Further feedback by users ii) Possible future solutions
Thanks again.
Thank you very much for your input!
I just added the consequences for enabling MIUI optimization to the article and I totally agree that most people will not look for a solution to the problem.
The next big feature we're going to tackle is the document provider, which allows you to use the contents of the vault by third party apps. This means the development of the app is going in a different direction for now but with the MANAGE_EXTERNAL_STORAGE and ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION we could actually implement an in app file browser, which on the one hand gives some MIUI devices the ability to function without optimization and also other features like move to vault (delete original file) etc. However, I am quite a fan of scoped storage that means it would definitely have to be an optional feature.
Thanks. All that sounds great. I added MIUI to title so meanwhile people with this particular problem find your optimization solution.
Thanks again, I love the app, it's great. I have UI/UX experience, if I get time maybe later in the year, might suggest somethings on your community forum. Thanks again & Keep going 👍
Samsung S21 (SM-G9910) with the Secure Folder can not work