Android Studio provides the tools required to build, debug, and test Android applications. It also includes the Android Emulator, which allows researchers and developers to run Android virtual devices directly on a computer.
For Android security testing, an emulator is useful for testing applications in an isolated lab environment without requiring a physical Android device.
This guide explains how to install Android Studio, configure the Android SDK, create an Android Virtual Device (AVD), connect to it using ADB, and prepare the environment for basic Android application security testing.
Note: Perform security testing only on applications and systems that you own or have explicit authorization to test.
1. Prerequisites
Before installing Android Studio and the emulator, make sure your system has sufficient resources.
Android's current documentation lists 16 GB RAM and 16 GB free disk space as the minimum for Android Studio with the Android Emulator. Android recommends 32 GB RAM and an SSD for a more comfortable setup. Hardware virtualization is also required for supported Windows and Linux configurations.
Recommended setup
- 16 GB RAM or more
- SSD storage
- Hardware virtualization enabled
- Stable internet connection
- Android Studio
- Android SDK
- Android Emulator
- ADB
2. Install Android Studio
Download Android Studio from the official Android Developers website.
https://developer.android.com/studio
At the time of writing, the current stable release listed by Google is Android Studio Quail 4 | 2026.1.4 Patch 1.
Choose the installer appropriate for your operating system.
Windows
Download the .exe installer and run it.
During installation, allow Android Studio to install the recommended components.
Linux
Download the Linux archive, extract it, and launch Android Studio from the bin directory.
cd android-studio/bin
./studioComplete the Setup Wizard and allow Android Studio to install the required SDK components.
macOS
Open the downloaded DMG file and drag Android Studio into the Applications folder.
Launch Android Studio and complete the Setup Wizard.
3. Configure the Android SDK
After Android Studio starts, open the SDK Manager.
Depending on the Android Studio interface, you can access it through:
Settings → Languages & Frameworks → Android SDK
or from the Android Studio welcome screen through:
More Actions → SDK Manager
The SDK Manager allows you to install and manage Android SDK platforms and tools.
Make sure the required components are installed, including:
- Android SDK Platform
- Android SDK Build-Tools
- Android SDK Platform-Tools
- Android Emulator
- Android SDK Command-line Tools
The Platform-Tools package provides utilities such as adb, which is used to communicate with Android devices and emulators.
4. Create an Android Virtual Device
An Android Virtual Device (AVD) is a configuration that defines the characteristics of the virtual Android device that the emulator will run. Android Studio's Device Manager is used to create and manage AVDs.
Open:
Tools → Device Manager
Then select:
Create Device
Choose a hardware profile.
For example:
PixelSelect a device that matches the type of Android environment you want to test.
Click Next.
5. Select an Android System Image
The next screen allows you to select the Android version for the emulator.
For example:
Android 14
Android 15
Android 16The available versions depend on the SDK packages installed on your system.
The system image may need to be downloaded if it is not already installed.
Then select the image and click:
Next → Finish
Your new AVD will now appear in Device Manager.
6. Configure the AVD
Click the edit icon next to the newly created AVD.
Android Studio provides several configuration options, including:
- RAM
- Internal storage
- SD card
- Graphics
- CPU cores
- Network speed
- Network latency
- Camera
- Boot options
- Device orientation
The AVD configuration controls how the virtual device behaves, while some emulator settings can also be changed while it is running.
For a normal testing environment, the default configuration is usually sufficient.
If the emulator is slow, check:
- Hardware virtualization
- Available RAM
- CPU allocation
- Graphics configuration
- Available disk space
7. Start the Android Emulator
From Device Manager, click the play button next to your AVD.
The emulator will boot like a normal Android device.
After startup, you should see the Android home screen.
You can interact with the emulator using:
- Mouse
- Keyboard
- Android Emulator controls
- ADB
8. Verify ADB Connectivity
Open a terminal or command prompt and run:
adb devicesYou should see an output similar to:
List of devices attached
emulator-5554 deviceThis confirms that ADB can communicate with the running emulator.
If the device appears as:
offlinerestart ADB:
adb kill-server
adb start-server
adb devicesThen check the emulator again.
9. Install an APK
Once the emulator is running, you can install an Android APK using ADB.
For example:
adb install application.apkIf multiple devices are connected, specify the target device:
adb -s emulator-5554 install application.apkAfter installation, launch the application from the Android launcher.
10. Useful ADB Commands
ADB is one of the most useful tools when working with an Android emulator.
Check connected devices
adb devicesOpen an Android shell
adb shellInstall an APK
adb install application.apkUninstall an application
adb uninstall com.example.appView application logs
adb logcatCopy a file from the emulator
adb pull /sdcard/example.txt .Upload a file to the emulator
adb push example.txt /sdcard/These commands can be useful during application debugging and authorized security testing.
11. Start the Emulator From the Command Line
The emulator can also be started without opening the Device Manager.
First, list your available AVDs:
emulator -list-avdsExample:
Pixel_API_35
Pixel_API_36Start an AVD:
emulator -avd Pixel_API_36Android's current documentation also describes Android CLI commands for listing, creating, starting, and stopping AVDs.
12. Prepare the Emulator for Security Testing
Once the emulator is working, it can become part of your Android security testing lab.
A typical workflow is:
Android APK
│
▼
Android Emulator
│
├── ADB
├── Logcat
├── Application testing
├── Network testing
└── Runtime analysisDepending on the application and authorization available, a researcher may use the emulator to examine:
- Application behavior
- Local storage
- Application logs
- Network communication
- Exported components
- Intent handling
- Authentication flows
- API communication
- WebView behavior
- Application permissions
For authorized testing, keep the emulator isolated from production accounts and data whenever possible.
13. Configure Network Settings
The Android Emulator can be used to test applications that communicate with APIs and other network services.
Before performing network testing, identify the network configuration of your lab.
You may need to configure:
- Proxy settings
- DNS
- Host networking
- Application-specific network configuration
For example, when testing an application through an intercepting proxy, the emulator and testing workstation need to be configured so that application traffic can reach the proxy.
Do not use this configuration against systems you do not have permission to test.
14. Reset the Emulator
During security testing, an application may modify files, databases, settings, or other device state.
You can reset the emulator from:
Device Manager → Menu → Wipe Data
This is useful when you want to return the emulator to a clean state before testing again.
15. Troubleshooting
Emulator is very slow
Check whether hardware virtualization is enabled.
On supported Windows systems, virtualization support such as Intel VT-x or AMD-V needs to be enabled.
Also check:
- Available RAM
- CPU allocation
- GPU configuration
- SSD space
- Emulator graphics settings
ADB does not detect the emulator
Run:
adb kill-server
adb start-server
adb devicesIf the emulator still does not appear, restart the emulator and verify that Android SDK Platform-Tools are installed.
Emulator gets stuck during boot
Try:
Device Manager → AVD Menu → Wipe Data
Then start the AVD again.
You can also try a cold boot instead of restoring the previous emulator snapshot.
APK installation fails
Check the APK and emulator architecture/API compatibility.
First verify the emulator:
adb shell getprop ro.build.version.releaseThen try installing again:
adb install application.apkFor multiple connected devices, explicitly specify the emulator:
adb -s emulator-5554 install application.apk16. Useful Security Testing Workflow
Once everything is configured, a basic authorized Android application testing workflow can look like this:
1. Obtain APK
↓
2. Create test AVD
↓
3. Start Android Emulator
↓
4. Verify ADB
↓
5. Install APK
↓
6. Launch application
↓
7. Observe application behavior
↓
8. Capture logs/network traffic
↓
9. Analyze application
↓
10. Document findingsKeeping a dedicated AVD for security testing makes it easier to reset the environment between assessments.
Conclusion
Android Studio and the Android Emulator provide a practical environment for Android application development and authorized security testing.
The basic setup consists of:
- Installing Android Studio
- Installing the required Android SDK packages
- Creating an Android Virtual Device
- Starting the emulator
- Verifying ADB connectivity
- Installing an APK
- Configuring the environment for your testing requirements
Once the environment is working correctly, you can build a dedicated Android security-testing lab and add additional tools according to your testing methodology.
Official References
- Android Studio: https://developer.android.com/studio
- Android Studio Installation Guide: https://developer.android.com/studio/install.html
- Create and Manage Virtual Devices: https://developer.android.com/studio/run/managing-avds
- Android Emulator Command-Line Guide: https://developer.android.com/studio/run/emulator-commandline
- Android Debug Bridge (ADB): https://developer.android.com/tools/adb
Suggested Category: Android Security
Suggested Tags: Android, Android Studio, Android Emulator, ADB, Mobile Security, Android Security Testing, Pentesting, Security Research
