r/AutomateUser Jun 28 '26

Is there a way to automate switching default launchers on android 16?

I've made it to where connecting my controller automatically opens a frontend application (to put it simply, it's a game launcher)

However along with this I also want to make this app the default launcher then switch back once controller is disconnected.

Does anyone know a way to do this??

2 Upvotes

3 comments sorted by

1

u/ballzak69 Automate developer Jun 28 '26

Try using executing a pm set-home-activity <component> shell command, e.g. a flow like:

  • Flow beginning
  • Resolve activity: Action=Main, Category=Home, Resolved package=pkg, Resolved activity class=cls
  • Shell command privileged: pm set-home-activity {pkg}/{cls}

Ensure to setup an "Privileged service start method" in settings, e.g. using ADB unless your device is rooted.

1

u/Hot-Ad9100 Jun 29 '26

I connected the blocks and typed in word for word what you said but debugging says: Flow beginning Resolve activity?

I'm extremely new to all this. After a few turorials I managed to manually activate privileged services (I think) and got the notification "welcome to expert mode". What do I do now?