[DEV][Tools] simg2img for Windows

8ohmh

New member
May 6, 2012
1
7
0
Hello, although I'm working in Linux (VM too) I rewrote the SIMG2IMG so far for Windows (PE32, x86)

Usage: simg2img.exe -i <chunked Image file name> -o <outputname>

Optional: -d for debugging messages, listing all chunks of the image (.ext4.img) files to stdout (in case there are partial image files )

MD5: e5fc02b2f27756c1de270d31e29447e6 *simg2img.zip
 

Attachments

Last edited:

Victor_Hsu

New member
Oct 14, 2015
1
0
0
Error calling ftruncate() to set the image size

simg2img.exe -i system.img -o system.ext4
packed img filename: system.img
output img filename: system.ext4
Error calling ftruncate() to set the image size

Note: system.img is 1.9G.
 

sampalmer

Member
Aug 20, 2014
20
8
0
simg2img.exe -i system.img -o system.ext4
packed img filename: system.img
output img filename: system.ext4
Error calling ftruncate() to set the image size

Note: system.img is 1.9G.
I got the same problem when I ran this on system.img.ext4 from the Samsung Galaxy S5 Lollipop firmware. However, the output file still looked like it was the right size, and EXT2Read opened and extracted it without a problem.
 

pigstacho

Member
Dec 5, 2013
22
8
0
Same problem here:
packed img filename: system.img
output img filename: system.img2
Error calling ftruncate() to set the image size

Output file was 2.8GB, input file 2.4GB wich looked OK, so I tried opening the output file with ext4_unpacker_exe wich failed, then I tried opening it with ext2explore-2.2.71 and it was able to open it !!!!

Thanks
 

xdad_g

Member
Jan 18, 2015
12
1
0
G:\vbox_share\simg2img>simg2img.exe -i userdata.img -o new-userdata.img
packed img filename: userdata.img
output img filename: new-userdata.img
Wrote "new-userdata.img"

The userdata.img only 21.4MB , but the new-userdata.img is 1.19 GB . Is right ?
 
  • Like
Reactions: GreyMem
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone