Skip to content

Instantly share code, notes, and snippets.

@Akianonymus
Last active June 8, 2025 10:08
Show Gist options
  • Save Akianonymus/1fb3c040080f79e7a015c7948e874499 to your computer and use it in GitHub Desktop.
Save Akianonymus/1fb3c040080f79e7a015c7948e874499 to your computer and use it in GitHub Desktop.
Create multiple profiles for ISLAND app

Setup multiple island spaces

Note: Must have an work profile already setup, So that we can modify fw.sys.max_profiles to allow more work profiles

su # to gain root access
resetprop ro.debuggable 1 
am restart

Modify fw.sys.max_profiles prop

setprop fw.sys.max_profiles 10

Create new work profile

# this is the user id of the initial island which was setup from the application
exid="10"
id="$(pm create-user --profileOf 0 --managed Island | grep -Eo '[0-9]+')"
echo "ID: ${id}"

Open /data/system/users/11.xml and add following code below <name> Island </name> but above <user>

where 11 is the user id of newly created work profile

<restrictions no_wallpaper="true" />
<device_policy_local_restrictions>
    <restrictions_user user_id="10">
        <restrictions allow_parent_profile_app_linking="true" />
    </restrictions_user>
</device_policy_local_restrictions>

It should look like this

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<user id="10" serialNumber="28" flags="4144" type="android.os.usertype.profile.MANAGED" created="1652171823625" lastLoggedIn="1652351262370" lastLoggedInFingerprint="Sat Apr 23 21:25:20 IST 2022" profileGroupId="0" profileBadge="0">
    <name> Island </name>
    <restrictions no_wallpaper="true" />
    <device_policy_local_restrictions>
        <restrictions_user user_id="10">
            <restrictions allow_parent_profile_app_linking="true" />
        </restrictions_user>
    </device_policy_local_restrictions>
    <lastRequestQuietModeEnabledCall>1652340558380</lastRequestQuietModeEnabledCall>
</user>

Execute these commands

cd "/data/system/users/${exid:?}" || exit 1
cp app_idle_stats.xml appwidgets.xml \
   device_policies.xml \
   package-restrictions.xml profile_owner.xml \
   settings_secure.xml settings_ssaid.xml settings_system.xml \
   "/data/system/users/${id:?}/"
@underOATH777
Copy link

Would it be possible to post a screenshot of what the phone and also the island app looks like with this? will I have multiple work tabs and would I be able to clone apps more than once?!

@SanaurAsif
Copy link

SanaurAsif commented Jun 7, 2024

Hey, my /data/system/users/11.xml looks like this :
1000000514
How can I proceed?
[And can I contact with you anyhow?]

@Akianonymus
Copy link
Author

Would it be possible to post a screenshot of what the phone and also the island app looks like with this? will I have multiple work tabs and would I be able to clone apps more than once?!

Sorry but i no longer have a rooted device to check if it still works, so can't provide a screenshot.

Yes, multiple tabs show, and yes you can clone one app more than once.

@Akianonymus
Copy link
Author

Akianonymus commented Jun 7, 2024

Hey, my /data/system/users/.xml looks like this : How can I proceed? [And can I contact with you anyhow?]

Hmm, seems like a different file type.

@underOATH777
Copy link

Does the device have to be rooted for it to work?

@e-t-l
Copy link

e-t-l commented Aug 15, 2024

Yes.

@Lhn94
Copy link

Lhn94 commented Aug 30, 2024

Hey, my /data/system/users/11.xml looks like this : 1000000514 How can I proceed? [And can I contact with you anyhow?]

Use MT manager to open the xml file to read/edit xml files. Other text editor won't be able to render it correctly.

@gh4rv5
Copy link

gh4rv5 commented Sep 5, 2024

do you think it could work using termux and shizuku for root permissions (for unrooted devices)?

@e-t-l
Copy link

e-t-l commented Sep 5, 2024

No. This requires editing the files of the operating system itself in /data/system. Shizuku does not provide true root access, it provides apps with capabilities of unrooted ADB, which cannot access system folders.

@423428309843290
Copy link

Hello friend, how are you? When I ran the command to create the new user work profile with the command below, I got the error below. Can you help me? I can pay for your support friend:
command:

this is the user id of the initial island which was setup from the application

exid="10"
id="$(pm create-user --profileOf 0 --managed Island | grep -Eo '[0-9]+')"
echo "ID: ${id}"

error:
pstar:/ # # this is the user id of the initial island which was setup from the application
]+')"
echo "pstar:/ # exid="10"
{id}"pstar:/ # id="$(pm create-user --profileOf 0 --managed Island | grep -Eo '[0-9]+')"
Error: android.os.ServiceSpecificException: Cannot add more profiles of type android.os.usertype.profile.MANAGED for user 0 (code 6)
Error: couldn't create User.
1|pstar:/ # echo "ID: ${id}"
ID:

@danielsanaw
Copy link

same issue, you found any solution?

RED8D7:/ # id="$(pm create-user --profileOf 0 --managed Island | grep -Eo '[0-9]+')"
Error: android.os.ServiceSpecificException: Cannot add more profiles of type android.os.usertype.profile.MANAGED for user 0 (code 6)
Error: couldn't create User.
image
Screenshot 2025-05-20 014201

@LindaFerum
Copy link

I hereby (humbly) report a way for obtaining multiple work profile system that works even with limited root (no LSPosed/Zygisk support needed, so can work with Schnatterer-flavor "buttoned up" secure rooted Graphene (and on any modern android that has any sort of Magisk root)

cc @Akianonymus @SanaurAsif @danielsanaw @423428309843290

GrapheneOS/os-issue-tracker#5507 (comment)

@danielsanaw
Copy link

cant it be done on stock rom, or graphene os is must?

@LindaFerum
Copy link

@danielsanaw almost any ROM will work (tho of course some weirder more exotic ones may make things harder)

Basically if both Magisk and the ancient magiskhide propsconfig module work chances are high this trick will work

@danielsanaw
Copy link

hey thanks again for the time to reply.

@danielsanaw
Copy link

@danielsanaw almost any ROM will work (tho of course some weirder more exotic ones may make things harder)

Basically if both Magisk and the ancient magiskhide propsconfig module work chances are high this trick will work

hey linda could you help me out here please, i keep getting this error.
image
"No Busybox found"

i've flashed "built-in busybox" magisk module + copied the binary file into root/data/adb/modules/busybox. directroy.

still when i run "props" command in terminal su , it kept saying "busybox" not installed.

im using apatch root.

+i kept getting "system read-only" when try to install busybox via busybox-installer.

modules in apatch= magisk's builtin busybox, magical overlaysfs, magiskhide props config, nsg sepolicy for A11, zygisk next, lsposed.

please help me out here, guys. Thanks in advanced.

@LindaFerum
Copy link

LindaFerum commented Jun 8, 2025

@danielsanaw
I don't have any experience with apatch root, but magisk has its own busybox which if memory serves lives at /data/adb/magisk/busybox

Apparently the propsconfig module expects it to be present which I presume is not the case with apatch root

Do bear in mind that module appears heavily dependent on other magisk instrumentation, such as resetprop tool and Magisk's early boot script semantics.

I don't know how closely can apatch root emulate the necessary environment.

However, if you have Zygisk and Lsposed you can try this tool which does what my lifehack does but via lsposed hooking

https://github.com/icepony/AlwaysCreateUser

(In fact my hack was born from carefully looking at what alwayscreateuser does and finding a way to recreate it without Zygisk, because getting Zygisk on Graphene is a massive boondongle I am too lazy to mess with)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment