devicetree

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Extract

func Extract(ipsw, destPath string) error

Extract extracts DeviceTree(s) from ipsw

func Parse

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

Parse parses plist files in a local ipsw file

func ParseZipFiles

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

ParseZipFiles parses DeviceTree in remote ipsw zip

Types

type DeviceTree

type DeviceTree map[string]Properties

DeviceTree object

func ParseImg3Data

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

ParseImg3Data parses a img4 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) 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
}

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 Properties

type Properties map[string]interface{}

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