Appearance
ADB intent and deep link builder
In short: The ADB intent builder writes adb shell am start and am broadcast commands. Choose a deep link, an activity or a broadcast, add the action, data, package or component, flags and typed extras, and copy a command quoted for both the phone's shell and yours, in bash, PowerShell or Command Prompt. It writes commands only; nothing runs until you paste one.
MIME type, categories and flags
Command
adb shell am start -W -a android.intent.action.VIEW -d "'https://example.com/products/42?ref=adb&utm=test'" com.example.shop- With the package, Android opens the link in that app only; leave it out to see which app Android picks, or its chooser.
- An https link opens your app straight away only when it is a verified App Link; otherwise Android may show a chooser or the browser.
- -W waits until the screen has started and prints the result and timings, such as TotalTime; "Error: Activity not started" means no activity matched.
Which app would open the link (pm resolve-activity)
adb shell pm resolve-activity --brief -a android.intent.action.VIEW -d "'https://example.com/products/42?ref=adb&utm=test'"The app’s verified App Links, Android 12 and newer (pm get-app-links)
adb shell pm get-app-links com.example.shopAsk Android to verify them again (pm verify-app-links)
adb shell pm verify-app-links --re-verify com.example.shopThe builder writes commands; nothing runs until you paste one into your terminal. Nothing you type leaves your browser.
Checking the same links on a shelf of phones? BenchFleet shows every connected phone on one screen with one-click control. On Pro, workflows run checks on many phones at once or on a schedule, and every run keeps a timeline of screenshots. See testing apps on real phones and workflows and schedules.
Free for up to 3 phones, with no account. Pro adds workflows, schedules and AI for up to 25 phones from £12 a month + VAT.
How to use it
- Choose what to send. Open a deep link fills in the
VIEWaction for you; Start an activity opens a screen by its component or action; Send a broadcast reaches a receiver. - Name the app. For a deep link, the package makes Android open the link in that app only, which tests your intent filter directly. Leave it out to see what a tap on the link would do.
- Add extras if the screen reads them: each has a type (
--estext,--eiint,--eztrue or false and so on), a key and a value. The builder checks the value against the type before it writes the command. - Pick the phone and your shell, then copy the command. With Open a deep link, the builder also writes commands that show which app would handle the link and the app's verified App Links.
Examples
Open a product page in the app, wait for it and print the launch time:
bash
adb shell am start -W -a android.intent.action.VIEW -d "'https://example.com/products/42?ref=adb&utm=test'" com.example.shopThe inner single quotes are for the phone's shell, the outer double quotes for bash; without them, the phone would cut the link at & and run the rest as a second command. In PowerShell the same command reads:
powershell
adb shell am start -W -a android.intent.action.VIEW -d '''https://example.com/products/42?ref=adb&utm=test''' com.example.shopStart a screen directly with two extras, after force-stopping the app:
bash
adb shell am start -W -S -n com.example.shop/.ProductActivity --ei product_id 42 --es source "'adb test'"Send your app a broadcast, named by its package as Android 8 and newer need for receivers in the manifest:
bash
adb shell am broadcast -a com.example.shop.ACTION_REFRESH --ez full true -p com.example.shopReading the result
| Output | What it means |
|---|---|
Status: ok and LaunchState: COLD | The screen started; with -W, TotalTime is the launch time in milliseconds |
Warning: Activity not started, intent has been delivered to currently running top-most instance | The screen was already on top and got the intent there (see --activity-single-top) |
Error: Activity not started, unable to resolve Intent | No activity matches: check the scheme, host, path, package and that the app is installed |
SecurityException: Permission Denial | The activity is not exported, or a protected broadcast was refused |
Broadcast completed: result=0 | The broadcast was sent; it says nothing about whether a receiver got it |
Android's own pages explain the parts: the intent arguments of am, testing deep links and verifying App Links.
Windows shells
- PowerShell keeps everything inside single quotes as it is; a single quote inside is doubled. Windows PowerShell 5.1 drops double quotes it passes to programs such as adb, so the builder asks you to leave them out of values there.
- Command Prompt keeps
&,|,<,>and^literal inside double quotes, which is how the builder writes values. It still expands%NAME%there, so values with%or"need PowerShell or bash.
For other adb commands, such as installs, screenshots and logcat, use the ADB command builder; the mobile app testing checklist lists the checks around deep links, permissions and interruptions.
Questions
How do I test a deep link with adb?
Run adb shell am start -W -a android.intent.action.VIEW -d followed by the link in quotes and, optionally, the app's package. The builder writes it with the quoting your shell needs, so links with & and ? reach the phone intact.
Why do I get "Error: Activity not started, unable to resolve Intent"?
No activity on the phone matches the intent. Check the link's scheme and host against the app's intent filters, that the app is installed, and the package name; pm resolve-activity shows which app, if any, would open the link.
Why does my link need two sets of quotes?
adb shell joins its arguments into one line that the phone's shell reads again. A value with spaces, & or ? is quoted once for the phone and once more for your own shell, which is what the builder does for you.
Can I send BOOT_COMPLETED or other system broadcasts?
No. Android protects system broadcasts such as BOOT_COMPLETED, and the shell gets a SecurityException. Test a receiver with your own action, or by causing the event, for example by restarting the phone.
Does the builder run the command or send my links anywhere?
No. It writes the command in your browser and sends and stores nothing; nothing leaves your browser, and nothing runs until you paste the command into your own terminal.
Does it work on emulators?
Yes. Emulators take the same am commands; choose One phone by serial number and give one such as emulator-5554 when several are connected.
Start with the Free plan
Free for up to 3 phones, with no account. Pro adds workflows, schedules and AI for up to 25 phones from £12 a month + VAT.
- A Free plan with no time limit and no account
- Starts in Local mode, with no telemetry or analytics in the app