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

Commit e5e38431 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Add Build.IS_DEBUGGABLE to public API

For testing purposes, system components such as mainline modules may
need to relax some security restrictions on debuggable builds only, in
cases where there is no testing strategy that would be reasonable on
user builds security-wise.
One example is to test interfaces between a mainline module and the
rest of the system, which typically require very privileged permissions.

There is no particular reason or permission check to keep the symbol
non-public so add it to the public API.

Test: m
Fixes: 163699557
Change-Id: I15c093af04f024eed5567151b241a4bc35c611d4
parent 3d31f1ea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29237,6 +29237,7 @@ package android.os {
    field public static final String HARDWARE;
    field public static final String HOST;
    field public static final String ID;
    field public static final boolean IS_DEBUGGABLE;
    field public static final String MANUFACTURER;
    field public static final String MODEL;
    field @NonNull public static final String ODM_SKU;
+5 −3
Original line number Diff line number Diff line
@@ -1287,10 +1287,12 @@ public class Build {
    public static final String HOST = getString("ro.build.host");

    /**
     * Returns true if we are running a debug build such as "user-debug" or "eng".
     * @hide
     * Returns true if the device is running a debuggable build such as "userdebug" or "eng".
     *
     * Debuggable builds allow users to gain root access via local shell, attach debuggers to any
     * application regardless of whether they have the "debuggable" attribute set, or downgrade
     * selinux into "permissive" mode in particular.
     */
    @UnsupportedAppUsage
    public static final boolean IS_DEBUGGABLE =
            SystemProperties.getInt("ro.debuggable", 0) == 1;