Comments (4)
Can you try enabling strict mode (see the readme) and attach a logcat? Thanks.
Also not sure how well RemotePreferences plays with file permissions. You shouldn't need to chmod (setReadable
) the preference xml files for the library to work. Try removing that code and see if it helps.
from remotepreferences.
Thanks for your quick response. I will work on it and give feedback.
Edit: I removed the setReadable actions and also without the strict mode it works really fine.
Preferences are updated immediately and accessible, also after a full reboot.
Thanks a lot. Also for your excellent library.
Edit 2: I don't seem to be able to close the issue.
from remotepreferences.
Good to hear! Glad it's working now :-)
from remotepreferences.
Hi there, I faced this problem too. Reading preference keys and values at boot from hooks in system apps is not possible, until the system is unlocked. This is expected behaviour due to Android N's Direct Boot mode which encrypts everything (file-based encryption, including the preference xml file) and prevents any apps from using internal storage. It blocks ContentProviders too, as used in RemotePreferences. Reproducing this issue in hooked user apps is tough, because most of them load only after unlock.
The workaround for this (found in GravityBox) is to use Device Protected Storage (as opposed to Credential Protected Storage), through context = context.createDeviceProtectedStorageContext();
wherever needed. This must be done in
- Xposed (before using your constructor for RemotePreferences), and
- A few locations in RemotePreferences itself (#5), because the default context is the Credential Protected Storage context
- The app's preferences, either through preferenceManager.setStorageDeviceProtected(), or through overriding the getSharedPreferences in your activity to use the correct context.
This also links back to my old issue #2, where I couldn't figure out what was going in earlier. Hope this helps someone.
from remotepreferences.
Related Issues (20)
- [QUESTION] How to get preferences from Android system package? HOT 6
- I don't understand how to declare "context" HOT 2
- Android 10 return default value HOT 8
- Exception thrown when accessing preferences from Xposed (Android 11) HOT 10
- [Please Delete] Non-issue. HOT 2
- No exception thrown when Key is NULL HOT 2
- Unable to get provider HOT 9
- Move away from jcenter HOT 2
- Is it Solve Xsharedpreference Canβt Access Preference XML HOT 3
- App closed when try to use RemotePreference HOT 5
- [INFO] java.lang.SecurityException: Given calling package android does not match caller's uid HOT 6
- Variable preference name? HOT 5
- Does not work when trying to access via Xposed on an app targeting Android 11 HOT 16
- multiple apps use the library but they have same authority for a content provider, which creates conflict HOT 1
- Android 13:RemotePreferenceAccessException: query() failed or returned null cursor HOT 1
- Doesn't work in initZygote
- Cannot get preferences when application get killed HOT 6
- Should checkAccess check for the preferences owner package? HOT 4
- Unable to launch app **** for provider **** process is bad HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remotepreferences.