docs: update hrp cmd docs

This commit is contained in:
lilong.129
2025-04-24 22:31:03 +08:00
parent 9473345ec9
commit 03c0d6ee42
47 changed files with 587 additions and 117 deletions

View File

@@ -57,5 +57,5 @@ func getAndroidDevices() (devices []*gadb.Device, err error) {
}
func init() {
androidRootCmd.AddCommand(listAndroidDevicesCmd)
CmdAndroidRoot.AddCommand(listAndroidDevicesCmd)
}

View File

@@ -9,7 +9,7 @@ import (
var serial string
var androidRootCmd = &cobra.Command{
var CmdAndroidRoot = &cobra.Command{
Use: "adb",
Short: "simple utils for android device management",
PersistentPreRun: func(cmd *cobra.Command, args []string) {},
@@ -22,7 +22,3 @@ func getDevice(serial string) (*uixt.AndroidDevice, error) {
}
return device, nil
}
func Init(rootCmd *cobra.Command) {
rootCmd.AddCommand(androidRootCmd)
}

View File

@@ -66,5 +66,5 @@ func init() {
installCmd.Flags().BoolVarP(&replace, "replace", "r", false, "replace existing application")
installCmd.Flags().BoolVarP(&downgrade, "downgrade", "d", false, "allow version code downgrade (debuggable packages only)")
installCmd.Flags().BoolVarP(&grant, "grant", "g", false, "grant all runtime permissions")
androidRootCmd.AddCommand(installCmd)
CmdAndroidRoot.AddCommand(installCmd)
}

View File

@@ -46,5 +46,5 @@ var screencapAndroidDevicesCmd = &cobra.Command{
func init() {
screencapAndroidDevicesCmd.Flags().StringVarP(&serial, "serial", "s", "", "filter by device's serial")
androidRootCmd.AddCommand(screencapAndroidDevicesCmd)
CmdAndroidRoot.AddCommand(screencapAndroidDevicesCmd)
}