seven332 / EhViewer

[DEPRECATED] An Unofficial E-Hentai Application for Android
http://www.ehviewer.com/
Apache License 2.0
8.8k stars 963 forks source link

Dir picker shows nothing at the root location #638

Closed airium closed 5 years ago

airium commented 5 years ago

简略描述 / Describe the bug

There is a Magisk module "ExSDCard Access Enabler" that mounts the external SD card under "/mnt/media_rw/". Placing the download location of EhViewer in this way will allow faster access to files on the external storage (compared with the Document API). However, I found that I failed to navigate into "/mnt/media_rw/" on one of my devices, as at "/" it shows nothing: Screenshot_20190709-154153

如何重现 / To Reproduce

  1. In download settings, press "Download Location"
  2. Press "continue"
  3. Navigate backward to "/".
  4. Check if it is blank

预期行为 / Expected behavior

It should show the dirs at "/", so I can navigate into "/mnt/media_rw/".

On my another device, here is the correct behavior: Screenshot_20190709-154544

And the location url is now like this: Screenshot_20190709-154615

设备型号与 Android 版本 / Device model and Android version

seven332 commented 5 years ago

Is the Magisk module "ExSDCard Access Enabler" works on other apps?

airium commented 5 years ago

Interesting. Hinted by your words, I found on this machine (find7), apps without root permission will fail to access "/". "/mnt" is accessible but "/mnt/media_rw" not as its permission is 750. So, even though the magisk module did work, no regular app will be able to access the mount point. It appears that the rom has a bit stricter permission.

To my knowledge, it seems this issue is ROM/Device-dependent and no effort is required from developers. But, do you know this case and have any suggestion?

seven332 commented 5 years ago

Please try this one. Click the "Preset" button to select a directory. One directory should be in the SD card.

https://drive.google.com/open?id=1mzPxnqyjU51msKT6MoJ7F72JVMYlpx3Y

airium commented 5 years ago

Sorry for my delay. I see your point, that you added shortcuts to quickly navigate into these writable app data dirs. That's a good idea to avoid using the Document API, and works well.

It's pleased to see the commit being added. Thank you for the work.