English 中文(简体)
Is there a way to mount Android .img to access the AVD (Android Virtual Device) contents?
原标题:

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.

最佳回答

You can just mount the device in Linux:

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

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.





相关问题
virtual column for drop down in the ruby on rails

How to place a drop down for the virtual column, in the ruby on rails. The virutal column does not exist in my table , but I want to get the value from the drop down ,when user saves the data. for ...

C++ : implications of making a method virtual

Should be a newbie question... I have existing code in an existing class, A, that I want to extend in order to override an existing method, A::f(). So now I want to create class B to override f(), ...

C++ static virtual members?

Is it possible in C++ to have a member function that is both static and virtual? Apparently, there isn t a straightforward way to do it (static virtual member(); is a compile error), but is there at ...

C++ collection of abstract base classes

how can I create STL collection of classes which implement abstract base class using the base class as collection value, without using pointers? is there something in Boost that allows me to ...

How to design a C++ API for binary compatible extensibility

I am designing an API for a C++ library which will be distributed in a dll / shared object. The library contains polymorhic classes with virtual functions. I am concerned that if I expose these ...

热门标签