id = "adb" name = "Android Debug Bridge" homepage = "https://developer.android.com/tools/adb" description = "Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device." icon = "SimpleIcons:android" executables = ["adb"] [dotfiles] # AOSP packages/modules/adb: client/auth.cpp get_user_key_path() returns # adb_get_android_dir_path() + "adbkey", and writes the public half to the # same path + ".pub"; adb_utils.cpp adb_get_android_dir_path() is # /.android. The private key is what a device's "allow USB debugging" # prompt trusts, so it is the credential. paths = ["~/.android/adbkey.pub"] secret = ["~/.android/adbkey"] # Emulator images, AVD definitions and the mDNS/USB state adb keeps beside # the key. exclude = [ "~/.android/avd/", "~/.android/cache/", "~/.android/build-cache/", ] [commands] format = 1 label = "Android Debug Bridge" description = "Talk to Android devices. Device selection flags apply to every subcommand; logcat, forwarding and server management are left out." quality = "ai-draft" base = "fig:adb" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/adb.ts" license = "MIT" [[commands.field]] id = "serial" label = "Device serial" description = "Target a specific device." type = "string" option = ["-s"] sources = ["fig"] [[commands.field]] id = "usb" label = "USB device only" type = "boolean" option = ["-d"] sources = ["fig"] [[commands.field]] id = "emulator" label = "Emulator (TCP/IP) only" type = "boolean" option = ["-e"] sources = ["fig"] [[commands.field]] id = "transport" label = "Transport id" type = "string" option = ["-t"] sources = ["fig"] [[commands.group]] id = "basic" label = "Basic" fields = ["serial", "usb", "emulator"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["transport"] [[commands.subcommand]] path = ["devices"] label = "List devices" description = "List connected devices." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/adb.ts" license = "MIT" [[commands.subcommand]] path = ["install"] label = "Install an APK" description = "Push a package to the device and install it. Fast-deploy and agent options are left out." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/adb.ts" license = "MIT" [[commands.subcommand.field]] id = "package" label = "APK file" type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "replace" label = "Replace existing app" type = "boolean" option = ["-r"] sources = ["fig"] [[commands.subcommand.field]] id = "test" label = "Allow test packages" type = "boolean" option = ["-t"] sources = ["fig"] [[commands.subcommand.field]] id = "downgrade" label = "Allow version downgrade" type = "boolean" option = ["-d"] sources = ["fig"] [[commands.subcommand.field]] id = "grant" label = "Grant all runtime permissions" type = "boolean" option = ["-g"] sources = ["fig"] [[commands.subcommand.task]] id = "install" label = "Install an APK" fields = ["package", "replace", "grant"] required = ["package"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["package", "replace", "test", "downgrade", "grant"] [[commands.subcommand]] path = ["push"] label = "Copy files to device" description = "Copy local files or directories to the device." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/adb.ts" license = "MIT" [[commands.subcommand.field]] id = "local" label = "Local files" type = "path" position = 0 multiple = true path = { kind = "any", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "remote" label = "Remote path" description = "Destination on the device, for example /sdcard/Download/." type = "string" position = 1 sources = ["fig"] [[commands.subcommand.field]] id = "sync" label = "Only newer files" type = "boolean" option = ["--sync"] sources = ["fig"] [[commands.subcommand.field]] id = "dry_run" label = "Dry run" type = "boolean" option = ["-n"] sources = ["fig"] [[commands.subcommand.task]] id = "push" label = "Push files" fields = ["local", "remote", "sync"] required = ["local", "remote"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["local", "remote"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["sync", "dry_run"] [[commands.subcommand]] path = ["pull"] label = "Copy files from device" description = "Copy files or directories from the device." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/adb.ts" license = "MIT" [[commands.subcommand.field]] id = "remote" label = "Remote paths" type = "string" position = 0 multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "local" label = "Local destination" type = "path" position = 1 path = { kind = "any", role = "output", must_exist = false } sources = ["fig"] [[commands.subcommand.field]] id = "preserve" label = "Preserve timestamp and mode" type = "boolean" option = ["-a"] sources = ["fig"] [[commands.subcommand.task]] id = "pull" label = "Pull files" fields = ["remote", "local", "preserve"] required = ["remote", "local"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["remote", "local", "preserve"] [[commands.subcommand]] path = ["shell"] label = "Run a shell command" description = "Run a command on the device, or open an interactive shell when none is given." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/adb.ts" license = "MIT" [[commands.subcommand.field]] id = "command" label = "Command" description = "Command and arguments; leave empty for an interactive shell." type = "string" position = 0 multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "no_stdin" label = "Do not read stdin" type = "boolean" option = ["-n"] sources = ["fig"] [[commands.subcommand.field]] id = "no_pty" label = "Disable pty allocation" type = "boolean" option = ["-T"] sources = ["fig"] [[commands.subcommand.task]] id = "shell" label = "Run a command" fields = ["command"] required = ["command"] [[commands.subcommand.task]] id = "interactive" label = "Interactive shell" fields = [] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["command"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["no_stdin", "no_pty"]