goadb/server_controller.go
2015-07-19 12:45:24 -07:00

17 lines
314 B
Go

package goadb
import (
"os/exec"
"github.com/zach-klippenstein/goadb/util"
)
/*
StartServer ensures there is a server running.
*/
func StartServer() error {
cmd := exec.Command("adb", "start-server")
err := cmd.Run()
return util.WrapErrorf(err, util.ServerNotAvailable, "error starting server: %s", err)
}