[MOD][CM10.1][4.2.2][GUIDE] Enable Multiuser (for noobs)

rfmalta

Senior Member
Nov 1, 2011
120
38
0
RomWiz

It's kind hard to explain how to modifie xml file... are you on p970?? tell me your phone/rom so I can modify this file for you... although you gonna have to change some values to match the resolution of your phone later...
 

RomWiz

Senior Member
Jan 27, 2012
2,745
1,193
0
Helsingborg
Sv: [MOD][CM10.1][4.2.2][GUIDE] Enable Multiuser (for noobs)

RomWiz

It's kind hard to explain how to modifie xml file... are you on p970?? tell me your phone/rom so I can modify this file for you... although you gonna have to change some values to match the resolution of your phone later...
Yes p970, I'm using my own rom, wizard rom :)

Cheers

Daniel
 

swiggs98

Senior Member
Aug 7, 2012
466
180
0
@rfmalta

Do you have any experience enabling Android sdcard encryption with multiuser enabled? I would assume it binds the pin code of the owner for purposes of encryption but I am not sure.

I am asking because I have attempted to encrypt my phone with multiuser and it fails (in a not so good way... i.e. format of data required). I was just curious if multiuser would have anything to do with that as I try and troubleshoot. I haven't tried doing it without multiuser yet. I may try to do a factory restore, set up an encrypted volume, and then Nandroid back to my current config and see what the heck that looks like. :)
 
Last edited:

jjwalker2

Member
Nov 14, 2009
44
1
0
Encrypted

Good question regarding encryption. I want to use a second user for work exchange and use encryption. Wondering if it is done globally or just for the single user profile.
 

rfmalta

Senior Member
Nov 1, 2011
120
38
0
@RomWiz

Sorry for the delay!! Try flashing this mod based on your rom: Multi_p970_WizardRom_V3 and see if it works.

If the widgets are not correct sized you gonna have to decompile this mod and manually change values of this file: framework-res.apk\res\layout-port\keyguard_host_view.xml

at the second "<FrameLayout" there is this code:
Code:
androidprv:paddingTop="54.0dip"
As higher this number gets, the lower the clock widget gets

At bottom of the file, you'll find this:
Code:
androidprv:paddingTop="35.0dip"
As higher this number gets, the lower the unlock widget gets
 
Last edited:
  • Like
Reactions: RomWiz

swiggs98

Senior Member
Aug 7, 2012
466
180
0
@swiggs98 and @jjwalker2<br />
<br />
I'm sorry, never used encryption with android before... can't help.
No problem. I hope to find some time to factory reset and try it soon. I will post the results here.
 

rfmalta

Senior Member
Nov 1, 2011
120
38
0
Hey OP!
Do you know how I can edit unlocker size to bigger..? :)
read this post:

@RomWiz

Sorry for the delay!! Try flashing this mod based on your rom: Multi_p970_WizardRom_V3 and see if it works.

If the widgets are not correct sized you gonna have to decompile this mod and manually change values of this file: framework-res.apk\res\layout-port\keyguard_host_view.xml

...

At bottom of the file, you'll find this:
Code:
androidprv:paddingTop="35.0dip"
As higher this number gets, the lower the unlock widget gets
 
  • Like
Reactions: Carlos_Manuel

Jeffreycat

Senior Member
Jun 3, 2012
189
45
28
I tried flashing this on my US Cellular Galaxy S3 and it just put it into a boot loop >.< I'm gonna reflash CM10.1 and Gapps right now. I didn't realize that this is only for the International Galaxy S3. I was able to get Multi-user support working with some terminal commands, but it reset upon reboot.

Is there anything else I can try to make it persistent?
 

Carlos_Manuel

Senior Member
Apr 28, 2011
4,092
5,367
0
23
Kuressaare
Hey OP, I don't know what I do wrong when I try to make lock screen look correct on CM10.1 (Maguro) with multi user selector

First:
This:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardHostView androidprv:gravity="center_horizontal" androidprv:orientation="vertical" androidprv:id="@id/keyguard_host_view" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:androidprv="http://schemas.android.com/apk/res/android">
    <com.android.internal.policy.impl.keyguard.SlidingChallengeLayout androidprv:id="@id/sliding_layout" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent">
        <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="wrap_content" androidprv:layout_childType="pageDeleteDropTarget">
            <include androidprv:layout_gravity="top|center" androidprv:id="@id/keyguard_widget_pager_delete_target" androidprv:layout_width="wrap_content" androidprv:layout_height="wrap_content" layout="@layout/keyguard_widget_remove_drop_target" />
        </FrameLayout>
        <FrameLayout androidprv:paddingTop="54.0dip" 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>
        <FrameLayout androidprv:paddingTop="7.0dip" androidprv:layout_width="fill_parent" androidprv:layout_height="wrap_content">
            <include androidprv:layout_gravity="top|center" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_multi_user_selector" />
        </FrameLayout>
        <View androidprv:background="#99000000" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="scrim" />
        <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer androidprv:gravity="bottom|center" androidprv:id="@id/keyguard_security_container" androidprv:paddingTop="35.0dip" androidprv:layout_width="wrap_content" androidprv:layout_height="wrap_content" androidprv:layout_maxHeight="@dimen/keyguard_security_no_widget_height" androidprv:layout_childType="challenge">
            <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper androidprv:gravity="center" androidprv:id="@id/view_flipper" androidprv:paddingTop="@dimen/keyguard_security_view_margin" androidprv:clipChildren="false" androidprv:clipToPadding="false" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" />
        </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer>
        <ImageButton androidprv:id="@id/expand_challenge_handle" androidprv:background="@null" androidprv:focusable="true" androidprv:layout_width="fill_parent" androidprv:layout_height="@dimen/kg_widget_pager_bottom_padding" androidprv:src="@drawable/keyboard_popup_panel_trans_background" androidprv:scaleType="center" androidprv:contentDescription="@string/lockscreen_low_battery" androidprv:layout_childType="expandChallengeHandle" />
    </com.android.internal.policy.impl.keyguard.SlidingChallengeLayout>
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
It works well but when I expand widget it doesn't show lock image on it, it shows the box which is gray instead of lock, also opening screen takes sometimes a bit time.

This one:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardHostView androidprv:gravity="center_horizontal" androidprv:orientation="vertical" androidprv:id="@id/keyguard_host_view" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:androidprv="http://schemas.android.com/apk/res/android">
    <com.android.internal.policy.impl.keyguard.SlidingChallengeLayout androidprv:id="@id/sliding_layout" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent">
        <FrameLayout androidprv:layout_width="fill_parent" androidprv:layout_height="wrap_content" androidprv:layout_childType="pageDeleteDropTarget">
            <include androidprv:layout_gravity="top|center" androidprv:id="@id/keyguard_widget_pager_delete_target" androidprv:layout_width="wrap_content" androidprv:layout_height="wrap_content" layout="@layout/keyguard_widget_remove_drop_target" />
        </FrameLayout>
        <FrameLayout androidprv:paddingTop="54.0dip" 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>
        <FrameLayout androidprv:paddingTop="7.0dip" androidprv:layout_width="fill_parent" androidprv:layout_height="wrap_content">
            <include androidprv:layout_gravity="top|center" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_multi_user_selector" />
        </FrameLayout>
        <View androidprv:background="#99000000" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" androidprv:layout_childType="scrim" />
        <com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer androidprv:gravity="bottom|center" androidprv:id="@id/keyguard_security_container" androidprv:padding="35.0dip" androidprv:layout_width="wrap_content" androidprv:layout_height="wrap_content" androidprv:layout_maxHeight="@dimen/keyguard_security_no_widget_height" androidprv:layout_childType="challenge">
            <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper androidprv:gravity="center" androidprv:id="@id/view_flipper" androidprv:paddingTop="@dimen/keyguard_security_view_margin" androidprv:clipChildren="false" androidprv:clipToPadding="false" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" />
        </com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer>
        <ImageButton androidprv:id="@id/expand_challenge_handle" androidprv:background="@null" androidprv:focusable="true" androidprv:layout_width="fill_parent" androidprv:layout_height="@dimen/kg_widget_pager_bottom_padding" androidprv:src="@drawable/keyguard_expand_challenge_handle" androidprv:scaleType="center" androidprv:contentDescription="@string/keyguard_accessibility_expand_lock_area" androidprv:layout_childType="expandChallengeHandle" />
    </com.android.internal.policy.impl.keyguard.SlidingChallengeLayout>
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
It makes lockscreen stuff much smaller and it doesn't show the PIN code thing correctly, it doesn't fit it, but it shows the lock icon..

Do you know what I have done so wrong with those? :eek:
Are you able to fix it, I'm not able to fix it... :/

Thanks! :)
 

m3adow

Senior Member
May 20, 2011
71
23
38
adminswerk.de
I tried this method with the CM10.1 Nightlies for the Motrola Xoom. Although it seems to work, everything FCs for the second user. Creating a third user didn't help either (neither a fourth). The ROMs keyguard_host_view.xml looked a bit different than the one in your OP. Could it be I changed it wrong?
Pastebin of my edited keyguard_host_view.xml: http://pastebin.com/dqYDrZVR
 

FAtfcK

Senior Member
Oct 25, 2012
267
56
0
Hey :) my friend followed the guide and made the multiuser possible on the wfs but he's experiencing the force close on the dialer, ringtones and themes. The solution on the OP is not working too :/ is there any way I can make it work? Thanks in advance

Sent from my HTC Wildfire S using xda app-developers app
 

swiggs98

Senior Member
Aug 7, 2012
466
180
0
Yes... themes cause FCs on secondary users... great to know it worked for you
As of the last cm10.1 nightly or so, the user theme issue is supposedly resolved. I loaded the 6-15 nightly and it worked with themes enabled where it wouldn't before. Don't have a lot of run time under my belt yet, but this is very encouraging.