How adonespitogo/adobot works
1. Project type and runtime
- This is an Android application built with Gradle, organized as a single app module under app/.
- The app is designed around background execution, SMS-triggered control, periodic server polling, and local data persistence.
2. Primary architectural goal
- The app acts as a remote-control agent that collects device data, executes commands, and synchronizes with a remote backend.
- The README identifies the backend dependency as AdoBot-IO, which is the external server/admin console this client talks to.
3. Top-level control surface
- User-facing entry points are the activities in com.android.adobot.activities:
- SetupActivity for initial configuration.
- PermissionsActivity for runtime permissions on Android 6+.
- UpdateActivity for APK update prompting/flow.
- BaseActivity as shared UI behavior.
- These screens are not the core business logic; they mainly configure or enable the background agent.
4. Event ingestion boundary
- SmsBroadcastReceiver is the main device-side trigger for external control via SMS.
- The README describes SMS phrases used to:
- open the app/settings,
- force a sync to the server,
- and likely trigger command handling.
- This receiver is a key ingress point from the Android OS into the app’s command-processing path.
5. Background orchestration
- NetworkSchedulerService is the main background service for periodic or scheduled work.
- It likely coordinates polling the backend, running queued commands, and refreshing device state.
- This service is the bridge between passive device state and active server-driven execution.
6. Task-based command model
- The tasks/ package is the main execution layer, with each class representing a focused capability:
- data collection: GetSmsTask, GetCallLogsTask, GetContactsTask
- data recording/sync prep: SmsRecorderTask, CallLogRecorderTask
- command execution: SendSmsTask
- device telemetry: LocationMonitor
- lifecycle/admin actions: UpdateAppTask, TransferBotTask
- This suggests a command-dispatch architecture where incoming remote actions are mapped to task objects.
7. Local persistence layer
- The database/ package uses a Room-style structure:
- AppDatabase as the database entry point,
- entities like Sms and CallLog,
- DAOs SmsDao and CallLogDao.
- Collected SMS and call log data are retained locally before being displayed, queued, or synchronized.
- This is the app’s offline buffer and historical store.
8. Network layer
- The http/ package contains a thin HTTP abstraction:
- Http, HttpRequest, and HttpCallback.
- This layer is used to communicate with the remote server for:
- fetching pending commands,
- uploading captured data,
- reporting device status,
- and handling app update/transfer actions.
- The architecture separates HTTP transport from task logic.
9. Core data/configuration objects
- CommonParams and AdobotConstants centralize shared parameters and constants.
- These likely define server URLs, command strings, sync keys, and other app-wide settings used across activities, receivers, services, and tasks.
- This is the main configuration boundary for the rest of the app.
10. Device capability gates
- PermissionsActivity and the README’s Android 6+ notes show a permission-aware flow.
- Some tasks depend on runtime permissions and may prompt the user when a command arrives and the permission is missing.
- This means capability execution is gated by OS permissions, not just app logic.
11. Update and transfer flows
- UpdateAppTask handles remote APK replacement/update behavior.
- TransferBotTask suggests the agent can be re-pointed to another server, changing where it reports.
- These are administrative lifecycle actions distinct from normal data collection.
12. Build and delivery
- The repo includes GitHub Actions workflow support under .github/workflows/android-build.yml, indicating automated Android builds.
- The app is meant to be compiled into a signed APK and installed on the target device.
- The screenshots/ directory and README show the project also includes a management-console-facing operational workflow, though that console is in a separate repository.
13. Main data flow
- Device events arrive through SMS or scheduled background checks.
- The app executes tasks to collect or act on data.
- Data is stored locally in Room tables.
- The HTTP layer syncs results and status to the server.
- The server can return new commands, updates, or transfer instructions back to the client.
14. Important diagram boundaries
- Android OS boundary: SMS broadcasts, permissions, background services.
- Local app boundary: activities, task engine, database, constants/config.
- Network boundary: HTTP client to AdoBot-IO backend.
- External backend boundary: remote command source, data sink, and admin console.
Main entry points: BaseTask.java Task Base · Http.java HTTP Client · AppDatabase.java App DB · BaseActivity.java Base UI
Components 23
Android OS
Device-side entry points and runtime gates
- SMS Receiver · SMS-triggered control ingress
app/src/main/java/com/android/adobot/SmsBroadcastReceiver.java
App UI
User-facing configuration and prompt screens
- Setup · Initial configuration screen
app/src/main/java/com/android/adobot/activities/SetupActivity.java - Permissions · Runtime permission gate
app/src/main/java/com/android/adobot/activities/PermissionsActivity.java - Update Prompt · APK update flow UI
app/src/main/java/com/android/adobot/activities/UpdateActivity.java - Base UI · Shared activity behavior
app/src/main/java/com/android/adobot/activities/BaseActivity.java
App Runtime
Background orchestration and task execution
- Scheduler Service · Periodic background orchestration
app/src/main/java/com/android/adobot/NetworkSchedulerService.java - Task Base · Shared execution base for command tasks
app/src/main/java/com/android/adobot/tasks/BaseTask.java - Data Tasks · SMS, calls, and contacts collection
app/src/main/java/com/android/adobot/tasks/GetSmsTask.java - Recorder Tasks · Local capture and sync preparation
app/src/main/java/com/android/adobot/tasks/SmsRecorderTask.java - Action Tasks · Remote actions and admin commands
app/src/main/java/com/android/adobot/tasks/SendSmsTask.java - Device Telemetry · Location and device-state monitoring
app/src/main/java/com/android/adobot/tasks/LocationMonitor.java - Config · Shared app parameters and commands
app/src/main/java/com/android/adobot/CommonParams.java - Constants · App-wide static values
app/src/main/java/com/android/adobot/AdobotConstants.java
Local Storage
Offline persistence for captured data
- App DB · Local persistence entry point
app/src/main/java/com/android/adobot/database/AppDatabase.java - SMS · Stored message records
app/src/main/java/com/android/adobot/database/Sms.java - Call Log · Stored call records
app/src/main/java/com/android/adobot/database/CallLog.java - SMS DAO · SMS persistence access
app/src/main/java/com/android/adobot/database/SmsDao.java - Call DAO · Call log persistence access
app/src/main/java/com/android/adobot/database/CallLogDao.java
Network
HTTP transport and sync layer
- HTTP Client · HTTP request execution
app/src/main/java/com/android/adobot/http/Http.java - Request Model · Outbound HTTP request envelope
app/src/main/java/com/android/adobot/http/HttpRequest.java - Callback · Async HTTP completion handler
app/src/main/java/com/android/adobot/http/HttpCallback.java
AdoBot-IO
Remote command source and data sink
- AdoBot-IO · Remote command console and data sink
Build
Automated Android build and packaging
- Android Build · Automated APK build pipeline
.github/workflows/android-build.yml
Connections 27
- Base UI → Setup: shared UI · Common activity behavior used by setup flow
- Base UI → Permissions: shared UI · Common activity behavior used by permission flow
- Base UI → Update Prompt: shared UI · Common activity behavior used by update flow
- Setup → Config: reads · Uses shared settings and server parameters
- Permissions → Config: reads · Checks capability-related settings
- Update Prompt → Action Tasks: triggers · Prompts update-related command flow
- SMS Receiver → Task Base: dispatches · Routes SMS-triggered commands into tasks
- Scheduler Service → Task Base: runs · Schedules background task execution
- Task Base → Data Tasks: specializes · Representative command execution branch
- Task Base → Recorder Tasks: specializes · Representative capture/sync branch
- Task Base → Action Tasks: specializes · Representative remote action branch
- Task Base → Device Telemetry: specializes · Representative telemetry branch
- Data Tasks → App DB: reads/writes · Uses local persistence for captured data
- Recorder Tasks → App DB: buffers · Stores collected records locally first
- App DB → SMS: contains · SMS table/entity model
- App DB → Call Log: contains · Call log table/entity model
- SMS → SMS DAO: accessed by · SMS data access operations
- Call Log → Call DAO: accessed by · Call log data access operations
- Scheduler Service → HTTP Client: syncs · Polls backend and uploads status
- Action Tasks → HTTP Client: executes · Uses transport for remote commands
- HTTP Client → Request Model: builds · Wraps outgoing requests
- HTTP Client → Callback: returns · Delivers async completion
- HTTP Client → AdoBot-IO: connects to · Communicates with the AdoBot-IO server
- Android Build → Setup: packages · Build output includes app entry screens
- Android Build → Scheduler Service: packages · Build output includes background runtime
- Android Build → SMS Receiver: packages · Build output includes control ingress
- Config → Constants: centralizes · Shared app configuration and fixed values