示例#1
0
文件: install.go 项目: xsacx/fdroidcl
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")
}
示例#2
0
文件: install.go 项目: xsacx/fdroidcl
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")
}
示例#3
0
文件: search.go 项目: xsacx/fdroidcl
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
}