### Multi-Process Support Initialization and Logging - Kotlin Source: https://context7.com/allenymt/privacysentry/llms.txt Demonstrates how to initialize PrivacySentry in an Android application to support multi-process scenarios. It shows the setup in the Application class and how sensitive API calls in a separate process are logged to uniquely named files. ```kotlin // Multi-process Application setup class MyApplication : Application() { override fun attachBaseContext(base: Context?) { super.attachBaseContext(base) // PrivacySentry automatically detects process and names files accordingly // Main process: privacy_result.xls // Sub-process: com.example.app:remote_privacy_result.xls val builder = PrivacySentryBuilder() .configResultFileName("privacy_result") .syncDebug(true) .enableFileResult(true) PrivacySentry.Privacy.init(this, builder) } } // Service running in separate process // AndroidManifest.xml: android:process=":remote" class RemoteService : Service() { override fun onCreate() { super.onCreate() // Sensitive API calls in this process are logged to: // com.example.app:remote_privacy_result.xls val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager // This call is automatically intercepted and logged val deviceId = telephonyManager.deviceId } } // Pull reports from all processes // adb pull /storage/emulated/0/Android/data/com.example.app/files/privacy/ // Files: privacy_result.xls, com.example.app:remote_privacy_result.xls ``` -------------------------------- ### Gradle Plugin Setup for PrivacySentry Source: https://context7.com/allenymt/privacysentry/llms.txt Add the PrivacySentry Gradle plugin to your project's root build.gradle file. This enables compile-time bytecode instrumentation for privacy API interception. Ensure you have the jitpack.io repository configured. ```gradle // Root build.gradle buildscript { repositories { maven { url 'https://jitpack.io' } mavenCentral() google() } dependencies { classpath 'com.github.allenymt.PrivacySentry:plugin-sentry:1.3.7_v820_beta4' } } allprojects { repositories { maven { url 'https://jitpack.io' } mavenCentral() google() } } ``` -------------------------------- ### Update Privacy Settings After User Agreement Source: https://context7.com/allenymt/privacysentry/llms.txt Enables full sensitive API access after the user accepts the privacy agreement. Before this method is called, intercepted APIs return empty or default values. This example demonstrates how to check for prior acceptance, display a privacy dialog if needed, and then call updatePrivacyShow() upon acceptance. ```kotlin class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) // Check if privacy agreement was already accepted if (!hasAcceptedPrivacyAgreement()) { showPrivacyDialog() } else { // Previously accepted - notify SDK PrivacySentry.Privacy.updatePrivacyShow() } } private fun showPrivacyDialog() { AlertDialog.Builder(this) .setTitle("Privacy Agreement") .setMessage("Please read and accept our privacy policy...") .setPositiveButton("Accept") { _, _ -> // Save acceptance state savePrivacyAgreement(true) // CRITICAL: Notify SDK that user accepted privacy agreement // After this call, sensitive APIs return real data PrivacySentry.Privacy.updatePrivacyShow() // Continue with app initialization initializeApp() } .setNegativeButton("Decline") { _, _ -> // User declined - sensitive APIs return empty values finish() } .setCancelable(false) .show() } private fun hasAcceptedPrivacyAgreement(): Boolean { return getSharedPreferences("app_prefs", MODE_PRIVATE) .getBoolean("privacy_accepted", false) } private fun savePrivacyAgreement(accepted: Boolean) { getSharedPreferences("app_prefs", MODE_PRIVATE) .edit() .putBoolean("privacy_accepted", accepted) .apply() } } ``` -------------------------------- ### Configure PrivacySentry with Builder Pattern (Kotlin) Source: https://context7.com/allenymt/privacysentry/llms.txt Demonstrates how to build a customized PrivacySentry configuration using the builder pattern. This includes enabling/disabling debug output, file generation, setting monitoring duration, and configuring callbacks for both debug and release builds. It shows how to initialize PrivacySentry within an Android Application. ```kotlin class PrivacyConfig { companion object { fun createDebugBuilder(): PrivacySentryBuilder { return PrivacySentryBuilder() .syncDebug(true) // Enable logcat output .enableFileResult(true) // Generate Excel reports .configResultFileName("debug_privacy") // Custom filename .configWatchTime(60 * 60 * 1000) // 60 minute monitoring .enableReadClipBoard(true) // Monitor clipboard .configResultCallBack(object : PrivacyResultCallBack { override fun onResultCallBack(filePath: String) { // Share report file for debugging shareFile(filePath) } }) } fun createReleaseBuilder(): PrivacySentryBuilder { return PrivacySentryBuilder() .syncDebug(false) // Disable logcat .enableFileResult(false) // NO Excel in production! .configWatchTime(3 * 60 * 1000) // 3 minute monitoring .enableReadClipBoard(false) // Disable clipboard monitoring .configResultCallBack(object : PrivacyResultCallBack { override fun onResultCallBack(filePath: String) { // Report to analytics (path only, not file) Analytics.log("privacy_scan_complete", mapOf("path" to filePath)) } }) } private fun shareFile(filePath: String) { // Implementation for debug file sharing } } } // Usage in Application class MyApplication : Application() { override fun attachBaseContext(base: Context?) { super.attachBaseContext(base) val builder = if (BuildConfig.DEBUG) { PrivacyConfig.createDebugBuilder() } else { PrivacyConfig.createReleaseBuilder() } PrivacySentry.Privacy.init(this, builder) } } ``` -------------------------------- ### Initialize PrivacySentry SDK in Android Application Source: https://context7.com/allenymt/privacysentry/llms.txt Initializes the PrivacySentry SDK early in the application lifecycle within the attachBaseContext method. This ensures all sensitive API calls from app startup are captured. Configuration options include setting output filenames, enabling debug logs and file output, configuring monitoring duration, and enabling clipboard interception. ```kotlin class MyApplication : Application() { override fun attachBaseContext(base: Context?) { super.attachBaseContext(base) // Initialize PrivacySentry FIRST to capture early API calls val builder = PrivacySentryBuilder() .configResultFileName("privacy_result") // Custom output filename .syncDebug(BuildConfig.DEBUG) // Enable logcat output in debug .enableFileResult(BuildConfig.DEBUG) // Enable Excel file output in debug .configWatchTime(30 * 60 * 1000) // Monitor duration: 30 minutes .enableReadClipBoard(true) // Allow clipboard interception .configResultCallBack(object : PrivacyResultCallBack { override fun onResultCallBack(filePath: String) { Log.i("PrivacySentry", "Result file: $filePath") // Upload file path to analytics or crash reporting } }) PrivacySentry.Privacy.init(this, builder) } override fun onCreate() { super.onCreate() // Other SDK initializations... } } ``` -------------------------------- ### PrivacySentry.Privacy.init() Source: https://context7.com/allenymt/privacysentry/llms.txt Initializes the PrivacySentry SDK. This method should be called as early as possible in your Application class, specifically within attachBaseContext(), to ensure all sensitive API calls are captured from the application's startup. ```APIDOC ## PrivacySentry.Privacy.init() ### Description Initializes the PrivacySentry SDK. This method should be called as early as possible in your Application class, specifically within `attachBaseContext()`, to ensure all sensitive API calls are captured from the application's startup. It must be called before any other initialization. ### Method `PrivacySentry.Privacy.init(context: Context, builder: PrivacySentryBuilder)` ### Endpoint N/A (SDK Initialization) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin class MyApplication : Application() { override fun attachBaseContext(base: Context?) { super.attachBaseContext(base) // Initialize PrivacySentry FIRST to capture early API calls val builder = PrivacySentryBuilder() .configResultFileName("privacy_result") // Custom output filename .syncDebug(BuildConfig.DEBUG) // Enable logcat output in debug .enableFileResult(BuildConfig.DEBUG) // Enable Excel file output in debug .configWatchTime(30 * 60 * 1000) // Monitor duration: 30 minutes .enableReadClipBoard(true) // Allow clipboard interception .configResultCallBack(object : PrivacyResultCallBack { override fun onResultCallBack(filePath: String) { Log.i("PrivacySentry", "Result file: $filePath") // Upload file path to analytics or crash reporting } }) PrivacySentry.Privacy.init(this, builder) } override fun onCreate() { super.onCreate() // Other SDK initializations... } } ``` ### Response #### Success Response (Initialization) N/A (SDK initialization does not return a value, but logs success or failure internally). #### Response Example None ``` -------------------------------- ### MockView Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for a custom MockView, used for debugging or visualization. Attributes control diagonal lines, label visibility, and label styling (color, background). ```java int[] styleable MockView { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable MockView_mock_diagonalsColor 0 int styleable MockView_mock_label 1 int styleable MockView_mock_labelBackgroundColor 2 int styleable MockView_mock_labelColor 3 int styleable MockView_mock_showDiagonals 4 int styleable MockView_mock_showLabel 5 ``` -------------------------------- ### App Module Dependencies and Plugin Application for PrivacySentry Source: https://context7.com/allenymt/privacysentry/llms.txt Apply the PrivacySentry plugin and add the necessary PrivacySentry libraries to your app module's build.gradle file. This includes the core runtime SDK, annotation definitions, and the recommended pre-built API interceptions. ```gradle // app/build.gradle apply plugin: 'privacy-sentry-plugin' dependencies { def privacyVersion = "1.3.7_v820_beta4" // Core runtime SDK (required) implementation "com.github.allenymt.PrivacySentry:hook-sentry:$privacyVersion" // Annotation definitions (required) implementation "com.github.allenymt.PrivacySentry:privacy-annotation:$privacyVersion" // Pre-built API interceptions (strongly recommended) implementation "com.github.allenymt.PrivacySentry:privacy-proxy:$privacyVersion" } ``` -------------------------------- ### PrivacySentry Plugin Configuration Source: https://context7.com/allenymt/privacysentry/llms.txt Configure the privacy plugin block in your app/build.gradle to customize bytecode transformation. Options include enabling/disabling the plugin, setting output filenames, defining blacklists for conflicting libraries, and enabling/configuring reflection hooks. ```gradle // app/build.gradle privacy { // Master switch for plugin functionality (default: true) enablePrivacy = true // Static scan output filename (default: "privacy_hook.json") replaceFileName = "privacy_hook.json" // Blacklist packages excluded from bytecode modification // Required for ASM-conflicting libraries like AMap SDK blackList = [ "com.loc", // AMap SDK (ASM conflict) "com.amap.api", // AMap API "io.openinstall.sdk", // OpenInstall SDK "com.google.android" // Google services (optional) ] // Enable reflection method interception (default: false) hookReflex = true // Configure reflection interception targets // Key: fully qualified class name, Value: list of method names reflexMap = [ "com.android.id.impl.IdProviderImpl": [ "getOAID", // Open Anonymous Device ID (Xiaomi) "getAAID", // Application Anonymous Device ID "getVAID" // Developer Anonymous Device ID ], "com.huawei.hms.ads.identifier.AdvertisingIdClient": [ "getAdvertisingIdInfo" ] ] } ``` -------------------------------- ### Create Custom API Proxy with @PrivacyMethodProxy (Kotlin) Source: https://context7.com/allenymt/privacysentry/llms.txt Shows how to define custom interception rules for APIs using the @PrivacyMethodProxy annotation. This allows for handling methods not covered by the default privacy-proxy module. It demonstrates intercepting instance, static, and interface methods, including logging API calls and conditionally blocking access based on privacy state. ```kotlin import androidx.annotation.Keep import com.yl.lib.privacy_annotation.MethodInvokeOpcode import com.yl.lib.privacy_annotation.PrivacyClassProxy import com.yl.lib.privacy_annotation.PrivacyMethodProxy import com.yl.lib.sentry.hook.PrivacySentry import com.yl.lib.sentry.hook.util.PrivacyProxyUtil.Util.doFilePrinter @Keep @PrivacyClassProxy object MyCustomProxy { /** * Intercept instance method - first parameter is the instance object */ @PrivacyMethodProxy( originalClass = MySDK::class, originalMethod = "getUserData", originalOpcode = MethodInvokeOpcode.INVOKEVIRTUAL ) @JvmStatic fun getUserData(instance: MySDK, userId: String): UserData? { // Log the API call with stack trace doFilePrinter("getUserData", "Custom SDK - Get User Data: $userId") // Block access before privacy agreement if (PrivacySentry.Privacy.inDangerousState()) { return null } // Call original method after agreement return instance.getUserData(userId) } /** * Intercept static method - parameters match original exactly */ @PrivacyMethodProxy( originalClass = DeviceUtils::class, originalMethod = "getUniqueId", originalOpcode = MethodInvokeOpcode.INVOKESTATIC ) @JvmStatic fun getUniqueId(context: Context): String { doFilePrinter("getUniqueId", "Custom Utils - Device Unique ID") if (PrivacySentry.Privacy.inDangerousState()) { return "" // Return empty before agreement } return DeviceUtils.getUniqueId(context) } /** * Intercept interface method - first parameter is the interface instance */ @PrivacyMethodProxy( originalClass = ITracker::class, originalMethod = "trackEvent", originalOpcode = MethodInvokeOpcode.INVOKEINTERFACE ) @JvmStatic fun trackEvent(tracker: ITracker, event: String, params: Map): Boolean { doFilePrinter("trackEvent", "Analytics - Track Event: $event") // Allow tracking only after privacy agreement if (PrivacySentry.Privacy.inDangerousState()) { return false } return tracker.trackEvent(event, params) } } ``` -------------------------------- ### MaterialTextAppearance Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Lists styleable attributes for MaterialTextAppearance, enabling fine-grained control over text styling. Attributes include letter spacing, line height, and TextAppearance references. ```java int[] styleable MaterialTextAppearance { 0x10104b6, 0x101057f, 0x0 } int styleable MaterialTextAppearance_android_letterSpacing 0 int styleable MaterialTextAppearance_android_lineHeight 1 int styleable MaterialTextAppearance_lineHeight 2 ``` -------------------------------- ### Constraint Layout Attributes Definitions Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines integer constants for various styleable attributes used in Android's ConstraintLayout. These constants map to specific layout properties, enabling programmatic access and configuration of UI elements. ```java int styleable Constraint_layout_constraintLeft_toLeftOf 76 int styleable Constraint_layout_constraintLeft_toRightOf 77 int styleable Constraint_layout_constraintRight_creator 78 int styleable Constraint_layout_constraintRight_toLeftOf 79 int styleable Constraint_layout_constraintRight_toRightOf 80 int styleable Constraint_layout_constraintStart_toEndOf 81 int styleable Constraint_layout_constraintStart_toStartOf 82 int styleable Constraint_layout_constraintTag 83 int styleable Constraint_layout_constraintTop_creator 84 int styleable Constraint_layout_constraintTop_toBottomOf 85 int styleable Constraint_layout_constraintTop_toTopOf 86 int styleable Constraint_layout_constraintVertical_bias 87 int styleable Constraint_layout_constraintVertical_chainStyle 88 int styleable Constraint_layout_constraintVertical_weight 89 int styleable Constraint_layout_constraintWidth_default 90 int styleable Constraint_layout_constraintWidth_max 91 int styleable Constraint_layout_constraintWidth_min 92 int styleable Constraint_layout_constraintWidth_percent 93 int styleable Constraint_layout_editor_absoluteX 94 int styleable Constraint_layout_editor_absoluteY 95 int styleable Constraint_layout_goneMarginBottom 96 int styleable Constraint_layout_goneMarginEnd 97 int styleable Constraint_layout_goneMarginLeft 98 int styleable Constraint_layout_goneMarginRight 99 int styleable Constraint_layout_goneMarginStart 100 int styleable Constraint_layout_goneMarginTop 101 int styleable Constraint_motionProgress 102 int styleable Constraint_motionStagger 103 int styleable Constraint_pathMotionArc 104 int styleable Constraint_pivotAnchor 105 int styleable Constraint_transitionEasing 106 int styleable Constraint_transitionPathRotate 107 int styleable Constraint_visibilityMode 108 ``` -------------------------------- ### CollapsingToolbarLayout Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines the styleable attributes for the CollapsingToolbarLayout component in Android. These attributes manage collapsed and expanded title appearance, scrim effects, and content. ```xml int[] styleable CollapsingToolbarLayout { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable CollapsingToolbarLayout_collapsedTitleGravity 0 int styleable CollapsingToolbarLayout_collapsedTitleTextAppearance 1 int styleable CollapsingToolbarLayout_contentScrim 2 int styleable CollapsingToolbarLayout_expandedTitleGravity 3 int styleable CollapsingToolbarLayout_expandedTitleMargin 4 int styleable CollapsingToolbarLayout_expandedTitleMarginBottom 5 int styleable CollapsingToolbarLayout_expandedTitleMarginEnd 6 int styleable CollapsingToolbarLayout_expandedTitleMarginStart 7 int styleable CollapsingToolbarLayout_expandedTitleMarginTop 8 int styleable CollapsingToolbarLayout_expandedTitleTextAppearance 9 int styleable CollapsingToolbarLayout_maxLines 10 int styleable CollapsingToolbarLayout_scrimAnimationDuration 11 int styleable CollapsingToolbarLayout_scrimVisibleHeightTrigger 12 int styleable CollapsingToolbarLayout_statusBarScrim 13 int styleable CollapsingToolbarLayout_title 14 int styleable CollapsingToolbarLayout_titleEnabled 15 int styleable CollapsingToolbarLayout_toolbarId 16 ``` -------------------------------- ### CollapsingToolbarLayout.Layout Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies the styleable attributes for the layout parameters of CollapsingToolbarLayout in Android, controlling collapse mode and parallax multiplier. ```xml int[] styleable CollapsingToolbarLayout_Layout { 0x0, 0x0 } int styleable CollapsingToolbarLayout_Layout_layout_collapseMode 0 int styleable CollapsingToolbarLayout_Layout_layout_collapseParallaxMultiplier 1 ``` -------------------------------- ### Chip Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies the styleable attributes for the Chip component in Android. These attributes allow customization of text, icons, colors, padding, and shape. ```xml int[] styleable Chip { 0x10101e5, 0x10100ab, 0x101011f, 0x101014f, 0x1010034, 0x1010098, 0x1010095, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable Chip_android_checkable 0 int styleable Chip_android_ellipsize 1 int styleable Chip_android_maxWidth 2 int styleable Chip_android_text 3 int styleable Chip_android_textAppearance 4 int styleable Chip_android_textColor 5 int styleable Chip_android_textSize 6 int styleable Chip_checkedIcon 7 int styleable Chip_checkedIconEnabled 8 int styleable Chip_checkedIconTint 9 int styleable Chip_checkedIconVisible 10 int styleable Chip_chipBackgroundColor 11 int styleable Chip_chipCornerRadius 12 int styleable Chip_chipEndPadding 13 int styleable Chip_chipIcon 14 int styleable Chip_chipIconEnabled 15 int styleable Chip_chipIconSize 16 int styleable Chip_chipIconTint 17 int styleable Chip_chipIconVisible 18 int styleable Chip_chipMinHeight 19 int styleable Chip_chipMinTouchTargetSize 20 int styleable Chip_chipStartPadding 21 int styleable Chip_chipStrokeColor 22 int styleable Chip_chipStrokeWidth 23 int styleable Chip_chipSurfaceColor 24 int styleable Chip_closeIcon 25 int styleable Chip_closeIconEnabled 26 int styleable Chip_closeIconEndPadding 27 int styleable Chip_closeIconSize 28 int styleable Chip_closeIconStartPadding 29 int styleable Chip_closeIconTint 30 int styleable Chip_closeIconVisible 31 int styleable Chip_ensureMinTouchTargetSize 32 int styleable Chip_hideMotionSpec 33 int styleable Chip_iconEndPadding 34 int styleable Chip_iconStartPadding 35 int styleable Chip_rippleColor 36 int styleable Chip_shapeAppearance 37 int styleable Chip_shapeAppearanceOverlay 38 int styleable Chip_showMotionSpec 39 int styleable Chip_textEndPadding 40 int styleable Chip_textStartPadding 41 ``` -------------------------------- ### Motion Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Lists styleable attributes for motion animations, including relative animation, path drawing, rotation, staggering, arc motion, and easing functions. ```java int[] styleable Motion { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable Motion_animate_relativeTo 0 int styleable Motion_drawPath 1 int styleable Motion_motionPathRotate 2 int styleable Motion_motionStagger 3 int styleable Motion_pathMotionArc 4 int styleable Motion_transitionEasing 5 ``` -------------------------------- ### Android Manifest Configuration Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt The AndroidManifest.xml file declares essential components and permissions for an Android application. It specifies the package name, SDK versions, and lists activities like RealTimePrivacyItemActivity, ReplaceListActivity, and PermissionListActivity, all marked as non-exported. ```xml ``` -------------------------------- ### Implement Custom Java Proxy for API Interception Source: https://context7.com/allenymt/privacysentry/llms.txt Create custom API interceptions in Java using the annotation system for projects not using Kotlin. This allows for fine-grained control over third-party SDK interactions by defining proxy methods that intercept specific calls. ```java import androidx.annotation.Keep; import com.yl.lib.privacy_annotation.MethodInvokeOpcode; import com.yl.lib.privacy_annotation.PrivacyClassProxy; import com.yl.lib.privacy_annotation.PrivacyMethodProxy; import com.yl.lib.sentry.hook.PrivacySentry; import static com.yl.lib.sentry.hook.util.PrivacyProxyUtil.Util.doFilePrinter; @Keep @PrivacyClassProxy public class MyJavaCustomProxy { @PrivacyMethodProxy( originalClass = ThirdPartySDK.class, originalMethod = "getDeviceFingerprint", originalOpcode = MethodInvokeOpcode.INVOKEVIRTUAL ) public static String getDeviceFingerprint(ThirdPartySDK instance) { doFilePrinter("getDeviceFingerprint", "Third-party SDK fingerprint access", false); if (PrivacySentry.Privacy.INSTANCE.inDangerousState()) { return ""; } return instance.getDeviceFingerprint(); } @PrivacyMethodProxy( originalClass = AnalyticsManager.class, originalMethod = "initialize", originalOpcode = MethodInvokeOpcode.INVOKESTATIC ) public static void initialize(Context context, String apiKey) { doFilePrinter("AnalyticsManager.initialize", "Analytics SDK initialization with key: " + apiKey, false); if (PrivacySentry.Privacy.INSTANCE.inDangerousState()) { // Skip initialization before privacy agreement return; } AnalyticsManager.initialize(context, apiKey); } } ``` -------------------------------- ### MaterialShape Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Provides styleable attributes for MaterialShape, allowing customization of shape appearance and overlay. These are fundamental for defining custom shapes in Material Design. ```java int[] styleable MaterialShape { 0x0, 0x0 } int styleable MaterialShape_shapeAppearance 0 int styleable MaterialShape_shapeAppearanceOverlay 1 ``` -------------------------------- ### MenuItem Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines a comprehensive set of styleable attributes for MenuItem, covering action layouts, provider classes, view classes, modifiers, shortcuts, checkable states, icons, IDs, categories, titles, and visibility. ```java int[] styleable MenuItem { 0x0, 0x0, 0x0, 0x0, 0x10101e3, 0x10101e5, 0x1010106, 0x101000e, 0x1010002, 0x10100d0, 0x10101de, 0x10101e4, 0x101026f, 0x10101df, 0x10101e1, 0x10101e2, 0x1010194, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable MenuItem_actionLayout 0 int styleable MenuItem_actionProviderClass 1 int styleable MenuItem_actionViewClass 2 int styleable MenuItem_alphabeticModifiers 3 int styleable MenuItem_android_alphabeticShortcut 4 int styleable MenuItem_android_checkable 5 int styleable MenuItem_android_checked 6 int styleable MenuItem_android_enabled 7 int styleable MenuItem_android_icon 8 int styleable MenuItem_android_id 9 int styleable MenuItem_android_menuCategory 10 int styleable MenuItem_android_numericShortcut 11 int styleable MenuItem_android_onClick 12 int styleable MenuItem_android_orderInCategory 13 int styleable MenuItem_android_title 14 int styleable MenuItem_android_titleCondensed 15 int styleable MenuItem_android_visible 16 int styleable MenuItem_contentDescription 17 int styleable MenuItem_iconTint 18 int styleable MenuItem_iconTintMode 19 int styleable MenuItem_numericModifiers 20 int styleable MenuItem_showAsAction 21 int styleable MenuItem_tooltipText 22 ``` -------------------------------- ### MotionHelper Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for MotionHelper, likely used to control the showing and hiding of motion-related elements or animations. ```java int[] styleable MotionHelper { 0x0, 0x0 } int styleable MotionHelper_onHide 0 int styleable MotionHelper_onShow 1 ``` -------------------------------- ### MaterialTimePicker Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies styleable attributes for the MaterialTimePicker component, including icons for clock and keyboard input modes. ```java int[] styleable MaterialTimePicker { 0x0, 0x0 } int styleable MaterialTimePicker_clockIcon 0 int styleable MaterialTimePicker_keyboardIcon 1 ``` -------------------------------- ### Monitor Privacy Events via Logcat Source: https://context7.com/allenymt/privacysentry/llms.txt Monitor real-time privacy API calls in Android Studio's Logcat by filtering for PrivacySentry tags. This helps in debugging and understanding privacy-related events as they occur on the device. ```bash # View all PrivacySentry logs in real-time adb logcat | grep "PrivacyOfficer" # Expected output format: # [PrivacyOfficer] getDeviceId-thread: main | IMEI Access | com.example.MainActivity.onCreate(MainActivity.kt:42) # [PrivacyOfficer] getLastKnownLocation-thread: main | Location Access | com.example.LocationService.getLocation(LocationService.kt:28) # Filter for specific API calls adb logcat | grep "PrivacyOfficer" | grep "getDeviceId" # Show warning messages (calls before privacy agreement) adb logcat | grep "check!!!" # Output: check!!! Privacy agreement not shown, Illegal print # Clear logcat and start fresh monitoring adb logcat -c && adb logcat | grep "PrivacyOfficer" ``` -------------------------------- ### ConstraintLayout Layout Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for the ConstraintLayout itself, including dimensions, padding, visibility, and orientation. These attributes control the overall layout behavior and appearance. ```java int[] styleable ConstraintLayout_Layout { 0x1010440, // android_elevation 0x1010120, // android_maxHeight 0x101011f, // android_maxWidth 0x1010140, // android_minHeight 0x101013f, // android_minWidth 0x10100c4, // android_orientation 0x1010121, // android_padding 0x1010122, // android_paddingBottom 0x1010123, // android_paddingEnd 0x1010124, // android_paddingLeft 0x1010125, // android_paddingRight 0x1010126, // android_paddingStart 0x1010127, // android_paddingTop 0x1010128, // android_visibility // ... other attributes for ConstraintLayout_Layout } int styleable ConstraintLayout_Layout_android_elevation 0 int styleable ConstraintLayout_Layout_android_maxHeight 1 int styleable ConstraintLayout_Layout_android_maxWidth 2 int styleable ConstraintLayout_Layout_android_minHeight 3 int styleable ConstraintLayout_Layout_android_minWidth 4 int styleable ConstraintLayout_Layout_android_orientation 5 int styleable ConstraintLayout_Layout_android_padding 6 int styleable ConstraintLayout_Layout_android_paddingBottom 7 int styleable ConstraintLayout_Layout_android_paddingEnd 8 int styleable ConstraintLayout_Layout_android_paddingLeft 9 int styleable ConstraintLayout_Layout_android_paddingRight 10 int styleable ConstraintLayout_Layout_android_paddingStart 11 int styleable ConstraintLayout_Layout_android_paddingTop 12 int styleable ConstraintLayout_Layout_android_visibility 13 int styleable ConstraintLayout_Layout_barrierAllowsGoneWidgets 14 int styleable ConstraintLayout_Layout_barrierDirection 15 int styleable ConstraintLayout_Layout_barrierMargin 16 int styleable ConstraintLayout_Layout_chainUseRtl 17 int styleable ConstraintLayout_Layout_constraintSet 18 int styleable ConstraintLayout_Layout_constraint_referenced_ids 19 int styleable ConstraintLayout_Layout_flow_firstHorizontalBias 20 int styleable ConstraintLayout_Layout_flow_firstHorizontalStyle 21 int styleable ConstraintLayout_Layout_flow_firstVerticalBias 22 int styleable ConstraintLayout_Layout_flow_firstVerticalStyle 23 int styleable ConstraintLayout_Layout_flow_horizontalAlign 24 int styleable ConstraintLayout_Layout_flow_horizontalBias 25 int styleable ConstraintLayout_Layout_flow_horizontalGap 26 int styleable ConstraintLayout_Layout_flow_horizontalStyle 27 int styleable ConstraintLayout_Layout_flow_lastHorizontalBias 28 int styleable ConstraintLayout_Layout_flow_lastHorizontalStyle 29 int styleable ConstraintLayout_Layout_flow_lastVerticalBias 30 int styleable ConstraintLayout_Layout_flow_lastVerticalStyle 31 int styleable ConstraintLayout_Layout_flow_maxElementsWrap 32 int styleable ConstraintLayout_Layout_flow_verticalAlign 33 int styleable ConstraintLayout_Layout_flow_verticalBias 34 int styleable ConstraintLayout_Layout_flow_verticalGap 35 int styleable ConstraintLayout_Layout_flow_verticalStyle 36 int styleable ConstraintLayout_Layout_flow_wrapMode 37 int styleable ConstraintLayout_Layout_layoutDescription 38 int styleable ConstraintLayout_Layout_layout_constrainedHeight 39 int styleable ConstraintLayout_Layout_layout_constrainedWidth 40 int styleable ConstraintLayout_Layout_layout_constraintBaseline_creator 41 int styleable ConstraintLayout_Layout_layout_constraintBaseline_toBaselineOf 42 ``` -------------------------------- ### MenuView Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies styleable attributes for MenuView, controlling aspects like background, dividers, item appearance, icon spacing, and window animations. ```java int[] styleable MenuView { 0x101012f, 0x101012d, 0x1010130, 0x1010131, 0x101012c, 0x101012e, 0x10100ae, 0x0, 0x0 } int styleable MenuView_android_headerBackground 0 int styleable MenuView_android_horizontalDivider 1 int styleable MenuView_android_itemBackground 2 int styleable MenuView_android_itemIconDisabledAlpha 3 int styleable MenuView_android_itemTextAppearance 4 int styleable MenuView_android_verticalDivider 5 int styleable MenuView_android_windowAnimationStyle 6 int styleable MenuView_preserveIconSpacing 7 int styleable MenuView_subMenuArrow 8 ``` -------------------------------- ### Material CheckBox Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies styleable attributes for MaterialCheckBox components. Key attributes include button tint and a flag to use Material theme colors. ```java int[] styleable MaterialCheckBox { 0x0, 0x0 } int styleable MaterialCheckBox_buttonTint 0 int styleable MaterialCheckBox_useMaterialThemeColors 1 ``` -------------------------------- ### MaterialToolbar Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for MaterialToolbar, specifically for customizing the navigation icon tint. ```java int[] styleable MaterialToolbar { 0x0 } int styleable MaterialToolbar_navigationIconTint 0 ``` -------------------------------- ### MotionScene Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for MotionScene, which manages animation transitions. Attributes include default duration and layout behavior during transitions. ```java int[] styleable MotionScene { 0x0, 0x0 } int styleable MotionScene_defaultDuration 0 int styleable MotionScene_layoutDuringTransition 1 ``` -------------------------------- ### Static Analysis JSON Output - privacy_hook.json Source: https://context7.com/allenymt/privacysentry/llms.txt This JSON file is generated during compile-time by PrivacySentry. It details all intercepted methods, their call counts, and the originating methods within the application's codebase or third-party libraries. ```json // Generated file: {project_root}/privacy_hook.json { "hookServiceList": [ "com.example.TestService", "com.example.BackgroundSyncService" ], "replaceMethodMap": { "android.app.ActivityManager.getRunningTasks": { "count": 5, "originMethodList": [ { "originClassName": "com.example.MainActivity", "originMethodName": "checkRunningApps" }, { "originClassName": "com.example.utils.AppUtils", "originMethodName": "isAppRunning" } ] }, "android.telephony.TelephonyManager.getDeviceId": { "count": 2, "originMethodList": [ { "originClassName": "com.example.DeviceManager", "originMethodName": "getIMEI" } ] }, "android.provider.Settings$Secure.getString": { "count": 8, "originMethodList": [ { "originClassName": "com.example.utils.DeviceUtils", "originMethodName": "getAndroidId" }, { "originClassName": "com.thirdparty.sdk.Analytics", "originMethodName": "init" } ] } } } ``` -------------------------------- ### MenuGroup Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Lists styleable attributes for MenuGroup, controlling properties like checkable behavior, enabled state, ID, menu category, order, and visibility. ```java int[] styleable MenuGroup { 0x10101e0, 0x101000e, 0x10100d0, 0x10101de, 0x10101df, 0x1010194 } int styleable MenuGroup_android_checkableBehavior 0 int styleable MenuGroup_android_enabled 1 int styleable MenuGroup_android_id 2 int styleable MenuGroup_android_menuCategory 3 int styleable MenuGroup_android_orderInCategory 4 int styleable MenuGroup_android_visible 5 ``` -------------------------------- ### ChipGroup Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines the styleable attributes for the ChipGroup component in Android. These attributes control chip spacing, selection behavior, and layout orientation. ```xml int[] styleable ChipGroup { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable ChipGroup_checkedChip 0 int styleable ChipGroup_chipSpacing 1 int styleable ChipGroup_chipSpacingHorizontal 2 int styleable ChipGroup_chipSpacingVertical 3 int styleable ChipGroup_selectionRequired 4 int styleable ChipGroup_singleLine 5 int styleable ChipGroup_singleSelection 6 ``` -------------------------------- ### CircularProgressIndicator Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies the styleable attributes for the CircularProgressIndicator component in Android. These attributes control the indicator's direction, inset, and size. ```xml int[] styleable CircularProgressIndicator { 0x0, 0x0, 0x0 } int styleable CircularProgressIndicator_indicatorDirectionCircular 0 int styleable CircularProgressIndicator_indicatorInset 1 int styleable CircularProgressIndicator_indicatorSize 2 ``` -------------------------------- ### MotionTelltales Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies styleable attributes for MotionTelltales, likely used to visualize motion paths or related data. Attributes control tail color, scale, and velocity mode. ```java int[] styleable MotionTelltales { 0x0, 0x0, 0x0 } int styleable MotionTelltales_telltales_tailColor 0 int styleable MotionTelltales_telltales_tailScale 1 int styleable MotionTelltales_telltales_velocityMode 2 ``` -------------------------------- ### Retrieve Excel Privacy Reports from Device Source: https://context7.com/allenymt/privacysentry/llms.txt Pull the generated Excel privacy reports from the device for offline analysis and compliance auditing. These reports contain detailed information about privacy compliance and call statistics. ```bash # Pull all privacy reports from the device adb pull /storage/emulated/0/Android/data/com.example.app/files/privacy/ ./privacy_reports/ # Report files: # - privacy_result.xls (main process) # - com.example.service_privacy_result.xls (sub-process) # Excel report structure: # Sheet 1 - Privacy Compliance Details (sorted by time descending): # | Timestamp | Alias | Function Name | Call Stack | # | 2024-12-30 10:25:15 | Running Tasks | getRunningTasks | com.example.MainActivity.onCreate() -> ... | # | 2024-12-30 10:25:14 | Device Serial | getSerial | com.example.utils.Utils.getDeviceId() -> ... | # # Sheet 2 - Call Count Statistics (aggregated by stack trace): # | Alias | Function Name | Call Stack | Count | # | Running Tasks | getRunningTasks | MainActivity.onCreate | 3 | # | Device Serial | getSerial | Utils.getDeviceId | 5 | # Open report on macOS open ./privacy_reports/privacy_result.xls # List generated reports adb shell ls -la /storage/emulated/0/Android/data/com.example.app/files/privacy/ ``` -------------------------------- ### MaterialTextView Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for MaterialTextView, offering customization for line height, text appearance, and other text-related properties. ```java int[] styleable MaterialTextView { 0x101057f, 0x1010034, 0x0 } int styleable MaterialTextView_android_lineHeight 0 int styleable MaterialTextView_android_textAppearance 1 int styleable MaterialTextView_lineHeight 2 ``` -------------------------------- ### MaterialCardView Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for customizing the appearance of MaterialCardView components. These include settings for checked icon tint, ripple color, shape appearance, stroke color, and stroke width. ```java int styleable MaterialCardView_checkedIconTint 5 int styleable MaterialCardView_rippleColor 6 int styleable MaterialCardView_shapeAppearance 7 int styleable MaterialCardView_shapeAppearanceOverlay 8 int styleable MaterialCardView_state_dragged 9 int styleable MaterialCardView_strokeColor 10 int styleable MaterialCardView_strokeWidth 11 ``` -------------------------------- ### ColorStateListItem Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines the styleable attributes for ColorStateListItem in Android, primarily used for defining colors with alpha values in state lists. ```xml int[] styleable ColorStateListItem { 0x0, 0x101031f, 0x10101a5 } int styleable ColorStateListItem_alpha 0 ``` -------------------------------- ### Material RadioButton Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines styleable attributes for MaterialRadioButton components, similar to MaterialCheckBox. Attributes control button tint and the use of Material theme colors. ```java int[] styleable MaterialRadioButton { 0x0, 0x0 } int styleable MaterialRadioButton_buttonTint 0 int styleable MaterialRadioButton_useMaterialThemeColors 1 ``` -------------------------------- ### MotionLayout Styleable Attributes Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies styleable attributes for MotionLayout, a powerful layout manager for complex animations. Attributes control scene application, current state, layout description, debugging, progress, and path visibility. ```java int[] styleable MotionLayout { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable MotionLayout_applyMotionScene 0 int styleable MotionLayout_currentState 1 int styleable MotionLayout_layoutDescription 2 int styleable MotionLayout_motionDebug 3 int styleable MotionLayout_motionProgress 4 int styleable MotionLayout_showPaths 5 ``` -------------------------------- ### ClockHandView Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Specifies the styleable attributes for the ClockHandView component in Android, controlling the color of the clock hand, its radius, and selector size. ```xml int[] styleable ClockHandView { 0x0, 0x0, 0x0 } int styleable ClockHandView_clockHandColor 0 int styleable ClockHandView_materialCircleRadius 1 int styleable ClockHandView_selectorSize 2 ``` -------------------------------- ### CardView Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines the styleable attributes for the CardView component in Android. These attributes control aspects like background color, corner radius, elevation, and padding. ```xml int[] styleable CardView { 0x1010140, 0x101013f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } int styleable CardView_android_minHeight 0 int styleable CardView_android_minWidth 1 int styleable CardView_cardBackgroundColor 2 int styleable CardView_cardCornerRadius 3 int styleable CardView_cardElevation 4 int styleable CardView_cardMaxElevation 5 int styleable CardView_cardPreventCornerOverlap 6 int styleable CardView_cardUseCompatPadding 7 int styleable CardView_contentPadding 8 int styleable CardView_contentPaddingBottom 9 int styleable CardView_contentPaddingLeft 10 int styleable CardView_contentPaddingRight 11 int styleable CardView_contentPaddingTop 12 ``` -------------------------------- ### ClockFaceView Styleable Attributes (Android) Source: https://github.com/allenymt/privacysentry/blob/main/privacy-ui/build/intermediates/compile_symbol_list/debug/R.txt Defines the styleable attributes for the ClockFaceView component in Android, controlling the background color and text color of clock numbers. ```xml int[] styleable ClockFaceView { 0x0, 0x0 } int styleable ClockFaceView_clockFaceBackgroundColor 0 int styleable ClockFaceView_clockNumberTextColor 1 ```