Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twrp extraction #60

Open
jontis opened this issue Jan 29, 2018 · 3 comments
Open

Twrp extraction #60

jontis opened this issue Jan 29, 2018 · 3 comments

Comments

@jontis
Copy link

jontis commented Jan 29, 2018

TWRP seems to add some rows.

$ java -debug -jar "/home/jonathan/Downloads/Android Backup Utilities/Android Backup Extractor/android-backup-extractor-20171005-bin/abe.jar" unpack backup.ab backup.tar
Invlaid Magic: TWRPtwstreamheader���¨G+TWRPtwfilename h?fs�/external_sd/TWRP/BACKUPS/88f12f77/2018-01-22--10-32-14_onyx-userdebug_7.1.2_NJH47F_4cb9ee3dc1/system.ext4.winTWRPtwdatablockDÝíº/addon.d/00407550000000000000000000000062132311571050011257xustar rootroot50 RHT.security.selinux=u:object_r:system_file:s0
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid Magic TWRPtwstreamheader���¨G+TWRPtwfilename h?fs�/external_sd/TWRP/BACKUPS/88f12f77/2018-01-22--10-32-14_onyx-userdebug_7.1.2_NJH47F_4cb9ee3dc1/system.ext4.winTWRPtwdatablockDÝíº/addon.d/00407550000000000000000000000062132311571050011257xustar rootroot50 RHT.security.selinux=u:object_r:system_file:s0
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:502)
at org.nick.abe.Main.main(Main.java:128)
... 5 more
Caused by: java.lang.IllegalArgumentException: Invalid Magic TWRPtwstreamheader���¨G+TWRPtwfilename h?fs�/external_sd/TWRP/BACKUPS/88f12f77/2018-01-22--10-32-14_onyx-userdebug_7.1.2_NJH47F_4cb9ee3dc1/system.ext4.winTWRPtwdatablockDÝíº/addon.d/00407550000000000000000000000062132311571050011257xustar rootroot50 RHT.security.selinux=u:object_r:system_file:s0
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:332)
... 6 more

Skipping them helped but I don't get all data from an extraction. Help would be really appreciated :-)

Check your file:
$ head backup.ab

Twrp has added some things in the beginning. Skipping those with:
$ dd if=backup.ab bs=512 skip=3 | head

Got me to a semiworking extraction.

$ dd if=backup.ab bs=512 skip=3 | tar -x

@nelenkov
Copy link
Owner

I think there is a related issue on TWRP's Github about this already: https://github.com/omnirom/android_bootable_recovery/issues/133
They are indeed using a slightly different format, but I don't know the details.

@bugmaschine
Copy link

Any update on this?

@Overpricedgpu
Copy link

Any update on this?

solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants