3

If I install an app, uninstall it, finally install it again at a later time, how the app can detect if it was installed on this device earlier? What are the device unique id's that it can detect?

  1. Android device ID: I changed it with device ID changer (now removed from play store, can't give link).
  2. google advertising ID: changed that too
  3. didn't login into the app with any accounts earlier used.

What other ways the app an app can use to detect if it was installed earlier on the device. I do give internet access to the app.

No IMEI, I'm using a tablet.

  • I'm not sure where it is stored (probably in the packages.xml), but also wondered when discovering you can pm list packages -u, with the -u parameter explained as Also include uninstalled packages. So it seems Android itself keeps track of apps you uninstall even, which IMHO can only be "cleaned up" by a factory-reset (at least for a "normal user"). – Izzy Nov 8 '14 at 16:09
  • @Izzy An 'uninstalled' package can always be purged with pm uninstall. A package will be completely removed if all users (guest incl.) have uninstalled on their perspectives. Furthermore, if there's only one user (again, guest incl.) exists on the system, then his removing a package will also fully remove it. By 'fully remove' I mean the system keeps no record of the package, despite the fact that some 3rd party apps may keep their own 'operation history'. – iBug Mar 1 '17 at 11:22
  • @iBug I never found any traces with the -u, so all I can do is "wonder" – as my previous comment puts it. But thanks for those details! – Izzy Mar 1 '17 at 12:33
  • @Izzy So do I. I even wondered if option -u was broken because I, too, found no trace from it. But everything that should have been there did exist in packages.xml. – iBug Mar 2 '17 at 5:15
  • @iBug of course, as that's what pm uses as "backend" :) – Izzy Mar 2 '17 at 7:42
3

As RossC said, yes it depends upon the developers how they keep the logic to detect the uniqueness. As I am too a dev (Windows App) and my preferred way is to keep the device id's over the cloud. So whenever the device gets internet on, it syncs with our servers for prior installations and it becomes easy for users to use it on multiple devices. Other easy ways are to put some file inside the android system folders like data , usr or wherever.

2

The app may well leave a folder behind with some data in it. You would have to go and manually remove the folder(s) to ensure all data is removed. If you reinstall the app it will check that folder and know it was installed.

An easy example is The Bard's Tale, the game. You install about 20 Mb of a file from the Play Store and open the game. The game downloads about 3Gb of additional data (HD textures version) onto your internal/external SD. Then you play the game and save it a few times, creating save files on the device. Then you uninstall the game. The 3Gb of Textures AND your save games stay on the int/ext SD. If you reinstall it takes up just where it left off.

It's not so much it recognises your device, it is that it still has the data.

Something like ES File Manager, will advise you that you have uninstalled an application that has left data behind, and ask you to choose if you want to delete it. You will need access to delete System Apps or anything within /system

  • 1
    I don't have root access on my Nexus 4, but ES File Manager still asks me if I want to delete data left behind by an app that I uninstall. – Adinia Nov 6 '14 at 14:21
  • @Adinia thanks! I don't have any devices that aren't rooted so I took a guess. I've edited my answer now, good spot! Hopefully it's right now! – RossC Nov 6 '14 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.