Skip to content

Tasker and ADB commands

zobnin edited this page Sep 19, 2024 · 12 revisions

AIO Launcher 2.7.0 introduced support for controlling launcher from other applications (for example, Tasker) and ADB. To enable this feature, open the Tasker section in the AIO settings.

It works like this: you send a broadcast intent with action ru.execbit.aiolauncher.COMMAND and the extra cmd var with command. For example, to open the application menu using ADB, do this:

adb shell am broadcast -a ru.execbit.aiolauncher.COMMAND --es cmd apps_menu

The same with Tasker (System - Send intent):

The following commands are available:

  • apps_menu:[style_or_script_name]
  • screen_off
  • screen_off_root
  • refresh
  • notify
  • search
  • dialer
  • camera
  • flashlight
  • voice
  • headers
  • fold
  • unfold
  • scroll_up
  • scroll_down
  • scroll_up_or_search
  • shortcuts
  • one_handed
  • add_note:[text]
  • add_task:[text]:[YYYY-MM-DD-HH-MM]
  • add_purchase:[amount][currency]:[comment]
  • private_mode
  • settings
  • ui_settings
  • quick_menu
  • theme:<name>
  • save_profile:<name>
  • restore_profile:<name>
  • iconpack:<package_name>
  • add_widget:<name>:[position]
  • remove_widget:<position>

Also, you can use the command interface to launch applications. Use a command in the following format:

cn:package.name/Activity.Name:PROFILE_ID

For example, to open the Settings app on the phone using ADB, execute the following console command:

adb shell am broadcast -a ru.execbit.aiolauncher.COMMAND --es cmd cn:com.android.settings/com.android.settings.MainSettings:0

The same command for Tasker:

cmd:cn:com.android.settings/com.android.settings.MainSettings:0

As you can see, 0 is the ID of the primary user. To get the package name and activity name of the desired app, you can use an app like Shortcut Maker.

To prevent third-party (malicious) applications from gaining the ability to control the launcher and write text to the widget, you can set a password to access the launcher. This password must be specified each time a command or text is sent:

adb shell am broadcast -a ru.execbit.aiolauncher.COMMAND --es cmd apps_menu --es password PASSWORD

AIO Launcher will send broadcast messages when certain events occur:

  • ru.execbit.aiolauncher.RESUMED - when the user returns to the launcher;
  • ru.execbit.aiolauncher.STOPPED - when the user leaves the launcher;
  • ru.execbit.aiolauncher.SEARCH_OPENED - when the user opens the search window;
  • ru.execbit.aiolauncher.SEARCH_CLOSED - when the user closes the search window;
  • ru.execbit.aiolauncher.DRAWER_OPENED - when the user opens the side menu;
  • ru.execbit.aiolauncher.DRAWER_CLOSED - when the user closes the side menu;
  • ru.execbit.aiolauncher.WIDGET_ADDED - when the user adds a widget (extra "name" contains the widget name);
  • ru.execbit.aiolauncher.WIDGET_REMOVED - when the user removes a widget (extra "name" contains the widget name).
Clone this wiki locally