# allenymt/PrivacySentry

Android隐私合规整改检测工具，注解+Asm修改字节码的检测方案

Repository: https://github.com/allenymt/PrivacySentry
Canonical: https://ross.abutalabs.com/products/privacysentry
Language: Kotlin
License: MIT
License Family: permissive
Last push: 2025-12-30T06:16:38+00:00

## Health v2 (maintenance only)
Score: 49/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 59, release rhythm 8, longevity 100
- inputs: {"age_days": 1752, "days_push": 246, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2283, forks 300 (observed 2026-08-28T04:06:33.951690+00:00)

## What it is
PrivacySentry is an Android privacy compliance toolkit combining a Gradle plugin with a runtime SDK, using annotations plus ASM bytecode instrumentation (via the Booster framework) at compile time. It intercepts and records calls to 60+ sensitive APIs (device identifiers, personal data access), supports delaying calls until the user accepts the privacy agreement, and generates Excel reports of all detected calls to help apps pass app-store and MIIT compliance reviews.

## Use cases
- detect sensitive API calls in my Android app before a privacy compliance audit
- pass MIIT / app-store privacy compliance review for an Android app in China
- hook Android methods that read IMEI, device ID, or other personal data
- block sensitive APIs until the user accepts the privacy policy
- generate a report of personal data collection calls across my app and third-party SDKs
- instrument bytecode at compile time without adding runtime performance overhead

## When to choose
- You ship an Android app to Chinese app stores and must satisfy MIIT privacy compliance requirements
- You want compile-time bytecode instrumentation of sensitive API calls with zero runtime performance cost
- You need automated, exportable (Excel) audit trails of who called which sensitive API and when
- You need to defer or gate sensitive API calls until after the user agrees to the privacy notice, with multi-process support

## When to avoid
- Your project is not Android (iOS, web, or server-side software)
- You are on AGP below 8.0 and cannot or will not use the legacy 1.3.6 release line
- You need runtime dynamic hooking (Xposed-style) rather than build-time static instrumentation
- Your app depends on third-party SDKs that perform their own ASM transformations (e.g., AMap) and conflict with the plugin

## Facets
- artifact type: plugin
- maturity: active
- function: security, privacy, monitoring, logging, testing, build-tool, sdk
- domain: mobile-development, android-tools, security, privacy, developer-tools, testing
- platform: jvm
- tags: android, gradle-plugin, bytecode-instrumentation, asm, booster, privacy-compliance, sensitive-api-hooking, miit-compliance, app-store-review, privacy-audit, kotlin, hooking, china, mobile

## Member repositories
- allenymt/PrivacySentry (main) score 49

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:33.951690+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:41:18.587530+00:00, confidence not recorded.
  - readme: https://github.com/allenymt/PrivacySentry (fetched 2026-08-28T04:06:33.951690+00:00, sha 5c4d66ae913e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
