A Swift Recreation of Attach-Detach, with some configurable options
To use, you’ll need to specify if you are attaching or detaching, See below:
To Attach a DMG, the following command should be run:
attachdetachsw --attach/-a DMGFILE. Where
DMGFile is the path of the DMG to attach.
iPhone:~ mobile% attachdetachsw -a attachdetachsw.dmg Attached as disk6
To detach/eject a disk, the following command should be run:
attachdetachsw --detach/-d diskWithNumebr Where
diskWithNumebr is the disk to eject.
iPhone:~ mobile% attachdetachsw -d disk6 Detached /dev/disk6
Though these aren’t necessary, the following options can be used:
-f, --file-mode=FILEMODEWhere FILEMODE is a number, sets the filemode while attaching
-s, --set-auto-mountSets automount to true while attaching
-g, --get-reg-entry-idPrints the RegEntryID of the disk that the DMG was attached to
There are currently no options for detaching.
To build, you must have Theos and the swift-toolchain, you also must be building with a patched SDK.
git clone https://github.com/dabezt31/Attach-Detach-Sw/ cd Attach-Detach-Sw make package