Android users who want to have a little adventure use many mods and frequently change ROMs to make their devices brand new everyday. But you might never know when your device might get into a boot loop after installing a Mod or in the worst case it might get bricked and you need to restore the device. So it’s always advisable to take Nandroid backup of your device whenever possible, so that you can restore your device whenever you face a little ill fate. If you don’t know how to take a nandroid backup, follow our guide from the below link.

How To Take Nandroid Backups Using Custom Recoveries

But what if you have an old CWM nandroid backup of your device but you’ve moved to TWRP recently.(or Vice Versa) We know how frustrating it would be, but don’t lose your hope yet as we are going to show you how to convert your nandroid backup into a flashable Zip so that you can flash it using any custom recovery. Once you got a Zip file, you can either transfer it to the SDcard on your bricked device or if your device doesn’t sport an external SDcard, then you can sideload it using the ADB tool.

So let’s begin our little tutorial on creating flashable Zip files from CWM and TWRP backups.

Create Flashable Zip from CWM/TWRP Backup

The method for creating flashable Zip from CWM and TWRP backups are different as both the recoveries use different techniques to backup the device.

For CWM Backup

  1. Transfer the CWM backup from Phone to PC.
  2. Extract system.ext4.tar file with any of the archive apps like Winrar or 7zip, you will get the system folder of your device containing all the files.
  3. Gather the boot.img from the CWM backup.
  4. Now collect a META-INF folder from any custom ROM which is made for your device. Make sure you get the correct Meta-Inf folder, else the Zip won’t work and might worsen the condition of your device.
  5. Select the META-INF, System folders and the boot.img and right click your mouse and select add to Archive.
  6. In the Archive settings, choose the extension of the compressed file as Zip (Make sure of this part)

That’s it, your flashable Zip is now ready and you can flash it using any custom recovery.

For TWRP Backup

  1. Transfer the TWRP backup from Phone to PC.
  2. You’ll see a file named system.ext4.win which is the System partition backup of your device. Rename it to system.ext4.tar (Changing its extension from .win to .tar)
  3. Extract the system.ext4.tar using an archive software like Winrar or 7zip.
  4. If your TWRP backup is not in compression mode, you will directly get the system folder, else you will get a file named system.ext4, which should be renamed again to system.ext4.tar and extract it to get the system folder.
  5. Take the boot.emmc.win file and rename it to boot.img.
  6. Now collect a META-INF folder from any custom ROM which is made for your device. Make sure you get the correct Meta-Inf folder, else the Zip won’t work and might worsen the condition of your device.
  7. Select the META-INF, System folders and the boot.img and right click your mouse and select add to Archive.
  8. In the Archive settings, choose the extension of the compressed file as Zip (Make sure of this part)

Now you can use this Zip file to flash it on your Custom recovery.

Leave your feedback regarding the guide in the comments section below.

Source

24 COMMENTS

  1. use assayyed kitchen, put both system file and boot.img in the working folder. open the kitchen and chose number 6 and stand alone, this will give you the meta-inf

  2. what if there isn’t any meta-inf folder for my device? how can i generate it?

  3. Complete BS.

    You Windows users stick to Windows phone continue renaming extensions all your file.

  4. Then you have to write all by yourself or somehow make it compatible to use it with Android kitchen (easiest method)..

  5. By following this procedure appears that only a part of the copy made with the recovery will be replenished. I do not see that the partition “/Data” is replenished. Probably I’m in mistake, but I need this clarification

  6. I want to make a ZIP from the existing CUSTOM ROM, and can I get the META-INF folder from that CUSTOM ROM? (Monde7 rom for Note4 ExyNos)

  7. 1. I took backup with CWM via recovery mode. Backup folder has 5 files.. (nandroid.mdf ,cache.rfs.tar, .android_secure.vfat.tar ,data.rfs.tar and system.rfs.tar

    2. flashable zip dont need these PIT,MODEM files like ODIN uses ?
    3. Can i use this flashable zip on another phone (same make and model) ?

  8. 1. How did you take the backup in the first place? Anyway, all you need to do is to place all the contents of system folder of your device in the flashable zip. So you can look for a rfs extractor and extract the system.rfs file. Usually system directory contain folders like app, bin, etc, usr, framework and many more. If you have these contents after extracting the rfs file, you’re good to go.

    2. ODIN Firmware is usually in .tar or .tar.md5 format. The PIT file contains partition details of the device, so if you ever need to re-partition your device, you will need it. Modem.bin is used for restore radio (2G, 3G related) on your device.

  9. thank naveen for the info…..
    Prob is my backup do not have sys.ext4. file but there is sys.rfs. file… still need to use same method?

    2. off topic, why ODIN (samsung) needs diff files for flashing (Modem,PIT etc) but flashable files are single alone

    best wishes

  10. Every custom recovery has their own backup method resulting in different compression techniques and stuff. So you can restore it with the same recovery because other recoveries might use different decompression technique(sometimes, I even faced issues with different versions of same recovery). When you want to use your backup as flashable zip to flash it from any recovery, you need a universal code that can be understood by any recovery. Hence we need Meta-inf folder, in which you have an updater script of your device which tell a recovery what to do with the flashable zip.

  11. hi,
    Why do i need META folder from any custom ROM ? My stock ROM backup wont have that folder? (resulting flashable ROM will be the stock rom from the device i guess)

  12. IMO, the f2fs partition support is embedded in the kernel of the device (boot,img). In this method, you’re restoring the boot.img which replaces the kernel as per the backup. Additionally, you need to edit the updater script of the ROM to replace the ext4 specific code to the relevant f2fs code. If you use a ext4 compatible kernel and updater-script on a f2fs partitioned system, it might lead to a soft/hard brick. However, if you’re sure to unbrick your device, you can give your idea a try but we would recommend you to take necessary measures in case of any misfortunes.

  13. Got an interesting side question: Would this be useful to convert ext4 to f2fs? As TWRP creates ISO-like files, you can’t just restore an ext4 backup to a f2fs partition. Would this zip be similarly file-system dependent/ISO-like, or would it instead work by installing the data to any filesystem? Thanks in advance. There are a lot of people that could really benefit from this.

This site uses Akismet to reduce spam. Learn how your comment data is processed.