This project consists of four tasks that demonstrate proficiency in backend development, database management, virtual Android system simulation, and basic networking.
- Task 1: Backend Development
- Task 2: Database Management
- Task 3: Virtual Android System Simulation
- Task 4: Basic Networking
- Setup and Installation
- Usage
- Testing the API
A Flask-based REST API was developed to manage app details in a database.
- POST /add-app - Adds an app to the database.
- GET /get-app/{id} - Retrieves app details by ID.
- DELETE /delete-app/{id} - Removes an app by ID.
- SQLite was used as the database to store app details.
- Flask-SQLAlchemy was used to manage the database.
- The database stores app details with fields:
app_name,version, anddescription.
A Python script simulates a virtual Android system capable of:
- Launching a virtual Android environment.
- Installing a sample app (
sample_app.apk). - Retrieving and logging system information (OS version, device model, available memory).
- A Python script was created to establish an HTTP connection with the backend server.
- It sends mock data (device ID, system info) to the Flask API.
- The server's response is logged.
Ensure you have Python 3 installed on your system.
Run the following command:
pip install -r requirements.txtpython app.pyThe API will be available at http://127.0.0.1:5000/.
python virtual_android.pypython networking.pyYou can test the API using tools like Postman or curl commands.
curl -X POST http://127.0.0.1:5000/add-app -H "Content-Type: application/json" -d '{"app_name": "TestApp", "version": "1.0", "description": "Sample application"}'curl -X GET http://127.0.0.1:5000/get-app/1curl -X DELETE http://127.0.0.1:5000/delete-app/1This completes all the tasks for the assignment. 🚀