手动将文件放到Android模拟器SD卡

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2808632/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 07:29:18  来源:igfitidea点击:

Manually put files to Android emulator SD card

androidemulationmountsd-card

提问by poeschlorn

I'm just having trouble with getting my emulator SD card work... I created a new AVD device with a new SD card.

我只是在让我的模拟器 SD 卡工作时遇到问题......我用一张新的 SD 卡创建了一个新的 AVD 设备。

So how to put data onto it? I found the "correct" file to be mounted on Daemon tools, but is corrupt or simply not readable...

那么如何把数据放到上面呢?我发现“正确”的文件要挂载在守护程序工具上,但已损坏或根本无法读取...

It would be great if you have any idea :)

如果您有任何想法,那就太好了:)

采纳答案by Janusz

If you are using Eclipse you can move files to and from the SD Card through the Android Perspective (it is called DDMS in Eclipse). Just select the Emulator in the left part of the screen and then choose the File Explorer tab. Above the list with your files should be two symbols, one with an arrow pointing at a phone, clicking this will allow you to choose a file to move to phone memory.

如果您使用 Eclipse,您可以通过 Android Perspective(在 Eclipse 中称为 DDMS)将文件移入和移出 SD 卡。只需选择屏幕左侧的模拟器,然后选择文件资源管理器选项卡。在您的文件列表上方应该有两个符号,一个带有指向手机的箭头,单击它可以让您选择一个文件移动到手机内存中。

回答by olafure

Use the adb tool that comes with the SDK.

使用 SDK 自带的 adb 工具。

adb push myDirectory /sdcard/targetDir

If you only specify /sdcard/(with the trailing slash) as destination, then the CONTENTS of myDirectory will end up in the root of /sdcard.

如果您仅指定/sdcard/(使用尾部斜杠)作为目标,则 myDirectory 的 CONTENTS 将最终位于 /sdcard 的根目录中。

回答by Kirtikumar A.

In Android Studio, open the Device Manager: Tools -> Android -> Android Device Monitor

在 Android Studio 中,打开设备管理器: 工具 -> Android -> Android 设备监视器

In Eclipse open the Device Manager: enter image description here

在 Eclipse 中打开设备管理器: 在此处输入图片说明

In the device manager you can add files to the SD Card here: enter image description here

在设备管理器中,您可以在此处将文件添加到 SD 卡: 在此处输入图片说明

回答by johnml1135

One easy way is to drag and drop. It will copy files to /sdcard/Download. You can copy whole folders or multiple files. Make sure that "Enable Clipboard Sharing" is enabled. (under ...->Settings)enter image description here

一种简单的方法是拖放。它将文件复制到/sdcard/Download。您可以复制整个文件夹或多个文件。确保启用“启用剪贴板共享”。(在 ...-> 设置下)在此处输入图片说明

回答by Jitendra Sawant

I am using Android Studio 3.3.

我正在使用 Android Studio 3.3。

Go to View -> Tools Window -> Device File Explorer. Or you can find it on the Bottom Right corner of the Android Studio.

转到查看 -> 工具窗口 -> 设备文件资源管理器。或者您可以在 Android Studio 的右下角找到它。

If the Emulator is running, the Device File Explorer will display the File structure on Emulator Storage.

如果仿真器正在运行,设备文件资源管理器将在仿真器存储上显示文件结构。

Here you can right click on a Folder and select "Upload" to place the file

在这里,您可以右键单击文件夹并选择“上传”以放置文件

enter image description here

在此处输入图片说明

回答by silkfire

In Visual Studio 2019 (Xamarin):

在 Visual Studio 2019 (Xamarin) 中:

  1. Click on the Device Monitor (DDMS) button.
  1. 单击设备监视器 (DDMS) 按钮。

enter image description here

在此处输入图片说明

  1. Go to the File Explorer tab and click the button with a phone and a right-pointing arrow on top of it.
  1. 转到“文件资源管理器”选项卡,然后单击带有手机和顶部向右箭头的按钮。

enter image description here

在此处输入图片说明