Seshu Vinay
Seshu Vinay

Reputation: 13588

Know if my app is uninstalled

After a lot of research, I got to a conclusion that uninstalls can't be tracked as "Package Removed" action is not broadcasted to all the apps except the one getting uninstalled.

And then I found a way of tracking uninstalls. I saved all uninstall user information by Sending a GCM and getting "Not Registered" error in the response(GCM gives "Not Registered" error for devices with the app uninstalled).

So now, when I installed Opera Max app and uninstalled it, it opened a webpage asking for "Uninstall Survey". How could they have done that?

Upvotes: 2

Views: 189

Answers (2)

zmarties
zmarties

Reputation: 4869

I can't repro this behaviour when I uninstall Opera Max, but I believe their technique is along the following lines:

  • they somehow register an event handler that will send an Intent if and when the directory that the app was installed to disappears
  • that event handler survives the uninstallation of the app
  • when the directory disappears the intent fires - of course they can't run their own code now (since it has been uninstalled), but they can direct you to a webpage in whatever browser is in place

I didn't have any other Opera apps installed when I tried this - if you have a second app that you also control that has not been uninstalled, then it's easy for each app to monitor the uninstallation of the other one.

I was running on Lollipop - perhaps recent versions of Android have closed what certainly feels like a security hole.

Upvotes: 0

sschuberth
sschuberth

Reputation: 29867

See these slides from Droidcon 2015 where some guys reverse-engineered how Opera Max is doing that, and see this GitHub repository for some example code.

Upvotes: 2

Related Questions