title: how to identify an uninstall attempt which fails due to app defined as device admin
body: <p>when attempting to uninstall an app which is defined as device admin, the uninstall fails (this is normal system behavior); however, there is no notification to explain to the user why this happens.</p>
  
  <p>is there a way to identify the uninstall attempt  so i can handle this?</p>
  
  <p>parsing logcat (as root) is doable; e.g. on my device i get from <code>PackageManager</code> logcat:</p>
  
  <p><code>Not removing package</code><em><code>package name</code></em><code>: has active device admin</code></p>
  
  <p>but, besides requiring root, this might be android-version-specific</p>