Metadata-Version: 2.3
Name: android-device-manager
Version: 1.1.0
Summary: Android Device Manager is a Python library for creating, launching, and managing Android device programmatically. 
Keywords: android,adb,emulator,android emulator,device manager,automation,testing,devtools,python
Author: Jérémy Woirhaye
Author-email: Jérémy Woirhaye <jerem.woirhaye@gmail.com>
License: MIT License
         
         Copyright (c) 2025 Jérémy Woirhaye
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Maintainer: Jérémy Woirhaye
Maintainer-email: Jérémy Woirhaye <jerem.woirhaye@gmail.com>
Requires-Python: >=3.10
Project-URL: Documentation, https://jwoirhaye.com/android-device-manager-python/
Project-URL: Homepage, https://github.com/jwoirhaye/android-device-manager-python
Project-URL: Issues, https://github.com/jwoirhaye/android-device-manager-python/issues
Project-URL: Source, https://github.com/jwoirhaye/android-device-manager-python
Description-Content-Type: text/markdown

# Android Device Manager Python
Android Device Manager is a Python library for creating, launching, and managing Android emulators (AVDs) programmatically.

![PyPI - Version](https://img.shields.io/pypi/v/android-device-manager)
[![CI](https://github.com/jwoirhaye/android-device-manager-python/actions/workflows/ci.yml/badge.svg)](https://github.com/jwoirhaye/android-device-manager-python/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/jwoirhaye/android-device-manager-python/branch/main/graph/badge.svg)](https://codecov.io/gh/jwoirhaye/android-device-manager-python)
[![Docs](https://img.shields.io/badge/docs-mkdocs-blue?logo=readthedocs)](https://jwoirhaye.github.io/android-device-manager-python/)
[![License](https://img.shields.io/github/license/jwoirhaye/android-device-manager-python)](https://github.com/jwoirhaye/android-device-manager-python/blob/main/LICENSE)
---

## 📖 Table of Contents
- [Features](#-features)
- [Requirements](#-requirements)
- [Installation](#-installation)
- [Quickstart](#-quickstart)
- [License](#-license)
- [Support](#-support)

---

## 🚀 Features

### 📦 AVD Management
- **Create AVDs programmatically** from system images
- **List existing AVDs** and check availability
- **Delete AVDs** cleanly
- **Validate AVD names** according to Android rules
- **Force recreation** of AVDs with `force=True`

### ▶️ Emulator Control
- **Start emulators** in headless or windowed mode
- **Automatic port allocation** for multiple running instances
- **Stop emulators** gracefully or force-kill when needed
- **Custom emulator options** via `EmulatorConfiguration`

### 📡 ADB Integration
- **Execute `adb` commands** directly from Python
- **Install APKs** and manage applications (install/uninstall)
- **List installed packages** and check if a package is installed
- **Push and pull files** between host and device
- **Access `logcat` output** and clear logs

---

## 🐍 Requirements

- **Python**: 3.10 or higher
- **Android SDK**: Latest version recommended
- **System Resources**: Sufficient RAM and storage for emulators

---

## 📦 Installation

### 📦 From PyPI (Recommended)
```bash
pip install android-device-manager
```

### 🚧 From Source
```bash
git clone https://github.com/jwoirhaye/python-android-avd-manager-python.git
cd python-android-avd-manager
pip install -e .
```

--- 

## ⚡ Quickstart

With everything set up, here’s the simplest way to create and run an emulator:

```python
from android_device_manager import AndroidDevice , AndroidProp
from android_device_manager.avd import AVDConfiguration
from android_device_manager.emulator import EmulatorConfiguration

# Define AVD configuration
avd_config = AVDConfiguration(
    name="quickstart_avd",
    package="system-images;android-34;google_apis;x86_64"
)

# Define Emulator configuration
emulator_config = EmulatorConfiguration(
    no_window=True  # Run emulator in headless mode
)

# Create and run the device using context manager
with AndroidDevice(avd_config, emulator_config) as device:
    print(f"Device {device.name} is running!")
    print("Android Version:", device.get_prop(AndroidProp.ANDROID_VERSION))
    # Or
    #print("Android Version:", device.get_prop("ro.build.version.release"))

```

---

## 📜 License
This project is licensed under the [MIT License](LICENSE).

---

## 📧 Support
- 🐛 Issues: [GitHub Issues](https://github.com/jwoirhaye/android-device-manager-python/issues)  
- 📬 Contact: [jerem.woirhaye@gmail.com]