android-backup-extractor icon indicating copy to clipboard operation
android-backup-extractor copied to clipboard

Bad advice in the README.md

Open cparke2 opened this issue 8 years ago • 6 comments

This is a great utility you've created that is working well for me on Mac OS X. However, when rebuilding the archive, you advised in the readme file to use "tar tf backup.tar | grep -F "com.package.name" >package.list" to store off the original order of the files to be used subsequently with "tar cf restore.tar -T package.list" when creating the new tar file to pack,

There is a big problem with this suggestion: tar includes subdirectory names as well as files in the package.list file! When you go to recreate the tar using that list file, all the files in the subdirectories get added multiple times! (once for the directory listings, and again for the file listings). Talk about bloat! Not to mention the exact file ordering is not preserved for the subdirectories because they are added for the subdirectory listing first. There isn't an easy way to fix this, the subdirectories need to be filtered out of the package.list somehow and tar doesn't provide such an option, for now I'm using a bash shell script to repair the list.

cparke2 avatar Jan 03 '16 00:01 cparke2

Someone contributed that part, care to submit a 'fix' (pull request) for the README?

nelenkov avatar Jan 03 '16 01:01 nelenkov

Ready for review

cparke2 avatar Jan 03 '16 08:01 cparke2

@cparke2 Could you please provide your shell script to repair the list?

tomaszn avatar May 13 '16 09:05 tomaszn

His commit is at https://github.com/cparke2/android-backup-extractor/commit/ec804f65fdf62babd94ba795330c8713090b1e3d

cpfeiffer avatar Dec 26 '16 23:12 cpfeiffer

Check out my fork, it has built-in support to pack/unpack a .tar file.

rustyx avatar May 17 '21 13:05 rustyx

Check out my fork, it has built-in support to pack/unpack a .tar file.

MAN YOU ARE A LIFESAVER Thank you very much for your repo, only your solution for .tar packing worked and is very cool and easy to use!

Einxeld avatar Oct 23 '23 17:10 Einxeld