XposedBridge
XposedBridge copied to clipboard
Cant read preferences Samsung S7 Edge
I have apps that put preferences like
SharedPreferences.Editor bar = preferences.edit();
bar.putInt("distance_end", 1);
bar.putInt("distance_start", 25);
i was tried :
XSharedPreferences prefs = new XSharedPreferences(PACKAGENAME, PREF_NAME);
prefs.makeWorldReadable();
prefs.reload();
or
` new File("/data/data/packagename/shared_prefs/pref.xml").setReadable(true, false);`
or
File pkg = new File("/data/data/packagename/shared_prefs/pref.xml");
prefs = new XSharedPreferences(pkg);
but, still read default value from preference when I try to read
int start = prefs.getInt("distance_start", 0);
int end = prefs.getInt("distance_end", 25);
it's return start = 0 end = 25
on another nougat devices my apps works.
any ideas?
sorry for bad english
Hello, anyone?
Verify manually that the file is world-readable. Also the folder of your app must at least have "x" for others/world. It's also likely that the data partition is encrypted, then it's not readable when Zygote starts. Then you have to use the user_de folder, which is for device encrypted files. You'll need to create a different Context object for that.
hello @rovo89 can you show me an example? im newbie about this
@aldyjrz I also had this pro. I'm crazy. do you solved?
@magicbaby819 solved with just give access your app to superuser and make chmod 777 data/data/urapp/shared_prefs
solved ? chmod 777 not solve this problem.
Any good idea?
anyone knows?
try to use contentprovider