adb shell 'pm list packages -f -s | sed -e 's/.*=//' | sort
List All Third Party Applications
adb shell 'pm list packages -f -3'
adb shell 'pm list packages -f -3' | sed -e 's/.*=//' | sort
Restore a Backup
adb restore “/path/to/backup/myapp.ab”
Show Logs for a Service
adb shell logcat -s [Service]
adb shell logcat -s BackupManagerService
Issue: when restoring backups you receive in the BackupManagerService the message Wrong header version: X where X is a positive integer.
Solution: the backup file you've tried to restore is likely from a newer version of Android. Open up the .ab file and in the header info for the file is the incorrect i
nteger. Try a lower one, save the file, and restore again.