Skip to content

This Python-based project simulates an Android environment and connects it to a Flask backend with PostgreSQL integration. It allows APK installation, system information logging, and real-time data exchange between the Android emulator and server, demonstrating core concepts of backend development, database management, device simulation, and basic

Notifications You must be signed in to change notification settings

Pu5hk4r/DataLogAPP-AndroidStudio-FlaskAPI

Repository files navigation

Python Assignment Project

Overview

This project consists of four main tasks:

  1. Backend Development: A Flask API to manage various functionalities for interacting with the Android emulator.
  2. Database Management: PostgreSQL integration to store system information, app data, and logs.
  3. Virtual Android System Simulation: Simulation of an Android environment where APKs can be installed, and system information is logged.
  4. Basic Networking: Data exchange between the Android emulator and the backend, enabling seamless communication for various operations.

Project Working

This project aims to simulate an Android environment while interacting with a backend server. Here's how each component works:

1. Backend Development (Flask API):

Flask API

  • 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.

2. Database Management (PostgreSQL Integration):

PostgreSQL Setup

  • 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.

3. Virtual Android System Simulation:

Android Emulator emulator

  • 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 ppadb Python package, which allows control over the virtual Android device (e.g., installing APKs, retrieving system logs, etc.).

4. Basic Networking (Data Exchange Between Emulator and Backend):

Network Exchange logs

  • 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.

Prerequisites

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:
    • ppadb
    • requests

Setup

Follow the instructions below to set up the environment for the project:

  1. Clone the repository:

    https://github.com/Pu5hk4r/PYTHON-BACKEND-ASSIGNMENT.git
  2. 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.
  3. Install dependencies:

    • Navigate to the backend directory and install the required Python packages.
    pip install -r backend/requirements.txt
  4. Task-specific setup:

    • Refer to the individual task README files for any additional setup or configuration instructions for each task.

Running the Project

  • Backend Development: Follow the instructions in the backend/README.md file to start the Flask API.

  • Database Management: Refer to the database/README.md for setting up and testing PostgreSQL integration.

  • Virtual Android System Simulation: Follow the android_simulation/README.md to run the Android emulator and install APKs.

  • Basic Networking: Check the networking/README.md for setting up communication between the emulator and the backend.

  • **

About

This Python-based project simulates an Android environment and connects it to a Flask backend with PostgreSQL integration. It allows APK installation, system information logging, and real-time data exchange between the Android emulator and server, demonstrating core concepts of backend development, database management, device simulation, and basic

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published