中文版本
Recently I found module list in Xposed become empty after I upgrade my Nexus5 to 6.0.1 (M4B30Z, Dec 2016). And all the modules are not activating. So I open logcat and see the following:
|
01-10 21:35:02.682 294 294 E Xposed : Cannot load any modules because /data/data/de.robv.android.xposed.installer/conf/modules.list was not found |
Rovo89 said on a xda post that this file should be created if any module is activated. But somehow it didn’t do so on my Nexus5. So I create one myself and set correct permission (0644) and uid (you can run the Xposed Installer app and check the uid through ps |grep xposed). Then I reboot and check logcat again:
|
01-10 21:29:39.485 295 295 E Xposed : Errors during Xposed initialization 01-10 21:29:39.485 295 295 E Xposed : java.io.IOException: Permission denied while reading /data/data/de.robv.android.xposed.installer/conf/modules.list |
Looks like it’s still not working.
Then I realise that Android started to set SELinux to enforce from Lollipop (5.0) so this should be the problem. (We can use dmesg|grep audit to check if the problem really related to SELinux. ) I compared a random file under /data/data to the file we just created:
|
root@hammerhead:/ # ls -Z /data/data/de.robv.android.xposed.installer/cache/repo_cache.db -rw-rw---- u0_a379 u0_a379 u:object_r:app_data_file:s0:c512,c768 repo_cache.db root@hammerhead:/ # ls -Z /data/data/de.robv.android.xposed.installer/conf/modules.list -rw------- root root u:object_r:app_data_file:s0 modules.list |
So all we need to do is to change this conf/modules.list to u:object_r:app_data_file:s0:c512,c768 as well
|
root@hammerhead:/ # restorecon /data/data/de.robv.android.xposed.installer/conf/modules.list |
restorecon is a applet shipped with toybox, we can also use chcon to manually set SELinux context.