我下载了AOSP源代码,并成功构建。现在有了新构建的 system.img 文件,我想安装它并看看里面。但是我无法安装它。我正在 MacOS 上工作,我使用的命令是:
$ 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
如何解决这个问题?
最佳答案
以下是对我有用的步骤
安装所需的依赖项
brew install simg2img
brew install osxfuse
brew install ext4fuse
我在这个阶段按照建议重新启动了 here
将system.img转换为原始img
simg2img system.img system_raw.img
挂载镜像
mkdir mountpoint
ext4fuse system_raw.img mountpoint
此时您还可以在Mac Finder中将img作为文件夹浏览
引用文献
关于android-source - Mac 无法挂载 Android system.img,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49889971/