{"id":27140436,"url":"https://github.com/sachindsilvanist/swupdaterservice","last_synced_at":"2025-04-10T00:51:11.583Z","repository":{"id":286060213,"uuid":"960232106","full_name":"sachindsilvaNIST/SWUpdaterService","owner":"sachindsilvaNIST","description":"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.","archived":false,"fork":false,"pushed_at":"2025-04-07T01:58:32.000Z","size":8790,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"service","last_synced_at":"2025-04-10T00:51:08.395Z","etag":null,"topics":["gradle-plugin","groovy-script","java","xml"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sachindsilvaNIST.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-04T04:44:55.000Z","updated_at":"2025-04-07T10:09:25.000Z","dependencies_parsed_at":"2025-04-04T05:37:37.747Z","dependency_job_id":"8d38280a-6816-46f2-a356-d744f090f08c","html_url":"https://github.com/sachindsilvaNIST/SWUpdaterService","commit_stats":null,"previous_names":["sachindsilvanist/swupdaterservice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachindsilvaNIST%2FSWUpdaterService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachindsilvaNIST%2FSWUpdaterService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachindsilvaNIST%2FSWUpdaterService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachindsilvaNIST%2FSWUpdaterService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sachindsilvaNIST","download_url":"https://codeload.github.com/sachindsilvaNIST/SWUpdaterService/tar.gz/refs/heads/service","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137997,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradle-plugin","groovy-script","java","xml"],"created_at":"2025-04-08T05:52:08.479Z","updated_at":"2025-04-10T00:51:11.555Z","avatar_url":"https://github.com/sachindsilvaNIST.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWUpdaterService\n\n\n## Overview\n\n\n`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.\n\n\n## How It Works\n\n\n1. **USB Detection**  \n   - `SWUpdaterService.apk` listens for the `MEDIA_MOUNTED` broadcast when a USB device is inserted.  \n   - Since it is signed with platform keys, it has the necessary privileges to receive these restricted broadcasts.\n\n\n2. **Launching SWUpdaterV2**  \n   - Upon detecting a valid USB event, `SWUpdaterService.apk` launches `SWUpdaterV2`.  \n   - If `SWUpdaterV2` is not recognized as a separate package, it must provide an entry point (such as an Activity or a Binder interface).\n\n\n3. **Ensuring Compatibility**  \n   - The simplest approach is to ensure `SWUpdaterV2` has a minimal user-space shell Activity, which `SWUpdaterService.apk` can invoke.  \n   - If required, an entry point can be embedded in the system server to facilitate invocation.\n\n\n## Implementation Details\n\n\n- `SWUpdaterService.apk` is a system app with platform-level permissions.  \n- `SWUpdaterV2` can be either a standalone package or an embedded module.  \n- The communication between `SWUpdaterService` and `SWUpdaterV2` is handled via standard Android IPC mechanisms (e.g., `Intent`, `Binder`).\n\n\n## Requirements\n\n\n- Android system access with platform signature privileges.  \n- `SWUpdaterService.apk` must be installed as a privileged system app.  \n- `SWUpdaterV2` must expose an entry point that can be invoked by `SWUpdaterService.apk`.\n\n\n## Usage\n\n\n1. Place `SWUpdaterService.apk` in the `/system/priv-app/` directory.  \n2. Ensure `SWUpdaterV2` is accessible and properly configured.  \n3. Insert a USB device containing the update package.  \n4. `SWUpdaterService.apk` will detect the USB event and automatically launch `SWUpdaterV2`.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachindsilvanist%2Fswupdaterservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsachindsilvanist%2Fswupdaterservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachindsilvanist%2Fswupdaterservice/lists"}