Closed gontazaka closed 6 years ago
You are correct. Because I was testing in the VirtualXposed which hooked apps are running in the same permission context with MinMinGuard, I did not encounter this issue.
The reason I changed MODE_WORLD_READABLE
to MODE_PRIVATE
is the new sdk requires it.
I thought XSharedPreferences.makeWorldReadable
should solve this issue but it didn't.
I will try to find another solution or do you have any suggestion?
Thank you for your reply. :smile:
I have two ideas.
a. Granting permissions from the MinminGuard process
b. Use ContentProvider
This is the same way as XSharedPreferences.makeWorldReadable()
.
for example
modPref.edit()
.putBoolean(info.packageName, false)
.putBoolean(Common.getWhiteListKey(info.packageName), true)
.apply();
File modPrefFile = new File(Environment.getDataDirectory(), "data/" + getPackageName() + "/shared_prefs/" + Common.MOD_PREFS + ".xml");
modPrefFile.setReadable(true, false);
se this post: https://github.com/bigsinger/AndroidIdChanger/issues/26
There is a library created for use in xposed. https://github.com/apsun/RemotePreferences
se this post: https://github.com/rovo89/XposedBridge/issues/74
fixed 4481aee00269c4e46b4baf73e01430b690bb2dc4
Thank you for your reply. :smile:
I have two ideas.
a. Granting permissions from the MinminGuard process
b. Use
ContentProvider
a. Granting permissions from the MinminGuard process
This is the same way as
XSharedPreferences.makeWorldReadable()
.for example
modPref.edit() .putBoolean(info.packageName, false) .putBoolean(Common.getWhiteListKey(info.packageName), true) .apply(); File modPrefFile = new File(Environment.getDataDirectory(), "data/" + getPackageName() + "/shared_prefs/" + Common.MOD_PREFS + ".xml"); modPrefFile.setReadable(true, false);
se this post: https://github.com/bigsinger/AndroidIdChanger/issues/26
b. Use ContentProvider
There is a library created for use in xposed.
https://github.com/apsun/RemotePreferences
se this post: https://github.com/rovo89/XposedBridge/issues/74
I need some help I appreciate if you could help
I installed and tested version 2.0.1. It don't work correctly. I think about the cause of the problem(and workaround) as follows.
The callback function called by xposed is inaccessible because of insufficient permissions on
"Modsettings.xml"
. The difference from the previous version is:/data/data/tw.fatminmin.xposed.minminguard/shared_prefs/ModSettings.xml
Therefore, version 2.0.1 can also be used to function by manually changing the
"Modsettings.xml"
permissions.I paid attention to the following changes. But I didn't know how to solve the problem.
SharedPreferences("ModSettings", MODE_WORLD_READABLE)
SharedPreferences("ModSettings", MODE_PRIVATE)
relevant information: