Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,513 Members 51,316 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
AmniX
Old
(Last edited by AmniX; 21st April 2014 at 05:58 AM.)
#1  
AmniX's Avatar
Senior Member - OP
Thanks Meter 2637
Posts: 325
Join Date: Jul 2012
Location: India

 
DONATE TO ME
Tutorial [GUIDE]How to enable Multiuser support on Xperia 4.2+ Smartphones

Hello Mates!

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


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" />
            <include layout="@layout/amnix_multi_user_selector" />
        </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
Attached Files
File Type: zip res.zip - [Click for QR Code] (555 Bytes, 173 views)
↓"Did you like my work?"↓

And Press "thanks" button too!
---------------------------------------------------
► All of my work on xda is here ◄
--------------------------------------------------


The Following 23 Users Say Thank You to AmniX For This Useful Post: [ Click to Expand ]
 
tidusfox
Old
#2  
tidusfox's Avatar
Member
Thanks Meter 42
Posts: 68
Join Date: Aug 2013
Thumbs up good



working on Xperia SP
Attached Thumbnails
Click image for larger version

Name:	10258369_626326440787808_594191607522553322_n.jpg
Views:	3588
Size:	44.2 KB
ID:	2698023   Click image for larger version

Name:	10253862_626326460787806_8910984644653631920_n.jpg
Views:	3522
Size:	32.1 KB
ID:	2698024  
If you like my work, Hit

Sorry, I bad English
The Following User Says Thank You to tidusfox For This Useful Post: [ Click to Expand ]
 
yakupTR
Old
#3  
yakupTR's Avatar
Senior Member
Thanks Meter 64
Posts: 481
Join Date: Jun 2013
Quote:
Originally Posted by AmniX View Post
Hello Mates!

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


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" />
            <include layout="@layout/amnix_multi_user_selector" />
        </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
 
jatinrungta
Old
#4  
jatinrungta's Avatar
Senior Member
Thanks Meter 2363
Posts: 1,969
Join Date: Nov 2012
Quote:
Originally Posted by yakupTR View Post
Pls 4.1.2 port pls pls..

Xperia s2
Stop quoting the whole op!
Its so annoying
Cant port to 4.1.2, it does not support multiusers!
4.2 has multiusers but hidded in xperia so we can only enable it
 
Riyal
Old
#5  
Senior Member
Thanks Meter 1638
Posts: 2,867
Join Date: Dec 2011
Location: Iloilo City

 
DONATE TO ME
Any way of having an option to rename the users?
 
ansebovi
Old
#6  
ansebovi's Avatar
Senior Member
Thanks Meter 782
Posts: 1,071
Join Date: Dec 2012
Location: Chennai
hi i cant decompile 4.3 framework of sony
which tool did u use for decompile/..i m using apktool
MODEL-Xperia M Dual C2005

My second sign below
 


 
cachanilla86
Old
#7  
cachanilla86's Avatar
Senior Member
Thanks Meter 494
Posts: 699
Join Date: Mar 2012
Location: Mexicali

 
DONATE TO ME
Quote:
Originally Posted by ansebovi View Post
hi i cant decompile 4.3 framework of sony
which tool did u use for decompile/..i m using apktool
Try with this one, It works for me

http://forum.xda-developers.com/show....php?t=2639400
 
cachanilla86
Old
(Last edited by cachanilla86; 20th April 2014 at 11:47 PM.)
#8  
cachanilla86's Avatar
Senior Member
Thanks Meter 494
Posts: 699
Join Date: Mar 2012
Location: Mexicali

 
DONATE TO ME
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://forum.xda-developers.com/show....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

Thanks.
 
ansebovi
Old
#9  
ansebovi's Avatar
Senior Member
Thanks Meter 782
Posts: 1,071
Join Date: Dec 2012
Location: Chennai
@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.UserS ettings" />

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

My second sign below
 


 
AmniX
Old
#10  
AmniX's Avatar
Senior Member - OP
Thanks Meter 2637
Posts: 325
Join Date: Jul 2012
Location: India

 
DONATE TO ME
Quote:
Originally Posted by ansebovi View Post
@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.UserS ettings" />

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
↓"Did you like my work?"↓

And Press "thanks" button too!
---------------------------------------------------
► All of my work on xda is here ◄
--------------------------------------------------



The Following User Says Thank You to AmniX For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes