adb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearAppDataCmd

func ClearAppDataCmd(serial, pkg string) tea.Cmd

func DeleteFileCmd

func DeleteFileCmd(serial, path string) tea.Cmd

func ExecuteCommand

func ExecuteCommand(serial string, args ...string) ([]byte, error)

func FetchDeviceDetailsCmd

func FetchDeviceDetailsCmd(serial string) tea.Cmd

func ForceStopAppCmd

func ForceStopAppCmd(serial, pkg string) tea.Cmd

func FormatFileSize

func FormatFileSize(sizeStr string) string

func GetProperty

func GetProperty(serial, prop string) (string, error)

func GetSystemStatsCmd

func GetSystemStatsCmd(serial string) tea.Cmd

func LaunchAppCmd

func LaunchAppCmd(serial, pkg string) tea.Cmd

func ListAppsCmd

func ListAppsCmd(serial string) tea.Cmd

func ListDevicesCmd

func ListDevicesCmd() tea.Cmd

func ListFilesCmd

func ListFilesCmd(serial, path string) tea.Cmd

func NextLogcatLineCmd

func NextLogcatLineCmd(s *LogcatSession) tea.Cmd

func PairWirelessCmd

func PairWirelessCmd(addr, port, pin string) tea.Cmd

func ParseLines

func ParseLines(data []byte) []string

func PullFileCmd

func PullFileCmd(serial, remotePath, localPath string) tea.Cmd

func PushFileCmd

func PushFileCmd(serial, localPath, remotePath string) tea.Cmd

func RebootBootloaderCmd

func RebootBootloaderCmd(serial string) tea.Cmd

func RebootCmd

func RebootCmd(serial string) tea.Cmd

func RebootRecoveryCmd

func RebootRecoveryCmd(serial string) tea.Cmd

func StartLogcatCmd

func StartLogcatCmd(serial string) tea.Cmd

func StartScrcpyCmd

func StartScrcpyCmd(serial string) tea.Cmd

func ToggleScreenCmd

func ToggleScreenCmd(serial string) tea.Cmd

func ToggleWifiCmd

func ToggleWifiCmd(serial string) tea.Cmd

func UninstallAppCmd

func UninstallAppCmd(serial, pkg string) tea.Cmd

Types

type App

type App struct {
	PackageName string
	APKPath     string
	IsSystem    bool
}

func ParseApps

func ParseApps(output []byte) []App

type AppActionErrorMsg

type AppActionErrorMsg struct {
	Action string
	Error  error
}

type AppActionResultMsg

type AppActionResultMsg struct {
	Action string
}

type AppsLoadErrorMsg

type AppsLoadErrorMsg struct {
	Error error
}

type AppsLoadedMsg

type AppsLoadedMsg struct {
	Apps []App
}

type Device

type Device struct {
	Serial  string
	Model   string
	State   string
	Android string
}

func (*Device) DisplayName

func (d *Device) DisplayName() string

func (*Device) IsConnected

func (d *Device) IsConnected() bool

type DeviceActionErrorMsg

type DeviceActionErrorMsg struct {
	Action string
	Error  error
}

type DeviceActionResultMsg

type DeviceActionResultMsg struct {
	Action string
}

type DeviceDetails

type DeviceDetails struct {
	BatteryLevel  string
	BatteryStatus string
	StorageUsed   string
	StorageTotal  string
	ScreenSize    string
	ScreenDensity string
	IPAddress     string
}

type DeviceDetailsMsg

type DeviceDetailsMsg struct {
	Details DeviceDetails
	Error   error
}

type DevicesLoadedMsg

type DevicesLoadedMsg struct {
	Devices []Device
	Error   error
}

type FileActionResultMsg

type FileActionResultMsg struct {
	Action string
	Error  error
}

type FileEntry

type FileEntry struct {
	Name        string
	Path        string
	IsDir       bool
	Size        string
	Permissions string
}

type FilesLoadedMsg

type FilesLoadedMsg struct {
	Path  string
	Files []FileEntry
	Error error
}

type LogcatErrorMsg

type LogcatErrorMsg struct {
	Error error
}

type LogcatLineMsg

type LogcatLineMsg struct {
	Line string
}

type LogcatSession

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

type LogcatStartedMsg

type LogcatStartedMsg struct {
	Session *LogcatSession
}

type LogcatStoppedMsg

type LogcatStoppedMsg struct{}

type PairWirelessResultMsg

type PairWirelessResultMsg struct {
	Error error
}

type SystemStats

type SystemStats struct {
	// CPU counters (jiffies)
	CPUTotal uint64
	CPUIdle  uint64

	// Memory info (kB)
	MemTotal     uint64
	MemUsed      uint64 // Total - Available
	MemAvailable uint64 // MemFree + Buffers + Cached (approx)

	// Network counters (bytes) - usually for wlan0 or total
	NetRxBytes uint64
	NetTxBytes uint64
}

SystemStats holds raw counters from /proc files. The UI layer is responsible for calculating rates/percentages by comparing with previous samples.

type SystemStatsMsg

type SystemStatsMsg struct {
	Stats SystemStats
	Error error
}

Jump to

Keyboard shortcuts

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