npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-plugin-rootguard

v2.0.2

Published

Cordova plugin for detecting root access and Frida-based root bypass attempts.

Readme

Cordova Plugin - RootGuard : cordova-plugin-rootguard

RootGuard

GitHub license Android iOS

cordova-plugin-rootguard is a security plugin for Cordova that detects:

  • ✅ Root access (Magisk, SuperSU, su binaries, system mount modifications) – Android
  • ✅ Frida instrumentation (open ports, memory maps, processes) – Android
  • ✅ Jailbreak status (Cydia, Sileo, rootless indicators) – iOS
  • ✅ Frida runtime detection (dylib injection) – iOS

Changelog

02-10-2025

  • Fix(android): prevent plugin timeout on Magisk/RootAVD by adding process timeouts and safe cleanup
    • Moved root and Frida detection checks to Cordova thread pool
    • Added timeouts (500ms) to all shell command executions (su, mount, pidof, getprop)
    • Ensured processes are destroyed and streams closed in finally blocks
    • Fail-safe: assume compromised if detection errors or times out
    • Fixes issue where plugin call timed out on Magisk-enabled emulators (RootAVD)

17-04-2025

  • Added iOS support

Features

Android

  • Detects common root paths and su binaries
  • Executes shell checks (which su, mount)
  • Detects Frida server via:
    • Open ports (default: 27042, 27043)
    • Injected memory maps
    • Frida running processes
    • System properties

iOS

  • Detects Cydia, Sileo, and rootless jailbreak indicators
  • Checks common jailbreak file paths and URL schemes
  • Detects Frida dynamic library injections using dyld inspection

🚀 Installation

Option 1: Install from GitHub

cordova plugin add cordova-plugin-rootguard

Option 2: Install Locally

  1. Download and place the cordova-plugin-rootguard/ folder inside your project.
  2. Run:
    cordova plugin add ./cordova-plugin-rootguard

📖 Usage

JavaScript API

The plugin provides a single function checkSecurity that checks for both root access and Frida detection.

🔍 Usage

RootGuard.checkSecurity(function(result) {
    if (result === 1) {
        console.log("Security Risk Detected: Root or Frida is present.");
    } else {
        console.log("Device is secure.");
    }
}, function(error) {
    console.error("Error detecting Root/Frida:", error);
});

🔧 How It Works

Root Detection

  • File Check: Scans for common root-related files (e.g., su, Superuser.apk, .magisk).
  • Command Execution: Attempts to execute su to check for root access.
  • Mount Check: Verifies if /system is mounted as read-write instead of read-only.

Frida Detection

  • Port Scan: Checks for Frida's default listening ports (27042, 27043).
  • Memory Scan: Reads /proc/self/maps to detect Frida-related libraries (frida, gum-js, gadget).
  • Process Check: Looks for a running frida-server process.
  • Property Check: Scans system properties for any Frida-related entries.

🛠️ Testing

Testing Root Detection

  1. Install Magisk or SuperSU on your Android device.
  2. Run your Cordova app. It should detect root and exit.

Android

  • Test with rooted devices or emulators with Magisk/SuperSU.
  • Attach Frida using: frida -n

iOS

  • Test on a jailbroken device (Palera1n, Dopamine).
  • Use Frida with tools like frida-trace, frida-server.

Testing Frida Detection

  1. Start Frida-server on the device:
    adb push frida-server /data/local/tmp/
    adb shell chmod 755 /data/local/tmp/frida-server
    adb shell /data/local/tmp/frida-server &
  2. Run your Cordova app. It should detect Frida and exit.

Supported Platforms

  • Android (Minimum SDK: API 21+)
  • ✅ iOS

Platform | Root/Jailbreak Detection | rida Detection --- | --- | --- Android | ✅ | ✅ iOS | ✅ (Cydia, Sileo, Rootless) | ✅ (dylib scan)

Troubleshooting

Common Issues & Fixes

1. Plugin Not Found After Installation
Run cordova platform remove android && cordova platform add android to refresh plugins.

2. App Crashes on Certain Devices
Ensure the plugin has the required permissions and that your app has minSdkVersion set to 21 or higher in config.xml.

3. False Positives or False Negatives
Root detection can vary across devices. Consider adding additional root detection methods if needed.


📜 License

This project is licensed under the MIT License.

👨‍💻 Contributing

We welcome contributions! Feel free to submit a pull request or report issues on the repository.

🛠 Support

For any issues, please open a GitHub issue in the repository.


Author

📌 Binuka Kamesh
📧 Contact: [email protected]
🌍 GitHub: binuka97


Maintained by Binuka Kamesh