pylerSM/XInstaller

Change preferences => not world readable preferences

pylerSM opened this issue · 3 comments

If we change any setting, then prefs file lose "world readable" attribute and XInstaller (and any other Xposed modules) can't load other than word readable preferences.

    @Override
    public void onPause() {
        super.onPause();

        // Set preferences file permissions to be world readable
        File prefsDir = new File(getActivity().getApplicationInfo().dataDir, "shared_prefs");
        File prefsFile = new File(prefsDir, getPreferenceManager().getSharedPreferencesName() + ".xml");
        if (prefsFile.exists()) {
            prefsFile.setReadable(true, false);
        }
    }

I will test this code

Okey, good