-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Main user SELinux Context applied even on other users #272
Comments
I'm having the same user visible behavior on LineageOS for MicroG 15.1. Didn't yet check file contexts etc, but I'd imagine it's the same. Also trying to restore apps to a work profile. @SebiderSushi did you find some manual way to fix up things after a restore? |
For me the fix was
Followed by a reboot |
I don't have a rooted device at hand right now but i think i never tried anything other than Edit: Okay nevermind i pulled out rooted adb on a LineageOS 15.1 and oh boy does running One possible workaround i use in a shell script when i restore data in recovery:
(see here for the full app data restore shell script function) |
For me the manual |
ROM: unofficial build of Resurrection Remix 7.0.2 based on LineageOS 16.0 based on AOSP 9
oandbackup version: 0.3.5-universal (from F-Droid)
Problem
When restoring app data on a secodary device user or work profile (implemented as a special, seperated user account from androids point of view), oandbackup appears to be unable to apply the proper SELinux contexts, thus preventing the restored application from reading its data.
Expected behavior
Current behavior
After following the aforementioned steps, the restored app crashes upon launch. Using a terminal emulator, it is possible to reveal the following:
/data/user/[id]
Example with app
org.lineageos.eleven
under "New user"ls -Z /data/user/11
before restoring data (excerpt)ls -Z /data/user/11
after restoring data (excerpt)ls -Z /data/user/0
for comparison (excerpt)Notice that
org.lineageos.eleven
is in the contextc512
after restore whilec523
would be required to allow access if the app is launched with the "New user" logged into the android device.Running
restorecon -R /data/user/11/$packagename
on any given app data folder sets the wrong contextc512
in my case. As oandbackup probably uses this tool to restore contexts, this looks like the root of the problem. So, is this a bug in my ROM or is it simply incorrect to fully rely onrestorecon
in all cases?The text was updated successfully, but these errors were encountered: