Closed lmagyar closed 3 months ago
After some experiments I decided to set isReadable and isExecutable true on all faked/injected folders, and their parents also (/storage/emulated, looking at you). This works on WinSCP, SSHFS, SSHFS + cmd prompt, SSHFS + Win Explorer. It just works.
Ok, code is simple enough to support this.
On (some?) non-rooted phones listing the
/
folder and the/storage/emulated
returns nothing. Related #279 #293 #299 #305~First workaround is to let at least return an empty list, that's why
isReadable()
is changed toisExecutable()
.~~Second~The workaround is more like a hack, because I couldn't find any way to list the root folders, though when I enter them directly (like
/system
), they work fine in read-only mode. So I've added a way to fake/inject any folder listing if the OS doesn't list anything for us.Currently only the
/storage
and/storage/emulated/0
is faked (the others are commented out in the code). This is helpful for the "average" user, because at least there is a path to the internal and external storage throught clicking in eg. WinSCP, without direct knowledge of the Android file-system's structure.