libimobiledevice

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

* sonic-gidevice Connect to your iOS Devices. * Copyright (C) 2022 SonicCloudOrg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

* sonic-gidevice Connect to your iOS Devices. * Copyright (C) 2022 SonicCloudOrg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	AfcOperationInvalid              = 0x00000000 /* Invalid */
	AfcOperationStatus               = 0x00000001 /* Status */
	AfcOperationData                 = 0x00000002 /* Data */
	AfcOperationReadDir              = 0x00000003 /* ReadDir */
	AfcOperationReadFile             = 0x00000004 /* ReadFile */
	AfcOperationWriteFile            = 0x00000005 /* WriteFile */
	AfcOperationWritePart            = 0x00000006 /* WritePart */
	AfcOperationTruncateFile         = 0x00000007 /* TruncateFile */
	AfcOperationRemovePath           = 0x00000008 /* RemovePath */
	AfcOperationMakeDir              = 0x00000009 /* MakeDir */
	AfcOperationGetFileInfo          = 0x0000000A /* GetFileInfo */
	AfcOperationGetDeviceInfo        = 0x0000000B /* GetDeviceInfo */
	AfcOperationWriteFileAtomic      = 0x0000000C /* WriteFileAtomic (tmp file+rename) */
	AfcOperationFileOpen             = 0x0000000D /* FileRefOpen */
	AfcOperationFileOpenResult       = 0x0000000E /* FileRefOpenResult */
	AfcOperationFileRead             = 0x0000000F /* FileRefRead */
	AfcOperationFileWrite            = 0x00000010 /* FileRefWrite */
	AfcOperationFileSeek             = 0x00000011 /* FileRefSeek */
	AfcOperationFileTell             = 0x00000012 /* FileRefTell */
	AfcOperationFileTellResult       = 0x00000013 /* FileRefTellResult */
	AfcOperationFileClose            = 0x00000014 /* FileRefClose */
	AfcOperationFileSetSize          = 0x00000015 /* FileRefSetFileSize (ftruncate) */
	AfcOperationGetConnectionInfo    = 0x00000016 /* GetConnectionInfo */
	AfcOperationSetConnectionOptions = 0x00000017 /* SetConnectionOptions */
	AfcOperationRenamePath           = 0x00000018 /* RenamePath */
	AfcOperationSetFSBlockSize       = 0x00000019 /* SetFSBlockSize (0x800000) */
	AfcOperationSetSocketBlockSize   = 0x0000001A /* SetSocketBlockSize (0x800000) */
	AfcOperationFileRefLock          = 0x0000001B /* FileRefLock */
	AfcOperationMakeLink             = 0x0000001C /* MakeLink */
	AfcOperationGetFileHash          = 0x0000001D /* GetFileHash */
	AfcOperationSetFileModTime       = 0x0000001E /* SetModTime */
	AfcOperationGetFileHashRange     = 0x0000001F /* GetFileHashWithRange */
	/* iOS 6+ */
	AfcOperationFileSetImmutableHint             = 0x00000020 /* FileRefSetImmutableHint */
	AfcOperationGetSizeOfPathContents            = 0x00000021 /* GetSizeOfPathContents */
	AfcOperationRemovePathAndContents            = 0x00000022 /* RemovePathAndContents */
	AfcOperationDirectoryEnumeratorRefOpen       = 0x00000023 /* DirectoryEnumeratorRefOpen */
	AfcOperationDirectoryEnumeratorRefOpenResult = 0x00000024 /* DirectoryEnumeratorRefOpenResult */
	AfcOperationDirectoryEnumeratorRefRead       = 0x00000025 /* DirectoryEnumeratorRefRead */
	AfcOperationDirectoryEnumeratorRefClose      = 0x00000026 /* DirectoryEnumeratorRefClose */
	/* iOS 7+ */
	AfcOperationFileRefReadWithOffset  = 0x00000027 /* FileRefReadWithOffset */
	AfcOperationFileRefWriteWithOffset = 0x00000028 /* FileRefWriteWithOffset */
)
View Source
const (
	AfcErrSuccess                = 0
	AfcErrUnknownError           = 1
	AfcErrOperationHeaderInvalid = 2
	AfcErrNoResources            = 3
	AfcErrReadError              = 4
	AfcErrWriteError             = 5
	AfcErrUnknownPacketType      = 6
	AfcErrInvalidArgument        = 7
	AfcErrObjectNotFound         = 8
	AfcErrObjectIsDir            = 9
	AfcErrPermDenied             = 10
	AfcErrServiceNotConnected    = 11
	AfcErrOperationTimeout       = 12
	AfcErrTooMuchData            = 13
	AfcErrEndOfData              = 14
	AfcErrOperationNotSupported  = 15
	AfcErrObjectExists           = 16
	AfcErrObjectBusy             = 17
	AfcErrNoSpaceLeft            = 18
	AfcErrOperationWouldBlock    = 19
	AfcErrIoError                = 20
	AfcErrOperationInterrupted   = 21
	AfcErrOperationInProgress    = 22
	AfcErrInternalError          = 23
	AfcErrMuxError               = 30
	AfcErrNoMemory               = 31
	AfcErrNotEnoughData          = 32
	AfcErrDirNotEmpty            = 33
)
View Source
const (
	AmfiServiceName = "com.apple.amfi.lockdown"

	DEV_MODE_REVEAL = 0
	DEV_MODE_ARM    = 1
	DEV_MODE_ENABLE = 2
)
View Source
const (
	CrashReportMoverServiceName      = "com.apple.crashreportmover"
	CrashReportCopyMobileServiceName = "com.apple.crashreportcopymobile"
)
View Source
const (
	InstrumentsServiceName            = "com.apple.instruments.remoteserver"
	InstrumentsSecureProxyServiceName = "com.apple.instruments.remoteserver.DVTSecureSocketProxy"
)
View Source
const (
	TestmanagerdSecureServiceName = "com.apple.testmanagerd.lockdown.secure"
	TestmanagerdServiceName       = "com.apple.testmanagerd.lockdown"
)
View Source
const (
	BundleID         = "org.cloud.sonic.gidevice"
	ProgramName      = "libimobiledevice"
	ClientVersion    = "libimobiledevice-beta"
	LibUSBMuxVersion = 3
)
View Source
const AfcServiceName = "com.apple.afc"
View Source
const (
	DiagnosticsRelayServiceName = "com.apple.mobile.diagnostics_relay"
)
View Source
const HouseArrestServiceName = "com.apple.mobile.house_arrest"
View Source
const ImageMounterServiceName = "com.apple.mobile.mobile_image_mounter"
View Source
const InstallationProxyServiceName = "com.apple.mobile.installation_proxy"
View Source
const LockdownPort = 62078
View Source
const PcapdServiceName = "com.apple.pcapd"
View Source
const ProtocolVersion = "2"
View Source
const ScreenshotServiceName = "com.apple.mobile.screenshotr"
View Source
const SimulateLocationServiceName = "com.apple.dt.simulatelocation"
View Source
const (
	SpringBoardServiceName = "com.apple.springboardservices"
)
View Source
const SyslogRelayServiceName = "com.apple.syslog_relay"

Variables

View Source
var (
	NSMutableDictionaryClass = &ArchiverClasses{
		Classes:   []string{"NSMutableDictionary", "NSDictionary", "NSObject"},
		ClassName: "NSMutableDictionary",
	}
	NSDictionaryClass = &ArchiverClasses{
		Classes:   []string{"NSDictionary", "NSObject"},
		ClassName: "NSDictionary",
	}
	NSMutableArrayClass = &ArchiverClasses{
		Classes:   []string{"NSMutableArray", "NSArray", "NSObject"},
		ClassName: "NSMutableArray",
	}
	NSArrayClass = &ArchiverClasses{
		Classes:   []string{"NSArray", "NSObject"},
		ClassName: "NSArray",
	}
	NSMutableDataClass = &ArchiverClasses{
		Classes:   []string{"NSMutableArray", "NSArray", "NSObject"},
		ClassName: "NSMutableArray",
	}
	NSDataClass = &ArchiverClasses{
		Classes:   []string{"NSData", "NSObject"},
		ClassName: "NSData",
	}
	NSDateClass = &ArchiverClasses{
		Classes:   []string{"NSDate", "NSObject"},
		ClassName: "NSDate",
	}
	NSErrorClass = &ArchiverClasses{
		Classes:   []string{"NSError", "NSObject"},
		ClassName: "NSError",
	}
)
View Source
var DefaultDeadlineTimeout = 30 * time.Second
View Source
var ErrDeviceLocked = errors.New("device locked")
View Source
var (
	PacketHeaderSize = uint32(95)
)

Functions

func SetDebug

func SetDebug(debug bool)

SetDebug sets debug mode

func UnmarshalAuxBuffer

func UnmarshalAuxBuffer(b []byte) ([]interface{}, error)

Types

type AfcClient

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

func NewAfcClient

func NewAfcClient(innerConn InnerConn) *AfcClient

func (*AfcClient) Receive

func (c *AfcClient) Receive() (respMsg *AfcMessage, err error)

func (*AfcClient) Send

func (c *AfcClient) Send(operation uint64, data, payload []byte) (err error)

type AfcMessage

type AfcMessage struct {
	Operation uint64
	Data      []byte
	Payload   []byte
}

func (*AfcMessage) Err

func (m *AfcMessage) Err() error

func (*AfcMessage) Map

func (m *AfcMessage) Map() map[string]string

func (*AfcMessage) Strings

func (m *AfcMessage) Strings() []string

func (*AfcMessage) Uint64

func (m *AfcMessage) Uint64() uint64

type AmfiClient added in v0.7.6

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

func NewAmfiClient added in v0.7.6

func NewAmfiClient(innerConn InnerConn) *AmfiClient

func (*AmfiClient) SendAction added in v0.7.6

func (c *AmfiClient) SendAction(action int) (int, error)

type ApplicationType

type ApplicationType string
const (
	ApplicationTypeSystem   ApplicationType = "System"
	ApplicationTypeUser     ApplicationType = "User"
	ApplicationTypeInternal ApplicationType = "internal"
	ApplicationTypeAny      ApplicationType = "Any"
)

type ArchiverClasses

type ArchiverClasses struct {
	Classes   []string `plist:"$classes"`
	ClassName string   `plist:"$classname"`
}

type ArchiverRoot

type ArchiverRoot struct {
	Root plist.UID `plist:"root"`
}

type AuxBuffer

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

func NewAuxBuffer

func NewAuxBuffer() *AuxBuffer

func (*AuxBuffer) AppendBytes

func (m *AuxBuffer) AppendBytes(b []byte)

func (*AuxBuffer) AppendInt32

func (m *AuxBuffer) AppendInt32(v int32)

func (*AuxBuffer) AppendInt64

func (m *AuxBuffer) AppendInt64(v int64)

func (*AuxBuffer) AppendObject

func (m *AuxBuffer) AppendObject(obj interface{}) error

func (*AuxBuffer) AppendUInt32

func (m *AuxBuffer) AppendUInt32(v uint32)

func (*AuxBuffer) AppendUInt64

func (m *AuxBuffer) AppendUInt64(v uint64)

func (*AuxBuffer) Bytes

func (m *AuxBuffer) Bytes() []byte

func (*AuxBuffer) Len

func (m *AuxBuffer) Len() int

type BaseDevice

type BaseDevice struct {
	MessageType MessageType      `plist:"MessageType"`
	DeviceID    int              `plist:"DeviceID"`
	Properties  DeviceProperties `plist:"Properties"`
}

type BasicRequest

type BasicRequest struct {
	MessageType         MessageType `plist:"MessageType"`
	BundleID            string      `plist:"BundleID,omitempty"`
	ProgramName         string      `plist:"ProgName,omitempty"`
	ClientVersionString string      `plist:"ClientVersionString"`
	LibUSBMuxVersion    uint        `plist:"kLibUSBMuxVersion"`
}

type CommandType

type CommandType string
const (
	CommandTypeVendDocuments CommandType = "VendDocuments"
	CommandTypeVendContainer CommandType = "VendContainer"
)
const (
	CommandTypeLookupImage  CommandType = "LookupImage"
	CommandTypeReceiveBytes CommandType = "ReceiveBytes"
	CommandTypeMountImage   CommandType = "MountImage"
)
const (
	CommandTypeBrowse    CommandType = "Browse"
	CommandTypeLookup    CommandType = "Lookup"
	CommandTypeInstall   CommandType = "Install"
	CommandTypeUninstall CommandType = "Uninstall"
)

type ConnectRequest

type ConnectRequest struct {
	BasicRequest
	DeviceID   int `plist:"DeviceID"`
	PortNumber int `plist:"PortNumber"`
}

type CoordinateSystem

type CoordinateSystem string
const (
	CoordinateSystemWGS84 CoordinateSystem = "WGS84"
	CoordinateSystemBD09  CoordinateSystem = "BD09"
	CoordinateSystemGCJ02 CoordinateSystem = "GCJ02"
)

type CrashReportMoverClient

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

func NewCrashReportMoverClient

func NewCrashReportMoverClient(innerConn InnerConn) *CrashReportMoverClient

func (*CrashReportMoverClient) InnerConn

func (c *CrashReportMoverClient) InnerConn() InnerConn

type DTXMessageResult

type DTXMessageResult struct {
	Obj    interface{}
	Aux    []interface{}
	Header []byte
}

type DeletePairRecordRequest

type DeletePairRecordRequest struct {
	BasicRequest
	PairRecordID string `plist:"PairRecordID"`
}

type DeviceProperties

type DeviceProperties struct {
	DeviceID        int    `plist:"DeviceID"`
	ConnectionType  string `plist:"ConnectionType"`
	ConnectionSpeed int    `plist:"ConnectionSpeed"`
	ProductID       int    `plist:"ProductID"`
	LocationID      int    `plist:"LocationID"`
	SerialNumber    string `plist:"SerialNumber"`
	UDID            string `plist:"UDID"`
	USBSerialNumber string `plist:"USBSerialNumber"`

	EscapedFullServiceName string `plist:"EscapedFullServiceName"`
	InterfaceIndex         int    `plist:"InterfaceIndex"`
	NetworkAddress         []byte `plist:"NetworkAddress"`
}

type DiagnosticsRelayBasicRequest

type DiagnosticsRelayBasicRequest struct {
	Request    string  `plist:"Request"`
	Label      string  `plist:"Label"`
	EntryClass *string `plist:"EntryClass,omitempty"`
}

type DiagnosticsRelayClient

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

func NewDiagnosticsRelayClient

func NewDiagnosticsRelayClient(innerConn InnerConn) *DiagnosticsRelayClient

func (*DiagnosticsRelayClient) InnerConn

func (c *DiagnosticsRelayClient) InnerConn() InnerConn

func (*DiagnosticsRelayClient) NewBasicRequest

func (c *DiagnosticsRelayClient) NewBasicRequest(relayType string, entryClass *string) *DiagnosticsRelayBasicRequest

func (*DiagnosticsRelayClient) NewXmlPacket

func (c *DiagnosticsRelayClient) NewXmlPacket(req interface{}) (Packet, error)

func (*DiagnosticsRelayClient) ReceivePacket added in v0.7.1

func (c *DiagnosticsRelayClient) ReceivePacket() (respPkt Packet, err error)

func (*DiagnosticsRelayClient) SendPacket

func (c *DiagnosticsRelayClient) SendPacket(pkt Packet) (err error)

type HouseArrestBasicRequest

type HouseArrestBasicRequest struct {
	Command    CommandType `plist:"Command"`
	Identifier string      `plist:"Identifier"`
}

type HouseArrestClient

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

func NewHouseArrestClient

func NewHouseArrestClient(innerConn InnerConn) *HouseArrestClient

func (*HouseArrestClient) InnerConn

func (c *HouseArrestClient) InnerConn() InnerConn

func (*HouseArrestClient) NewBasicRequest

func (c *HouseArrestClient) NewBasicRequest(cmdType CommandType, bundleID string) *HouseArrestBasicRequest

func (*HouseArrestClient) NewContainerRequest

func (c *HouseArrestClient) NewContainerRequest(bundleID string) *HouseArrestBasicRequest

func (*HouseArrestClient) NewDocumentsRequest

func (c *HouseArrestClient) NewDocumentsRequest(bundleID string) *HouseArrestBasicRequest

func (*HouseArrestClient) NewXmlPacket

func (c *HouseArrestClient) NewXmlPacket(req interface{}) (Packet, error)

func (*HouseArrestClient) ReceivePacket

func (c *HouseArrestClient) ReceivePacket() (respPkt Packet, err error)

func (*HouseArrestClient) SendPacket

func (c *HouseArrestClient) SendPacket(pkt Packet) (err error)

type IOSPacketHeader

type IOSPacketHeader struct {
	HdrSize        uint32  `struc:"uint32,big"`
	Version        uint8   `struc:"uint8,big"`
	PacketSize     uint32  `struc:"uint32,big"`
	Type           uint8   `struc:"uint8,big"`
	Unit           uint16  `struc:"uint16,big"`
	IO             uint8   `struc:"uint8,big"`
	ProtocolFamily uint32  `struc:"uint32,big"`
	FramePreLength uint32  `struc:"uint32,big"`
	FramePstLength uint32  `struc:"uint32,big"`
	IFName         string  `struc:"[16]byte"`
	Pid            int32   `struc:"int32,little"`
	ProcName       string  `struc:"[17]byte"`
	Unknown        uint32  `struc:"uint32,little"`
	Pid2           int32   `struc:"int32,little"`
	ProcName2      string  `struc:"[17]byte"`
	Unknown2       [8]byte `struc:"[8]byte"`
}

type IconPNGDataResponse

type IconPNGDataResponse struct {
	PNGData []byte `plist:"pngData"`
}

type ImageMounterBasicRequest

type ImageMounterBasicRequest struct {
	Command   CommandType `plist:"Command"`
	ImageType string      `plist:"ImageType"`
}

type ImageMounterBasicResponse

type ImageMounterBasicResponse struct {
	LockdownBasicResponse
	Status string `plist:"Status"`
}

type ImageMounterClient

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

func NewImageMounterClient

func NewImageMounterClient(innerConn InnerConn) *ImageMounterClient

func (*ImageMounterClient) NewBasicRequest

func (c *ImageMounterClient) NewBasicRequest(cmdType CommandType, imgType string) *ImageMounterBasicRequest

func (*ImageMounterClient) NewMountImageRequest

func (c *ImageMounterClient) NewMountImageRequest(imgType, imgPath string, imgSignature []byte) *ImageMounterMountImageRequest

func (*ImageMounterClient) NewReceiveBytesRequest

func (c *ImageMounterClient) NewReceiveBytesRequest(imgType string, imgSize uint32, imgSignature []byte) *ImageMounterReceiveBytesRequest

func (*ImageMounterClient) NewXmlPacket

func (c *ImageMounterClient) NewXmlPacket(req interface{}) (Packet, error)

func (*ImageMounterClient) ReceivePacket

func (c *ImageMounterClient) ReceivePacket() (respPkt Packet, err error)

func (*ImageMounterClient) SendDmg

func (c *ImageMounterClient) SendDmg(data []byte) (err error)

func (*ImageMounterClient) SendPacket

func (c *ImageMounterClient) SendPacket(pkt Packet) (err error)

type ImageMounterLookupImageResponse

type ImageMounterLookupImageResponse struct {
	ImageMounterBasicResponse
	ImageSignature [][]byte `plist:"ImageSignature"`
}

type ImageMounterMountImageRequest

type ImageMounterMountImageRequest struct {
	ImageMounterBasicRequest
	ImagePath      string `plist:"ImagePath"`
	ImageSignature []byte `plist:"ImageSignature"`
}

type ImageMounterReceiveBytesRequest

type ImageMounterReceiveBytesRequest struct {
	ImageMounterBasicRequest
	ImageSignature []byte `plist:"ImageSignature"`
	ImageSize      uint32 `plist:"ImageSize"`
}

type InnerConn

type InnerConn interface {
	Write(data []byte) (err error)
	Read(length int) (data []byte, err error)
	Handshake(version []int, pairRecord *PairRecord) (err error)
	DismissSSL() (err error)
	Close()
	RawConn() net.Conn
	Timeout(time.Duration)
}

type InstallationProxyBasicRequest

type InstallationProxyBasicRequest struct {
	Command       CommandType              `plist:"Command"`
	ClientOptions *InstallationProxyOption `plist:"ClientOptions,omitempty"`
}

type InstallationProxyBasicResponse

type InstallationProxyBasicResponse struct {
	Status string `plist:"Status"`
}

type InstallationProxyBrowseResponse

type InstallationProxyBrowseResponse struct {
	InstallationProxyBasicResponse
	CurrentAmount int           `plist:"CurrentAmount"`
	CurrentIndex  int           `plist:"CurrentIndex"`
	CurrentList   []interface{} `plist:"CurrentList"`
}

type InstallationProxyClient

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

func NewInstallationProxyClient

func NewInstallationProxyClient(innerConn InnerConn) *InstallationProxyClient

func (*InstallationProxyClient) NewBasicRequest

func (*InstallationProxyClient) NewInstallRequest

func (c *InstallationProxyClient) NewInstallRequest(bundleID, packagePath string) *InstallationProxyInstallRequest

func (*InstallationProxyClient) NewUninstallRequest

func (c *InstallationProxyClient) NewUninstallRequest(bundleID string) *InstallationProxyUninstallRequest

func (*InstallationProxyClient) NewXmlPacket

func (c *InstallationProxyClient) NewXmlPacket(req interface{}) (Packet, error)

func (*InstallationProxyClient) ReceivePacket

func (c *InstallationProxyClient) ReceivePacket() (respPkt Packet, err error)

func (*InstallationProxyClient) SendPacket

func (c *InstallationProxyClient) SendPacket(pkt Packet) (err error)

type InstallationProxyInstallRequest

type InstallationProxyInstallRequest struct {
	Command       CommandType              `plist:"Command"`
	ClientOptions *InstallationProxyOption `plist:"ClientOptions"`
	PackagePath   string                   `plist:"PackagePath"`
}

type InstallationProxyInstallResponse

type InstallationProxyInstallResponse struct {
	InstallationProxyBasicResponse
	Error            string `plist:"Error"`
	ErrorDescription string `plist:"ErrorDescription"`
}

type InstallationProxyLookupResponse

type InstallationProxyLookupResponse struct {
	InstallationProxyBasicResponse
	LookupResult interface{} `plist:"LookupResult"`
}

type InstallationProxyOption

type InstallationProxyOption struct {
	ApplicationType  ApplicationType `plist:"ApplicationType,omitempty"`
	ReturnAttributes []string        `plist:"ReturnAttributes,omitempty"`
	MetaData         bool            `plist:"com.apple.mobile_installation.metadata,omitempty"`
	BundleIDs        []string        `plist:"BundleIDs,omitempty"`          // for Lookup
	BundleID         string          `plist:"CFBundleIdentifier,omitempty"` // for Install
}

type InstallationProxyUninstallRequest

type InstallationProxyUninstallRequest struct {
	Command  CommandType `plist:"Command"`
	BundleID string      `plist:"ApplicationIdentifier"`
}

type InstrumentsClient

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

func NewInstrumentsClient

func NewInstrumentsClient(innerConn InnerConn) *InstrumentsClient

func (*InstrumentsClient) Invoke

func (c *InstrumentsClient) Invoke(selector string, args *AuxBuffer, channelCode uint32, expectsReply bool) (result *DTXMessageResult, err error)

func (*InstrumentsClient) NotifyOfPublishedCapabilities

func (c *InstrumentsClient) NotifyOfPublishedCapabilities() (publishedChannels map[string]int32, err error)

func (*InstrumentsClient) RegisterCallback

func (c *InstrumentsClient) RegisterCallback(obj string, cb func(m DTXMessageResult))

func (*InstrumentsClient) RequestChannel

func (c *InstrumentsClient) RequestChannel(channel string) (id uint32, err error)

type InterfaceOrientationResponse

type InterfaceOrientationResponse struct {
	Orientation OrientationState `plist:"interfaceOrientation"`
}

type KeyedArchiver

type KeyedArchiver struct {
	Archiver string        `plist:"$archiver"`
	Objects  []interface{} `plist:"$objects"`
	Top      ArchiverRoot  `plist:"$top"`
	Version  int           `plist:"$version"`
}

func (*KeyedArchiver) UID

func (ka *KeyedArchiver) UID() plist.UID

type LockdownBasicRequest

type LockdownBasicRequest struct {
	Label           string      `plist:"Label"`
	ProtocolVersion string      `plist:"ProtocolVersion"`
	Request         RequestType `plist:"Request"`
}

type LockdownBasicResponse

type LockdownBasicResponse struct {
	Request string `plist:"Request"`
	Error   string `plist:"Error"`
}

type LockdownClient

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

func NewLockdownClient

func NewLockdownClient(innerConn InnerConn) *LockdownClient

func (*LockdownClient) EnableSSL

func (c *LockdownClient) EnableSSL(version []int, pairRecord *PairRecord) (err error)

func (*LockdownClient) NewBasicRequest

func (c *LockdownClient) NewBasicRequest(reqType RequestType) *LockdownBasicRequest

func (*LockdownClient) NewEnterRecoveryRequest

func (c *LockdownClient) NewEnterRecoveryRequest() *LockdownBasicRequest

func (*LockdownClient) NewGetValueRequest

func (c *LockdownClient) NewGetValueRequest(domain, key string) *LockdownValueRequest

func (*LockdownClient) NewPairRequest

func (c *LockdownClient) NewPairRequest(pairRecord *PairRecord) *LockdownPairRequest

func (*LockdownClient) NewSetValueRequest

func (c *LockdownClient) NewSetValueRequest(domain, key string, value interface{}) *LockdownValueRequest

func (*LockdownClient) NewStartServiceRequest

func (c *LockdownClient) NewStartServiceRequest(service string) *LockdownStartServiceRequest

func (*LockdownClient) NewStartSessionRequest

func (c *LockdownClient) NewStartSessionRequest(buid, hostID string) *LockdownStartSessionRequest

func (*LockdownClient) NewStopSessionRequest

func (c *LockdownClient) NewStopSessionRequest(sessionID string) *LockdownStopSessionRequest

func (*LockdownClient) NewXmlPacket

func (c *LockdownClient) NewXmlPacket(req interface{}) (Packet, error)

func (*LockdownClient) ReceivePacket

func (c *LockdownClient) ReceivePacket() (respPkt Packet, err error)

func (*LockdownClient) SendPacket

func (c *LockdownClient) SendPacket(pkt Packet) (err error)

type LockdownPairRequest

type LockdownPairRequest struct {
	LockdownBasicRequest
	PairRecord     *PairRecord            `plist:"PairRecord"`
	PairingOptions map[string]interface{} `plist:"PairingOptions"`
}

type LockdownPairResponse

type LockdownPairResponse struct {
	LockdownBasicResponse
	EscrowBag []byte `plist:"EscrowBag"`
}

type LockdownStartServiceRequest

type LockdownStartServiceRequest struct {
	LockdownBasicRequest
	Service   string `plist:"Service"`
	EscrowBag []byte `plist:"EscrowBag,omitempty"`
}

type LockdownStartServiceResponse

type LockdownStartServiceResponse struct {
	LockdownBasicResponse
	EnableServiceSSL bool   `plist:"EnableServiceSSL"`
	Port             int    `plist:"Port"`
	Service          string `plist:"Service"`
}

type LockdownStartSessionRequest

type LockdownStartSessionRequest struct {
	LockdownBasicRequest
	SystemBUID string `plist:"SystemBUID"`
	HostID     string `plist:"HostID"`
}

type LockdownStartSessionResponse

type LockdownStartSessionResponse struct {
	LockdownBasicResponse
	EnableSessionSSL bool   `plist:"EnableSessionSSL"`
	SessionID        string `plist:"SessionID"`
}

type LockdownStopSessionRequest

type LockdownStopSessionRequest struct {
	LockdownBasicRequest
	SessionID string `plist:"SessionID"`
}

type LockdownType

type LockdownType struct {
	Type string `plist:"Type"`
}

type LockdownTypeResponse

type LockdownTypeResponse struct {
	LockdownBasicResponse
	Type string `plist:"Type"`
}

type LockdownValueRequest

type LockdownValueRequest struct {
	LockdownBasicRequest
	Domain string      `plist:"Domain,omitempty"`
	Key    string      `plist:"Key,omitempty"`
	Value  interface{} `plist:"Value,omitempty"`
}

type LockdownValueResponse

type LockdownValueResponse struct {
	LockdownBasicResponse
	Key   string      `plist:"Key"`
	Value interface{} `plist:"Value"`
}

type MessageType

type MessageType string
const (
	MessageTypeResult           MessageType = "Result"
	MessageTypeConnect          MessageType = "Connect"
	MessageTypeListen           MessageType = "Listen"
	MessageTypeDeviceAdd        MessageType = "Attached"
	MessageTypeDeviceRemove     MessageType = "Detached"
	MessageTypeReadBUID         MessageType = "ReadBUID"
	MessageTypeReadPairRecord   MessageType = "ReadPairRecord"
	MessageTypeSavePairRecord   MessageType = "SavePairRecord"
	MessageTypeDeletePairRecord MessageType = "DeletePairRecord"
	MessageTypeDeviceList       MessageType = "ListDevices"
)

type NSArray

type NSArray struct {
	NSObject
	Values []plist.UID `plist:"NS.objects"`
}

type NSData

type NSData struct {
	NSObject
	Data []byte `plist:"NS.data"`
}

type NSDictionary

type NSDictionary struct {
	NSArray
	Keys []plist.UID `plist:"NS.keys"`
}

type NSError

type NSError struct {
	NSCode     int
	NSDomain   string
	NSUserInfo interface{}
}

type NSKeyedArchiver

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

func NewNSKeyedArchiver

func NewNSKeyedArchiver() *NSKeyedArchiver

func (*NSKeyedArchiver) Marshal

func (ka *NSKeyedArchiver) Marshal(obj interface{}) ([]byte, error)

func (*NSKeyedArchiver) Unmarshal

func (ka *NSKeyedArchiver) Unmarshal(b []byte) (interface{}, error)

type NSObject

type NSObject struct {
	Class plist.UID `plist:"$class"`
}

type OrientationState

type OrientationState int64
const (
	Unknown OrientationState = iota
	Portrait
	PortraitUpsideDown
	LandscapeRight
	LandscapeLeft
)

type Packet

type Packet interface {
	Pack() ([]byte, error)
	Unpack(buffer *bytes.Buffer) (Packet, error)
	Unmarshal(v interface{}) error

	String() string
}

type PairRecord

type PairRecord struct {
	DeviceCertificate []byte `plist:"DeviceCertificate"`
	EscrowBag         []byte `plist:"EscrowBag,omitempty"`
	HostCertificate   []byte `plist:"HostCertificate"`
	HostPrivateKey    []byte `plist:"HostPrivateKey,omitempty"`
	HostID            string `plist:"HostID"`
	RootCertificate   []byte `plist:"RootCertificate"`
	RootPrivateKey    []byte `plist:"RootPrivateKey,omitempty"`
	SystemBUID        string `plist:"SystemBUID"`
	WiFiMACAddress    string `plist:"WiFiMACAddress,omitempty"`
}

type PcapdClient

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

func NewPcapdClient

func NewPcapdClient(innerConn InnerConn) *PcapdClient

func (*PcapdClient) Close

func (c *PcapdClient) Close()

func (*PcapdClient) CreatePacket

func (c *PcapdClient) CreatePacket(packet []byte) ([]byte, error)

func (*PcapdClient) GetPacket

func (c *PcapdClient) GetPacket(buf []byte) ([]byte, error)

func (*PcapdClient) ReceivePacket

func (c *PcapdClient) ReceivePacket() (respPkt Packet, err error)

type PcaprecHdrS

type PcaprecHdrS struct {
	TsSec   int `struc:"uint32,little"` /* timestamp seconds */
	TsUsec  int `struc:"uint32,little"` /* timestamp microseconds */
	InclLen int `struc:"uint32,little"` /* number of octets of packet saved in file */
	OrigLen int `struc:"uint32,little"` /* actual length of packet */
}

type ProtoMessageType

type ProtoMessageType uint32
const (
	ProtoMessageTypeResult ProtoMessageType
	ProtoMessageTypeConnect
	ProtoMessageTypeListen
	ProtoMessageTypeDeviceAdd
	ProtoMessageTypeDeviceRemove
	ProtoMessageTypeDevicePaired

	ProtoMessageTypePlist
)

type ProtoVersion

type ProtoVersion uint32
const (
	ProtoVersionBinary ProtoVersion = iota
	ProtoVersionPlist
)

type ReadPairRecordRequest

type ReadPairRecordRequest struct {
	BasicRequest
	PairRecordID string `plist:"PairRecordID"`
}

type ReplyCode

type ReplyCode uint64
const (
	ReplyCodeOK ReplyCode = iota
	ReplyCodeBadCommand
	ReplyCodeBadDevice
	ReplyCodeConnectionRefused

	ReplyCodeBadVersion
)

func (ReplyCode) String

func (rc ReplyCode) String() string

type RequestType

type RequestType string
const (
	RequestTypeQueryType     RequestType = "QueryType"
	RequestTypeSetValue      RequestType = "SetValue"
	RequestTypeGetValue      RequestType = "GetValue"
	RequestTypePair          RequestType = "Pair"
	RequestTypeEnterRecovery RequestType = "EnterRecovery"
	RequestTypeStartSession  RequestType = "StartSession"
	RequestTypeStopSession   RequestType = "StopSession"
	RequestTypeStartService  RequestType = "StartService"
)

type SavePairRecordRequest

type SavePairRecordRequest struct {
	BasicRequest
	PairRecordID   string `plist:"PairRecordID"`
	PairRecordData []byte `plist:"PairRecordData"`
	DeviceID       int    `plist:"DeviceID"`
}

type ScreenshotClient

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

func NewScreenshotClient

func NewScreenshotClient(innerConn InnerConn) *ScreenshotClient

func (*ScreenshotClient) NewBinaryPacket

func (c *ScreenshotClient) NewBinaryPacket(req interface{}) (Packet, error)

func (*ScreenshotClient) ReceivePacket

func (c *ScreenshotClient) ReceivePacket() (respPkt Packet, err error)

func (*ScreenshotClient) SendPacket

func (c *ScreenshotClient) SendPacket(pkt Packet) (err error)

type SimulateLocationClient

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

func NewSimulateLocationClient

func NewSimulateLocationClient(innerConn InnerConn) *SimulateLocationClient

func (*SimulateLocationClient) NewLocationPacket

func (c *SimulateLocationClient) NewLocationPacket(lon, lat float64, coordinateSystem CoordinateSystem) Packet

func (*SimulateLocationClient) Recover

func (c *SimulateLocationClient) Recover() error

Recover try to revert back

func (*SimulateLocationClient) SendPacket

func (c *SimulateLocationClient) SendPacket(pkt Packet) (err error)

type SpringBoardClient

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

func NewSpringBoardClient

func NewSpringBoardClient(innerConn InnerConn) *SpringBoardClient

func (*SpringBoardClient) InnerConn

func (c *SpringBoardClient) InnerConn() InnerConn

func (*SpringBoardClient) NewBinaryPacket

func (c *SpringBoardClient) NewBinaryPacket(req interface{}) (Packet, error)

func (*SpringBoardClient) NewXmlPacket

func (c *SpringBoardClient) NewXmlPacket(req interface{}) (Packet, error)

func (*SpringBoardClient) ReceivePacket

func (c *SpringBoardClient) ReceivePacket() (respPkt Packet, err error)

func (*SpringBoardClient) SendPacket

func (c *SpringBoardClient) SendPacket(pkt Packet) (err error)

type SyslogRelayClient

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

func NewSyslogRelayClient

func NewSyslogRelayClient(innerConn InnerConn) *SyslogRelayClient

func (*SyslogRelayClient) Close

func (c *SyslogRelayClient) Close()

func (*SyslogRelayClient) InnerConn

func (c *SyslogRelayClient) InnerConn() InnerConn

type TestmanagerdClient

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

func NewTestmanagerdClient

func NewTestmanagerdClient(innerConn InnerConn) *TestmanagerdClient

func (*TestmanagerdClient) Close

func (t *TestmanagerdClient) Close()

func (*TestmanagerdClient) Connection

func (t *TestmanagerdClient) Connection() (publishedChannels map[string]int32, err error)

func (*TestmanagerdClient) Invoke

func (t *TestmanagerdClient) Invoke(selector string, args *AuxBuffer, channelCode uint32, expectsReply bool) (result *DTXMessageResult, err error)

func (*TestmanagerdClient) MakeChannel

func (t *TestmanagerdClient) MakeChannel(channel string) (id uint32, err error)

func (*TestmanagerdClient) RegisterCallback

func (t *TestmanagerdClient) RegisterCallback(obj string, cb func(m DTXMessageResult))

type UsbmuxClient

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

func NewRemoteUsbmuxConn added in v0.7.0

func NewRemoteUsbmuxConn(conn net.Conn) (c *UsbmuxClient)

func NewUsbmuxClient

func NewUsbmuxClient(addr string, timeout ...time.Duration) (c *UsbmuxClient, err error)

func (*UsbmuxClient) Close

func (c *UsbmuxClient) Close()

func (*UsbmuxClient) InnerConn

func (c *UsbmuxClient) InnerConn() InnerConn

func (*UsbmuxClient) NewBasicRequest

func (c *UsbmuxClient) NewBasicRequest(msgType MessageType) *BasicRequest

func (*UsbmuxClient) NewConnectRequest

func (c *UsbmuxClient) NewConnectRequest(deviceID, port int) *ConnectRequest

func (*UsbmuxClient) NewDeletePairRecordRequest

func (c *UsbmuxClient) NewDeletePairRecordRequest(udid string) *DeletePairRecordRequest

func (*UsbmuxClient) NewPacket

func (c *UsbmuxClient) NewPacket(protoMsgType ProtoMessageType) Packet

func (*UsbmuxClient) NewPlistPacket

func (c *UsbmuxClient) NewPlistPacket(req interface{}) (Packet, error)

func (*UsbmuxClient) NewReadPairRecordRequest

func (c *UsbmuxClient) NewReadPairRecordRequest(udid string) *ReadPairRecordRequest

func (*UsbmuxClient) NewSavePairRecordRequest

func (c *UsbmuxClient) NewSavePairRecordRequest(udid string, deviceID int, data []byte) *SavePairRecordRequest

func (*UsbmuxClient) RawConn

func (c *UsbmuxClient) RawConn() net.Conn

func (*UsbmuxClient) ReceivePacket

func (c *UsbmuxClient) ReceivePacket() (respPkt Packet, err error)

func (*UsbmuxClient) SendPacket

func (c *UsbmuxClient) SendPacket(pkt Packet) (err error)

type WIRMessageKey

type WIRMessageKey string
const (
	WebInspectorServiceName               = "com.apple.webinspector"
	WIRFinalMessageKey      WIRMessageKey = "WIRFinalMessageKey"
	WIRPartialMessageKey    WIRMessageKey = "WIRPartialMessageKey"
)

type WebInspectorClient

type WebInspectorClient struct {
	MaxPlistLen int // 7586
	// contains filtered or unexported fields
}

func NewWebInspectorClient

func NewWebInspectorClient(innerConn InnerConn) *WebInspectorClient

func (*WebInspectorClient) NewXmlPacket

func (w *WebInspectorClient) NewXmlPacket(req interface{}) (Packet, error)

func (*WebInspectorClient) ReceivePacket

func (w *WebInspectorClient) ReceivePacket() (respPkt Packet, err error)

func (*WebInspectorClient) ReceiveWebkitMsg

func (w *WebInspectorClient) ReceiveWebkitMsg() (response interface{}, err error)

func (*WebInspectorClient) SendPacket

func (w *WebInspectorClient) SendPacket(pkt Packet) (err error)

func (*WebInspectorClient) SendWebkitMsg

func (w *WebInspectorClient) SendWebkitMsg(req interface{}) (err error)

func (*WebInspectorClient) SetPartialsSupported

func (w *WebInspectorClient) SetPartialsSupported(isCompleteSupported bool)

type XCTestConfiguration

type XCTestConfiguration struct {
	Contents map[string]interface{}
}

Jump to

Keyboard shortcuts

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