Reputation: 21
I downloaded the AOSP source code, and successfully make the build. Now with the new built system.img file, I want to mount it and take a look inside. However I am not be able to mount it. I am working on the MacOS, and the command I used was:
$ file system.img
system.img: Linux rev 1.0 ext4 filesystem data, UUID=b250775f-0c87-4e48-b8ed-c0443f127ee9 (extents) (large files) (huge files)
$ mount -o loop -t ext4 system.img /mnt
mount: exec /Library/Filesystems/ext4.fs/Contents/Resources/mount_ext4 for /mnt: No such file or directory
How can I solve this issue?
Upvotes: 2
Views: 4618
Reputation: 1526
Here are the steps that worked for me
brew install simg2img
brew install osxfuse
brew install ext4fuse
I did a reboot at this stage as it was recommended here
simg2img system.img system_raw.img
mkdir mountpoint
ext4fuse system_raw.img mountpoint
At this point you can also browse the img as a folder in Mac Finder
Upvotes: 2
Reputation: 4796
You can use extfstools to extract the Android system.img
on macOS and Linux. You don't need root privileges or mount anything.
The original version is at https://github.com/petib/extfstools and it was written for macOS. It doesn't support symlinks.
I have a fork of extfstools at https://github.com/qmfrederik/extfstools which does support symlinks, but was tested on Linux only.
Upvotes: 0