Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Close()
- func (c *Client) Download(src string, dst io.Writer) error
- func (c *Client) EnsureHelper() (string, error)
- func (c *Client) Exists(path string) bool
- func (c *Client) FindInstalled(appDirName string) (string, error)
- func (c *Client) FindInstalledByBundleID(bundleID string) (string, error)
- func (c *Client) HashFile(target string) (string, error)
- func (c *Client) Install(appinstPath, ipaRemote string) error
- func (c *Client) InstalledVersion(bundlePath string) (string, error)
- func (c *Client) LocateAppSync() (string, error)
- func (c *Client) LocateAppinst() (string, error)
- func (c *Client) LocateBinary(name string) (string, error)
- func (c *Client) Mkdir(path string) error
- func (c *Client) Probe() (ProbeResult, error)
- func (c *Client) Remove(path string) error
- func (c *Client) Run(cmd string) (string, string, int, error)
- func (c *Client) RunHelper(helperPath, bundleID, bundlePath, outIPA string, onEvent EventHandler, ...) (string, string, int, error)
- func (c *Client) RunSudo(cmd string) (string, string, int, error)
- func (c *Client) RunSudoStream(cmd string, stdoutW, stderrW io.Writer) (string, string, int, error)
- func (c *Client) Stat(p string) (os.FileInfo, error)
- func (c *Client) Upload(src io.Reader, dst string, mode os.FileMode) error
- func (c *Client) VerifyHelper(helperPath string) error
- type Event
- type EventHandler
- type ProbeResult
Constants ¶
const RemoteRoot = "/var/mobile/Media/ipadecrypt"
Variables ¶
var ErrSudoPasswordRejected = errors.New("sudo password rejected")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Download ¶
Download streams the remote file at src into dst. Caller owns dst (open, close, atomic rename if needed). Wrap dst for progress.
func (*Client) EnsureHelper ¶
func (*Client) FindInstalled ¶
FindInstalled locates an installed app bundle directory by its .app name. Installed apps live under /var/containers/Bundle/Application/<uuid>/X.app on rootful and rootless setups alike. Requires sudo because /var/containers is readable only by _installd + root.
func (*Client) FindInstalledByBundleID ¶ added in v0.5.0
FindInstalledByBundleID returns the first installed .app whose Info.plist contains bundleID
func (*Client) HashFile ¶ added in v0.3.0
HashFile computes the sha256 of a path on-device. Installed bundles under /var/containers are readable only by root + _installd, hence sudo. Relies on a `shasum` binary being on PATH (procursus/dopamine/palera1n all ship it at /var/jb/usr/bin/shasum).
func (*Client) InstalledVersion ¶ added in v0.4.0
InstalledVersion reads CFBundleShortVersionString (falling back to CFBundleVersion) from an installed app bundle's Info.plist.
func (*Client) LocateAppSync ¶
func (*Client) LocateAppinst ¶
func (*Client) Probe ¶
func (c *Client) Probe() (ProbeResult, error)
func (*Client) RunHelper ¶
func (c *Client) RunHelper(helperPath, bundleID, bundlePath, outIPA string, onEvent EventHandler, humanFallback io.Writer) (string, string, int, error)
RunHelper spawns the on-device helper for a bundle. bundleID goes to the SpringBoard SBS SPI (only accepted for the main app; empty string skips the main-app pass and just decrypts PlugIns/*.appex + Extensions/*.appex).
func (*Client) RunSudoStream ¶
func (*Client) VerifyHelper ¶
VerifyHelper is a best-effort sanity: invoke the helper with no args; it should exit 2 with a usage string we can recognize. Catches common issues (binary not executable, sudo denied, missing codesign).
type Event ¶
func ParseEvent ¶
ParseEvent parses "@evt event=foo key=value ..." lines. Values may be double-quoted to allow spaces. Returns (_, false) for non-event lines.
type EventHandler ¶
type EventHandler func(Event)