I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
instead, you can just mount the image, for ext4 it would be:
and when you're done customizing:Code:sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
(note that I've used offset=131072 instead of removing the header)Code:sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/ sudo umount mnt
After the second command I'm getting a memory allocation error though
"error: do_inode_allocate_extents: Failed to allocate 6524 blocks"
After adjusting the length flag to 3 gigs I was able to get it to work (I'm clueless but I assume that's what I was supposed to do). I'm hesitant to start uploading until I can get verification though.Also, just to be complete, the way I am going to modify/root the ext4 image is by using TWRP on a bootloader unlocked device according to these instructions:
http://forum.xda-developers.com/showpost.php?p=60389310&postcount=177
It worked for the XT1096 so it should work for the XT1097. Once we get the rooted ext4 image, we have a tool to flash it to the XT1097 that bypasses the signature check. Our bootloaders are locked so we have to do it this way.