Exemplo n.º 1
0
func installApk(device *adb.Device, apk *fdroidcl.Apk, path string) {
	fmt.Printf("Installing %s... ", apk.App.ID)
	if err := device.Install(path); err != nil {
		fmt.Println()
		log.Fatalf("Could not install %s: %v", apk.App.ID, err)
	}
	fmt.Println("done")
}
Exemplo n.º 2
0
func upgradeApk(device *adb.Device, apk *fdroidcl.Apk, path string) {
	fmt.Printf("Upgrading %s... ", apk.App.ID)
	if err := device.Upgrade(path); err != nil {
		fmt.Println()
		log.Fatalf("Could not upgrade %s: %v", apk.App.ID, err)
	}
	fmt.Println("done")
}
Exemplo n.º 3
0
func mustInstalled(device *adb.Device) map[string]adb.Package {
	if device == nil {
		return nil
	}
	inst, err := device.Installed()
	if err != nil {
		log.Fatalf("Could not get installed packages: %v", err)
	}
	return inst
}