[MOD][GUIDE] ENABLE MULTI-USER ON ANDROID 4.2.x - PHONE MODE

Search This thread

monx®

Senior Member
Jan 3, 2006
6,497
7,009
▂ ▃ ▅ ▆ █
Red Magic 6S Pro
We know Android 4.2 multi-user capable for Tablet. Its also looks awesome on our phone.
(Currently running CM10.1 Nightlies 121223)

Screenshot_2012-12-24-12-24-14.jpg
Screenshot_2012-12-24-12-23-29.jpg
Screenshot_2012-12-24-12-25-58.jpg


ROM THREAD HERE
 
Last edited:

monx®

Senior Member
Jan 3, 2006
6,497
7,009
▂ ▃ ▅ ▆ █
Red Magic 6S Pro
How To

BASIC INFO
Tablet vs Phone
Tablet has no Phone nor Messaging function so in this case, switching to other than primary user may cause Phone app (com.android.phone) force close. This is normal & make sense bcos we dont share phone to others. Whenever there is incoming call in other(s)user account, phone will ring as usual + LED notification but u need to switch to primary account immediately to pick up or will see miss called notification in primary account. Any activity related to Phone will force close in others account (outgoing call, ussd dialing, etc)

SMS messaging can be sent thru other(s) account but any received sms only viewable in primary account.

*Above info is correct when posted until other dev(s) make it work other way round.

MODDING
framework-res.apk >
\res\values\integers.xml (change to max users limit. 2 is enough IMHO, but i made it 3 just for fun)
<integer name="config_multiuserMaximumUsers">3</integer>

\res\values\bools.xml (basically Tablet is in landscape thus user switching only visible in landscape in LockScreen. at least in current CM10.1 rom to date)
<bool name="config_enableLockScreenRotation">true</bool>

To make user switching visible in portrait LockScreen mode, manual layout modding is needed.
\res\layout-port\keyguard_host_view.xml (add this line before second </FrameLayout> to make more layout customization possible)
<include layout="@layout/keyguard_multi_user_selector" />

ADD \res\layout-port\keyguard_multi_user_selector.xml manually to customize the user switch location in portrait LockScreen.

Here is mine as example :
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/keyguard_user_selector" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:contentDescription="@string/keyguard_accessibility_user_selector" android:layout_childType="userSwitcher"
  xmlns:androidprv="http://schemas.android.com/apk/res/android"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.internal.policy.impl.keyguard.KeyguardLinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:id="@id/keyguard_users_grid" android:layout_width="wrap_content" android:layout_height="@dimen/keyguard_avatar_size" android:layout_marginBottom="400.0dip" />
</com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView>
 
Last edited:

kryptoner

Senior Member
Apr 24, 2011
1,786
376
Where is the link. .. waiting since six hours. ..

Sent from my GT-N7100 using xda app-developers app
 

monx®

Senior Member
Jan 3, 2006
6,497
7,009
▂ ▃ ▅ ▆ █
Red Magic 6S Pro
Wow this is nice, I'm guessing but it looks like for each user, there is a selected enabled applications if the owner wishes?

That function was in 4.1.2 (unfinished multi-user support :eek:)
In 4.2.1 other user hv to install app manually. Currently only ChainsDD's Superuser support multi superuser.

What theme are you using it looks beautiful ?
Stock. 4.2.1 wallpaper + Nova Launcher.
 

raman21raman

Senior Member
Jun 9, 2008
393
83
home
hi monx.. i tried to edit framework-res.apk but i got probss...
1. the original size of jb 4.2 framework-res.apk is around 11mb
but when i recompile after editing the apk the remains only about 7mb

2: when i tries to use that 7mb apk framework file it stucks at boot screen only..

so can u please provide any help or ur

framework-res.apk???

thanxxx
 

monx®

Senior Member
Jan 3, 2006
6,497
7,009
▂ ▃ ▅ ▆ █
Red Magic 6S Pro

Mr Colt

Senior Member
Aug 10, 2012
77
8
I am getting process.android.phone FC on incoming and outgoing calls. Cleared data and cache..

EDIT: Just re compiled framework-res.apk and woola done!!
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    We know Android 4.2 multi-user capable for Tablet. Its also looks awesome on our phone.
    (Currently running CM10.1 Nightlies 121223)

    Screenshot_2012-12-24-12-24-14.jpg
    Screenshot_2012-12-24-12-23-29.jpg
    Screenshot_2012-12-24-12-25-58.jpg


    ROM THREAD HERE
    8
    How To

    BASIC INFO
    Tablet vs Phone
    Tablet has no Phone nor Messaging function so in this case, switching to other than primary user may cause Phone app (com.android.phone) force close. This is normal & make sense bcos we dont share phone to others. Whenever there is incoming call in other(s)user account, phone will ring as usual + LED notification but u need to switch to primary account immediately to pick up or will see miss called notification in primary account. Any activity related to Phone will force close in others account (outgoing call, ussd dialing, etc)

    SMS messaging can be sent thru other(s) account but any received sms only viewable in primary account.

    *Above info is correct when posted until other dev(s) make it work other way round.

    MODDING
    framework-res.apk >
    \res\values\integers.xml (change to max users limit. 2 is enough IMHO, but i made it 3 just for fun)
    <integer name="config_multiuserMaximumUsers">3</integer>

    \res\values\bools.xml (basically Tablet is in landscape thus user switching only visible in landscape in LockScreen. at least in current CM10.1 rom to date)
    <bool name="config_enableLockScreenRotation">true</bool>

    To make user switching visible in portrait LockScreen mode, manual layout modding is needed.
    \res\layout-port\keyguard_host_view.xml (add this line before second </FrameLayout> to make more layout customization possible)
    <include layout="@layout/keyguard_multi_user_selector" />

    ADD \res\layout-port\keyguard_multi_user_selector.xml manually to customize the user switch location in portrait LockScreen.

    Here is mine as example :
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/keyguard_user_selector" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:contentDescription="@string/keyguard_accessibility_user_selector" android:layout_childType="userSwitcher"
      xmlns:androidprv="http://schemas.android.com/apk/res/android"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.internal.policy.impl.keyguard.KeyguardLinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:id="@id/keyguard_users_grid" android:layout_width="wrap_content" android:layout_height="@dimen/keyguard_avatar_size" android:layout_marginBottom="400.0dip" />
    </com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView>
    3

    Is totally diff. i tried tat b4 & even forcing multiuser on 4.1.2. Nothing can beat how it should on 4.2.1. Im going to upload monxDIFIED CM10.1 Nightly 121227 shortly.

    √ xda-premium | note²
    2
    Wow this is nice, I'm guessing but it looks like for each user, there is a selected enabled applications if the owner wishes?

    The Note 2 is slowly replacing the computer :eek: