Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android key store entries cleaning

I have an app that uses AndroidKeystore, and I wanted to cleanup my app specific key entries from Android Key Store, when my app got uninstalled(so, app does not have much control to call deleteEntry).

I believe that android cleans up when my app got uninstalled, but I donno how to confirm. I could not find much info on clenaup on android-dev either.

Can anybody confirm or give help on how we be sure that an app's keystore entries will be deleted when that app is uninstalled ?

like image 693
Hakuna Matata Avatar asked Jul 29 '15 19:07

Hakuna Matata


1 Answers

Yes, your keystore keys are automatically removed when your app is deleted. Specifically, whenever an app is deleted, PackageManagerService.removeKeyStoreDataIfNeeded is called. This calls KeyStoreService::clear_uid which finds and removes all key aliases for the specified app UID.

like image 153
divegeek Avatar answered Oct 20 '22 11:10

divegeek