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

Commit a5964c08 authored by Kenny Root's avatar Kenny Root
Browse files

Move AdbDebuggingManager to AdbService

Also remove the "Usb" from the AIDL function since it's not really
related to USB.

Test: make
Bug: 63820489
Change-Id: Ibf23964665a115a5bc835820dcff98aaf7ba610f
parent 47312183
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ package android {
    field public static final java.lang.String MANAGE_AUTO_FILL = "android.permission.MANAGE_AUTO_FILL";
    field public static final java.lang.String MANAGE_CARRIER_OEM_UNLOCK_STATE = "android.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE";
    field public static final java.lang.String MANAGE_CA_CERTIFICATES = "android.permission.MANAGE_CA_CERTIFICATES";
    field public static final java.lang.String MANAGE_DEBUGGING = "android.permission.MANAGE_DEBUGGING";
    field public static final java.lang.String MANAGE_DEVICE_ADMINS = "android.permission.MANAGE_DEVICE_ADMINS";
    field public static final java.lang.String MANAGE_IPSEC_TUNNELS = "android.permission.MANAGE_IPSEC_TUNNELS";
    field public static final java.lang.String MANAGE_ROLE_HOLDERS = "android.permission.MANAGE_ROLE_HOLDERS";
+24 −1
Original line number Diff line number Diff line
@@ -16,6 +16,29 @@

package android.debug;

/** @hide */
/**
 * Interface to communicate remotely with the {@code AdbService} in the system server.
 *
 * @hide
 */
interface IAdbManager {
    /**
     * Allow ADB debugging from the attached host. If {@code alwaysAllow} is
     * {@code true}, add {@code publicKey} to list of host keys that the
     * user has approved.
     *
     * @param alwaysAllow if true, add permanently to list of allowed keys
     * @param publicKey RSA key in mincrypt format and Base64-encoded
     */
    void allowDebugging(boolean alwaysAllow, String publicKey);

    /**
     * Deny ADB debugging from the attached host.
     */
    void denyDebugging();

    /**
     * Clear all public keys installed for secure ADB debugging.
     */
    void clearDebuggingKeys();
}
+0 −11
Original line number Diff line number Diff line
@@ -111,17 +111,6 @@ interface IUsbManager
     */
    ParcelFileDescriptor getControlFd(long function);

    /* Allow USB debugging from the attached host. If alwaysAllow is true, add the
     * the public key to list of host keys that the user has approved.
     */
    void allowUsbDebugging(boolean alwaysAllow, String publicKey);

    /* Deny USB debugging from the attached host */
    void denyUsbDebugging();

    /* Clear public keys installed for secure USB debugging */
    void clearUsbDebuggingKeys();

    /* Gets the list of USB ports. */
    UsbPort[] getPorts();

+6 −0
Original line number Diff line number Diff line
@@ -1791,6 +1791,12 @@
    <permission android:name="android.permission.MANAGE_USB"
        android:protectionLevel="signature|privileged" />

    <!-- @SystemApi Allows an application to manage Android Debug Bridge settings.
         <p>Not for use by third-party applications.
         @hide -->
    <permission android:name="android.permission.MANAGE_DEBUGGING"
        android:protectionLevel="signature|privileged" />

    <!-- @SystemApi Allows an application to access the MTP USB kernel driver.
         For use only by the device side MTP implementation.
         @hide -->
+2 −0
Original line number Diff line number Diff line
@@ -256,6 +256,7 @@ applications that come with the platform
        <permission name="android.permission.DELETE_PACKAGES"/>
        <permission name="android.permission.FORCE_STOP_PACKAGES"/>
        <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
        <permission name="android.permission.MANAGE_DEBUGGING"/>
        <permission name="android.permission.MANAGE_DEVICE_ADMINS"/>
        <permission name="android.permission.MANAGE_FINGERPRINT"/>
        <permission name="android.permission.MANAGE_USB"/>
@@ -376,6 +377,7 @@ applications that come with the platform
        <permission name="android.permission.GET_APP_OPS_STATS"/>
        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
        <permission name="android.permission.MANAGE_ACTIVITY_STACKS"/>
        <permission name="android.permission.MANAGE_DEBUGGING"/>
        <permission name="android.permission.MANAGE_USB"/>
        <permission name="android.permission.MANAGE_USERS"/>
        <permission name="android.permission.MASTER_CLEAR"/>
Loading