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

frida-packing-detector

v1.0.6

Published

A general method for detecting packed APKs at runtime

Readme

frida-packing-detector

English | 中文

A general-purpose Frida library for runtime detection of Android app protection/packing.

  • Generic: not targeting any specific vendor or protection scheme.
  • Non-signature-based: does not rely on a protection signature database (no fingerprint matching for specific packer classes/so files/strings).
  • Runtime decision: determines whether protection exists and when unpacking / original app loading is completed based on runtime loading order and availability behavior.

Quick start (in your Frida Agent)

Install the dependency in your project:

npm i frida-packing-detector

API: FridaPackingDetector.register(callback, isLogging?)

  • callback.onDetected(isProtected): triggered when protection status is detected (true means protected/packed, false means not protected)
  • callback.onUnpacked(): if protected/packed, triggered later when the original app is detected as loaded / unpacking completed
  • callback.onError(message): triggered when an error occurs

Example:

import {FridaPackingDetector} from "frida-packing-detector";

function onAppReady() {
  // Put your business logic here (at this time app classes should be stably accessible)
}

FridaPackingDetector.register(
  {
    onDetected(isProtected) {
      console.log("Protection detected: " + isProtected);
      if (!isProtected) {
        onAppReady();
      }
    },
    onUnpacked() {
      onAppReady();
    },
    onError(message) {
      console.error("FridaPackingDetector error occurred: " + message);
    },
  }
);

Overview

This library hooks key points in the Android app startup process (e.g. android.app.LoadedApk.makeApplication, custom Application.attachBaseContext/onCreate, etc.). Early in the app lifecycle, it tries to access the app’s own Activity classes:

  • If, during Application.attachBaseContext, the app’s launch Activity (or any Activity) cannot be Java.use()’d, it usually means the original APK/DEX classes have not been fully loaded yet, and the app is considered “protected/packed”.
  • When, at a later time, the Activity classes can be loaded normally, it is considered “unpacked / original app loaded”, and onUnpacked is triggered.

Note: this is a “generic runtime behavior detection approach” and is not guaranteed to be 100% accurate in all environments (e.g. extreme class-loading strategies, multi-process apps, plugin frameworks, etc.).

Limitations

  • No packer type identification: only provides a generic decision for “protected/packed” and “when unpacking is completed”.
  • Complex app architectures may affect results: e.g. pluginization, hotfix frameworks, dynamic multi-dex loading, differences in multi-process startup paths, etc.

Disclaimer

This project is for security research, compliant testing, and learning/exchange only. Please ensure you use it within the scope of legal authorization.