Unpacking, Editing, Packing ROMS [.IMG, .DAT] in Windows.

Search This thread

Mr Hassan

Account currently disabled
Feb 14, 2016
932
63
OnePlus 10 Pro


hello brother
thanks for beautifull and easy thread ,
i have a Q , i have system.img.ext4 ........and i extracted with another tool, and now after some changes i want to repack it again, so how can i repack it,
and MOST IMPORTANT thing where i found system.transfer.list files
 

yhh084

New member
Jun 22, 2016
2
0
Hi I think a bit late to reply. But I am facing a problem.
I can't repack extracted system/ folder. It shows-

Code:
0 [main] make_ext4fs 2152 cygwin_expection::open_stackdumpfile: Dumping stack trace to make_ext4fs.exe.stackdump

and created system_new.img. But its size is 0 B.

I love this tool a lot. But it will be useful for me if you help to fix this problem.:rolleyes:
I used this command to repack-

Code:
make_ext4fs -s -l 3.07G -a system system_new.img system/

Please help me sir :(
 
Last edited:

cihaneken

Senior Member
Does anyone know about the error below?

Analize format of file. Please wait...
Exception EAccessViolation in module ImgExtractor.exe at 00003F88.
Access violation at address 00403F88 in module 'ImgExtractor.exe'. Read of address B9EC8B51.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Unpacking, Editing, Packing ROMS GUIDE - Host Zero

    First download the tools from the link below.

    new%2Bprof.png


    1. system.img
    2. system.new.dat


    1.Unpacking Repacking system.img

    1. Paste your system.img in tools folder
    2. Open cmd.exe
    3. Type:
    Code:
    mkdir <your_folder_name>
    ImgExtactor <raw_sparse.img> system -i
    
    ex: ImgExtactor system.img system -i

    4. Now open your folder you have created, you can find your <raw_image> has been extracted.
    5. Now edit the files in system folder as your convenience.
    6. Now open properties of folder you have created see the size of folder.
    7. Now lets pack the image back, open the minimized command window.
    Code:
    make_ext4fs -s -l <size_of_your_folder+100>M -a system <name_of_packing_image>.img <your_folder_name>/
    
    ex: make_ext4fs -s -l 512M -a system my_new_system.img system/
    8. Done, enjoy!

    2.Unpacking Repacking system.new.dat

    1. Paste your system.new.dat, system.transfer.list and file_contexts in tools folder.
    2. Open cmd.exe
    3. Type:
    Code:
    sprs2ext system.transfer.list <name_of_system>.new.dat
    
    ex: sprs2ext system.transfer.list system.new.dat

    4. Now again type:
    Code:
    mkdir <your_folder_name>
    ImgExtactor <raw_sparse.new.img> system -i
    
    ex: ImgExtactor system.img system -i

    5. Now open folder you have created and you will find the system.new.dat has been extracted.
    6. Edit the extracted files.
    7. Open properties of the extracted folder and check the size of folder
    7. Now open minimized command window.
    Code:
    make_ext4fs -T 0 -S file_contexts -l <size_of_folder+100>M -a system <name_of_packing_image>.img <your_folder_name>/
    
    ex: make_ext4fs -T 0 -S file_contexts -I 512M -a system my_new_system.img system/

    8. Now again type:
    Code:
    rimg2sdat <your_raw_image>.img
    
    ex: rimg2img my_new_system.img

    9. Done! enjoy.

    CLICK HERE TO DOWNLOAD TOOLS
    2
    Cmd.exe not work on windows 7 32bit



    sent from Xperia™ SP | Android 6.0.1



    No problem. Open your tools folder in full screen. now below empty white space click (Shift + RightClick) then select Open Command Window Here.

    Done!
    1
    A useful guide! Thanks!

    Sent from my Sony Xperia Z3 Compact using XDA Labs
    1
    Cmd.exe not work on windows 7 32bit

    ?

    sent from Xperia™ SP | Android 6.0.1
    Hi hamed24
    Start-->run--> cmd.exe didn´t work? but using the right Mousebutton is okay?
    Seems that Windows has lost the C:\Windows\system32 entry in the PATH Variable... easy to fix...
    1. Press "Windows-Sign" Key and Break at the same time (it´s the same as rightclick on the Computer-Icon on the Desktop), click on Advanced System Settings.
    2. Inside the new Window, click on Environment Variables, a new window opens. Now the lower part is the important one... look for PATH and doubleclick it.
    3. At the end of the line, check if there is a ";" (without quotes). That seperates the different entries.... if there´s one there ... ok, place cursor at the end and enter C:\WINDOWS\SYSTEM32;
    4. Hit ENTER, close all Windows, log off and on again.... and try again, should work now. If not, go to Start-->Run--> and type C:\WINDOWS\SYSTEM32\CMD.EXE and there you are :)

    regards...
    daywalker386