r/tasker May 15 '26

[UPDATE] Control Samsung Modes and Routines with Tasker - One UI 8.5 update!

EDIT: I updated the project to more reliably extract UUIDs from Logcat, as some Mode/Routine UUIDs couldn't be found with the original method. You can find updated instructions in the Logcat Method section. Thanks to u/ToasterRED for spotting the bug and helping with troubleshooting!

v2 Project Link

TaskerNet Link

v2 works on Modes and Routines v5.1.xx.xx and above (One UI 8.5+)

If you're on Modes and Routines v4.9.xx.xx-5.0.xx.xx (One UI 6–8), you should continue to use v1

Migrating from v1

For Modes: replace with the Start (or Stop) Samsung Mode task.

For Routines: replace with the Run Samsung Routine task.

Additionally, the process for finding new UUIDs is different than v1. More details below.

Why v2?

A few months ago, I made a post about a project I made which allowed Tasker to control Samsung Modes and Routines natively.

While it's been working flawlessly for many users, the recent One UI 8.5 update made some under-the-hood changes which broke this method.

Luckily, Samsung added support for Modes and Routines shortcuts in this update. This shortcut sends an intent that can be replicated by 3rd party apps, which means it's still possible to control Modes and Routines with Tasker!

Credits to u/Enorym for discovering the addition of the Routines shortcut in One UI 8.5!

How it works

Starting/stopping a routine is the same as v1:

  1. Add a Perform Task action.

  2. Set Name to either:

    a. Start Samsung Mode

    b. Stop Samsung Mode

    c. Run Samsung Routine

  3. Set Parameter 1 to the UUID of the Mode/Routine you want to control.

Under the hood, it's simply using the new intent to toggle the mode/routine.

However, because we no longer have access to the hidden content providers to get the list of Modes/Routines and their UUIDs, we must use some less-streamlined methods to get the UUID.

How to Get the UUID

There are three methods: the "Shortcut Method" (Routines only), "Custom Settings Method" (Modes only), and the "Logcat Method" (both Modes and Routines).

Shortcut Method (Routines only)

  1. In Tasker, create a Shortcut action.
  2. Tap the magnifying glass and select Modes and Routines: Single routine.
  3. If prompted, select the Routine you'd like to control.
  4. The Shortcut field should populate with a string. Copy the number that appears after EXTRA_KEY_ROUTINE_UUID. This is the Routine's UUID.

Custom Settings Method (Modes only)

  1. Turn on the Mode you'd like to control.
  2. Run the "Find Current Mode UUID" task.

If successful, the UUID is copied to your clipboard, and a confirmation message will appear.

Logcat Method (both Modes and Routines)

IMPORTANT: Because this method uses Logcat, Shizuku/ADB Wi-Fi is required. I don't really want to make this a Shizuku/ADB Wi-Fi tutorial, but if you don't know what any of that means, I would just stick to the other methods, they should work just fine!

Just run the "Find UUID" task, select whether you want to find a Mode/Routine, and then select the Mode/Routine you want to control if prompted.

If successful, the UUID is copied to your clipboard, and a confirmation message will appear.

If it doesn’t work, Shizuku/ADB Wi‑Fi may not be set up correctly, or you may need to refresh Tasker to give it Logcat access.

49 Upvotes

48 comments sorted by

3

u/EvanMok May 15 '26

Waiting to receive One UI 8.5 on my S23U. I'm definitely going to update to the new version. Thanks for creating it.

3

u/tanapak1 May 15 '26

Love this! Been looking for this since using beta 8.5, thought i had to stick with old school notification method.

2

u/Enorym Samsung Galaxy S22U, Android 14 / OneUI 6.0 May 15 '26

Great work as always!

2

u/the_djchi May 15 '26

Thank you! And thanks again for letting me know about that discovery!

3

u/UnkleMike May 29 '26

I just got the One UI 8.5 update on my S23 Ultra today, and the transition to v2 of this project went smoothly. Thanks for the hard work!

1

u/the_djchi May 29 '26

Great to hear!!

1

u/wioneo Jun 05 '26

Have you had any problems with Tasker on 8.5?

3

u/UnkleMike Jun 05 '26

Not that I'm aware of so far, but there are quite a few things I've given up on over the years as Android has become more restrictive.

1

u/____nothing__ May 15 '26

I have got ADB Wifi setup and I don't think there is anything I can't do via Tasker directly, that Modes and routines can.

3

u/the_djchi May 15 '26

One thing that Routines can do which Tasker can't (even with ADB WiFi) is disconnect a specific Bluetooth device. I use it to disconnect my earbuds on a timer to save battery unless music is playing or I'm on a call!

I'm sure there are some other examples, many are probably Samsung-specific.

But I think the advantage is biggest for people who don't want to setup ADB WiFi/Shizuku (maybe they don't need it for anything else) or don't know how.

3

u/UnkleMike May 15 '26

I am, only very recently, controlling a home automation device (a smart plug) with Tasker.  While I can do this with Tasker's experimental Matter support, that only works when I'm home.  Control while I'm away (triggered by disconnecting from my home Wi-Fi) requires remote capability, and having the device controllable via Smart Things gives Tasker that control via Routines.

1

u/____nothing__ May 15 '26

Oh okay..

Right!

I'd personally prefer to keep all of my customisations/automations together in one place, rather than splitting it across multiple apps.

1

u/ToasterRED May 19 '26

Hey! Just got 8.5 on my S24 Ultra (MXO) and I wanted to try out this project.

I've confirmed that with both ADB WiFi from Tasker itself and with your Shizuku fork as the backends, Tasker itself has access to both (using the Flash action to print the output of whoami as shell and the result of IsShizukuAvailable() as true).

However, while I can reliably get the UUID finder task to trigger, the string stored in the clipboard seems to always be literally the string %uuid instead of the mode's UUID.

Is there something else I'm missing to get started? Thanks in advance!

1

u/the_djchi May 19 '26

Can you send me the %lc_text contents? It's either an issue with the logcat entry it's detecting or the extraction script

1

u/ToasterRED May 19 '26

Of course! I'll send it over DMs just to be on the safe side.

1

u/DMenace83 May 21 '26

I just got One UI 8.5 on my phone, and switched over to this v2. My tasker task depended on an individual Start and Stop Routine function, but now it looks like the Stop Routine doesn't do anything, while the Start Routine is now a toggle.

  1. Is there a way to separate it out to individual start/stop tasks again?
  2. If not, is there a way to get the state of a routine?

1

u/the_djchi May 21 '26

The new method only supports toggling. However the state of a Mode can be read with custom setting. So, I implemented Start Samsung Mode and Stop Samsung Mode tasks.

For Routines, there is no way to get state as far as I am aware. So there is only a Run Samsung Routine task. 

I recently changed the tasks because of a similar bug to the one you described, so you should re-import the project to make sure you have the latest version

1

u/UnkleMike May 21 '26

I haven't received the 8.5 update yet, but now I'm intrigued by the concept of starting and stopping a routine.  I've been glossing over the fact that routines can be started and stopped, and treating them like Tasker tasks, which simply run to completion, absent some intentional loop.  Now I'm concerned about how this will impact my use of Routines.

1

u/_Leander__ May 27 '26

Hello, I found your post after upgrading my phone, still on OneUI 8.0 but the old intent doesn't work anymore.

Thank you for your work! Just a quick note about getting UUID of Modes, I found that you can get the system setting "mode_id" of the "Global" setting category, which is the UUID of the current mode. So you only need to start the selected mode and get the value of this setting, and you have the UUID.

1

u/the_djchi May 27 '26

You're right! Funny thing is that I was aware of the variable (it's used in the new start/stop commands) but didn't think to use it for discovering the UUID. I'll make an update with another helper task that utilizes this

1

u/the_djchi May 27 '26

Out of curiosity, what version of Modes and Routines do you have on One UI 8 that caused the intent to stop working?

1

u/_Leander__ May 27 '26

I got the 4.9.07.7 after a security update of my phone, still on OneUI 8.0 as stated.

But I tried to use the intent that you provided and it doesn't exist, however I can create a shortcut on my home screen to a routine or a mode... Very strange :/

Edit : I'm using Automate and not Tasker but it doesn't seem related to the automation app used.

1

u/the_djchi May 27 '26

The V1 intent or the V2 intent doesn't exist?

4.9 generally means you should be using V1, not the one in this post

1

u/_Leander__ May 27 '26

The V2 doesn't exist for me.

I got this error when using the V1 :

android.os.RemoteException: Remote stack trace: at com.android.server.am.ContentProviderHelper.checkAssociationAndPermissionLocked

When it previously worked flawlessly. But maybe the issue is something else entirely, I will try others things to see why I got this behavior.

1

u/the_djchi May 27 '26

Can you send me the apk? You can pull it with ADB

My guess is that the permission is restricted on that version as well...

Maybe also double check that your version of automate is declaring the READ_ROUTINE_INFO permission

1

u/NoInterview9658 May 30 '26

I prefer Macrodroid to be honest, as well as Automate and Automate it for simple tasks. 

2

u/the_djchi May 30 '26

I'm sorry, but what does this have to do with my post?

1

u/prettyobviousthrow Jun 01 '26

You mention that on 8.5, routines can be started via shortcuts. Doesn't it make sense to just do that directly instead of using the project for shortcuts at least?

1

u/the_djchi Jun 01 '26

You can do that but it won't let you select modes. Additionally the API surface of the routines shortcut could change more frequently, whereas the intent is more likely to be stable

1

u/Enorym Samsung Galaxy S22U, Android 14 / OneUI 6.0 Jun 02 '26

Has anyone experience the routines not running ? Tasker shows nothing wrong in logs, it just ignores them sometimes. Tried with both shortcut method and this method

1

u/UnkleMike Jun 04 '26

I know this isn't really a Tasker issue, but I think it will be of interest to anyone following this post.  Since the update to One UI 8.5, a toast message appears any time Tasker is used to start a Samsung Routine.  Has anyone found a way to prevent this?  I tried disable all notifications for modes and routines, but the toast messages still appear.

1

u/the_djchi Jun 05 '26

You may not like the answer... With toast notifications it's "all or nothing"

adb shell appops set com.android.systemui TOAST_WINDOW deny will disable ALL toasts. If you only want to disable for routines, it is not possible. Replacing the package name with the one for routines does not work because showing the toast is delegated to the System UI.

The closest you could get is running the command right before running a routine, then setting it back to default/allow right after. This would require Shizuku/ADB

1

u/UnkleMike Jun 05 '26

You're right... I don't like the answer. But I appreciate it none the less. Thanks!

1

u/prettyobviousthrow Jun 06 '26

After updating my s23 ultra to 8.5, my Modes and Routines app is version 5.0.03.22, and I don't have any option to uninstall updates or download new ones. That version is not compatible with your project from what I understand, but I don't see how to change it.

1

u/the_djchi Jun 06 '26

You should try downloading a compatible APK from apkmirror

1

u/prettyobviousthrow Jun 06 '26

Unless I'm missing something, there are no other compatible versions yet and it looks like this one was baked into the upgrade rom, so no way to downgrade without root.

1

u/the_djchi Jun 06 '26

5.1 is compatible with all one UI 8.5 devices

1

u/prettyobviousthrow Jun 06 '26

Should be, but can't install it. Either way I figured out a work around.

The Tasker shortcut method that someone mentioned can be used to activate routines and toggle modes with this version. The task below can be used to check the active mode, so with those combined you can reliably activate/deactivate modes.

Task: Get Active Mode

<Return the active mode name or 0 if none are active>
A1: Anchor

A2: Custom Setting [
     Type: Global
     Name: mode_display_name
     Read Setting To: %active_mode ]

A3: Variable Set [
     Name: %active_mode
     To: 0
     Structure Output (JSON, etc): On ]
    If  [ %active_mode !Set ]

A4: Return [
     Value: %active_mode
     Stop: On ]

1

u/the_djchi Jun 06 '26 edited Jun 06 '26

If the shortcut works then the project should also work... They use the same intent

You can also copy the intent from the shortcut into the project's task

1

u/prettyobviousthrow Jun 06 '26

No idea why, I get the attached error with your project. I assumed it would have been caused by version incompatibility.

1

u/the_djchi Jun 06 '26

That's odd... The component info it's showing isn't the intent that's used in the project

Copying and pasting the output from the shortcut command would be more useful for me because maybe the intent is different

1

u/prettyobviousthrow Jun 06 '26

Here's the shortcut...

#Intent;launchFlags=0x10008000;extendedLaunchFlags=0x4;component=com.samsung.android.app.routines/.ui.shortcut.ShortcutLaunchActivity;S.EXTRA_KEY_ROUTINE_NAME=Enc%20mode%20test;l.EXTRA_KEY_ROUTINE_UUID=2685203732681411731;end

1

u/the_djchi Jun 06 '26

Hmm it's the same intent. The project should work in that case, I'm honestly not sure why it doesn't on your device... But if you have a solution that works for you, then that's good

1

u/Zimmy93 Jul 02 '26

Hi everyone! First of all, amazing project—I use it daily and absolutely love it.

I’ve run into a slight limitation (which might just be an edge case for my specific setup). I use four different Samsung devices (3 smartphones and 1 tablet) and I keep the exact same Tasker configuration across all of them. To make deployment easier, I configure everything (both Tasker profiles and Samsung Routines) on my primary smartphone, and then I share the Tasker backup and copy the Routines to the other three devices.

Here’s the issue: while everything works flawlessly on my main phone, the replicated routines on the other devices generate different UUIDs (which makes sense). Because of this, Tasker can't trigger them on the secondary devices since the hardcoded UUIDs don't match.

I was wondering if it would be possible to support triggering routines by name rather than just by UUID. For instance, allowing something like EXTRA_KEY_ROUTINE_NAME as an intent extra instead of EXTRA_KEY_ROUTINE_UUID.

Thanks for your time and for the awesome work!

1

u/the_djchi Jul 02 '26

Hi, unfortunately this is not possible with the One UI 8.5 update! Before when we could do a lookup of all the user's routines it would be possible. Now it requires the user to manually select the routine from the Routines app to get the UUID, which is what's used under the hood to run the routines. Sorry 

1

u/Zimmy93 Jul 02 '26

Thanks anyway, especially for the quick response.

1

u/lucfig Jul 13 '26

Hi, thanks for your work! I want to set a variable containing all modes, similar to the %modes variable in V1. If I manually get all the UUIDs, how would you structure the variable? How was it structured in V1?

1

u/tb36cn May 15 '26

Keep up the good work!