Android-virtual-device: Difference between revisions

From Irregularpedia
Jump to navigation Jump to search
Initial
 
/* MacOS - pre box fix
 
Line 11: Line 11:


=== MacOS - Ensure Homebrew is installed: <code></code>SHELL /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” ===
=== MacOS - Ensure Homebrew is installed: <code></code>SHELL /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” ===
- Install using Homebrew:
<pre>
brew install --cask android-studio</pre>


<pre>  - Install using Homebrew:
``` SHELL
brew install --cask android-studio</pre>
=== Linux - Extract the downloaded tar.gz file. - Run the <code>studio.sh</code> script from the extracted directory. ===
=== Linux - Extract the downloaded tar.gz file. - Run the <code>studio.sh</code> script from the extracted directory. ===



Latest revision as of 03:07, 26 September 2024

Android Virtual Emulator

Return to Virtual Environment page

The Android Virtual Device (AVD) Emulator, part of Android Studio, is a tool for running and debugging Android applications. It is free, open-source, and does not require an internet connection after installation.

This is a part of the DFP guide and the research section ## Installation 1. Download Android Studio from here. 2. Follow the installation instructions for your operating system.

Windows - Run the downloaded installer and follow the prompts.

MacOS - Ensure Homebrew is installed: SHELL /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”

- Install using Homebrew:

brew install --cask android-studio

Linux - Extract the downloaded tar.gz file. - Run the studio.sh script from the extracted directory.

  1. Launch Android Studio and go to “More Actions” > “AVD Manager.”
  2. In the AVD Manager, select “Create Virtual Device.”
  3. Choose a device to emulate.
  4. Select a system image (Android version) to use. (Expect about a 1GB download per image.)
  5. Name your emulator and click “Finish.”

Installing Applications

Download applications as “.apk” files from trusted sources like F-Droid. Store .apk files in a central location for the organization. Drag and drop the .apk file onto the running emulator to install.

Recommended FOSS App Markets: - Aurora Store - F-Droid

Migration

To create a backup of your AVD:

Locate your AVD folder. Common locations:

  1. Windows: C:\Users\<YourUserName>\.android\
    • Linux/Mac: ~/.android

In the .android folder, locate the AVD you want to export.

Compress the device.avd folder and the device.ini file (replace ‘device’ with the name of your AVD).

Move the compressed files to the new location.

To import the AVD on another machine: 1. Uncompress the files in the appropriate .android directory. 2. If moving across OS, adjust the file paths in device.ini to match the new system’s format. 3. In AVD Manager, go to “Import,” select the backed-up AVD. If an error occurs, use the “Repair” option.