[GUIDE]How to enable Multiuser support on Xperia 4.2+ Smartphones

Search This thread

AmniX

Senior Member
Jul 9, 2012
350
2,903
India
Hello Mates!

Here is a Simple Guide to Enable multiuser support on Xperia 4.2+

screen_M_higxperia_Z20140420_133313.png
screen_M_ja_Experia_Z20140420_133337.png
screen_M_vvdxperia_Z20140420_133344.png

Here wo Go.
Requirements:-
Basic knowledge of Reverse engineering (apktool and baksmali)
Notepad++ or any other text editor
Time and mind

Step 1:-
Decompile framework-res.apk

Step 2:-
Now Go to res/values/bools.xml
Here search for
Code:
<bool name="config_enableLockScreenRotation">false</bool>

Step 3:-
Change the boolean value to true
Save xml file

Step 4:-
Now Go to res/values/integers.xml
Here Search For
Code:
<integer name="config_multiuserMaximumUsers">1</integer>

Step 5:-
Chnage the Integer value to 3
Save xml file

Step 6:-
Now go to res\layout-port\keyguard_host_view.xml
Look for this FrameLayout
Code:
        <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="widgets">
            <include androidprv:layout_gravity="center" androidprv:id="@id/app_widget_container" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_widget_pager" />
        </FrameLayout>

Add this Line before </FrameLayout>
Code:
<include layout="@layout/amnix_multi_user_selector" />

Now It will look like this
Code:
        <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="widgets">
            <include androidprv:layout_gravity="center" androidprv:id="@id/app_widget_container" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_widget_pager" />
            [COLOR="Red"]<include layout="@layout/amnix_multi_user_selector" />[/COLOR]
        </FrameLayout>
Save and close keyguard_host_view.xml

Step 7:-
Now download res.zip from attachments and paste the xml file to res\layout-port\

Step 8:-
Recompile framework-res.apk

Step 9:-
Now Decompile Settings.apk

Step 10:-
Go to res/xml/settings_headers.xml

Step 11:-
Search for this line
Code:
android:fragment="com.android.settings.users.UserSettings"

Step 12:-
Beside this line, you will find a android:id="@id/user_settings header
change the android:id to android:id="@id/amnix"

Step 13:-
Now add this line to res/values/ids.xml
Code:
<item type="id" name="amnix">false</item>

Step 14:-
Recompile back Settings.apk

Step 15:-
Push new compiled settings and framework to system to adb or mannually

Step 16:-

If its work then Press Thanks Here
If it doesn't or you need any help post in same thread

Cheers
Enjoy

-AmniX
 

Attachments

  • res.zip
    555 bytes · Views: 423
Last edited:

tidusfox

Senior Member
Aug 3, 2013
80
46
good

:good:

working on Xperia SP
 

Attachments

  • 10258369_626326440787808_594191607522553322_n.jpg
    10258369_626326440787808_594191607522553322_n.jpg
    44.2 KB · Views: 6,158
  • 10253862_626326460787806_8910984644653631920_n.jpg
    10253862_626326460787806_8910984644653631920_n.jpg
    32.1 KB · Views: 6,148
  • Like
Reactions: asanan1

yakupTR

Senior Member
Jun 28, 2013
822
154
Hello Mates!

Here is a Simple Guide to Enable multiuser support on Xperia 4.2+

screen_M_higxperia_Z20140420_133313.png
screen_M_ja_Experia_Z20140420_133337.png
screen_M_vvdxperia_Z20140420_133344.png

Here wo Go.
Requirements:-
Basic knowledge of Reverse engineering (apktool and baksmali)
Notepad++ or any other text editor
Time and mind

Step 1:-
Decompile framework-res.apk

Step 2:-
Now Go to res/values/bools.xml
Here search for
Code:
<bool name="config_enableLockScreenRotation">false</bool>

Step 3:-
Change the boolean value to true
Save xml file

Step 4:-
Now Go to res/values/integers.xml
Here Search For
Code:
<integer name="config_multiuserMaximumUsers">1</integer>

Step 5:-
Chnage the Integer value to 3
Save xml file

Step 6:-
Now go to res\layout-port\keyguard_host_view.xml
Look for this FrameLayout
Code:
        <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="widgets">
            <include androidprv:layout_gravity="center" androidprv:id="@id/app_widget_container" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_widget_pager" />
        </FrameLayout>

Add this Line before </FrameLayout>
Code:
<include layout="@layout/amnix_multi_user_selector" />

Now It will look like this
Code:
        <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="widgets">
            <include androidprv:layout_gravity="center" androidprv:id="@id/app_widget_container" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_widget_pager" />
            [COLOR="Red"]<include layout="@layout/amnix_multi_user_selector" />[/COLOR]
        </FrameLayout>
Save and close keyguard_host_view.xml

Step 7:-
Now download res.zip from attachments and paste the xml file to res\layout-port\

Step 8:-
Recompile framework-res.apk

Step 9:-
Now Decompile Settings.apk

Step 10:-
Go to res/xml/settings_headers.xml

Step 11:-
Search for this line
Code:
android:fragment="com.android.settings.users.UserSettings"

Step 12:-
Beside this line, you will find a android:id="@id/multiuser header
change the android:id to android:id="@id/amnix"

Step 13:-
Now add this line to res/values/ids.xml
Code:
<item type="id" name="amnix">false</item>

Step 14:-
Recompile back Settings.apk

Step 15:-
Push new compiled settings and framework to system to adb or mannually

Step 16:-

If its work then Press Thanks Here
If it doesn't or you need any help post in same thread

Cheers
Enjoy

-AmniX

Pls 4.1.2 port pls pls..

Xperia s2
 
D

Deleted member 4529355

Guest
I'm having a little problem here with my settings.apk. There is a phantom Icon below Users. If i click it settings force closes. I've already modified my settings.apk with a few lines that enable smart call handling from this thread: http://xdaforums.com/showthread.php?t=2667184

What can be wrong? This is my framework and my settings.apk MY phone is a C6903 running the 136 build number, deodexed with superuser mod

I made it with Advanced APK Tool and Notepad++ and here is the flashable zip with the framework AND settings: https://www.mediafire.com/?kx58zcqexwnmse5

Oh! and Simple Home app force closes too, installed on system o as a regular app it doesnt work :eek:

Thanks.
QDtXQnh.png
 
Last edited by a moderator:

ansebovi

Senior Member
@cachanilla86 ty bro its working...
@AmniX bro i found this line in settings/res/xml/settings_header...

<header android:icon="@drawable/ic_settings_multiuser" android:id="@id/user_settings" android:title="@string/user_settings_title" android:fragment="com.android.settings.users.UserSettings" />

but there is no android:id="@id/multiuser" what can i do?
should i add it or am i missing something?
 

AmniX

Senior Member
Jul 9, 2012
350
2,903
India
@cachanilla86 ty bro its working...

@AmniX bro i found this line in settings/res/xml/settings_header...

<header android:icon="@drawable/ic_settings_multiuser" android:id="@id/user_settings" android:title="@string/user_settings_title" android:fragment="com.android.settings.users.UserSettings" />

but there is no android:id="@id/multiuser" what can i do?
should i add it or am i missing something?

Its Same! Change android:id="@id/user_settings to android:id="@id/amnix
 
  • Like
Reactions: ansebovi

AmniX

Senior Member
Jul 9, 2012
350
2,903
India
ty bro...grt works like charm :) :good:
but see my screenshot....the icons block date...anyway to adjust that>?

As multiuser is only for tablets so Mobile UI is not designed for Phones. Rotate your Device While Switching User's For Clear date in Statusbar.

Layout is overlapping it but there is no any other place to place multiuser Chnager on lockscreen.
 

ansebovi

Senior Member
As multiuser is only for tablets so Mobile UI is not designed for Phones. Rotate your Device While Switching User's For Clear date in Statusbar.

Layout is overlapping it but there is no any other place to place multiuser Chnager on lockscreen.

do u know how to reduce size of icons,patternview...maybe that can help...i know where is the layout...\res\layout\keyguard_pattern_view. but i dont know how to edit size :(
 

totzkitotz

Senior Member
Dec 6, 2013
597
187
DAUiSneyland
Great! :good:

thanks for this Sir :good:
gonna try this..

just a question sir, if Im using a lower DPI in my Z right nwo, is there a possibility that the icons will overlap the time and date in the lockscreen? :confused: thanks btw
 
Last edited:

devilmaycry2020

Senior Member
Apr 27, 2013
1,399
248
thanks.this guide missing some code lines, please add these.
i dont why every times i created new user my phone auto reboot.
And i can't choose another user not owner to login
 
Last edited:

Riyal

Senior Member
Dec 16, 2011
3,038
1,770
Iloilo City
Modified mine :) Now it doesn't cover up the widget area of the lockscreen. Also moved the remove widget drop spot from top to bottom so I could still delete the lockscreen widgets :D
 

Attachments

  • Screenshot_2014-04-22-19-31-47.jpg
    Screenshot_2014-04-22-19-31-47.jpg
    80.1 KB · Views: 250

Droidlover123

Senior Member
Jul 8, 2012
1,495
393
As multiuser is only for tablets so Mobile UI is not designed for Phones. Rotate your Device While Switching User's For Clear date in Statusbar.

Layout is overlapping it but there is no any other place to place multiuser Chnager on lockscreen.

@AmniX bro nice work...
But i got one problem...I did all steps as u mentioned on my xperia m but when i log into my new account android.process.media force stops and then phone restarts...
Pls help :rolleyes:
 

vijayjeeva

Senior Member
Aug 16, 2013
97
21
chennai
xposed frameworK

hI,

iTS SO EASY TO ACTIVATE THE MODULE IN XPOSED FRAMEWORK...

PERFECTLY WORKING IN MY XPERIA Z - EXISTENZ ULTRA 7.0.0
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Hello Mates!

    Here is a Simple Guide to Enable multiuser support on Xperia 4.2+

    screen_M_higxperia_Z20140420_133313.png
    screen_M_ja_Experia_Z20140420_133337.png
    screen_M_vvdxperia_Z20140420_133344.png

    Here wo Go.
    Requirements:-
    Basic knowledge of Reverse engineering (apktool and baksmali)
    Notepad++ or any other text editor
    Time and mind

    Step 1:-
    Decompile framework-res.apk

    Step 2:-
    Now Go to res/values/bools.xml
    Here search for
    Code:
    <bool name="config_enableLockScreenRotation">false</bool>

    Step 3:-
    Change the boolean value to true
    Save xml file

    Step 4:-
    Now Go to res/values/integers.xml
    Here Search For
    Code:
    <integer name="config_multiuserMaximumUsers">1</integer>

    Step 5:-
    Chnage the Integer value to 3
    Save xml file

    Step 6:-
    Now go to res\layout-port\keyguard_host_view.xml
    Look for this FrameLayout
    Code:
            <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="widgets">
                <include androidprv:layout_gravity="center" androidprv:id="@id/app_widget_container" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_widget_pager" />
            </FrameLayout>

    Add this Line before </FrameLayout>
    Code:
    <include layout="@layout/amnix_multi_user_selector" />

    Now It will look like this
    Code:
            <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="widgets">
                <include androidprv:layout_gravity="center" androidprv:id="@id/app_widget_container" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_widget_pager" />
                [COLOR="Red"]<include layout="@layout/amnix_multi_user_selector" />[/COLOR]
            </FrameLayout>
    Save and close keyguard_host_view.xml

    Step 7:-
    Now download res.zip from attachments and paste the xml file to res\layout-port\

    Step 8:-
    Recompile framework-res.apk

    Step 9:-
    Now Decompile Settings.apk

    Step 10:-
    Go to res/xml/settings_headers.xml

    Step 11:-
    Search for this line
    Code:
    android:fragment="com.android.settings.users.UserSettings"

    Step 12:-
    Beside this line, you will find a android:id="@id/user_settings header
    change the android:id to android:id="@id/amnix"

    Step 13:-
    Now add this line to res/values/ids.xml
    Code:
    <item type="id" name="amnix">false</item>

    Step 14:-
    Recompile back Settings.apk

    Step 15:-
    Push new compiled settings and framework to system to adb or mannually

    Step 16:-

    If its work then Press Thanks Here
    If it doesn't or you need any help post in same thread

    Cheers
    Enjoy

    -AmniX
    3
    hI,

    iTS SO EASY TO ACTIVATE THE MODULE IN XPOSED FRAMEWORK...

    PERFECTLY WORKING IN MY XPERIA Z - EXISTENZ ULTRA 7.0.0

    All we here like old school modding, not use xposed framework. so dont talk about that here.
    2
    ty bro...grt works like charm :) :good:
    but see my screenshot....the icons block date...anyway to adjust that>?

    As multiuser is only for tablets so Mobile UI is not designed for Phones. Rotate your Device While Switching User's For Clear date in Statusbar.

    Layout is overlapping it but there is no any other place to place multiuser Chnager on lockscreen.
    1
    good

    :good:

    working on Xperia SP
    1
    @cachanilla86 ty bro its working...

    @AmniX bro i found this line in settings/res/xml/settings_header...

    <header android:icon="@drawable/ic_settings_multiuser" android:id="@id/user_settings" android:title="@string/user_settings_title" android:fragment="com.android.settings.users.UserSettings" />

    but there is no android:id="@id/multiuser" what can i do?
    should i add it or am i missing something?

    Its Same! Change android:id="@id/user_settings to android:id="@id/amnix