0.5.0 • Published 7 months ago

@charlesmuchene/pref-editor v0.5.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

Android-Preference-Editor js library

View and edit on-device preferences: NO ROOT required! 🥳

Both legacy shared preferences and Datastore preferences are supported! 😎

Requirements

Usage

Install the package:

npm i @charlesmuchene/pref-editor

Sample code to change a user preference:

import {
    Preference,
    TypeTag,
    changePreference,
} from "@charlesmuchene/pref-editor";

const connection = {
    deviceId: "emulator-5554",
    appId: "com.charlesmuchene.datastore",
    filename: "settings.preferences_pb",
};

const pref: Preference = {
    key: "isVisited",
    value: "false",
    tag: TypeTag.BOOLEAN,
};

changePreference(pref, connection);

See the Android Preferences Editor MCP server project on more usages.

Known issues

  • string-set key-value preference type operations are partially supported

Build

# Clone the repository
git clone https://github.com/charlesmuchene/pref-editor-js.git
cd pref-editor

# Install dependencies and build
npm install

Contributing

See Contributing.

License

See LICENSE

Contact

For questions or support, reach out via GitHub Issues.

0.5.0

7 months ago

0.4.0

7 months ago

0.3.3

8 months ago

0.3.2

8 months ago

0.3.1

8 months ago

0.3.0

8 months ago

0.2.0

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago