Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ad6d0c3 authored by Andrei Onea's avatar Andrei Onea
Browse files

Add atom for logging hidden API usage

Test: m
Bug: 119217680
Bug: 124667657
Change-Id: Ia1894cfdb6b64f6bfda62ca725ef7bc902e091f7
parent e4f26ef2
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -246,6 +246,7 @@ message Atom {
        AssistGestureFeedbackReported assist_gesture_feedback_reported = 175;
        AssistGestureProgressReported assist_gesture_progress_reported = 176;
        TouchGestureClassified touch_gesture_classified = 177;
        HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true];
    }

    // Pulled events will start at field 10000.
@@ -3338,6 +3339,33 @@ message ServiceLaunchReported {
    optional string service_name = 3;
}

/**
 * Logs when a hidden API is used.
 *
 * Logged from:
 *     libcore/libart/src/main/java/dalvik/system/VMRuntime.java
 */
message HiddenApiUsed {
    // The uid of the app making the hidden access.
    optional int32 uid = 1 [(is_uid) = true];

    // Signature of the method or field accessed.
    optional string signature = 2;

    enum AccessMethod {
        NONE = 0;
        REFLECTION = 1;
        JNI = 2;
        LINKING = 3;
    }

    // Type of access.
    optional AccessMethod access_method = 3;

    // Whether the access was prevented or not.
    optional bool access_denied = 4;
}

//////////////////////////////////////////////////////////////////////
// Pulled atoms below this line //
//////////////////////////////////////////////////////////////////////