Jump to content

adb workflow for Android developers

Recommended Posts

ADB or Android Debug Bridge is linked to Alfred with this workflow.




GitHub release | packal


GitHub release


I created this workflow because Android developers like me may need to connect to multiple devices at the same time, and it's painful to add `-s {serial}` every time when using adb for a simple feature.


Alfred Workflow is a great tool to show lists and options.


So here it is:







These dependencies are included in Android Studio and Android command line tools.




Add the following environment variables in workflow settings to support its functions


Name Value (example)
adb_path ~/Library/Android/sdk/platform-tools/adb
aapt_path ~/Library/Android/sdk/build-tools/28.0.3/aapt
emulator_path ~/Library/Android/sdk/tools/emulator




keyword `adb`


  •  To list all connected devices.
  • `adb connect`, `adb disconnect`, `adb reset` are also in this level. 
  • WiFi devices will be saved for next time quick connection


  • Select one devices for its operations
  • Input commands like "shell dumpsys -l | grep wifi" in this level, to execute directly in terminal


  • Select "Show app list" to list installed apk, select one for further operations including:
    • Open app info page
    •  force stop app
    •  launch app
    • clear data
    • uninstall
    • extract apk file to desktop


  • Select "Install apk" to search in local drive for apk files or folders to be (bulk) installed.
  • Currently installed version will be shown, and install operation "-t", "-d", "-g" are supported



keyword `apk`


  • Search local apk files with package info shown and install them on attached devices.


keyword `apkf`


  • List local apk files under current front Finder window.


keyword `avd`


  • List all installed Android emulators and start new emulators





Edited by zjn0505
Fix keyword typo

Share this post

Link to post

v 1.2.0 is out there.


With two new keywords "apk" and "avd", and improved adb WiFi connection history and app operation shortcuts.


"apk" can be used to search local apk files, with package info shown, and the file can be then installed onto attached devices.


"avd" can be used to list installed Android emulators, and start a new emulator instance with it.

Share this post

Link to post

v1.3.0 is out

  • Add modifiers for "Show app list", to quick launch, uninstall, clear data, force stop and show app info.
  • Add option to extract apk file from devices. "Show app list" -> select package -> "Extract apk file"
  • Add uid to necessary places for auto-sort to prioritize most used items.
  • Improve installation option suggestions, e.g. item of "add 'd' for version downgrade" only appears on necessary.
Edited by zjn0505
Fix typo

Share this post

Link to post

Pretty cool workflow!
One requirement if I may: Could you add a simple way of entering unicode text?
(`adb shell input text` with escaped input should work)

Share this post

Link to post
On 4/1/2019 at 4:14 PM, Petru said:

Pretty cool workflow!
One requirement if I may: Could you add a simple way of entering unicode text?
(`adb shell input text` with escaped input should work)


Hi Petru.


From my research, that we can't use `adb shell input text  {unicodes}` out of box, no matter how it is escaped.


Thus there are tools like this one to support unicode input via adb.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...