I want to add folder in my Genymotion emulator
I also tried this question and follow all instruction but folder is not showing in file manager
I also download some images from Google but also those not visible in file manager.
In my emulator following file manager installed
File Managerv 1.0.1
The CyanogenMod Project
I solve my problem
First follow this Answer
Go to your VirtualBox VM setting / Shared folder tab
Add a shared folder with the folder you want to shared, and check the
"auto mount" option
Start your VM as usual from the Genymotion software
Your shared folder is available in the /mnt/shared directory
(multiple shared folders are supported)
After that
Change Settings of file Manager in Genymotion emulator change that to root user so all my folder visible also with Shared folders
In Genymotion virtual device, run the application "File Manager" and
READ the advertisement about "low-privileged mode".
Go to "settings" menu from "File Manager"
In "general settings", click on "access mode" and activate "Root
access" mode
Restart File Manager => all directories will be presented
Thanks
Update
In newer version of genymotion you can add files/folder by drag and drop.
It take some time while adding files in emulator. time depends on file size.
Update 2 (Based on #GandhyOnly comment)
To make visible in gallery just drag and drop your images files on emulator they stored in download folder after finish transferring files restart same emulator and images will shown in gallery. Or if you don't want to restart emulator then use following command
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard/
it will rescan images and show them in gallery. For more detail about command see the actual answer here. I didn't check command I use first method just restart emulator
Simply drag and drop onto the emulator the file that you want to use.
It will be saved in Download folder.
I have a more simpler approach to this .
Open your genymotion , and just
drag and drop
the file in the required directory
I am attaching two screenshots in this regard.I had an app that used pictures, after copying by drag and drop i was able to find pictures in file manager through my app.
**
Just drag and drop like following
**
And you are done
It will be copied to Download Folder
Simply Drag and drop files from your PC to emulator and after copying data, files will be saved in the DOWNLOAD folder. Remember that to make DRAG and DROP service working, do not open Genemotion Software by ADMINISTRATOR privileges.
I'm not sure whether you're using SD card or not. In case you do, try to look in this folder through DDMS file explorer in Eclipse:
mnt/shell/emulated/0/MyFiles
This is where my files go when using standard SD card reference in my code:
File sdCard = Environment.getExternalStorageDirectory();
File directory = new File (sdCard.getAbsolutePath() + "/MyFiles");
Related
Good day,I'm a student and I'm trying to create a virtual device in Android Studio, however my home internet is too slow to download a System Image, there is an internet cafe near me that has very fast internet and I plan to download the System Image there by accessing in my browser this link : https://dl.google.com/android/repository/sys-img/google_apis/x86-25_r08.zip
From this message in the window where Android Studio downloads the System Image for Android Nougat
To install:
- Google APIs Intel x86 Atom System Image (system-images;android-25;google_apis;x86)
Preparing "Install Google APIs Intel x86 Atom System Image".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86-25_r08.zip
However I do not know how to install it in android studio. How am I able to install it myself on android studio and make an emulator?
Many thanks.
In windows: First locate your android-sdk. By default it's in your C:\Users\Your.name\AppData\Local\
in it's root folder. where you can find: SDK Manager.exe, make a folder name it "system-images", my api 25 image is at system-images\android-25\google_apis\x86_64\Files
Hope you can Figure it out. Comment if you have any problem.
In mac OSX:
~/Library/Android/sdk/system-images/android-[API_VERSION]/[API_TYPE]/x86
Replace [API_VERSION] with Android version you are downloading and the [API_TYPE] can either be google_apis_playstore or google_apis depending on whether the image you are downloading comes with Google Play or not.
On Windows 10:
Download the file from e.g.:
https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r09.zip.
Extract the zipped file.
Copy (OR Cut, not recommended) the contents of the extracted folder e.g.: x86.
Find the android-sdk folder. By default, it should be located at C:\Users\[YOUR USER NAME]\AppData\Local\Android\Sdk.
Look for a folder named system-images. Create system-images if it doesn't exist. Depending on the file you downloaded, create
subfolders within system-images. E.g.:
system-images->android-27->google_apis.
Paste within google_apis.
Restart Android Studio and the system image should be selectable.
Shout if you need any further assistance.
FOR WINDOWS:
To get the exact path of the system-image, try to download from android studio first, after 1% download, stop the download and go to your sdk path.
E.g. C:\Users\TBR\AppData\Local\Android\Sdk, you will see a folder name "system-images"
this folder was created from the part download, open the sub-folder till you get to the last sub-folder.
E.g. C:\Users\TBR\AppData\Local\Android\Sdk\system-images\android-27\google_apis\x86
i.e x86 is last sub folder (delete any content in this last sub-folder)
Download the system images manually, unzipped and copy the whole content, then paste it into your last sub-folder.
Download link for android-27 - https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-27_r03.zip
Go back to android studio and you will see the system-image there now.
For Windows 10:
Download the file from e.g.: https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r09.zip. or Any other System Image
After Completion of Download
Extract the zipped file.
Copy extracted folder e.g.: x86.
Find the android-sdk folder. It is located at C:\Users\{your username}\AppData\Local\Android\Sdk\
Find the folder system-images. Create system-images if it doesn't exist.
Create subfolders within system-images. E.g.: system-images/android-27
Check in link, if it has google_apis or google_apis_playstore:
https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r09.zip.
or
https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-27_r09.zip.
Paste within google_apis if link has google_apis or Paste it in google_apis_playstore folder.
The Complete path of system image file :
C:\Users\{Your UserName}\AppData\Local\Android\Sdk\system-images\android-30\google_apis\x86
or
C:\Users\{Your UserName}\AppData\Local\Android\Sdk\system-images\android-30\google_apis_playstore\x86
Restart Android Studio and the system image should be selectable.
============= Good Luck ❤❤❤ =============
I have faced the same issue when manually installing an android-wear image. For android-wear images the directory structure looks like this.
<your_android_sdk_location>/system-images/android-<version>/android-wear/<extract_downloaded_android-wear_image_here>
example: For this wear image https://dl.google.com/android/repository/sys-img/android-wear/x86-28_r03.zip
<your_android_sdk_location>/system-images/android-28/android-wear/x86
Don't forget to restart the Android Studio!
Actually, if you extract downloaded zip archive, system will never find it.
You have to click in 'Download' tag, then in folder
%ANDROIDSDK%/system-images/android-25/
^^^ version of SDK you use
if google-api then additional folder 'google_apis' will be created .install file with the path, where archive is located.
Usually it is
C:\Users[YOUR USER NAME]\AppData\Local\Temp\PackageOperation01
Put there your zip archive and go to Download link again.
After that, it will not start download, but will start to check and unzip operation.
This resolves offline installation issue.
find the logfile for the android device manager (on my machine it was here: C:\Users(user name)\AppData\Local\Xamarin\Logs\16.0). At the end of the logfile (named like 2021-07-21_16-03-19.18380.devicemanager.log), you'll see it reference a path it's trying to download from and to. Here's what my log message looked like:
[21-07-21 21:03:29.66] [ProgressMonitor] Step "Downloading Google Play Intel x86 Atom System Image v9" did begin for AVD: pixel_2_pie_9_0_-_api_28, totalWork: 918028186
[21-07-21 21:03:29.67] Downloaded file '<USER_HOME>\AppData\Local\Temp\xamarin-android-sdk\x86-28_r09.zip' not found for Android SDK archive 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-28_r09.zip'
[21-07-21 21:06:08.50] [ProgressMonitor] downloading did report error with exception: System.TimeoutException: The operation has timed out. AVD Name: pixel_2_pie_9_0_-_api_28
So I went to the https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-28_r09.zip link and manually downoaded the file and copied it to <USER_HOME>\AppData\Local\Temp\xamarin-android-sdk\x86-28_r09.zip and clicked retry from the failed attempt inside the android device manager, and voila, it worked after 2 days of messing around with it.
For me the problem was that currently Android Studio doesn't list older system images (older than 29) in the "Create Device" wizard, and that even if the relevant system images have been downloaded already.
The workaround I found was to download system images and create emulator devices from the command line. This works even if you don't have the Android Studio - you just need the Android SDK installed.
To download a system image, go into the directory where the Android SDK is installed (by default this is at ~/Android/SDK on Linux), then in your terminal type: ./cmdline-tools/latest/bin/sdkmanager --list - this will list all the available system images, even very old ones (I see the oldest SDK is 10). They should have the path (the text in the first column) labeled with this format: system-images;android-<sdk-version>;<type>;<architecture> (there are also other stuff aside from system images, lets ignore these for now).
To download the system image you want, type ./cmdline-tools/latest/bin/sdkmanager --install "<path>" where "<path>" would be the first column from the available package list from the step above.
Then to create an emulator virtual device for this image, use the command line as well: type ./cmdline-tools/latest/bin/avdmanager create avd -d <device-type> -k '<system-image-path> -n '<device-name>', where:
"<device-type>" would be the name of the device you want to emulate, for example "pixel_4a" to emulate a Pixel 4a - use avdmanager list device to get the list of devices.
"<system-image-path>" would be the same path you used to download the system image, for example system-images;android-23;google_apis;x86_64.
"<device-name>" would be whatever name you want to be shown in Android Studio's "Device Manager" view.
For example: ./cmdline-tools/latest/bin/avdmanager create avd -d pixel_4a -k 'system-images;android-23;google_apis;x86_64' -n 'Pixel_4a_API_23'
If you had Android Studio running while doing all of that, you'd need to stop and restart it. If you want to copy the created files to another machine, you'd need to copy your entire Android SDK installation directory (or possibly only the "system-images" folder inside the SDK installation directory) and also the content of the Android SDK AVD configuration directory - if you created any AVDs - this would be ~/.android/avd under Linux.
Go to the AVD Manager in Android Studio (it is in the toolbar and looks like a tablet with an Android on it), then click on "Create Virtual Device" once a window called "Android Virtual Device Manager" pops up. Next, choose the device you want to pick, and then click "Next". You will then be able to download a system image.
I have downloaded (externally from IDM) Android N System Image from this link. Now where should i paste, install the file or what should i do with the file?
I want Android N to show in my Android Emulator list (list which appears after clicking the run button in Android Studio).
Unpack this zip into folder {sdk_dir}/system-images/android-24/default/
After it you must create new virtual device from run dialog usiing this system image.
Unpack to {SDK_PATH}/system-images/android-24/google_apis/x86/
Refresh the emulators list by clicking the reload button at the bottom
You should put the downloaded system images in {Sdk_location}/temp and then use command line to install them otherwise they won't show up in android studio.
*follow this hierarchy
*C:\android-sdk\system-images\android-R\google_apis_playstore
inside the last directory which is the google_apis_playstore unpack the zip file which is system image downloaded
open AndS(android studio), click create virtual device, browse to x86 images
your device should be in the list
How am I able to push .txt files to the emulator using Android Studio?
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)
Update (May 2020):
Android studio have new tool called Device File Explorer. You can access it in two way:
By clicking on Device File Explorer icon in right bottom corner of android studio window.
If you could not find its icon, inside Android Studio press shift button twice. Quick search window will appear, then type Device File in it and Device File Explorer will appear in search result and you can click it.
Then you can navigate to folder which you want to push your file in it. Right click on that folder and select upload(or press Ctrl+Shift+O). Select file you want to upload and it will upload file to desired location.
Push file using adb.exe:
In Android 6.0+, you should use same process but your android application cannot access files which pushed inside SDCARD using DDMS File Explorer. It is the same if you try commands like this:
adb push myfile.txt /mnt/sdcard/myfile.txt
If you face EACCES (Permission denied) exception when you try to read file inside your application, it means you have no access to files inside external storage, since it requires a dangerous permission.
For this situation, you need to request granting access manually using new permission system in Android 6.0 and upper version. For details you can have a look in android tutorial and this link.
Solution for old android studio version:
If you want to do it using graphical interface you can follow this inside android studio menus:
Tools --> Android --> Android Device Monitor
Afterward, Android Device Monitor(DDMS) window will open and you can upload files using File Explorer. You can select an address like /mnt/sdcard and then push your file into sdcard.
You can use the ADB via a terminal to pass the file From Desktop to Emulator.
adb push <file-source-local> <file-destination-remote>
You can also copy file from emulator to Desktop
adb pull <file-source-remote> <file-destination-local>
How ever you can also use the Android Device Monitor to access files. Click on the Android Icon which can be found in the toolbar itself. It'll take few seconds to load. Once it's loaded, you can see a tab named "File Explorer". Now you can pull/push files from there.
Android Device monitor is no longer available in android studio.
If you are using android studio 3.0 and above.
Go to "Device File Explorer" which is on the bottom right of android studio.
If you have more than one device connected, select the device you want from the drop-down list on top.
mnt>sdcard is the location for SD card on the emulator.
Right click on the folder and click Upload. See the image below.
Note: You can upload folder as well not just individual files.
I am using 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.
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
I usually use mnt - sdcard - download folder.
Thanks.
After you drag and drop your files from Desktop to Emulator like this answer here :
https://stackoverflow.com/a/44885506/3904109
Your location of files will be
Android 19, 21, 22 /storage/sdcard/Download
Android 23, 24, 25, 26, 27, 28, 29, 30 /storage/emulated/0/Download
Open command prompt and give the platform-tools path of the sdk.
Eg:- C:\Android\sdk\platform-tools>
Then type 'adb push' command like below,
C:\Android\sdk\platform-tools>adb push C:\MyFiles\fileName.txt /sdcard/fileName.txt
This command push the file to the root folder of the emulator.
refer johnml1135 answer, but not fully work.
after self investigate, using official docs, it works now:
and use Drag and Drop actually worked, but use android self installed app Download, then you can NOT find the copied file, for not exist so called /sdcard/Download folder.
finally using other file manager app, like
ES File Explorer
then can see the really path is
/storage/emulated/0/Download/
which contains the copied files, like
/storage/emulated/0/Download/chenhongyu_lixiangsanxun.mp3
after drag and drop more mp3 files:
adb push [file path on your computer] [file path on your mobile]
on windows 10 , android studio emulator.
be on the directory yourFile.xml is.
on terminal, command:
adb push yourFile.xml \C:\Users\yourUN\.android\avd\Pixel_4_API_29.avd\mnt\sdcard
Pixel_4_API_29 is the emulator name , choose the device you are using on emulator
Just need to drag and drop to the corresponding directory in the ADB
I have an error due to the contents of a file stored in internal storage on my Android Emulator. (I wrote it to file). Is there a way I can view the internal storage used by my app in windows?
I've searched through my whole project folder, sdk, workspace etc and cant find anything. I saw someone in another question say it was in the /data folder, but i dont know where to look for that either.
Thanks
If you want to view the folder/file structure of the running emulator, you can do that with the Android Device Monitor which is included with the SDK.
Specifically, it has a File Explorer, which allows you to browse the folder structure on the device. It also has buttons which give you the adb push/pull functionality but from a GUI if this is easier for you to use.
In Android Studio on Mac you can go to View -> Tool Windows -> Device File Explorer. Here you can use a finder-like structure.
They are stored in an img file inside the avd directory. If you are using Linux you can mount the img file via:
sudo mount -o loop ~/.android/avd/<youremulator>/sdcard.img <mountpoint>
Not sure if there is a way in Windows or Mac to view the contents of the img since they are either in ext3, ext4, or yaffs file system format (depending on what you are emulating) and windows doesn't easily support those file systems.
Your best bet is to use adb to copy the file directly out of the emulator while it is running as shown in adb --help:
adb pull <remote> [<local>] - copy file/dir from device
In Android Studio 3.2 and later you can access a device's internal storage by using the menu item
View -> Tool Windows -> Device File Explorer
See this article for details: https://developer.android.com/studio/debug/device-file-explorer
...and this one to find out where the other components of Android Device Monitor ended up: https://developer.android.com/studio/profile/monitor
In Android N emulator you can easily get access Internal Memory.
Go to Emulator:
Settings -> Memory -> Internal Storage -> Others
Then a pop up will open. Click on explore. Then you will get access of Internal Storage.
in Android Studio 4.1 and later you can access a device's internal storage by using the menu item
View -> Tool Windows -> Device File Explorer -> storage
When I connect the android tablet to windows 7 I get 2 external devices, one of them (H) doesn't open.
When I open G:, I get this
If I want to copy an app (adobe reader) to the tablet, to which folder should I copy it?
This is the screen of the tablet:
Where should I access the folders and files from?
Any? Copy it over, navigate to the folder on your phone, and click on the APK and it'll install. Make sure you allow your phone to install apps from unknown sources first.
That folder looks like the Android SD Card. If you copy it to any folder, just browse to it using a File Manager and click it to install it. You could also copy it to Downloads, and then open the Downloads app to install the APK. Make sure you also have enabled Unknown Sources.