Help us shape the future of Go! Take the 2026 Go Developer Survey

tss

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTSSResponse

func GetTSSResponse(conf *Config) ([]byte, error)

func Personalize

func Personalize(conf *PersonalConfig) ([]byte, error)

Personalize returns a personalized TSS blob

Types

type Blob

type Blob struct {
	ServerVersion    string `plist:"@ServerVersion,omitempty"`
	ApImg4Ticket     []byte `plist:"ApImg4Ticket,omitempty"`
	BBTicket         []byte `plist:"BBTicket,omitempty"`
	BasebandFirmware struct {
		MiscHashTableBodyBlob        []byte `plist:"Misc-HashTableBody-Blob,omitempty"`
		RestoreSbl1HashTableBodyBlob []byte `plist:"RestoreSBL1-HashTableBody-Blob,omitempty"`
		Sbl1HashTableBodyBlob        []byte `plist:"SBL1-HashTableBody-Blob,omitempty"`
	}
	EUICCTicket []byte `plist:"eUICC,Ticket,omitempty"`
}

Blob is the TSS response blob with ApImg4Ticket

type Config

type Config struct {
	Device          string
	Version         string
	Build           string
	ApNonce         []byte
	SepNonce        []byte
	ECID            uint64
	Image4Supported bool
	Proxy           string
	Insecure        bool
}

type PersonalConfig

type PersonalConfig struct {
	Proxy         string
	Insecure      bool
	PersonlID     map[string]any
	BuildManifest *info.BuildManifest
	Nonce         string
}

PersonalConfig is the config for personalizing a TSS blob

type Request

type Request struct {
	ApImg4Ticket              bool   `plist:"@ApImg4Ticket,omitempty"`
	BBTicket                  bool   `plist:"@BBTicket,omitempty"`
	HostPlatformInfo          string `plist:"@HostPlatformInfo,omitempty"`
	Locality                  string `plist:"@Locality,omitempty"`
	VersionInfo               string `plist:"@VersionInfo,omitempty"` // = libauthinstall-850.0.1.0.1 (/usr/lib/libauthinstall.dylib)
	ApBoardID                 uint64 `plist:"ApBoardID,omitempty"`
	ApChipID                  uint64 `plist:"ApChipID,omitempty"`
	ApECID                    uint64 `plist:"ApECID,omitempty"`
	ApNonce                   []byte `plist:"ApNonce,omitempty"`
	ApProductionMode          bool   `plist:"ApProductionMode,omitempty"`
	ApSecurityDomain          int    `plist:"ApSecurityDomain,omitempty"` // = 1
	ApSecurityMode            bool   `plist:"ApSecurityMode,omitempty"`
	ApSupportsImg4            bool   `plist:"ApSupportsImg4,omitempty"`
	PearlCertificationRootPub []byte `plist:"PearlCertificationRootPub,omitempty"`
	UniqueBuildID             []byte `plist:"UniqueBuildID,omitempty"`
	SepNonce                  []byte `plist:"SepNonce,omitempty"`
	UID_MODE                  bool   `plist:"UID_MODE"`
	UUID                      string `plist:"@UUID,omitempty"`
	// Personalize
	LoadableTrustCache info.IdentityManifest `plist:"LoadableTrustCache,omitempty"`
	PersonalizedDMG    info.IdentityManifest `plist:"PersonalizedDMG,omitempty"`
}

Request is the request sent to the TSS server

type Response

type Response struct {
	Status  int
	Message string
	Plist   string
}

Response is the response from the TSS server

Jump to

Keyboard shortcuts

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