Giter Club home page Giter Club logo

Comments (4)

apsun avatar apsun commented on May 31, 2024

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.

hvdwolf avatar hvdwolf commented on May 31, 2024

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.

apsun avatar apsun commented on May 31, 2024

Good to hear! Glad it's working now :-)

from remotepreferences.

Rijul-A avatar Rijul-A commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.