Post Reply
Tutorial

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

20th April 2014, 03:30 PM   |  #1  
AmniX's Avatar
OP Senior Member
Flag India
Thanks Meter: 2,675
 
325 posts
Join Date:Joined: Jul 2012
Donate to Me
More
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, 201 views)
Last edited by AmniX; 21st April 2014 at 05:58 AM.
The Following 23 Users Say Thank You to AmniX For This Useful Post: [ View ]
20th April 2014, 04:30 PM   |  #2  
tidusfox's Avatar
Member
Thanks Meter: 42
 
73 posts
Join Date:Joined: Aug 2013
Thumbs up good


working on Xperia SP
Attached Thumbnails
Click image for larger version

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

Name:	10253862_626326460787806_8910984644653631920_n.jpg
Views:	3802
Size:	32.1 KB
ID:	2698024  
The Following User Says Thank You to tidusfox For This Useful Post: [ View ]
20th April 2014, 04:53 PM   |  #3  
yakupTR's Avatar
Senior Member
Thanks Meter: 85
 
514 posts
Join Date:Joined: Jun 2013
Quote:
Originally Posted by AmniX

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
20th April 2014, 05:03 PM   |  #4  
jatinrungta's Avatar
Senior Member
Thanks Meter: 2,303
 
1,968 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by yakupTR

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
20th April 2014, 06:49 PM   |  #5  
Senior Member
Flag Iloilo City
Thanks Meter: 1,674
 
2,877 posts
Join Date:Joined: Dec 2011
Donate to Me
More
Any way of having an option to rename the users?
20th April 2014, 06:57 PM   |  #6  
ansebovi's Avatar
Senior Member
Flag Chennai
Thanks Meter: 796
 
1,073 posts
Join Date:Joined: Dec 2012
More
hi i cant decompile 4.3 framework of sony
which tool did u use for decompile/..i m using apktool
20th April 2014, 07:18 PM   |  #7  
cachanilla86's Avatar
Senior Member
Flag Mexicali
Thanks Meter: 519
 
719 posts
Join Date:Joined: Mar 2012
Donate to Me
More
Quote:
Originally Posted by ansebovi

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
20th April 2014, 10:16 PM   |  #8  
cachanilla86's Avatar
Senior Member
Flag Mexicali
Thanks Meter: 519
 
719 posts
Join Date:Joined: Mar 2012
Donate to Me
More
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.
Last edited by cachanilla86; 20th April 2014 at 11:47 PM.
21st April 2014, 04:24 AM   |  #9  
ansebovi's Avatar
Senior Member
Flag Chennai
Thanks Meter: 796
 
1,073 posts
Join Date:Joined: Dec 2012
More
@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?
21st April 2014, 05:17 AM   |  #10  
AmniX's Avatar
OP Senior Member
Flag India
Thanks Meter: 2,675
 
325 posts
Join Date:Joined: Jul 2012
Donate to Me
More
Quote:
Originally Posted by ansebovi

@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

The Following User Says Thank You to AmniX For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Sony Cross-Device Development General by ThreadRank