Skip to content

Commit efd3d76

Browse files
committed
Pre-Release 0.5 - Brand New Dashboard
1 parent 6b0a3e3 commit efd3d76

11 files changed

Lines changed: 121 additions & 17 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ==========================================
22
# General Application Settings
33
# ==========================================
4-
VERSION=0.4
4+
VERSION=0.5
55

66
# Hardcoded administrator credentials.
77
# Manual passwords must be at least 8 chars long and include

README.md

Lines changed: 107 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Android SMS API Gateway 0.4 *(Pre-Release)*
2-
![Version](https://img.shields.io/badge/Version-0.4_(Pre--Release)-orange)
1+
# Android SMS API Gateway 0.5 (Pre-Release)
2+
![Version](https://img.shields.io/badge/Version-0.5_(Pre--Release)-orange) ![Released](https://img.shields.io/badge/Released-28.02.2026-blue)
33
![Python](https://img.shields.io/badge/Python-3.13+-blue?logo=python&logoColor=white)
44
![FastAPI](https://img.shields.io/badge/FastAPI-Powered-009688?logo=fastapi&logoColor=white)
55
![Maintained](https://img.shields.io/badge/Maintained-Yes-brightgreen)
6-
### Turn your Android device into a professional SMS Server
76

8-
This application transforms any Android device into a dedicated, self-hosted **SMS Gateway**. It provides a robust **RESTful API** that allows you to programmatically send SMS messages over your cellular network, manage device connections via ADB, and enforce secure, role-based access control for multiple users or services.
7+
### Turn your Android device into a professional SMS Server
98

10-
> **_P.S. Parts of this release are preperations for the UI Interface which is coming VERY soon!_**
9+
This application transforms any Android device into a dedicated, self-hosted **SMS Gateway**. It provides a robust **RESTful API** that allows you to programmatically send SMS messages over your cellular network, manage device connections via ADB, enforce secure, role-based access control for multiple users or services, and manage everything through its fully-integrated **UI Dashboard**.
1110

1211
## Table of Contents
1312

1413
- [Features & Capabilities](#features--capabilities)
14+
- [Dashboard](#dashboard)
1515
- [System Architecture](#system-architecture)
1616
- [Authentication & Security](#authentication--security)
1717
- [Deployment](#deployment)
@@ -31,7 +31,8 @@ This application transforms any Android device into a dedicated, self-hosted **S
3131
- [Trigger the QR Code](#trigger-the-qr-code)
3232
- [Pairing Instructions](#pairing-instructions)
3333
- [Verify Connection](#verify-connection)
34-
- [Whats New In 0.4](#whats-new-in-04-pre-release)
34+
- [What's New in 0.5](#whats-new-in-05)
35+
- [Version Archive](#version-archive)
3536

3637
---
3738

@@ -48,6 +49,37 @@ This application transforms any Android device into a dedicated, self-hosted **S
4849
4950
---
5051

52+
## Dashboard
53+
54+
The built-in UI Dashboard provides a clean and modern interface for managing your gateway, viewing conversations, monitoring connected devices, and administrating API tokens.
55+
### Main Messages Page
56+
57+
![Chats](assets/images/chats.png)
58+
<br>
59+
60+
<details>
61+
<summary><strong>View more screenshots</strong></summary>
62+
63+
<br>
64+
65+
### Devices Management Page
66+
67+
![Devices](assets/images/devices.png)
68+
<br>
69+
70+
### API Keys Management Page
71+
72+
![API Keys](assets/images/api_keys.png)
73+
<br>
74+
75+
### Settings Page
76+
77+
![Settings](assets/images/settings.png)
78+
79+
</details>
80+
81+
---
82+
5183
## System Architecture
5284

5385
### Authentication & Security
@@ -278,7 +310,29 @@ After scanning, the pairing process completes automatically. You can confirm suc
278310
* Checking the terminal logs for a "Successfully Paired" message.
279311
* Calling the `GET /adb/list-devices` endpoint to verify your device appears with the status `authorized`.
280312

281-
# What's New in 0.4 (Pre-release)
313+
# What's New in 0.5 (Pre-Release)
314+
![Version](https://img.shields.io/badge/Version-0.5_(Pre--Release)-orange) ![Released](https://img.shields.io/badge/Released-28.02.2026-blue)
315+
316+
The main feature of version 0.5 is the new **UI Dashboard**!
317+
318+
#### New Features
319+
* **UI Dashboard**: Introducing the new UI Dashboard (Still Closed Source) which lives within the same Docker image.
320+
* **MMS Support**: The routing for `GET /adb/list-messages` now supports MMS Messages.
321+
* **Update Notifications**: Added a `latest_version` fetch to `/auth/@me` to notify users automatically of updates when available via the Dashboard.
322+
* **Password Reset**: Added a new password-reset route.
323+
324+
#### Improvements & Fixes
325+
* **Message Retention**: Core database change in the `messages` table - messages are no longer deleted from the table at the monthly reset date, so they continue to show up in the chat history.
326+
* **Asynchronous Utils**: `utils/database.py` and `utils/adb.py` now serve their functions as asynchronous.
327+
* **Code Pairing Fix**: Fixed an issue where code pairing did not connect to the device automatically after the pairing process.
328+
* **Cleanup**: Partial leftovers cleanup for the deprecated user feature.
329+
330+
# Version Archive
331+
332+
<details>
333+
<summary><strong>What's New in 0.4 (Pre-release)</strong></summary>
334+
335+
![Version](https://img.shields.io/badge/Version-0.4_(Pre--Release)-orange) ![Released](https://img.shields.io/badge/Released-12.02.2026-blue)
282336

283337
#### Token-Based Authentication & System Overhaul
284338
Version 0.4 introduces a major overhaul to the authentication system, replacing traditional user accounts with a more robust **API Token** system.
@@ -294,3 +348,49 @@ Version 0.4 introduces a major overhaul to the authentication system, replacing
294348
* **Expanded Access**: API Tokens can now access `/adb/list-devices`.
295349
* **Status Info**: `GET /auth/@me` now returns detailed quota information.
296350

351+
</details>
352+
353+
<details>
354+
<summary><strong>What's New in 0.3 (Pre-release)</strong></summary>
355+
356+
![Version](https://img.shields.io/badge/Version-0.3_(Pre--Release)-orange) ![Released](https://img.shields.io/badge/Released-03.02.2026-blue)
357+
358+
#### Features & Improvements
359+
* Added a route to get and list all conversations on the device.
360+
* Added a route to list all users.
361+
* `GET /auth/@me` now returns how many messages are left for the current month.
362+
363+
> **_P.S. Parts of this release are preperations for the UI Interface which is coming VERY soon!_**
364+
365+
#### Bug Fixes
366+
* Timeout handling for ADB `POST /adb/connect-device` - trace back to client.
367+
* `device_id` was limited to 35 characters (raised to 99) - code pairing devices have longer names than 35 characters.
368+
369+
</details>
370+
371+
<details>
372+
<summary><strong>What's New in 0.2 (Pre-release)</strong></summary>
373+
374+
![Version](https://img.shields.io/badge/Version-0.2_(Pre--Release)-orange) ![Released](https://img.shields.io/badge/Released-20.01.2026-blue)
375+
376+
#### Features & Improvements
377+
* Added a new API route to support pairing devices via a 6-digit code, offering an alternative to QR code scanning.
378+
* Replaced the embedded ADB binary with the system-level `android-tools-adb` package. This improves stability and compatibility across different container environments.
379+
380+
#### Bug Fixes
381+
* Fixed major bugs that made delete-account endpoint not to work.
382+
* Resolved connectivity issues preventing successful wireless device pairing in Dockerized environments.
383+
* Fixed an issue where remember_me tokens were not persisting correctly; tokens now utilize a 10-year expiration for long-term sessions.
384+
* Corrected username validator logic and pattern. Usernames can now be 3–32 characters long, include numbers and hyphens (previously restricted to 10 characters maximum and no numbers were allowed).
385+
386+
</details>
387+
388+
<details>
389+
<summary><strong>What's New in 0.1 (Initial Release)</strong></summary>
390+
391+
![Version](https://img.shields.io/badge/Version-0.1-brightgreen) ![Released](https://img.shields.io/badge/Released-05.01.2026-blue)
392+
393+
#### Initial Release
394+
* First release of the Android SMS API Gateway.
395+
396+
</details>

app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
load_dotenv()
2323

24-
VERSION = os.getenv("VERSION", "0.4")
24+
VERSION = os.getenv("VERSION", "0.5")
2525
ADB_QR_DEVICE_PAIRING = os.getenv("ADB_QR_DEVICE_PAIRING", "true").lower() == "true"
2626
ADB_AUTO_CONNECT = os.getenv("ADB_AUTO_CONNECT", "false").lower() == "true"
2727
ADB_DEFAULT_DEVICE = os.getenv("ADB_DEFAULT_DEVICE")
@@ -34,7 +34,6 @@
3434

3535
log = create_logger(alias="APP", logger_name="ASA_APP")
3636

37-
3837
@asynccontextmanager
3938
async def lifespan(app: FastAPI):
4039

@@ -75,6 +74,7 @@ async def lifespan(app: FastAPI):
7574
port = 8000
7675

7776
if is_default:
77+
7878
log.warning(f"""\n
7979
{Fore.YELLOW}{Style.BRIGHT}{'=' * 60}
8080
⚠ DEFAULT PASSWORD DETECTED — MUST BE CHANGED
@@ -282,4 +282,4 @@ async def serve_frontend(request: Request, full_path: str):
282282
if __name__ == "__main__":
283283

284284
log.info("Starting Uvicorn server environment...")
285-
uvicorn.run(app, host="0.0.0.0", port=8001)
285+
uvicorn.run(app, host="0.0.0.0", port=8001, log_config=None)

assets/images/api_keys.png

63.5 KB
Loading

assets/images/chats.png

60.3 KB
Loading

assets/images/devices.png

66.8 KB
Loading

assets/images/settings.png

74.7 KB
Loading

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
:: Build from repo root, using backend/Dockerfile
22
cd /d %~dp0..
3-
docker build --no-cache -f backend/Dockerfile -t android-sms-api:0.4 -t android-sms-api:latest .
3+
docker build --no-cache -f backend/Dockerfile -t android-sms-api:0.5 -t android-sms-api:latest .

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "Android-SMS-API"
3-
version = "0.3"
3+
version = "0.5"
44
description = "Turn your Android phone into a programmable SMS server. A lightweight HTTP API wrapper around ADB for sending text messages over cellular network"
55
readme = "README.md"
66
requires-python = ">=3.13"

routes/authentication.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from dotenv import load_dotenv, set_key
44
from typing import Annotated
55
from fastapi import Depends, HTTPException, status, APIRouter
6+
from jose.exceptions import JWTError
67
from fastapi.security import OAuth2PasswordBearer, APIKeyHeader
78
from models.authentication import Token, AdditionalAccountData, LoginObtainToken, login_obtain_token, MUST_BE_ADMINISTRATOR_EXCEPTION, generate_random_password, ResetPasswordRequest, ResetPasswordResponse, DEFAULT_PASSWORD
89
from utils.database import SQLiteDb
@@ -95,12 +96,14 @@ async def authenticate_with_token(
9596
next_plan_reset=get_billing_cycle_end(),
9697
token_id=token_id
9798
)
98-
except ValueError:
99+
except (ValueError, JWTError):
99100
pass
100101

101102
if api_key:
103+
102104
try:
103105
token_id = await JWToken.verify_api_token(api_key)
106+
104107
record = await db_helper.get_token_by_id(token_id)
105108

106109
if not record:
@@ -123,7 +126,7 @@ async def authenticate_with_token(
123126
token_id=token_id
124127
)
125128

126-
except ValueError:
129+
except (ValueError, JWTError):
127130
pass
128131

129132
raise credentials_exception
@@ -201,9 +204,10 @@ async def reset_password(
201204

202205
try:
203206
token_data = await JWToken.verify(token)
207+
204208
if token_data.username == ADMIN_USERNAME:
205209
authenticated = True
206-
except ValueError:
210+
except (ValueError, JWTError):
207211
pass
208212

209213
if not authenticated and body.current_password:

0 commit comments

Comments
 (0)