Question

I feel a bit blind developing on an emulator for Android and not being able to see the file system on the AVD (.img).

Is there a way to mount it in Windows or Linux, so that I could at least see the file listing and maybe contents?

Bonus if it's mounted with write permissions as well.

Thank you.

Was it helpful?

Solution

You can just mount the device in Linux:

sudo mount -o loop ~/.android/avd/<myvirt>/sdcard.img <destdir>

OTHER TIPS

How about "adb shell"?

This will give you a root shell (on the emulator)..

For MacOS X users:

$ hdiutil attach ~/.android/avd/Samsung_Nexus_S.avd/sdcard.img

For Windows, I just ran across the ImDisk Virtual Disk Driver

Install this utility, and you can then mount sdcard.img. There's a nice tutorial here

Yes, they can be mounted. Under Ubuntu you can mount sdcard.img via vfat and system.img and userdata-qemu.img via yaffs2. See also: "Whats Android file system ??".

Note that the file system yaffs2 is not included in the standard Ubuntu kernel. Thus, in case of Ubuntu, you have to build your own kernel with yaffs2 support before you are able to mount the system.img and the userdata-qemu.img. Alternatively, you can also take a look at the yaffs2utils which allow you to extract files from yaffs2 images or to create new image files. The advantage is that you do not have to build your own kernel for using these tools.

Another option would be to use the File Explorer in DDMS (Eclipse SDK), you can see the whole file system there and download/upload files to the desired place. That way you don't have to mount and deal with images. I tried mounting and it's cumbersome, for example if the emulator is running you can't do it. Plus you would need to mount each image if you want to see all contents.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top