imagemounter

package
v1.0.122 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadImageFor

func DownloadImageFor(device ios.DeviceEntry, baseDir string) (string, error)

func IsDevModeEnabled

func IsDevModeEnabled(device ios.DeviceEntry) (bool, error)

Check if developer mode is enabled through the mobile_image_mounter service

func MatchAvailable

func MatchAvailable(version string) string

func MountImage

func MountImage(device ios.DeviceEntry, path string) error

Types

type DeveloperDiskImageMounter

type DeveloperDiskImageMounter struct {
	// contains filtered or unexported fields
}

DeveloperDiskImageMounter to mobile image mounter

func NewDeveloperDiskImageMounter

func NewDeveloperDiskImageMounter(device ios.DeviceEntry, version *semver.Version) (*DeveloperDiskImageMounter, error)

NewDeveloperDiskImageMounter returns a new mobile image mounter DeveloperDiskImageMounter for the given device

func (*DeveloperDiskImageMounter) Close

func (conn *DeveloperDiskImageMounter) Close() error

Close closes the underlying UsbMuxConnection

func (*DeveloperDiskImageMounter) ListImages

func (conn *DeveloperDiskImageMounter) ListImages() ([][]byte, error)

ListImages returns a list with signatures of installed developer images

func (*DeveloperDiskImageMounter) MountImage

func (conn *DeveloperDiskImageMounter) MountImage(imagePath string) error

MountImage installs a .dmg image from imagePath after checking that it is present and valid.

type ImageMounter

type ImageMounter interface {
	ListImages() ([][]byte, error)
	MountImage(imagePath string) error
	io.Closer
}

ImageMounter mounts developer disk images to an iOS device, and give a list of already mounted images

func NewImageMounter

func NewImageMounter(device ios.DeviceEntry) (ImageMounter, error)

NewImageMounter creates a new ImageMounter depending on the version of the given device. For iOS 17+ devices a PersonalizedDeveloperDiskImageMounter is created, and for all other devices a DeveloperDiskImageMounter gets created

type PersonalizedDeveloperDiskImageMounter

type PersonalizedDeveloperDiskImageMounter struct {
	// contains filtered or unexported fields
}

PersonalizedDeveloperDiskImageMounter allows mounting personalized developer disk images that are used starting with iOS 17. For personalized developer disk images a nonce gets queried from the device and needs to be signed by Apple to be able to mount the developer disk

func NewPersonalizedDeveloperDiskImageMounter

func NewPersonalizedDeveloperDiskImageMounter(entry ios.DeviceEntry, version *semver.Version) (PersonalizedDeveloperDiskImageMounter, error)

NewPersonalizedDeveloperDiskImageMounter creates a PersonalizedDeveloperDiskImageMounter for the device entry

func (PersonalizedDeveloperDiskImageMounter) Close

Close closes the connection to the image mounter service

func (PersonalizedDeveloperDiskImageMounter) ListImages

func (p PersonalizedDeveloperDiskImageMounter) ListImages() ([][]byte, error)

ListImages provides a list of signatures of the mounted personalized developer disk images

func (PersonalizedDeveloperDiskImageMounter) MountImage

func (p PersonalizedDeveloperDiskImageMounter) MountImage(imagePath string) error

MountImage mounts the personalized developer disk image present at imagePath. imagePath needs to point to the 'Restore' directory of the personalized developer disk image.

MountImage gets device identifiers and a nonce from the device first, which needs to be signed by Apple and after that the developer disk image is sent to the device with this signature to be able to mount it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL