arifogel / twrpabx

Apache License 2.0
23 stars 7 forks source link

Cannot extract TWRP backup (Unexpected type: twimage) #7

Open ghost opened 5 years ago

ghost commented 5 years ago

I get the following error message when trying to extract a TWRP backup archive:

$ twrpabx twrp-20180821.ab 
Input file: 'twrp-20180821.ab'
Read 512 bytes
TW ADB Backup Header type: twstreamheader
Number of partitions: 3
Read 512 bytes
Unexpected type: twimage

I previously generated this TWRP backup with the following command:

adb backup -f twrp-20180821.ab --twrp boot data system

I have a Samsung Galaxy S2 i9100 phone running LineageOS.

klausrollmann commented 5 years ago

Same problem here

divico commented 5 years ago

exactly same problem here

JuniorJPDJ commented 5 years ago

The same issue

MarcSN311 commented 5 years ago

same here

$ twrpabx backup.ab
Input file: 'backup.ab'
Read 512 bytes
TW ADB Backup Header type: twstreamheader
Number of partitions: 11
Read 512 bytes
Unexpected type: twimage
WHIFAN commented 5 years ago

same issue, anyone have a quick fix?


Read 512 bytes
TW ADB Backup Header type: twstreamheader
Number of partitions: 9
Read 512 bytes
Unexpected type: twimage```
prudy commented 4 years ago

I've opened a pull request for this.

vasyugan commented 4 years ago

@prudy

I've opened a pull request for this.

I have built the programme using your twrpabx.cpp, but it still fails, albeit with a different error message:

Wrote 1048064  bytes
Remaining bytes in backup file: 8169466880
Read 512  bytes
Corrupt start of data header
wimage

Tried this with two different backup archives. Apparently more work is needed.

prudy commented 4 years ago

This pull request fixes only issue #7. Your problem comes from separate issue #4, please take fix for it as well (or use all-in-one from my git branch).

vasyugan commented 4 years ago

This pull request fixes only issue #7. Your problem comes from separate issue #4, please take fix for it as well (or use all-in-one from my git branch).

I now did compile it all from your branch, but the problem is still there. After the boot image it throws the towel with a "corrupt header" message. Are you sure that the fix is in your branch? In #4 @hrimhari says that he has a fix and will create a pull request, but I don't see that he actually has done so.

hrimhari commented 4 years ago

It's right there: https://github.com/arifogel/twrpabx/pull/5

prudy commented 4 years ago

By all-in-one (issue 4+7) I meant branch on my git: https://github.com/prudy/twrpabx/tree/img_and_issue4

vasyugan commented 4 years ago

@hrimhari @prudy a big thank you to both of you!!