Admin edit: I have removed the <PRE> tags in this post HTML code so it appears properly formatted.

This is a guide to re-enable multi-user support on Rockchip-based Android 4.4.2.

Disclaimers :

- Please note : as I am a complete Android novice, it is entirely possible (and even probable) that alternative and more straightforward solutions exist.
- I accept no responsability should you brick or otherwise make defunct your device by following this guide.
- AOSP seems to be licensed under ASLv2.0 and GPLv2 ; should this guide conflict with Rockchip's rights, I kindly ask the forum admins to remove this post.

In Android 4.4 (and possibly earlier) and for reasons hitherto unknown (maybe because VFAT does not support multi-user file ownership ?), Rockchip disables multi-user support in UserManager.java if "ro.factory.hasUMS=true" (which is the default) :

Re-enabling multi-user by setting "ro.factory.hasUMS=false" in /system/build.prop (and adding the property "fw.max_users=X", with X>1) is not possible, as this renders the O/S unusable (probably due to the custom codepaths in other parts of the source tree, see above).

Hence it seems the solution requires the "hasUMS=true" condition to be removed from UserManager.java.

My testing device is an FNF iFive X2, with the most recent firmware ifiveX2_FW_442_V2.0.1_201401221700 .
Recompiling the published source tree (see above) is not feasible, as the code may be oriented to the MK908, and the status and/or existence of custom patches by FNF/iFive is unknown.

1. As code changes between firmware updates, you will need to repeat this procedure after every firmware upgrade.
The string "we has UMS,force disabled M-user" in /system/framework/framework.jar/classes.dex may be a good indicator of the presence of Rockchip's patch.

2. Considering the fact that the above is based on Rockchip's source code, this procedure should apply to all RK3188-based 4.4.2 tablets.

HTH.

The following users say thank you to didierm for this useful post:

admin, manupc

manupc

Contributor

Forum Posts: 18

Member Since: 2013/08/27

Offline

Thanks Received: 12

2

2014/01/28 - 12:54

Hi, thanks for effort. I have followed all your steps and tested the modified framework.jar but somehow multi-user is not full working at all. I am able to create so many users as stated in fw.max_users but the problem is when swichting to a new created user, im not able to use the back button and not able to change the new user´s name since keyboard wont appear. There must be something else needed to be changed to make it completely work. The new added ro.factory.hasUMS in ifive X2 could be messing somewhere else...

didierm

Contributor

Forum Posts: 12

Member Since: 2013/07/19

Offline

Thanks Received: 4

3

2014/01/28 - 19:52

manupc said
I am able to create so many users as stated in fw.max_users but the problem is when swichting to a new created user, im not able to use the back button and not able to change the new user´s name since keyboard wont appear.

When you navigate to Settings > Language & input > Keyboard & Input Methods, you'll notice [Default] is an empty field, and the [Android Keyboard Settings (AOSP)] is not activated and greyed out.

Entering and exiting the settings of AOSP, renders it as [Default], after which you can deactivate [Google voice typing] again.

You should now have a working virtual keyboard.

admin

admin

Forum Posts: 5878

Member Since: 2010/09/11

Offline

Thanks Received: 3169

4

2014/01/28 - 20:51

Thanks again didierm

I have patched and rebuilt the framework.jar file for the PiPO M9 Pro and will be testing it shortly, I will then post the results here.

Cheers.

If you like our web site, applications and firmwares, feel free to support our site. Donations are used to pay the bills for our server hosting costs, development tools and purchase new tablets to support.

admin

admin

Forum Posts: 5878

Member Since: 2010/09/11

Offline

Thanks Received: 3169

5

2014/01/28 - 21:25

From my PiPO M9 Pro test results, I am getting some kind of Android restart (not really a full reboot) after I did Add / User and I clicked OK button. Still, it seems to have worked as I got the new user created and working.

I have posted a rebuilt firmware for the PiPO M9 pro with the multi-user patch in the M9 Pro section:

If you like our web site, applications and firmwares, feel free to support our site. Donations are used to pay the bills for our server hosting costs, development tools and purchase new tablets to support.

manupc

Contributor

Forum Posts: 18

Member Since: 2013/08/27

Offline

Thanks Received: 12

6

2014/01/28 - 23:10

Thanks didierm. I got it working now. I will implement it in my rom and share soon. Shame something like that wasnt working before. Nice find!

didierm

Contributor

Forum Posts: 12

Member Since: 2013/07/19

Offline

Thanks Received: 4

7

2014/01/28 - 23:15

admin said
From my PiPO M9 Pro test results, I am getting some kind of Android restart (not really a full reboot) after I did Add / User and I clicked OK button.

If I am not mistaken, this is expected behaviour : the chain of events more or less forces the newly added user to promptly change his/her account details (display name, password mechanism, ...).

didierm

Contributor

Forum Posts: 12

Member Since: 2013/07/19

Offline

Thanks Received: 4

8

2014/01/28 - 23:22

admin said

I have posted a rebuilt firmware for the PiPO M9 pro with the multi-user patch in the M9 Pro section:

Glad to be of help ; without your reference to Rockchip's KK source code, this would never have been possible. Thanks again !

didierm

Contributor

Forum Posts: 12

Member Since: 2013/07/19

Offline

Thanks Received: 4

9

2014/01/28 - 23:33

manupc said
Thanks didierm. I got it working now. I will implement it in my rom and share soon. Shame something like that wasnt working before. Nice find!

My pleasure.

Aren't you the manupc of the Rockchip-4.4.2 modified CWM and OC kernel ?

Do you mind me asking some questions ? Feel free to reply or not, as you see fit.

Do you have any references to your CWM and/or kernel modifications ?

Is your kernel RK3188-generic, or is it adapted to specific brands (Pipo, iFive, ...) ?

What is your build environment for kernel development ?

Myself, I am looking into including Xposed/XPrivacy (and some system-oriented F-Droid OSS apps) into an iFive-oriented firmware roll-out. XPrivacy seems to be rapidly evolving into a decent multi-user aware app, which IMO is required when sharing a tablet with others (kids !).

If you like our web site, applications and firmwares, feel free to support our site. Donations are used to pay the bills for our server hosting costs, development tools and purchase new tablets to support.

manupc

Contributor

Forum Posts: 18

Member Since: 2013/08/27

Offline

Thanks Received: 12

11

2014/01/29 - 23:53

didierm said

My pleasure.

Aren't you the manupc of the Rockchip-4.4.2 modified CWM and OC kernel ?

Do you mind me asking some questions ? Feel free to reply or not, as you see fit.

Do you have any references to your CWM and/or kernel modifications ?

Is your kernel RK3188-generic, or is it adapted to specific brands (Pipo, iFive, ...) ?

What is your build environment for kernel development ?

Of course, no problem.

To be honest, i didnt build a CWM recovery and kernel from source. I just applied modifications to previous builds.

In case of CWM recovery, it is a simple copy-paste of files pointing to the right storage partitions and taken from the original kitkat recovery.

In case of the kernel modification, and since i dont have a kernel source, i hex searched a kernel file for a group or table of some specific voltages/frequencies. Once found, replaced them with desired values.

As i know, my kernel does only work on ifive x2, since no other rk3188 kernel ive tested was working on my device.

Im sure you could apply the same method with any other rk3188 kernel. It is just not that funny working with binary code XD

If you need more information im pleasured to help

jazzman123

New Member

Forum Posts: 4

Member Since: 2014/01/30

Offline

12

2014/02/02 - 09:36

Is there any change a new ROM will be out with this patch for the ifive x3 ?

Thank you for your great work!

admin

admin

Forum Posts: 5878

Member Since: 2010/09/11

Offline

Thanks Received: 3169

13

2014/02/02 - 19:29

jazzman123,

Maybe next week, once the current custom firmwares in the works are finished.

Cheers.

If you like our web site, applications and firmwares, feel free to support our site. Donations are used to pay the bills for our server hosting costs, development tools and purchase new tablets to support.

jazzman123

New Member

Forum Posts: 4

Member Since: 2014/01/30

Offline

14

2014/02/02 - 21:11

Thanks

Nilist

New Member

Forum Posts: 3

Member Since: 2014/02/23

Offline

15

2014/02/24 - 05:55

The creation of new users work, but you are stuck with the name "New User". trying to change the name by tapping on it in setting causes settings to crash.

If you would like a different user name, I found this work-around:

From a Terminal window enter

"su"

"pm create-user someusername"

replace someusername with the name you would like to see on the lock screen (doesn't have to be your gmail name)

Very much appreciated by my kids when they can log on with their own names