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

Skip to content
Commit 0bef5e6e authored by Felipe Leme's avatar Felipe Leme
Browse files

Added DeviceAdminInfo to dumpsys device_policy.

Also included missing fields, like mHeadlessDeviceOwnerMode.

For example, using TestDpc as DO, it would show:

  Enabled Device Admins (User 0, provisioningState: 0):
    com.afwsamples.testdpc/.DeviceAdminReceiver:
    ...
       mProvisioningContext=null
      DeviceAdminInfo:
        mVisible: true
        mUsesPolicies: 991
        mSupportsTransferOwnership: true
        mHeadlessDeviceOwnerMode: 1
        Receiver:
          name=com.afwsamples.testdpc.DeviceAdminReceiver
          packageName=com.afwsamples.testdpc
          labelRes=0x7f11005b nonLocalizedLabel=null icon=0x0 banner=0x0
          enabled=true exported=true directBootAware=false
          description=2131820635
          permission=android.permission.BIND_DEVICE_ADMIN
          taskAffinity=com.afwsamples.testdpc targetActivity=null persistableMode=PERSIST_ROOT_ONLY
          launchMode=LAUNCH_MULTIPLE flags=0x10000 privateFlags=0x0 theme=0x0
          lockTaskLaunchMode=LOCK_TASK_LAUNCH_MODE_DEFAULT
          resizeMode=RESIZE_MODE_RESIZEABLE
          knownActivityEmbeddingCerts={}
          requireContentUriPermissionFromCaller=CONTENT_URI_PERMISSION_NONE
          ApplicationInfo:
            packageName=com.afwsamples.testdpc
            labelRes=0x7f11005b nonLocalizedLabel=null icon=0x7f08007b banner=0x7f08007b
            processName=com.afwsamples.testdpc
            taskAffinity=com.afwsamples.testdpc
            uid=10174 flags=0x3088be46 privateFlags=0x8c001100 theme=0x7f120007
            requiresSmallestWidthDp=0 compatibleWidthLimitDp=0 largestWidthLimitDp=0
            sourceDir=/data/app/~~4e0LiJNiMykU3NBy1eB2XQ==/com.afwsamples.testdpc-Lkk6fLKZIU8p8leT9GnIcw==/base.apk
            resourceDirs=[]
            overlayPaths=[/data/resource-cache/com.android.systemui-neutral-Eghx.frro, /data/resource-cache/com.android.systemui-accent-2Awe.frro, /data/resource-cache/com.android.systemui-dynamic-pUTY.frro]
            seinfo=default:targetSdkVersion=33
            seinfoUser=:complete
            dataDir=/data/user/0/com.afwsamples.testdpc
            deviceProtectedDataDir=/data/user_de/0/com.afwsamples.testdpc
            credentialProtectedDataDir=/data/user/0/com.afwsamples.testdpc
            sharedLibraryFiles=[/system_ext/framework/androidx.window.extensions.jar, /system_ext/framework/androidx.window.sidecar.jar]
            enabled=true minSdkVersion=21 targetSdkVersion=33 versionCode=9000 targetSandboxVersion=1
            supportsRtl=false
            fullBackupContent=true
            crossProfile=false
            HiddenApiEnforcementPolicy=2
            usesNonSdkApi=false
            allowsPlaybackCapture=true
            nativeHeapZeroInitialized=0
            enableOnBackInvokedCallback=false
            allowCrossUidActivitySwitchFromBelow=true
            mPageSizeAppCompatFlags=0
            createTimestamp=13355397
    ...
    mPasswordOwner=-1

Test: adb shell dumpsys device_policy
Fixes: 398295173
Flag: EXEMPT changes on debugging components only

Change-Id: I7f3d29d41dc7604c3988517233e7312306bd4a42
parent 8b634e94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment