# Extending an Interactive ADB 🔀

DevFeed: [Extending an Interactive ADB 🔀](<https://devfeed.tech/articles/extending-an-interactive-adb-26171.md>)

Original publisher: [Read original article](<https://zarah.dev/2023/09/21/adb-devices.html>)

Author: Zarah Dominguez

Published: 2023-09-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Zarah Dominguez](<https://devfeed.tech/sources/zarah-dominguez.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Script](<https://devfeed.tech/topics/script.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [commands](<https://devfeed.tech/tags/commands.md>), [devices](<https://devfeed.tech/tags/devices.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [script](<https://devfeed.tech/tags/script.md>), [usb](<https://devfeed.tech/tags/usb.md>)

## AI overview

This tutorial extends an interactive ADB script that helps choose among multiple attached devices when running commands. It addresses counting unauthorized devices and explores passing command stubs as arguments or making the script retrieve a serial number for reuse across commands.

## Source excerpt

A few weeks ago, I wrote about a script for making adb a little bit more interactive. The script makes the process of running an adb command much smoother if there are multiple devices attached by presenting a chooser. For example, when sending a deeplink: ➜ ~ deeplink https://zarah.dev Multiple devices found: 1 - R5CR7039LBJ 2 - emulator-5554 3 - emulator-5556 Select device: