Android’s App Shortcuts let you jump directly to a specific function inside an app—think composing a new email, opening a favorite chat, or starting navigation to a saved address. By pinning these shortcuts to the home screen you get one‑tap access without opening the full app first. This not only saves time but also reduces battery use because the system doesn’t need to load the whole UI.
There are two ways to create shortcuts:
This tutorial covers both approaches, explains the underlying concepts, and provides troubleshooting tips for common pitfalls.
adb command‑line tool on your computer. The official Android SDK Platform‑Tools package works on Windows, macOS, and Linux.If the shortcut appears, you can now pin it to the home screen.
On some OEM skins (e.g., Samsung One UI), the long‑press menu may include a direct “Add shortcut to Home screen” option, skipping the extra drag step.
Android does not provide a universal UI for renaming shortcuts. However, many launchers (Nova, Lawnchair, etc.) let you edit the label:
To remove a shortcut, drag it to the Remove or Trash area that appears at the top or bottom of the screen.
Some apps expose shortcuts only through code, or you may want to create shortcuts for actions that the UI does not surface (e.g., opening a specific Settings page). ADB lets you create Intent‑based shortcuts directly.
The adb shell cmd shortcut command interacts with the system’s ShortcutManager. The basic syntax is:
adb shell cmd shortcut add <shortcut-id> <package-name> <activity-name> --label "<display‑name>" [--icon <resource-uri>] [--intent <intent-uri>]
Where:
<shortcut-id> – a unique string you choose (e.g., gmail_compose).<package-name> – the app’s package (e.g., com.google.android.gm).<activity-name> – the activity that will handle the intent (often the main activity).--label – the text shown on the home screen.--icon – optional URI to a custom icon; if omitted the system uses the app’s default icon.--intent – a full intent URI describing the action (e.g., android.intent.action.VIEW with extras).adb devices to confirm the device is listed.adb shell pm list packages | grep <app‑keyword> to find the exact package name. Example for Gmail:
adb shell pm list packages | grep gmail
com.google.android.gm), list its activities:
adb shell cmd package resolve-activity --brief com.google.android.gm
The output shows the default launch activity, typically com.google.android.gm.ConversationListActivityGmail.For Gmail’s compose action, the intent looks like:
intent:#Intent;action=android.intent.action.SENDTO;data=mailto:?subject=;end
Explanation:
action=android.intent.action.SENDTO tells Android to open a compose window.data=mailto:?subject= sets the scheme to mailto with an empty subject (you can pre‑fill if desired).adb shell cmd shortcut add gmail_compose com.google.android.gm com.google.android.gm.ConversationListActivityGmail \
--label "Compose Gmail" \
--intent "intent:#Intent;action=android.intent.action.SENDTO;data=mailto:?subject=;end"
Added shortcut [gmail_compose] in the terminal.Tip: Use the --icon flag to supply a custom PNG stored in /sdcard/. Example:
--icon "file:///sdcard/shortcut_icon.png"
Tap the newly placed shortcut. It should open the Gmail compose screen directly. If it opens the regular inbox, double‑check the intent URI and activity name.
android.settings.* actions. Example to open Wi‑Fi settings:
adb shell cmd shortcut add wifi_settings com.android.settings com.android.settings.Settings$WifiSettingsActivity \
--label "Wi‑Fi Settings" \
--intent "intent:#Intent;action=android.settings.WIFI_SETTINGS;end"
adb shell cmd shortcut add … lines in a .sh script and run it once to populate a suite of shortcuts (e.g., for a work profile).adb shell cmd shortcut delete gmail_compose
--intent URI is well‑formed. A missing ; or typo will cause the system to reject the shortcut.android:exported flag. If the target activity is not exported, the system cannot launch it from a shortcut.adb shell dumpsys shortcut to view all registered shortcuts and any error messages.file:// scheme and be readable by the system (store it in /sdcard/ or /data/local/tmp/).Shortcuts created via ADB are persisted, but some OEM launchers clean up unknown shortcuts on a fresh boot. If this happens:
Pinned app shortcuts are a low‑effort way to streamline daily Android tasks. By using the built‑in UI you can quickly add shortcuts for any app that already exposes them. When the UI falls short, ADB gives you fine‑grained control to create custom shortcuts for any activity or Settings page, even scripting them for multiple devices. Follow the preparation steps, use the command syntax carefully, and keep an eye on the troubleshooting tips to ensure your shortcuts stay functional and tidy.









