Re-install app without losing personal data How do you re-install an app without losing personal data?

In this case its Plants vs. Zombies 2 that hangs when loading the game. I thought a re-install might solve the issue. But I don't want to need to redo everything I've done so far.
For the following procedure you'll need adb installed on your computer (if you're not already have that, see: Is there a minimal installation of ADB?). Alternatively, a terminal emulator app should do as well.

Android apps are managed by the "Package manager", which has a command-line interface called pm. So here's what you can do with it for your case:


# to use ADB, first get a command line
adb shell
# now tell the package manager to uninstall the app, but keep its data
pm uninstall -k com.YOUR_PACKAGE_NAME`


(Note this won't work with a terminal emulator app on device (at least with none I know of) except with root permissions, as "normal apps" lack the required privileges/permissions.)

Of course you have to replace com.YOUR_PACKAGE_NAME with the package name of the app you want to deal with. Easiest way to find that is visiting its page on Google Play, and take a look at the URL: the package name follows the id= parameter there. It's the -k parameter telling the package manager to keep the app's data.

Now, when you re-install the app, its data is already there (was not removed).

All this does not require root (at least as long as we talk about a user-installed app).