[DEV][Tools] simg2img and make_ext4fs binaries for mac OS X

549 posts
Thanks Meter: 980
By Restl3ss, Senior Member on 2nd September 2014, 06:26 PM
Post Reply Subscribe to Thread Email Thread
Not really a whole lot to describe here. simg2img and make_ext4fs are both linux binaries that are used to unpack / mount / repack system.img from a stock tar.md5 rom. Quite useful.

I get curious as to how much development stuff I can do with OS X from time to time, as, though they are not twins by any means, linux and darwin are definitely cousins. Obviously the simg2img and make_ext4fs binaries in their normal state won't work on any darwin system (os x), however, they ARE unix binaries, and darwin is well... unix

So I downloaded the source code and compiled natively on OS X using xcode / gcc. When compile is done (didn't take long) dropped in /bin and.. viola! Works perfectly.

For those who want a tutorial on how to use these binaries, check here.

To mount sys.raw:

install either macports or homebrew. Then:

Macports: $ sudo port install ext4fuse
Homebrew: $ brew install ext4fuse

After which, cd to the directory you created sys.raw using simg2img.

$ mkdir sys

then, mount with:

$ ext4fuse sys.raw sys

and viola! it's now mounted and you can do what you will with /system

Download links:
simg2img: download
make_ext4fs: download

Homebrew: OS X package manager
Last edited by Restl3ss; 3rd September 2014 at 07:34 AM.
The Following 8 Users Say Thank You to Restl3ss For This Useful Post: [ View ]
3rd September 2014, 07:35 AM |#2  
Restl3ss's Avatar
OP Senior Member
Flag Fort Mcmurray
Thanks Meter: 980
Donate to Me
just added instructions for mounting sys.raw
The Following User Says Thank You to Restl3ss For This Useful Post: [ View ]
12th October 2014, 08:10 AM |#3  
Restl3ss's Avatar
OP Senior Member
Flag Fort Mcmurray
Thanks Meter: 980
Donate to Me
To all who do anything development related on Mac OS X / Darwin; let me know if there's any other linux binaries you'd like ported, I feel like doing some more cross-compiling but I can't think of a project.
The Following 2 Users Say Thank You to Restl3ss For This Useful Post: [ View ]
28th November 2014, 11:02 PM |#4  
Senior Member
Flag Northern Arizona
Thanks Meter: 116
Angry So awesome
This is awesome. Awesome, awesome, awesome. I just wish there was a better collection of tools because I tried everything (on my Mac), with every single other OS available, just to open a stock Galaxy Note 4 image.

Just one thing though ...

I mounted 'sys' and I don't know what happened but suddenly it unmounted and now the 'sys' folder has disappeared from view ... though I can still see it if I "ls" in its parent directory.

So I tried to 'mkdir sys' again, it says it can't. It also says that "'sys' is taken" if I try to recreate the folder ... I can create a different folder with a different name, but 'sys' is a weird hidden directory now that I can only see in the terminal/shell.


Guess I'll reboot.

Rebooting solved the problem and stopped whatever mounting process had been started. But it keeps happening and I can't figure out a way to kill the mount/unmount without restarting my whole Mac ... hmmm ...
Last edited by sbrownla; 28th November 2014 at 11:24 PM.
The Following User Says Thank You to sbrownla For This Useful Post: [ View ]
Post Reply Subscribe to Thread

binary, darwin, development, ext4, tools

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes