SystemUI modification for Multi-user functionality


Reirei

Members
Sep 27, 2019
2
3
In AOSP the Multi-user funcionality works very well within an option in status bar quick settings to change the current user, even in the lockscreen. Unfortunately MUIU team have dediced to hide the multi-user settings in his custom status bar layout and system settings. The multi-user function still works, there ways to enable the settings and that allow creating and switching between users via adb shell, but without an option to switch users in the system ui theres no way for normal users to utilize that functionality.

Looking at AOSP code i can find the references to the Multi-user function and have an overview how it works. I am looking for a way to modify the MIUI system ui package to enable or add the user switch button back, that will allow the use of the Multi-user funcionality. I believe that part of the AOSP code is still in the MIUI rom and will take some small ajusts to make it work.

I've developed some apps before but i am new in working with roms. There are some guides in decompiling the Systemui apk which allow to make modifications to the code and re-compile it, but i am afraid of compiling problems and the code obfuscation will make very hard to understand how the code works .

I am asking for ways for making modifications in the MIUI rom that will give back the multi-user funcionality, and maybe that can be implemented in the official MIUI EU rom.
 

Attachments

  • multi-user.png
    multi-user.png
    242.6 KB · Views: 398
I made an application that creates an quick setting tile with info about current user, clicking on it runs a switch-user command with root permissions.

user-switcher.jpg
 
Hi Reirei,

I have a Pad 6 (Android 13) and have enabled Multiple Users via the Developer Settings.
I would like to switch users on the lock screen, because at the moment the current user has to log in before a switch can be made.
Can I use your app for that? Where can I find it?