[APP] Multi-User App Share

Search This thread

TxaEkis

Member
Aug 8, 2012
49
15
Guadalajara
Really nice app, just what i was looking for!

Just one thing, on certain games where u are required to download data before play, the data is shared for both profiles (just downloading on the main profile before sharing it), but for some games (ex. Shadowgun) this doesn't happen and you are asked to download it again for the second profile, would be nice if you could check into this, as duplicating data is what i was looking to avoid..

Thanks again, and good work on this! :good:
 

Zatta

Inactive Recognized Developer / Contributor
Dec 22, 2010
2,177
1,222
Sneek
Would you be so kind to share the apk also as i would like to try it on my Samsung galaxy s3 (would save me some time tinkering with the xml).

Looks like you have disabled various devices on the play store, at least it isn't compatible with my device.

Taptalked u see .. əəs n pəʞlɐʇdɐʇ
 

KidCarter93

Forum Moderator
Staff member
Mar 26, 2012
14,679
8,083
30
Coventry, UK
Huawei P Smart+ 2019
Redmi 7A
Would you be so kind to share the apk also as i would like to try it on my Samsung galaxy s3 (would save me some time tinkering with the xml).

Looks like you have disabled various devices on the play store, at least it isn't compatible with my device.

Taptalked u see .. əəs n pəʞlɐʇdɐʇ
He posted the apk in this post :)

Sent from my Nexus 7 using xda premium
 
  • Like
Reactions: Zatta

Zatta

Inactive Recognized Developer / Contributor
Dec 22, 2010
2,177
1,222
Sneek
Am I that stupid?! Hmm, apppearently :D

Taptalked u see .. əəs n pəʞlɐʇdɐʇ
 

Zatta

Inactive Recognized Developer / Contributor
Dec 22, 2010
2,177
1,222
Sneek
Goodmorging,

I have used your app to setup a user account for my kids on my phone. I wanted to get rid of everything they can use to ****up, in fact, all I wanted to keep for them were some games.
What I did to remove the play store was to ADD "enabled=3" to the xml file. There was no "enabled"item so your app couldn't change it to 3.
Code:
<pkg name="com.android.vending" [B]enabled="3"[/B]>
<enabled-components>[INDENT] <item name="com.google.android.finsky.receivers.BootCompletedReceiver"/>
<item name="com.android.vending.AssetBrowserActivity"/>
<item name="com.google.android.finsky.receivers.AccountsChangedReceiver"/>
<item name="com.google.android.finsky.receivers.PackageMonitorReceiver$RegisteredReceiver"/>
[/INDENT]</enabled-components>
<disabled-components>[INDENT] <item name="com.google.android.finsky.activities.DebugActivity"/>
[/INDENT]</disabled-components>
</pkg>
The same goes for the following, where I added enabled is "2" with the same result.
Code:
pkg name="com.google.android.gm" enabled="2"
pkg name="com.android.email" enabled="2"
pkg name="com.android.gallery3d" enabled="2"
One more thing, I think you use the sdcard/0 to copy some files to, user10_info.xml, user10_package-restrictions.xml and userlist.xml. I usually use /data/data/com.mypackage.name/files to copy files to that need to be modified or read (if not readable). That location is the result from
Code:
String data_storage_root = getBaseContext().getFilesDir().toString();
Do we already know the difference between enabled = "1" enabled="2", enabled="3" (system apps??), inst="false" (for user apps that are installed before adding a user??) and inst="false" stopped="true" nl="true" (for user apps installed after adding a user??)
 
  • Like
Reactions: dragid10

jeepguy04

Member
Jun 8, 2006
48
47
I have used your app to setup a user account for my kids on my phone. I wanted to get rid of everything they can use to ****up, in fact, all I wanted to keep for them were some games.
What I did to remove the play store was to ADD "enabled=3" to the xml file. There was no "enabled"item so your app couldn't change it to 3.
Thanks for the info. I kinda figured out the enabled=3 a while back see this thread, but I haven't had a chance to implement it yet. Trying to fully understand all the values in the xml.

The enabled value is the component-enabled-state from Package Manager, see http://developer.android.com/reference/android/content/pm/PackageManager.html
So it appears 2 and 3 disable it, 0 is default and 1 enables it (although 0,1 seem to not be used for any apps in the xml or at least not on mine)

And the difference between 2 and 3 is that 3 is user disabled so they should be able to reenable it in the app manager where 2 is system diabled. So I wonder if setting an app to enabled=2 would not only remove it from the user but prevent them from enabling it back??? Time to do some testing.

One more thing, I think you use the sdcard/0 to copy some files to, user10_info.xml, user10_package-restrictions.xml and userlist.xml. I usually use /data/data/com.mypackage.name/files to copy files to that need to be modified or read (if not readable). That location is the result from
Code:
String data_storage_root = getBaseContext().getFilesDir().toString();

Actually I need to take that part out. I was just copying the files to the sdcard to make it easier on me pull them off my tablet and verify I was modifying the xml correctly. I can remove that and stop cluttering up everybody's internal storage. Sorry about that.
 
  • Like
Reactions: TxaEkis

jeepguy04

Member
Jun 8, 2006
48
47
And everybody asking about sharing data between users. I will probably look into it down the road but not in the immediate future. Fist I want to get the system apps settled. I also feel there will be alot of testing that needs to be done to see if sharing data directory on apps is stable. It would be cool to have to option to share data from some apps but not others.
 
  • Like
Reactions: TxaEkis

keshonok

Member
Dec 30, 2012
5
1
And everybody asking about sharing data between users. I will probably look into it down the road but not in the immediate future. Fist I want to get the system apps settled. I also feel there will be alot of testing that needs to be done to see if sharing data directory on apps is stable. It would be cool to have to option to share data from some apps but not others.

I've found this thread after I'd found the app and tried it on my Nexus 7. I have a few questions though after using it for a couple of days.

- Is it necessary to reboot the system after each session of sharing an app? I am not proficient in Android at all, but in any Unix system (which Android is a relative to) you can simply restart a certain service or daemon without rebooting the whole system, unless it's the kernel that has been changed.

- When an app is made shared between users, my understanding is that certain system data is written in the space of that user. When you remove the app without un-sharing it first, that leaves the system data in the user space intact, essentially polluting the system. Also, if you reinstall the application either under the owner's account or under the user's account, my feeling is that the the above mentioned program data and system data is picked up again under the user's account, which is kind of wrong. I am not absolutely sure if that's what's happening, but I've seen some strange behavior. I can imagine that it would be possible to catch these cases and automatically remove the leftover data under user accounts for deleted apps.

- I shared the "Kid's shell" app to my kid's account on my tablet. This app can be made the default launcher. However I was unable to do that for the kid's account. I've tried everything, the the system thinks (settings->apps->Kids Shell) that the "Kid's Shell" is the default launcher indeed, but the standard "launcher" still starts. Is there anything I don't understand, or is there something missing?

Thanks for a great app, and I am sure it improves a lot in the future. :good:
 
Last edited:

jeepguy04

Member
Jun 8, 2006
48
47
New version is out that should work with system apps. Setting enabled=2 does in fact remove the app from the user and also makes it where the user cannot enable the app in settings. Enabled=3 removes the app but the user can go into settings and enable it.

Right now I'm using enabled=2. Do you guys think that is best or would you rather disable it but leave the ability to enable it back in the app settings? Or should I make a dialog and let you choose which option to do for each system app.


For thos using phones and cannot see the app in the play store... here is the link to the new version https://dl.dropbox.com/u/43302928/MultiUserAppShare.apk
 

jeepguy04

Member
Jun 8, 2006
48
47
- Is it necessary to reboot the system after each session of sharing an app? I am not proficient in Android at all, but in any Unix system (which Android is a relative to) you can simply restart a certain service or daemon without rebooting the whole system, unless it's the kernel that has been changed.
There very well may be a service or something but right now I don't think there is much knowledge about exactly what goes on under the hood when an app is downloaded on second account that is already on the first. But there must be a way to do it without rebooting because the app shows up immediately if you redownload it from the play store instead of doing this hack. Right now rebooting is necessary because I bet it only reads that xml file that I'm modifying on boot. Maybe I can go digging through the android source to see if there is a better way. But for now you must reboot.

- When an app is made shared between users, my understanding is that certain system data is written in the space of that user. When you remove the app without un-sharing it first, that leaves the system data in the user space intact, essentially polluting the system. Also, if you reinstall the application either under the owner's account or under the user's account, my feeling is that the the above mentioned program data and system data is picked up again under the user's account, which is kind of wrong. I am not absolutely sure if that's what's happening, but I've seen some strange behavior. I can imagine that it would be possible to catch these cases and automatically remove the leftover data under user accounts for deleted apps.
This method should be no different that installing apps on the secondary user account the normal way. I'm not writing any system data to the secondary user, it is all this done by the android OS. To my knowledge it is the exact same whether this hack is used or if you install apps the official way.

However if anybody wants to do some in depth testing about how app data is added and removed for secondary users when installing/uninstalling apps or sharing/unsharing apps via this method, I'd love to see the results. Should be able to monitor the /data/user/XX folders before and afeter and see if the two ways differ any. I will when I get some extra time.

- I shared the "Kid's shell" app to my kid's account on my tablet. This app can be made the default launcher. However I was unable to do that for the kid's account. I've tried everything, the the system thinks (settings->apps->Kids Shell) that the "Kid's Shell" is the default launcher indeed, but the standard "launcher" still starts. Is there anything I don't understand, or is there something missing?
I bet this is due to extra lines in the package restriction file for that app. There are some apps, especially system apps that have extra nodes in the xml for enabled-components and disabled-components. I'm betting for apps like launchers there may be extra work that I need to do to xml. Look in the package-restrictions.xml file under /data/system/users/0/ and compare it to the one for your secondary user /data/system/users/XX/. See if the xml for that app has anything extra on the main user.

I will try to download "Kid's Shell" and look for myself and see what might be different about it.


Thanks for a great app, and I am sure it improves a lot in the future. :good:
Thanks. Hopefully the more we learn about the whole multi-user system that google put in place the better I can make the app.
 

crypticc

Senior Member
Aug 22, 2009
1,249
174
London
Google Play billing service is for accepting donations via in app purchase. Under settings anybody can donate if they feel the app has value to them... so far I've gotten two $1 donations...lol

network access is for connecting to internet for ads and also for ACRA (Application Crash Report for Android) it basically sends error reports to me to help fix errors. It can be disabled under settings if you do not want it reporting errors.

Just doubled it. Lol. All my apps worked except Met Office weather app for some reason. ll done
 

guardian-bs

Member
Jan 19, 2013
5
0
User Installed Apps

Great app, just a couple of questions

1. This app is offered in the list of apps to share with other Users, but this app requires Root and Users do not have access to Root and cannot therefore run this app, or am I missing something ?

2. If a User (not Owner) installs an app then it is not available to the Owner and as the Multi-User App Share app is not usable by Users there is no way to share the installed app with the Owner / Users (unless they install it themselves of course). It would be nice if this app could list apps installed by Users with the option to make them available to the Owner (who could then make them available to other Users).
 

Zatta

Inactive Recognized Developer / Contributor
Dec 22, 2010
2,177
1,222
Sneek
Hi pal, messaged you via the playstore before but thought this mght be quicker, any chance of making this compatible with the galaxy s3? could really use this :) Thanks.

Check post 32. You can download it from there.

Taptalked u see .. əəs n pəʞlɐʇdɐʇ
 

Mr.R™

Senior Member
Aug 11, 2008
899
204
OnePlus 8 Pro
Sony Xperia 5 II
Check post 32. You can download it from there.

Taptalked u see .. əəs n pəʞlɐʇdɐʇ

Excellent thanks i missed that :/

Anyway, got it installed, kinda does the job, ALL apps are now shared, but if i try to unshare any/all apps upon reboot all apps are still shared no matter what i do. Is this an issue thats been seen before or just me? Im using an s3 on paranoid android with siyah kernal if it matters, any additional info can be supplied if needed :)
 

TxaEkis

Member
Aug 8, 2012
49
15
Guadalajara
Excellent thanks i missed that :/

Anyway, got it installed, kinda does the job, ALL apps are now shared, but if i try to unshare any/all apps upon reboot all apps are still shared no matter what i do. Is this an issue thats been seen before or just me? Im using an s3 on paranoid android with siyah kernal if it matters, any additional info can be supplied if needed :)

I have the same issue, running CleanRom 3.1.1 (N7) when i share an app upon reboot all apps are shared including system apps
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    I have created an app that will help share apps across users on google's new 4.2 multi user feature.

    Thanks to mentose457 and unwired for giving me the idea.
    see this thread (http://xdaforums.com/showthread.php?t=1994169)

    It works by removing package elements from user's package-restriction.xml file to add the app and adding the package element back to remove the app. (located at \data\system\users\10\package-restrictions.xml where 10 is the user's id)

    This is quickly thrown together and will likely have a ton of bugs, but I wanted to go ahead and get it out there for testing.

    - This is BETA
    -You must have ROOT
    - This changes system data on non documented files it could screw something up.
    - I'm not responsible for any problems this causes or lost data or bricked or broken devices
    - please use cation

    - it is currently built to run on main user to enable or disable apps on secondary users (once root is fully working on secondary users I will see about making it run correctly on secondary user's account)
    - not tested thoroughly with paid apps*
    - does not currently support system apps**
    - due to the way I pull the app list from the package manager some installed apps may not show as available to add/remove
    - apps installed first on a secondary user's profile will probably not show in the list to add/remove

    *paid apps seemed to work but I did not have internet access during testing. My theory is that any paid apps that use Google's license verification will not work or not work for long. So adding your Google Account to the secondary user's play store is probably still the best way to share paid apps.

    **The entries in the xml for system apps is different. Therefore I will have to research them more before getting it to work or deciding not to mess with those apps. Currently some will show not installed on other users even though they are and removing/adding them will not work correctly.


    ------> DOWNLOAD HERE https://play.google.com/store/apps/...tm_medium=forum&utm_campaign=app_announcement

    I'd love to get feedback to what is working and what is not. Also if anybody figures out anything more about the package-restriction.xml file I'd love to hear it. Especially when it comes to system apps.
    2
    Get AppShare instead, free version forces you to reboot after 3 changes before you can change more, slightly annoying but at least it works and doesn't share all apps like this one did :)

    Sent from my GT-I9300 using xda app-developers app
    1
    Yes. Symlinking the photos/music folders outside /data/ should work. But I don't have a 4.2 device(nor willing to set up an emulator) so I'm unsure.
    1
    Would you be so kind to share the apk also as i would like to try it on my Samsung galaxy s3 (would save me some time tinkering with the xml).

    Looks like you have disabled various devices on the play store, at least it isn't compatible with my device.

    Taptalked u see .. əəs n pəʞlɐʇdɐʇ
    He posted the apk in this post :)

    Sent from my Nexus 7 using xda premium
    1
    Goodmorging,

    I have used your app to setup a user account for my kids on my phone. I wanted to get rid of everything they can use to ****up, in fact, all I wanted to keep for them were some games.
    What I did to remove the play store was to ADD "enabled=3" to the xml file. There was no "enabled"item so your app couldn't change it to 3.
    Code:
    <pkg name="com.android.vending" [B]enabled="3"[/B]>
    <enabled-components>[INDENT] <item name="com.google.android.finsky.receivers.BootCompletedReceiver"/>
    <item name="com.android.vending.AssetBrowserActivity"/>
    <item name="com.google.android.finsky.receivers.AccountsChangedReceiver"/>
    <item name="com.google.android.finsky.receivers.PackageMonitorReceiver$RegisteredReceiver"/>
    [/INDENT]</enabled-components>
    <disabled-components>[INDENT] <item name="com.google.android.finsky.activities.DebugActivity"/>
    [/INDENT]</disabled-components>
    </pkg>
    The same goes for the following, where I added enabled is "2" with the same result.
    Code:
    pkg name="com.google.android.gm" enabled="2"
    pkg name="com.android.email" enabled="2"
    pkg name="com.android.gallery3d" enabled="2"
    One more thing, I think you use the sdcard/0 to copy some files to, user10_info.xml, user10_package-restrictions.xml and userlist.xml. I usually use /data/data/com.mypackage.name/files to copy files to that need to be modified or read (if not readable). That location is the result from
    Code:
    String data_storage_root = getBaseContext().getFilesDir().toString();
    Do we already know the difference between enabled = "1" enabled="2", enabled="3" (system apps??), inst="false" (for user apps that are installed before adding a user??) and inst="false" stopped="true" nl="true" (for user apps installed after adding a user??)