如何挂载AOSP .img文件? [英] How to mount AOSP .img files?

查看:133
本文介绍了如何挂载AOSP .img文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过构建 AOSP 生成 *.img .

类似于 ramdisk.img,boot.img 等.

我要装入该文件.我正在使用Ubuntu.

I want to mount this file. I'm using Ubuntu.

推荐答案

您无法安装boot.img文件.但是,您可以解压缩它的ramdisk.

You cannot mount boot.img file. However you can unpack it's ramdisk.

boot.img文件包含:

  • ramdisk
  • zImage(内核二进制文件)
  • dt.img(设备树)

有一个出色的开源项目:GitHub上的 mkbootimg_tools.您可以使用它来分割boot.img文件并解压缩虚拟磁盘.

There is an excellent open source project: mkbootimg_tools at GitHub. You can use it to split the boot.img file and unpack the ramdisk.

解压boot.img:

Unpack boot.img:

mkbootimg_tools/mkboot boot.img boot_unpacked

要解压缩system.img,首先需要了解它是哪种分区: 跑: file system.img

To unpack system.img you first need to understand what kind of partition is it: run: file system.img

如果您获得"Android稀疏映像",则您有一个稀疏映像,这意味着在挂载之前需要先对其进行稀疏处理: simg2img system.img system_raw.img

If you get 'Android sparse image', then you have a sparse image, meaning you need to un-sparse it before mounting: simg2img system.img system_raw.img

然后,您只需运行以下命令即可挂载system_raw.img: 须藤挂载system_raw.img/mnt/android_sys

Then you can mount system_raw.img simply by running: sudo mount system_raw.img /mnt/android_sys

这篇关于如何挂载AOSP .img文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆