goadb/server_controller.go

20 lines
371 B
Go
Raw Normal View History

2015-07-11 21:32:04 +00:00
package goadb
2015-07-12 06:18:58 +00:00
import (
"os/exec"
"github.com/zach-klippenstein/goadb/util"
)
2015-07-11 21:32:04 +00:00
/*
StartServer ensures there is a server running.
Currently implemented by just running
adb start-server
*/
func StartServer() error {
cmd := exec.Command("adb", "start-server")
2015-07-12 06:18:58 +00:00
err := cmd.Run()
return util.WrapErrorf(err, util.ServerNotAvailable, "error starting server: %s", err)
2015-07-11 21:32:04 +00:00
}