In AVD emulator how to see sdcard folder? and Inst

2019-01-21 05:32发布

问题:

I have created an Android emulator (Android Virtual Device), but I am unable to find out the SD card I have built during creation of this.

How can I find the SD card and its content and also how to install APK files to the AVD?

回答1:

  1. switch to DDMS perspective
  2. select the emulator in devices list, whose sdcard you want to explore.
  3. open File Explorer tab on right hand side.
  4. expand tree structure. mnt/sdcard/

refer to image below


To install apk manually: copy your apk to to sdk/platform-tools folder and run following command in the same folder

adb install apklocation.apk


回答2:

I have used the following procedure.

Procedure to install the apk files in Android Emulator(AVD):

Check your installed directory(ex: C:\Program Files (x86)\Android\android-sdk\tools), whether it has the adb.exe or not). If not present in this folder, then download the attachment here, extract the zip files. You will get adb files, copy and paste those three files inside tools folder

Run AVD manager from C:\Program Files (x86)\Android\android-sdk and start the Android Emulator.

Copy and paste the apk file inside the C:\Program Files (x86)\Android\android-sdk\tools

  • Go to Start -> Run -> cmd

  • Type cd “C:\Program Files (x86)\Android\android-sdk\tools”

  • Type adb install example.apk

  • After getting success command

  • Go to Application icon in Android emulator, we can see the your application



回答3:

On linux sdcard image is located in:

~/.android/avd/<avd name>.avd/sdcard.img

You can mount it for example with (assuming /mnt/sdcard is existing directory):

sudo mount sdcard.img -o loop /mnt/sdcard

To install apk file use adb:

adb install your_app.apk


回答4:

These days the location of the emulated SD card is at /storage/emulated/0



回答5:

if you are using Eclipse. You should switch to DDMS perspective from top-right corner there after selecting your device you can see folder tree. to install apk manually you can use adb command

adb install apklocation.apk


回答6:

//in linux

// in your home folder .android hidden folder is there go to that there you can find the avd folder open that and check your avd name that you created open that and you can see the sdcard.img that is your sdcard file.

//To install apk in linux

$adb install ./yourfolder/myapkfile.apk


回答7:

DDMS is deprecated in android 3.0. "Device file explorer"can be used to browse files.



回答8:

Adding to the usefile DDMS/File Explorer solution, for those that don't know, if you want to read a file you need to select the "Pull File from Device" button on the file viewer toolbar. Unfortunately you can't just drag out, or double click to read.