Backup / Restore Android App

Backup An App

# (1) List packages.
adb shell pm list packages


# (2) Retrieve path of the package.
# Usage:
adb shell pm path [App]

# Example:
adb shell pm path com.example.someapp


# (3) Pull the app.
# Usage:
adb pull [Path2App] [NewName]

# Example:
adb pull /data/app/someapp/base.apk someapp.apk


# (4) Backup app data.
# Usage:
adb backup -f [FileName] -apl [TargetApp]

# Example:
adb backup -f someapp.data.backup -apk com.example.someapp

Restore the Backup

# (1) Install the apk package.
# Usage:
adb install [Path2App]

# Example:
adb install someapp.apk


# (2) Restore the app data.
# Usage:
adb restore [Path2BackupFile]

# Example:
adb restore someapp.data.backup

NOTES!

Backup and restoring of purchased app on Google Play will results of “Unlicensed App”. These should be reinstalled from the Google Play.