Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Can't navigate any files after granting storage permission, two empty entries #100

Open
ioogithub opened this issue Oct 29, 2020 · 13 comments · Fixed by #101
Open

Can't navigate any files after granting storage permission, two empty entries #100

ioogithub opened this issue Oct 29, 2020 · 13 comments · Fixed by #101
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ioogithub
Copy link

Describe the bug
App is unusable, only one screen with two folders is displayed. There doesn't seem to be any way to get past this.

To Reproduce

  1. Install the app
  2. Open the app
  3. Click on the lock to grant permission
  4. Verify the app has permission for storage
  5. On the next screen only two entries:

emulated d-x
self d-z

Both of these folders are empty. Is there some other way to grant storage permissions? Does this app require root?

Expected behavior
The app would be usable

Smartphone (please complete the following information):

  • Device: Moto G7+ / Moto G7
  • OS: LineageOS 71
  • Version 2.3.4

Additional context
If I select a file and then open with IrkFM I get the same screen. There doesn't seem to be anything other than this screen.
I tried this on a Moto G7 phone and got the same results.

@lfuelling
Copy link
Owner

Hi,
this app does not require root.
Unfortunately due to "security improvements" almost all directories are not readable in newer Android versions; according to Wikipedia, LineageOS 17 (assuming the numbers are switched) is Android 10 which is where this problem started occuring.

This issue is thus related to #69.

Currently I can not provide you with any help because at the moment I'm unsure whether I should add support for root (which would only help users on rooted devices) or fallback to the system file chooser on newer Android versions (or maybe both if I find the time).

What could maybe work is (since you run lineage) change the directory permissions where you want to use the app. But that's only speculation as I have no way of testing this. If you try this it's on your own risk.

@lfuelling lfuelling added the bug Something isn't working label Oct 29, 2020
@lfuelling lfuelling added this to the v3.0.0 milestone Oct 29, 2020
@lfuelling lfuelling self-assigned this Oct 29, 2020
@ioogithub
Copy link
Author

Thanks, I did read that issue that you mentioned however the title was > 10 so that to me means Android 11. Really it should say >= 10 or some version of that notation.

@ioogithub
Copy link
Author

I'm unsure whether I should add support for root (which would only help users on rooted devices) or fallback to the system file chooser on newer Android versions

I think this option would be the best.

In the meantime, are you aware of any other open source solutions for accessing 7zip or other archived files on Android?

@lfuelling
Copy link
Owner

lfuelling commented Nov 4, 2020

Unfortunately I don't know any. One of the reasons I wrote lrkFM 🙈

As a workaround you can try "sharing" the file with lrkFM to open it (or open it from the system file chooser, should result in the same thing) but on newer versions of Android that's likely to return a content:// uri to the app which it can't handle right now.
The problem with this is that you can only get the inputstream of a file behind a content URI and not any file objects. And all the libraries I use to extract archives only work with files, not with streams.

Rest assured that I'm on it and as soon as I find a way to get this to work I'll publish it.

@ioogithub
Copy link
Author

This doesn't really work. I tried to share the file in the way you suggested but IrkFM is never on the list of apps that I can share the file with. I tried multiple different file types.

@lfuelling
Copy link
Owner

Oh, that's weird. The app is registered as being able to handle all files (*/* mime type) so it should open whn clicking on archives.

Regardless of that, I've found a way that might enable support for content URIs. I'll try it later today.

@lfuelling
Copy link
Owner

I got it working (only tested .7z files yet)! 🎉
I'll just make it a bit prettier and then release an update.

Concerning the "sharing" part, I was stupid. It's not "sharing" but the "Open with" action in the system file chooser context menu for selected files, sorry.
Screenshot of an Android emulator showing the context menu for a selected file

@lfuelling lfuelling modified the milestones: v3.0.0, 2.4.0 Nov 5, 2020
@lfuelling
Copy link
Owner

The feature (among other things) was released as v2.4.0: https://github.com/lfuelling/lrkFM/releases/tag/v2.4.0

@ioogithub
Copy link
Author

Wow Awesome!

Did you release this version to F-Droid as well? Any idea when it will be there? I would love to try it.

@lfuelling
Copy link
Owner

lfuelling commented Nov 5, 2020

Yes, but I don't know how long it takes for the F-Droid repo to upgrade. If you're in a hurry you can simply install the apk attached to the release (which is the same the F-Droid repo will load once it updates).

@ioogithub
Copy link
Author

I have installed version 2.4.0. Unfortunately this is still not working for me. I still see only two entries:

-emulated
-self

When I tap on them I get:

"Unable to access files"

I have granted the storage permission

I think this is the same result as I got with the previous version.

@lfuelling lfuelling reopened this Dec 1, 2020
@lfuelling
Copy link
Owner

lfuelling commented Dec 1, 2020

Please try it using v2.5.0b2 which is using an older Android API still supporting legacy file access.

Additionally the navigation in the upper layers of the file system doesn't (and won't ever) work because of Android permissions. (Non-rooted) Apps can only properly access the /storage/emulated/0... and /sdcard directories and even those are becoming more limited in future Android versions.

The following works on the emaulator as well as my Pixel test device:

  1. Tap the main menu button in the top left when in the default "folder view"
  2. Tap the "Open Path" menu item
  3. Enter /sdcard, /storage/emulated/0 or similar and tap "Ok"
  4. The folder should be opened (if not try a different path)
  5. (optional) Open the main menu again and tap "Add Bookmark"
  6. (optional) Tap "Use current folder"
  7. (optional) The folder will be in the bookmark section of the main menu

If that doesn't work you it might be a customization by your device vendor. In that case you can try using the "Filesystem Explorer" in Android Studio to find a suitable path which you can set as the home directory in the app settings.

@ioogithub
Copy link
Author

I have tried everything suggested in your last post. Manually typing the paths doesn't work, neither does the Add Bookmark solution. Thanks for the suggestions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants