FORUMS

[GUIDE] How to extract, create or edit android adb backups

1,851 posts
Thanks Meter: 964
 
By scandiun, Senior Member on 24th November 2012, 09:51 PM
Post Reply Email Thread
20th February 2020, 10:05 AM |#221  
Senior Member
Flag Berlin
Thanks Meter: 15
 
More
Quote:
Originally Posted by scandiun

I would be really greatful if you did that for us.

One of the devs has already done it, so I don't need to.

His code can be checked out from the branch called Img_and_issue4 of his fork. Here is a direkt link to the zipped source.

(don't download the release version 0.1., it doesn't have the fixed).

To get the code to compile you first have to run

Code:
 autoreconf -vfi
(from the autoconf package)

After that you can do the usual
Code:
./configure && make && sudo make install
The Following 2 Users Say Thank You to yahya69 For This Useful Post: [ View ] Gift yahya69 Ad-Free
20th February 2020, 10:36 AM |#222  
Senior Member
Thanks Meter: 275
 
More
thx! nevertheless, its off-topic here and might confuse. consider revise your posts with [HIDE ] spoilers [/HIDE]
20th February 2020, 09:59 PM |#223  
scandiun's Avatar
OP Senior Member
Thanks Meter: 964
 
More
Quote:
Originally Posted by aIecxs

thx! nevertheless, its off-topic here and might confuse. consider revise your posts with [HIDE ] spoilers [/HIDE]

i don't think that's an issue, even more, it's useful.
25th February 2020, 08:32 AM |#224  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by yahya69

One of the devs has already done it, so I don't need to.

His code can be checked out from the branch called Img_and_issue4 of his fork. Here is a direkt link to the zipped source.

(don't download the release version 0.1., it doesn't have the fixed).

To get the code to compile you first have to run

Code:
 autoreconf -vfi
(from the autoconf package)

After that you can do the usual
Code:
./configure && make && sudo make install

Have tried this, but with this errors:

in make:
Code:
libtool: link: g++ -g -O2 -o .libs/twrpabx.exe src/twrpabx.o src/main.o
pandoc --standalone --to man man/twrpabx.1.md > man/twrpabx.1
/bin/sh: pandoc: command not found
make: *** [Makefile:1144: man/twrpabx.1] Error 127
But i see that a twrpabx was generated, so i run it with my backup, and after a lot of text, shows this:
Code:
Remaining bytes in backup file: 22507686912
Read 512  bytes
Data header type: twdatablock
Read 1048064  bytes
Wrote 1048064  bytes
Remaining bytes in backup file: 22506638336
Read 512  bytes
Data header type: md5trailer
Read 1048064  bytes
Wrote 1048064  bytes
Remaining bytes in backup file: 22505589760
Read 512  bytes
Corrupt start of data header
it generates a system.ext4.win file of 1.3Gb, my backup.ab original file is 23Gb

Any idea of how to fix it?
The Following User Says Thank You to Lerkista For This Useful Post: [ View ] Gift Lerkista Ad-Free
25th February 2020, 03:45 PM |#225  
scandiun's Avatar
OP Senior Member
Thanks Meter: 964
 
More
Quote:
Originally Posted by Lerkista

Have tried this, but with this errors:

in make:

Code:
libtool: link: g++ -g -O2 -o .libs/twrpabx.exe src/twrpabx.o src/main.o
pandoc --standalone --to man man/twrpabx.1.md > man/twrpabx.1
/bin/sh: pandoc: command not found
make: *** [Makefile:1144: man/twrpabx.1] Error 127
But i see that a twrpabx was generated, so i run it with my backup, and after a lot of text, shows this:
Code:
Remaining bytes in backup file: 22507686912
Read 512  bytes
Data header type: twdatablock
Read 1048064  bytes
Wrote 1048064  bytes
Remaining bytes in backup file: 22506638336
Read 512  bytes
Data header type: md5trailer
Read 1048064  bytes
Wrote 1048064  bytes
Remaining bytes in backup file: 22505589760
Read 512  bytes
Corrupt start of data header
it generates a system.ext4.win file of 1.3Gb, my backup.ab original file is 23Gb

Any idea of how to fix it?

Looks like you don't have pandoc installed on your system. Are you running linux to run the command? Also, probably your backup.ab has "several" partitions, where system.ext4.win is the first one extracted then fails.
5th March 2020, 10:57 AM |#226  
Member
Flag Velllore
Thanks Meter: 18
 
More
So after bashing my head for 12 straight hours, here I am. To avoid the trouble of restoring each app manually, I did the "adb backup --twrp" with just the data partition selected. Seemed to go well. Gave a success message too.
But every time I tried restoring it, it went on for whole 1.5 hours each time, and the bash command would complete but phone would still be stuck at restore screen with the bar moving but no update in logs.
So thought of extracting data and putting it back manually, but that too, seems like trouble.

I've tried the twrp extractor, but to no success.

running the below command gives the following response:
$ twrpabx /media/storage/Oneplus/ROMs/backup.ab
Input file: '/media/storage/Oneplus/ROMs/backup.ab'
Read 512 bytes
Corrupt start of backup header

checking the head:
$ head backup.ab
libc: Access denied finding property "libc.debug.malloc.options"
libc: Access denied finding property "ro.debuggable"
libc: Access denied finding property "libc.debug.malloc.options"
libc: Access denied finding property "ro.debuggable"
TWRPtwstreamheader;�%]TWRPtwfilename�,�/ ��f:/data/media/0/TWRP/BACKUPS/4b8e20e/2020-03-04--14-18-08/data.ext4.winTWRPtwdatablockD���/property/00407000000000000000000000000140136300052140011613 xustar rootroot57 RHT.security.selinux=ubject_rroperty_data_file :s0
39 TWRP.security.e4crypt=21DK
/property/00407000000000000000000000000000136300052140011503 5ustar rootroot/property/persistent_properties01006000000000000000000000000 071136300052140016207xustar rootroot57 RHT.security.selinux=ubject_rroperty_data_file :s0
/property/persistent_properties01006000000000000000000000005 3531363000521400161070ustar rootroot
(
persist.vendor.radio.atfwd.starttrue
5th March 2020, 08:47 PM |#227  
scandiun's Avatar
OP Senior Member
Thanks Meter: 964
 
More
Quote:
Originally Posted by mohitraj.raj

So after bashing my head for 12 straight hours, here I am. To avoid the trouble of restoring each app manually, I did the "adb backup --twrp" with just the data partition selected. Seemed to go well. Gave a success message too.
But every time I tried restoring it, it went on for whole 1.5 hours each time, and the bash command would complete but phone would still be stuck at restore screen with the bar moving but no update in logs.
So thought of extracting data and putting it back manually, but that too, seems like trouble.

I've tried the twrp extractor, but to no success.

use CODE tags to put code please, it's a mess otherwise.
13th May 2020, 09:55 AM |#228  
Member
Flag Tirana
Thanks Meter: 87
 
More
How can you edit the "_manifest" file inside the adb backup? It only contains random numbers/letters.
The Following User Says Thank You to eltonb For This Useful Post: [ View ] Gift eltonb Ad-Free
13th May 2020, 06:23 PM |#229  
scandiun's Avatar
OP Senior Member
Thanks Meter: 964
 
More
Quote:
Originally Posted by eltonb

How can you edit the "_manifest" file inside the adb backup? It only contains random numbers/letters.

Of course you can, another thing is that you know what you are doing. About those random numbers, you are referring to line 8? Probably that's the signing certificate, the other previous lines are plain text. In fact the whole _manifest is plain text. Do not mistake the _manifest from adb backup with the AndroidManifest.xml inside apk files. That AndroidManifest.xml will be present inside the apk which can be inside the adb backup as well if you selected -apk flag.
14th May 2020, 07:01 AM |#230  
Member
Flag Tirana
Thanks Meter: 87
 
More
Quote:
Originally Posted by scandiun

Of course you can, another thing is that you know what you are doing. About those random numbers, you are referring to line 8? Probably that's the signing certificate, the other previous lines are plain text. In fact the whole _manifest is plain text. Do not mistake the _manifest from adb backup with the AndroidManifest.xml inside apk files. That AndroidManifest.xml will be present inside the apk which can be inside the adb backup as well if you selected -apk flag.

Thanks for the response. I tried deleting a file inside a backup. As a result dhe backup didn't work anymore, so for a moment i thought the numbers/letters were encrypted content of the backup which needed to be changed in order for the modification to work.
14th May 2020, 08:05 PM |#231  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by eltonb

Thanks for the response. I tried deleting a file inside a backup. As a result dhe backup didn't work anymore, so for a moment i thought the numbers/letters were encrypted content of the backup which needed to be changed in order for the modification to work.

Depends what file it is, files inside the backup need to be in same order, trailing slash, and so on. It's better done with Linux.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes