-
Notifications
You must be signed in to change notification settings - Fork 261
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
Download fails due to permission problems #308
Comments
Thanks for writing. This problem exists, judging by the bug reports submitted from the app. But I never could reproduce it. Yalp Store puts downloaded files into Meanwhile I've added some additional logging. |
Thanks for looking into this issue.
The path is correctly set. If I change it to a non existing path I see a pop up that says: "Could not create directory or the directory is not writable".
If I use an existing path there is no error while setting the path. I also created a new directory: /storage/emulated/0/DownloadYalp which I could successfully select as a download directory. But in both cases I cannot download the app and I get the already described pop up.
I turned of the rights management but I still got the pop up asking for access to the storage location which I granted. I think the problem is, that the app does not get the right to access the storage location by the OS somehow... Although I granted it...
If I could choose the app's internal storage path I probably could use the app because it always has the permission to write to its own storage. Maybe you could add a possibility to select app internal storage as download location? That would be at least a workaround.
Am 3. November 2017 16:41:38 MEZ schrieb Sergey Yeriomin <[email protected]>:
…Thanks for writing.
This problem exists, judging by the bug reports submitted from the app.
But I never could reproduce it.
Yalp Store puts downloaded files into `<external storage>/Download` by
default. You can see the specific path in the settings. Is it properly
created on your device? Does it have any non-default permissions? Maybe
changing the download directory in the settings will help.
Meanwhile I've added some additional logging.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#308 (comment)
|
I have had exactly the the same problem with my S2 I9100 wich share a lot of code with the S3 I9300 on LineageOS. One workaround for me fixed it. |
@yeriomin Maybe you could use a file picker instead of the text input, so it pops up the corresponding DocumentProvider dialog? That way the system should give the permission if the user confirms. Currently it's not even possible to specify a path on a different storage, as the "prefix" seems to be fixed. So I cannot install anything via Yalp at the moment, and there are several updates pending … @sky321 I'm using LOS as well (LOS 13/Android 6.0.1 – the latest one available for my device), but unfortunately couldn't find that option there. PS: Found another workaround, using the Marshmallow SD fix Xposed module and whitelisting YalpStore (just mentioning it as it might be helpful to other affected users until it's fixed). |
Affects me as well (S2 i9100, Lineage OS 14.1). |
Hey there, at least for me the version 0.29 fixed my problem. It was no work around needed. Can anybody confirm that? |
@Araucarier Not me. That was what I was playing with and only got working via the mentioned Xposed module. |
This is with version 0.29 here too and the bug is there. I worked around it by making it a system app. |
Asking the user for the permission at first launch, before anything else, might help. That would be easy to implement, but is against android guidelines... @Araucarier
I've looked into this option before adding the download directory choice. The components I've found would, if used, double the apk size and make Yalp Store incompatible with old androids. |
Am I getting something wrong here? To me that sounds like meeting the "permissions on demand". For comparison: when setting up Titanium Backup one has to pick a directory as well. That requests DocumentProvider then to grant access to the chosen directory (which the user has to confirm). As this is only needed with Android 5+, it should of course only happen then.
Both very valid reasons against, agreed. I'm no Android dev; but isn't there an intent that could be called for picking a directory, where "registered components" (such as file managers) would respond to? That'd of course leave the question what happens if there's no file manager installed. I don't know either if there's a "standard Android component" for that it could default to. |
@yeriomin OK, but it still works for me now. Maybe because I updated the app from 0.28 to 0.29? I did not change anything else... |
@Araucarier I've also updated from 0.28 (installed from a backup, as the device was just completely reset and flashed fresh) to 0.29. Only after that I'd noticed the problem. Didn't have it with 0.28 (on Android 5), just with 0.29 (on Android 6). |
@yeriomin this sounds like what you might want give a try. Quoting the start:
Then some code follows. Though it says Lollipop, it's worth a try for multiple reasons: it might solve the issue some of us are having – and it gives you a "directory picker" (at least it sounds like) without the need to include another library. Could you give this a look? Thanks in advance! |
Galaxy S3 (i9300) with Lineage OS 14.1 (20171117-NIGHTLY-i9300). YalpStore 0.30 excluded from Privacy Guard. I got the same error as the OP multiple times Also in Yalp > Your apps > selecting an app > Get local apk would say "Saved in your Downloads folder" but nothing was downloaded in the Download folder. In YalpStore > Settings > Download directory it says the default is > /storage/emulated/0/Download when pressing on it the only option is to change the name of the Folder & not the path. I killed Yalp & created a new folder in /storage/emulated/0/ and in Yalp changed the destination folder name in Settings > Download directory but still got the same error. Changed it back to Download which already existed before installing Yalp Store with all the correct read/write folder permissions, same error. After reading this post above from @yeriomin
So I killed Yalp & created a Download folder in the root of my external SD card, did not changed the > Settings > Download directory in Yalp & I can now download apk's in /storage/emulated/0/Download. I don't know why it fixed the problem but it now works. |
It won't. The issue is: the permission is granted by the user, but writing is still denied by the OS. At best it will not show the non-writable directories, and most likely it will just let you choose the same thing the current solution does. Directory picker vs a plain string preference is not the point of this issue. Still, I'll look into it, thanks. @monteverde-org
So you didn't actually change the default path? Where are the apks saved?
What is its absolute path? @IzzySoft @Araucarier @pcercuei @sky321 It appears you all have Samsung devices with a SD card slot. Am I right? If yes, does @monteverde-org 's solution work for you? I'm starting to think the important thing in this workaround is to kill Yalp, and after the OS starts a different process for it, the permission is granted properly...
Actually, its any path as long as it is on your device's external storage. Note, that the name "external storage" is historical. Even if the device has no SD-card slot, the OS calls the place where all the user-accessible stuff is situated "external". https://developer.android.com/guide/topics/data/data-storage.html#filesExternal |
@yeriomin I've never used a Samsung phone (and am unlikely to do so in the near feature at least) – but yes, internal + external SD are present. I currently cannot test whether the work-around presented by @monteverde-org works (that would require multiple boots as I had to disable it in the Xposed module – and I'm currently performing a "long term" stability test for some other app). I could check, though, if there's a Side note: It might well be a bug in the system. I've meanwhile encountered two more apps with this issue, both working fine on another device which also runs MM. So to clarify: the device I'm having this issue with is an LG P880 running LOS13 (Android 6.0.1) – the "other one" I referred to is a Wileyfox Swift running CyanogenOS 13 (also Android 6.0.1). |
No.
As shown in the screen capture in my post above, in the default for my Samsung S3 I9300 running LineageOS 14.1 in Yalp Store > Settings > Download directory : /storage/emulated/0/Download. Absolute path of the other Download folder I created in my external SD card (per ES File Explorer > select the folder > i ) but did not use so far for Yalp: /storage/632B-09F5/Download. There are some reported issues with the path of external SD cards or mounting them or their usage by some apps in LineageOS for some devices. For example some S3 I9300 Lineage 14.1 users reported problems with Root Explorer but not with ES File Explorer of Solid Explorer: https://forum.xda-developers.com/search/thread/3544531?query=root%20explorer I just tried to type that absolute path in > Yalp Store > Settings > Download directory > to try to save the apk's in the external SD card/Download folder I created but it does not work as shown in the screen captures below because it's not possible to overwrite the path /storage/emulated/0/. Default: Editing > Yalp Store > Settings > Download directory > Result: |
Samsung Galaxy S3 (i9300) with Lineage OS 14.1 (20171117-NIGHTLY-i9300) Rooted. Yalp Store 0.30 excluded from Privacy Guard.
You are correct I think. To test this I uninstalled Yalp Store & rebooted. 1- Installed com.github.yeriomin.yalpstore_30.apk
If I go to Lineage's > Settings > Personal > Privacy > disabled Privacy Guard for Yalps long press after killing Yalps & restarting Yalp I can also see Modified settings denied 2 times (last screen capture below) but it did not prevent successful apk download after killing/restarting Yalp. Did you try it instead of re-installing Yalp? Anyway, thank you @yeriomin for working on Yalps Store! Lineage's > Settings > Personal > Privacy > disabled Privacy Guard for Yalps: |
If two ExternalFilesDirs are available, the non-removable is going to be used now. Also, if setting a download directory in the preferences screen fails, a fallback directory will be suggested.
@IzzySoft @Araucarier @pcercuei @sky321 @monteverde-org I've added a couple of things to help work around the problem...
If you have time, please check if it actually works as I described on your devices. Please, use v0.34 from the github releases page, f-droid hasn't compiled it yet. |
It does show a message asking me if I want to use the fallback directory. By doing so, the downloads work. |
Seems to be working as expected. Time to close this. |
Well, the bug isn't fixed, is it? I'm still unable to change the directory, it only works if I use the fallback one. |
@pcercuei The point of the issue was to let people download. Changing the directory is not essential. Yalp Store is not a file manager. Implementing all the possible ways to access all storage devices available is not a priority. |
Thanks folks! Helped me get through this one. |
I'm still seeing this bug. Thanks to the descriptions above, I found a workaround for me: |
Yalp Version
YalpStore 0.28
Expected behaviour
After logging in and search for app updates you click on an app with available updates. After that you click the download button. The download should start and you should be able to install the application afterwards.
Actual behaviour
Instead of downloading the application I get a pop up message, that says: "could not create folder or it is not writable" (translated to english).
Steps to reproduce
Info about your device
Galaxy S3 (i9300) with Lineage OS 14.1 (20170913-NIGHTLY-i9300).
If I look in the privacy protection settings in the settings of android and select Yalp store, I can see, that the change of settings was one time denied, although I definitely clicked on granting access to the storage. I tried it 3 times with a freshly installed yalp store and I always have the same beaviour.
The text was updated successfully, but these errors were encountered: