package shell

func (d DeviceShell) pm(args ...string) ([]byte, error) {
	return d.RunSync("pm", args...)
}

// InstalledApps returns installed apps. See ParseInstalledApps
func (d DeviceShell) InstalledApps() ([]byte, error) {
	return d.pm("list", "packages")
}

// PackagePath returns path to package. See ParsePackagePath
func (d DeviceShell) PackagePath(pkgName string) ([]byte, error) {
	return d.pm("path", pkgName)
}

// ClearPackageData clears installed package's data
func (d DeviceShell) ClearPackageData(pkgName string) ([]byte, error) {
	return d.pm("clear", pkgName)
}
