a-shell icon indicating copy to clipboard operation
a-shell copied to clipboard

Add Mount/Umount

Open lejurassien opened this issue 3 years ago • 2 comments

Hello, first of all thank you for this great app, very well done.

I was wondering if it was possible to use this app to fill a gap left by apple concerning the ejection of usb or hard disks/ssd because apple has not implemented an "eject safely" function which can sometimes cause data corruption.

The only solution is to turn off the ipad or to check that the led is not blinking anymore (if it is present on the disk!). I have tried to look at the mount/umount option but it is not present.

Is it possible to add them or is there another way to safely eject a disk/usb? Thank you!

lejurassien avatar Nov 19 '21 11:11 lejurassien

That would be a great addition, like the downloadFile and downloadFolder commands.

But I don't know which iOS API corresponds to external drives (I'm not even sure iOS exposes this part of the system). I'm going to need help here. The only think I could find is the mountedVolumeURLs function: https://developer.apple.com/documentation/foundation/filemanager/1409626-mountedvolumeurls

The documentation says: This method returns nil on platforms other than macOS., so I'm not sure we are supposed to be able to access external volumes. It's worth trying.

holzschu avatar Nov 19 '21 12:11 holzschu

yes it would indeed be a great addition I will try to see and search with the documentation you sent me.

Hopefully someone will find a way and I think it's pretty likely that Apple won't allow you to touch these settings as you say (Security, jailbreak..).

I thank you for your answer and wish you a good day

EDIT: I'm not sure if this is useful... maybe for some interesting lines.

https://github.com/Polidea/SiriusObfuscator/blob/master/SymbolExtractorAndRenamer/swift-corelibs-foundation/Foundation/FileManager.swift

lejurassien avatar Nov 19 '21 15:11 lejurassien

It appears that a couple of guys worked on iSH and successfully implemented mount/umount. https://github.com/ish-app/ish/pull/543

GregoryShields avatar Apr 03 '23 01:04 GregoryShields

That is only for "mounting" directories that are already available with pickFolder in a-Shell. The issue here is about access to external hard drives.

holzschu avatar Apr 03 '23 06:04 holzschu