An open API service indexing awesome lists of open source software.

https://github.com/sachindsilvanist/swupdaterservice

SWUpdaterService.apk - system-privileged Android service that listens for USB insertion events and launches SWUpdaterV2 for software updates. This ensures a seamless update process by leveraging platform-signed privileges to receive restricted broadcasts.
https://github.com/sachindsilvanist/swupdaterservice

gradle-plugin groovy-script java xml

Last synced: about 1 year ago
JSON representation

SWUpdaterService.apk - system-privileged Android service that listens for USB insertion events and launches SWUpdaterV2 for software updates. This ensures a seamless update process by leveraging platform-signed privileges to receive restricted broadcasts.

Awesome Lists containing this project

README

          

# SWUpdaterService

## Overview

`SWUpdaterService.apk` is a system-privileged Android service that listens for USB insertion events and launches `SWUpdaterV2` for software updates. This ensures a seamless update process by leveraging platform-signed privileges to receive restricted broadcasts.

## How It Works

1. **USB Detection**
- `SWUpdaterService.apk` listens for the `MEDIA_MOUNTED` broadcast when a USB device is inserted.
- Since it is signed with platform keys, it has the necessary privileges to receive these restricted broadcasts.

2. **Launching SWUpdaterV2**
- Upon detecting a valid USB event, `SWUpdaterService.apk` launches `SWUpdaterV2`.
- If `SWUpdaterV2` is not recognized as a separate package, it must provide an entry point (such as an Activity or a Binder interface).

3. **Ensuring Compatibility**
- The simplest approach is to ensure `SWUpdaterV2` has a minimal user-space shell Activity, which `SWUpdaterService.apk` can invoke.
- If required, an entry point can be embedded in the system server to facilitate invocation.

## Implementation Details

- `SWUpdaterService.apk` is a system app with platform-level permissions.
- `SWUpdaterV2` can be either a standalone package or an embedded module.
- The communication between `SWUpdaterService` and `SWUpdaterV2` is handled via standard Android IPC mechanisms (e.g., `Intent`, `Binder`).

## Requirements

- Android system access with platform signature privileges.
- `SWUpdaterService.apk` must be installed as a privileged system app.
- `SWUpdaterV2` must expose an entry point that can be invoked by `SWUpdaterService.apk`.

## Usage

1. Place `SWUpdaterService.apk` in the `/system/priv-app/` directory.
2. Ensure `SWUpdaterV2` is accessible and properly configured.
3. Insert a USB device containing the update package.
4. `SWUpdaterService.apk` will detect the USB event and automatically launch `SWUpdaterV2`.