This project consists of four main tasks:
- Backend Development: A Flask API to manage various functionalities for interacting with the Android emulator.
- Database Management: PostgreSQL integration to store system information, app data, and logs.
- Virtual Android System Simulation: Simulation of an Android environment where APKs can be installed, and system information is logged.
- Basic Networking: Data exchange between the Android emulator and the backend, enabling seamless communication for various operations.
This project aims to simulate an Android environment while interacting with a backend server. Here's how each component works:
- A Flask API serves as the central hub for managing requests related to the Android system simulation.
- It handles requests for installing APKs, fetching system logs, and managing system information.
- The API exposes endpoints to interact with the Android emulator, including installing apps, retrieving system data (such as device info), and sending commands to the emulator.
- The backend interacts with a PostgreSQL database to store and manage system data and logs generated by the Android emulator.
- The database schema includes tables for logging APK installations, system states, error logs, and data sent/received during networking operations.
- Data is stored and queried efficiently to keep track of the emulator’s status and any changes in system configurations.
- Using Android Studio and the Android SDK, the project simulates a virtual Android environment via an emulator.
- APK files are installed onto the emulator, and logs about system activity, including app performance and system status, are captured.
- The backend communicates with the emulator via the
ppadbPython package, which allows control over the virtual Android device (e.g., installing APKs, retrieving system logs, etc.).
- Data is exchanged between the Android emulator and the Flask backend using HTTP requests and responses.
- The backend sends commands to the emulator to install APKs and retrieve logs, and the emulator sends back responses (such as success or failure) to be stored in the database.
- The network layer ensures smooth communication between the backend and the Android emulator, enabling real-time interactions like log retrieval, status updates, and app management.
To set up and run the project, ensure you have the following installed:
- Python 3.12.5
- PostgreSQL
- Android Studio / Android SDK
- Required Python packages (listed in
backend/requirements.txt), including:ppadbrequests
Follow the instructions below to set up the environment for the project:
-
Clone the repository:
https://github.com/Pu5hk4r/PYTHON-BACKEND-ASSIGNMENT.git
-
Set up the PostgreSQL database:
- Install PostgreSQL and create a new database.
- Use the provided SQL scripts or migrations to set up tables and schemas.
-
Install dependencies:
- Navigate to the
backenddirectory and install the required Python packages.
pip install -r backend/requirements.txt
- Navigate to the
-
Task-specific setup:
- Refer to the individual task README files for any additional setup or configuration instructions for each task.
-
Backend Development: Follow the instructions in the
backend/README.mdfile to start the Flask API. -
Database Management: Refer to the
database/README.mdfor setting up and testing PostgreSQL integration. -
Virtual Android System Simulation: Follow the
android_simulation/README.mdto run the Android emulator and install APKs. -
Basic Networking: Check the
networking/README.mdfor setting up communication between the emulator and the backend. -
**




