Tasssadar / multirom

MultiROM for Nexus 7 and LG Optimus One
http://forum.xda-developers.com/showthread.php?t=2011403
GNU General Public License v3.0
415 stars 274 forks source link

Set correct context for .layout_version #65

Closed davidepianca98 closed 9 years ago

davidepianca98 commented 9 years ago

If .layout_version remains unlabeled the phone won't be able to access the sdcard Thanks to @nkk71 for finding the issue

davidepianca98 commented 9 years ago

I made a mistake, those lines must be out of the if(rewrite) statement

nkk71 commented 9 years ago

Thanks @KINGbabasula for your help, but it didn't work for me (HTC One M7), because of two reasons 1- prebuilt busybox doesn't seem to have SELinux extensions (but even changing the above) 2- SELinux hasn't been initialized when that function is running, so I get "SELinux is disabled" at that moment in time

my workaround, was to inject init.rc with an "import"; whose sole purpose it to run a "restorecon /data/.layout_version", on early-init

now working fine... yay... gonna do more testing though....

Tasssadar commented 9 years ago
I made a mistake, those lines must be out of the if(rewrite) statement

@KINGbabasula Why, just to fix already installed systems? The file should never be unlabeled unless created by MultiROM.

davidepianca98 commented 9 years ago

@Tasssadar not sure why it didn't always work