TransWikia.com

Extracting data from a TWRP backup

Android Enthusiasts Asked on February 22, 2021

How can I extract individual files from a backup created with TWRP? I’ve come across this answer, which is about extracting an APK from the system partition. However, I want to extract files from /data, which gets split across several files in the backup.

4 Answers

The files created by TWRP with a *.win or *.win??? extension are tar archives. If a partition gets split across multiple files, each is a tar archive in its own right. Simply rename each file, giving it a .tar extension, and open it in your favorite archive tool (Engrampa on Ubuntu MATE has worked well for this).

Correct answer by user149408 on February 22, 2021

Just extract it with winrar to a folder on desktop and that's it

Answered by Nottheone7 on February 22, 2021

cat data.ext4.win??? | tar xvfi -

What this does is concatenate each file matching the pattern data.ext4.win??? and then pipe the concatenated files to tar for extraction. the - as the filename tells tar to extract from stdin. The i option ignores zero blocks which will be in between each archive file concatenated.

In this example I used the ext4 formatted data partition. Change data.ext4 to match the partition you are extracting.

Disclaimer: This has not been tested in a windows environment.



For a less hacky solution found here

for f in data.ext4.win???; do tar xvf "$f"; done

This is a bit simpler without relying on the ignore zeros option of tar to operate properly



Edited to reflect davidgo's comment.

31-Jan-2020 Edited to reflect Code Bling's comments.

17-Feb-2021 Edited to reflect alecxs's comments.

Answered by Johnathon Havens on February 22, 2021

Try BinWalk, it's a fast, easy to use tool for analyzing, reverse engineering, and extracting firmware images. and for more information take a look at this Quick-Start-Guide.

Answered by M. A. on February 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP