Skip to main content
Glama
adb_expose_start.go805 B
package cmd import ( "fmt" "github.com/babelcloud/gbox/packages/cli/internal/adb_expose" "github.com/spf13/cobra" ) // ExecuteAdbExpose runs the adb-expose logic using the new client-server architecture func ExecuteAdbExpose(cmd *cobra.Command, opts *AdbExposeOptions, args []string) error { if opts.BoxID == "" && len(args) > 0 { opts.BoxID = args[0] } if opts.BoxID == "" { return fmt.Errorf("box ID is required. Usage: gbox adb-expose start <box_id>") } // Determine local port to use localPort := opts.LocalPort if localPort == 0 { localPort = 5555 // Default port } // ADB always uses port 5555 on the remote side remotePort := 5555 // Use the new client-server architecture return adb_expose.StartCommand(opts.BoxID, []int{localPort}, []int{remotePort}, opts.Foreground) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/babelcloud/gru-sandbox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server