Originally Posted by bounti
What ever came of this? I too would like to know how to backup data from a restricted profile.
The apks aren't necessary, as the primary user is the one who's allowed to installed apps anyway, but the data itself is what's important.
Did the TB team ever respond to you?
I found a way to do it. It's not very easy, I'm afraid. You need root, busybox, and pretty good familiarity with the command line (adb shell or terminal emulator on the device itself. However with this much typing, I really recommend adb shell...)
App data for other than the main user is stored at
where XX is a number. My restricted user was numbered "10".
so to backup, just make a tar archive of that directory:
tar cf /sdcard/whatevername.tar com.the.application
tar xf /sdcard/whatevername.tar
but, this probably only works for the very same user, because the file ownerships need to match.
So if it's not the same user, you need to fix the ownership of the restored files, but not the "lib" symlink.
With the games (the different angry birds...) I cared about had the folders cache, databases, files and shared_prefs. If there are other folders, you need to need to include them too (I'm not sure what folders there can be).
So to fix the ownership of all those, before extracting the backup (the tar xf command), first see who the owner is:
ls -ld com.the.application
it says something like
drwxr-x--x u11_a89 u11_a89 2013-09-12 23:14 com.the.application
here the u11_a89 is the important value.
Then, do the above tar xf command, and run
chown uXX_aYY:uXX_aYY .
find cache databases files shared_prefs | xargs chown uXX_aYY:uXX_aYY
Where uXX_aYY obviously is the value the ls command showed before.
By the way, this way you can also copy data from one user to another, e.g. from the main user (who can use titanium backup etc) to the restricted user or the other way around.
Sorry if I'm not very clear.. maybe someone could make a more understandable guide from this.
Disclaimer: I tried this on a rooted stock 4.3 nexus 7 (2012
). But I think it's the same on any android 4.3 based device. Also, I really only did this with the angry birds games, I don't know if other apps need other tricks. (well except Bad Piggies is different, the data is /sdcard/Android/data/com.rovio.BadPiggies, and it can be copied with a file manager, without root.)