Documentation
¶
Index ¶
- func AppDetailsCmd(serial, pkg, apkPath string) tea.Cmd
- func ClearAppDataCmd(serial, pkg string) tea.Cmd
- func DefaultSaveDir() string
- func DeleteFileCmd(serial, path string) tea.Cmd
- func EnsureAvailable() error
- func ExecuteCommand(serial string, args ...string) ([]byte, error)
- func ExtractApkCmd(serial, apkPath, pkg string) tea.Cmd
- func FetchBatteryThermalCmd(serial string) tea.Cmd
- func FetchDeviceDetailsCmd(serial string) tea.Cmd
- func ForceStopAppCmd(serial, pkg string) tea.Cmd
- func FormatFileSize(sizeStr string) string
- func ForwardPortCmd(serial, local, remote string) tea.Cmd
- func GetProperty(serial, prop string) (string, error)
- func GetSystemStatsCmd(serial string) tea.Cmd
- func InstallAppCmd(serial, localApkPath string) tea.Cmd
- func LaunchAppCmd(serial, pkg string) tea.Cmd
- func ListAppsCmd(serial string) tea.Cmd
- func ListDevicesCmd() tea.Cmd
- func ListFilesCmd(serial, path string) tea.Cmd
- func ListPortForwardsCmd(serial string) tea.Cmd
- func MakeDirCmd(serial, path string) tea.Cmd
- func NextLogcatLineCmd(s *LogcatSession) tea.Cmd
- func PairWirelessCmd(addr, port, pin string) tea.Cmd
- func ParseLines(data []byte) []string
- func PullFileCmd(serial, remotePath, localPath string) tea.Cmd
- func PushFileCmd(serial, localPath, remotePath string) tea.Cmd
- func RebootBootloaderCmd(serial string) tea.Cmd
- func RebootCmd(serial string) tea.Cmd
- func RebootRecoveryCmd(serial string) tea.Cmd
- func RemoveForwardCmd(serial, local string) tea.Cmd
- func ResolvePidCmd(serial, pkg string) tea.Cmd
- func ReversePortCmd(serial, remote, local string) tea.Cmd
- func SaveLogcatCmd(lines []string) tea.Cmd
- func ScreenshotCmd(serial string) tea.Cmd
- func SendBroadcastCmd(serial, action, extras string) tea.Cmd
- func SendIntentCmd(serial, action, dataURI, extras string) tea.Cmd
- func SendKeyEventCmd(serial string, keycode int) tea.Cmd
- func SendTextCmd(serial, text string) tea.Cmd
- func StartLogcatCmd(serial, pid string) tea.Cmd
- func StartScrcpyCmd(serial string) tea.Cmd
- func StartScreenRecordCmd(serial string) tea.Cmd
- func StopScreenRecordCmd(s *ScreenRecordSession) tea.Cmd
- func TimestampedName(prefix, ext string) string
- func ToggleScreenCmd(serial string) tea.Cmd
- func ToggleWifiCmd(serial string) tea.Cmd
- func UninstallAppCmd(serial, pkg string) tea.Cmd
- type App
- type AppActionErrorMsg
- type AppActionResultMsg
- type AppDetails
- type AppDetailsMsg
- type AppsLoadErrorMsg
- type AppsLoadedMsg
- type BatteryThermal
- type BatteryThermalMsg
- type CaptureResultMsg
- type Device
- type DeviceActionErrorMsg
- type DeviceActionResultMsg
- type DeviceDetails
- type DeviceDetailsMsg
- type DevicesLoadedMsg
- type FileActionResultMsg
- type FileEntry
- type FilesLoadedMsg
- type InputResultMsg
- type IntentErrorMsg
- type IntentResultMsg
- type LogcatErrorMsg
- type LogcatLineMsg
- type LogcatSavedMsg
- type LogcatSession
- type LogcatStartedMsg
- type LogcatStoppedMsg
- type PairWirelessResultMsg
- type PidResolvedMsg
- type PortActionErrorMsg
- type PortActionResultMsg
- type PortForward
- type PortsLoadErrorMsg
- type PortsLoadedMsg
- type ScreenRecordSession
- type ScreenRecordStartedMsg
- type SystemStats
- type SystemStatsMsg
- type ThermalZone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppDetailsCmd ¶ added in v0.2.0
AppDetailsCmd fetches version/target-sdk from dumpsys and the APK size for one package. Issued lazily for the selected app only.
func ClearAppDataCmd ¶
func DefaultSaveDir ¶ added in v0.2.0
func DefaultSaveDir() string
DefaultSaveDir is where host-side files (screenshots, recordings, pulled files, logcat dumps, extracted APKs) are written: ~/Downloads when it exists, otherwise the home directory, falling back to the working directory. Built with filepath so it is correct on Windows, macOS, and Linux.
func DeleteFileCmd ¶
func EnsureAvailable ¶ added in v0.2.0
func EnsureAvailable() error
EnsureAvailable reports whether the adb binary can be found on PATH.
func ExtractApkCmd ¶ added in v0.2.0
ExtractApkCmd pulls an installed app's base APK to the host.
func FetchBatteryThermalCmd ¶ added in v0.2.0
func FetchDeviceDetailsCmd ¶
func ForceStopAppCmd ¶
func FormatFileSize ¶
func ForwardPortCmd ¶ added in v0.2.0
func GetProperty ¶
func GetSystemStatsCmd ¶
func InstallAppCmd ¶ added in v0.2.0
func LaunchAppCmd ¶
func ListAppsCmd ¶
func ListDevicesCmd ¶
func ListFilesCmd ¶
func ListPortForwardsCmd ¶ added in v0.2.0
func MakeDirCmd ¶ added in v0.2.0
func NextLogcatLineCmd ¶
func NextLogcatLineCmd(s *LogcatSession) tea.Cmd
func PairWirelessCmd ¶
func ParseLines ¶
func PullFileCmd ¶
func PushFileCmd ¶
func RebootBootloaderCmd ¶
func RebootRecoveryCmd ¶
func RemoveForwardCmd ¶ added in v0.2.0
func ResolvePidCmd ¶ added in v0.2.0
ResolvePidCmd resolves a package name to its (single) running PID.
func ReversePortCmd ¶ added in v0.2.0
func SaveLogcatCmd ¶ added in v0.2.0
SaveLogcatCmd writes the given lines to a timestamped file in the default save dir.
func ScreenshotCmd ¶ added in v0.2.0
ScreenshotCmd grabs a screenshot via `exec-out screencap -p`, which streams the raw PNG to stdout — avoiding the CRLF corruption shell redirection causes on Windows.
func SendBroadcastCmd ¶ added in v0.2.0
func SendIntentCmd ¶ added in v0.2.0
func SendTextCmd ¶ added in v0.2.0
func StartLogcatCmd ¶
StartLogcatCmd starts a logcat stream. When pid is non-empty the stream is limited to that process via --pid.
func StartScrcpyCmd ¶
func StartScreenRecordCmd ¶ added in v0.2.0
StartScreenRecordCmd launches screenrecord on the device, writing to /sdcard. The process is long-running and held in the returned session until stopped.
func StopScreenRecordCmd ¶ added in v0.2.0
func StopScreenRecordCmd(s *ScreenRecordSession) tea.Cmd
StopScreenRecordCmd interrupts the recording so the file is finalized, pulls it to the host, then removes the on-device copy.
func TimestampedName ¶ added in v0.2.0
TimestampedName builds a filename like "screenshot-20060102-150405.png".
func ToggleScreenCmd ¶
func ToggleWifiCmd ¶
func UninstallAppCmd ¶
Types ¶
type AppActionErrorMsg ¶
type AppActionResultMsg ¶
type AppActionResultMsg struct {
Action string
}
type AppDetails ¶ added in v0.2.0
type AppDetailsMsg ¶ added in v0.2.0
type AppDetailsMsg struct {
Pkg string
Details AppDetails
Error error
}
type AppsLoadErrorMsg ¶
type AppsLoadErrorMsg struct {
Error error
}
type AppsLoadedMsg ¶
type AppsLoadedMsg struct {
Apps []App
}
type BatteryThermal ¶ added in v0.2.0
type BatteryThermalMsg ¶ added in v0.2.0
type BatteryThermalMsg struct {
Data BatteryThermal
Error error
}
type CaptureResultMsg ¶ added in v0.2.0
type DeviceActionErrorMsg ¶
type DeviceActionResultMsg ¶
type DeviceActionResultMsg struct {
Action string
}
type DeviceDetails ¶
type DeviceDetailsMsg ¶
type DeviceDetailsMsg struct {
Details DeviceDetails
Error error
}
type DevicesLoadedMsg ¶
type FileActionResultMsg ¶
type FilesLoadedMsg ¶
type InputResultMsg ¶ added in v0.2.0
type InputResultMsg struct {
Error error
}
type IntentErrorMsg ¶ added in v0.2.0
type IntentErrorMsg struct {
Error error
}
type IntentResultMsg ¶ added in v0.2.0
type IntentResultMsg struct {
Output string
}
type LogcatErrorMsg ¶
type LogcatErrorMsg struct {
Session *LogcatSession
Error error
}
type LogcatLineMsg ¶
type LogcatLineMsg struct {
Session *LogcatSession
Line string
}
Line/Stopped/Error messages carry the session they came from so the UI can ignore stale output after the stream is restarted with a new filter.
type LogcatSavedMsg ¶ added in v0.2.0
type LogcatSession ¶
type LogcatSession struct {
// contains filtered or unexported fields
}
func (*LogcatSession) Stop ¶ added in v0.2.0
func (s *LogcatSession) Stop() error
type LogcatStartedMsg ¶
type LogcatStartedMsg struct {
Session *LogcatSession
}
type LogcatStoppedMsg ¶
type LogcatStoppedMsg struct {
Session *LogcatSession
}
type PairWirelessResultMsg ¶
type PairWirelessResultMsg struct {
Error error
}
type PidResolvedMsg ¶ added in v0.2.0
type PortActionErrorMsg ¶ added in v0.2.0
type PortActionResultMsg ¶ added in v0.2.0
type PortActionResultMsg struct {
Action string
}
type PortForward ¶ added in v0.2.0
type PortsLoadErrorMsg ¶ added in v0.2.0
type PortsLoadErrorMsg struct {
Error error
}
type PortsLoadedMsg ¶ added in v0.2.0
type PortsLoadedMsg struct {
Ports []PortForward
}
type ScreenRecordSession ¶ added in v0.2.0
type ScreenRecordSession struct {
// contains filtered or unexported fields
}
type ScreenRecordStartedMsg ¶ added in v0.2.0
type ScreenRecordStartedMsg struct {
Session *ScreenRecordSession
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
}