How to remove App installed trusted CA cert on uninstalling the App

后端 未结 3 761
孤街浪徒
孤街浪徒 2020-12-29 05:39

I have an app that gives option to install CA cert and it gets stored in the user tab of Trusted Credentials and it works as expected.

FYI

相关标签:
3条回答
  • 2020-12-29 05:54

    Lookout Mobile has blogged about this due to the DigiNotar events, and provided some pretty good (read: lengthy) instructions which you can find here.

    The gist of it is that you need to pull /system/etc/security/cacerts.bks and then remove the CAs from the store, then push the store back to the device and reboot. Their instructions require that you have Bouncy Castle (for decrypting the store), root access, and a working adb connection. I'm not sure if this applies to all versions of Android or not, but my guess would be that the location of the CA store hasn't changed in quite some time (if ever).

    0 讨论(0)
  • 2020-12-29 06:05

    you cant get the broadcast of package getting uninstalled for your own package. this may lead to inconsistency in the system. see this answer

    0 讨论(0)
  • 2020-12-29 06:05

    As far as i know there is only a broadcast that tells that uninstall has completed ACTION_PACKAGE_REMOVED.

    After uninstalling the app MyCertApp the event ACTION_PACKAGE_REMOVED is broadcasted. The code that handles ACTION_PACKAGE_REMOVED in MyCertApp is alredy gone at that time.

    You can do the post-processing only with a second independant app that is still there and that can unistall itself after receiving that MyCertApp is gone.

    The other hypotetical solution may be that your app has a menu-item "uninstall MyCertApp". I donot know if it is possible for an app to uninstall itselt

    0 讨论(0)
提交回复
热议问题