devicetree

package
v0.0.0-prerelease Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEncryptedDeviceTree = errors.New("encrypted device tree")

Functions

func DecryptIm4pData

func DecryptIm4pData(data, iv, key []byte) ([]byte, error)

func Extract

func Extract(ipsw, destPath string) error

Extract extracts DeviceTree(s) from ipsw

func Parse

func Parse(ipswPath string, keys ...string) (map[string]*DeviceTree, error)

Parse parses plist files in a local ipsw file

func ParseZipFiles

func ParseZipFiles(files []*zip.File, keys ...string) (dt map[string]*DeviceTree, err error)

ParseZipFiles parses DeviceTree in remote ipsw zip

Types

type DeviceTree

type DeviceTree map[string]Properties

DeviceTree object

func ParseData

func ParseData(r io.Reader) (*DeviceTree, error)

func ParseImg3Data

func ParseImg3Data(data []byte) (*DeviceTree, error)

ParseImg3Data parses a img3 data containing a DeviceTree

func ParseImg4Data

func ParseImg4Data(data []byte) (*DeviceTree, error)

ParseImg4Data parses a img4 data containing a DeviceTree

func (*DeviceTree) GetBoardConfig

func (dtree *DeviceTree) GetBoardConfig() (string, error)

GetBoardConfig returns the device-trees board config

func (*DeviceTree) GetModel

func (dtree *DeviceTree) GetModel() (string, error)

GetModel returns the device-trees model

func (*DeviceTree) GetProductName

func (dtree *DeviceTree) GetProductName() (string, error)

GetProductName returns the device-trees product names

func (*DeviceTree) String

func (dtree *DeviceTree) String() string

func (*DeviceTree) Summary

func (dtree *DeviceTree) Summary() (*Summary, error)

Summary prints out a summary of the DeviceTree

type Img4

type Img4 struct {
	IM4P     string
	Name     string
	Version  string
	Data     []byte
	KbagData []byte `asn1:"optional"`
}

Img4 DeviceTree object

type Node

type Node struct {
	NumProperties uint32 // Number of props[] elements (0 => end)
	NumChildren   uint32 // Number of children[] elements
}

Node object

type NodeProperty

type NodeProperty struct {
	Name   [32]byte // NUL terminated property name (max length 32)
	Length uint32   // Length (bytes) of folloing prop value
}

NodeProperty object

type PmapIORange

type PmapIORange struct {
	Start uint64
	Size  uint64
	Flags uint32
	Name  [4]byte
}

func (*PmapIORange) MarshalJSON

func (p *PmapIORange) MarshalJSON() ([]byte, error)

type Properties

type Properties map[string]any

Properties object

type Summary

type Summary struct {
	ProductName        string
	ProductDescription string
	ProductType        string
	BoardConfig        string
	SocName            string
	DeviceType         string
	SocGeneration      string
	CPUs               []dtCPU
	Timestamp          time.Time
}

Summary object

Jump to

Keyboard shortcuts

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