Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 841
Artem Russakovskii Avatar asked Dec 02 '09 08:12

Artem Russakovskii


People also ask

Where are AVD system images stored?

Note: The default storage location for AVDs is in ~/. android/avd on OS X and Linux, C:\Documents and Settings\<user>\. android\ on Windows XP, and C:\Users\<user>\.

How do I access AVD Manager?

You can launch the AVD Manager in one of the following ways: In Eclipse: select Window > Android Virtual Device Manager, or click the AVD Manager icon in the toolbar. In Android Studio: select Tools > Android > AVD Manager, or click the AVD Manager icon in the toolbar.


3 Answers

You can just mount the device in Linux:

sudo mount -o loop ~/.android/avd/<myvirt>/sdcard.img <destdir>
like image 140
Ryan Olson Avatar answered Nov 08 '22 11:11

Ryan Olson


How about "adb shell"?

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

like image 33
Mads Kristiansen Avatar answered Nov 08 '22 11:11

Mads Kristiansen


For MacOS X users:

$ hdiutil attach ~/.android/avd/Samsung_Nexus_S.avd/sdcard.img
like image 3
Marco Gasparetto Avatar answered Nov 08 '22 12:11

Marco Gasparetto