{"id":19199555,"url":"https://github.com/subconsciouscompute/android_rust_service","last_synced_at":"2025-05-09T01:24:00.812Z","repository":{"id":176586752,"uuid":"656150671","full_name":"SubconsciousCompute/android_rust_service","owner":"SubconsciousCompute","description":"Android App with foreground service using Rust Native Libraries","archived":false,"fork":false,"pushed_at":"2024-01-23T07:37:26.000Z","size":673,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T11:32:01.261Z","etag":null,"topics":["android","jni","ndk","rust","service"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SubconsciousCompute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-06-20T10:57:50.000Z","updated_at":"2025-02-02T21:12:50.000Z","dependencies_parsed_at":"2024-01-23T08:37:00.478Z","dependency_job_id":null,"html_url":"https://github.com/SubconsciousCompute/android_rust_service","commit_stats":null,"previous_names":["subconsciouscompute/rustapp","subconsciouscompute/android_rust_service"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubconsciousCompute%2Fandroid_rust_service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubconsciousCompute%2Fandroid_rust_service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubconsciousCompute%2Fandroid_rust_service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubconsciousCompute%2Fandroid_rust_service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SubconsciousCompute","download_url":"https://codeload.github.com/SubconsciousCompute/android_rust_service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253172366,"owners_count":21865503,"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":["android","jni","ndk","rust","service"],"created_at":"2024-11-09T12:27:48.805Z","updated_at":"2025-05-09T01:24:00.756Z","avatar_url":"https://github.com/SubconsciousCompute.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Android CI](https://github.com/SubconsciousCompute/android_rust_service/actions/workflows/android.yml/badge.svg)](https://github.com/SubconsciousCompute/android_rust_service/actions/workflows/android.yml)\n# Android Rust Service\n\nA demo Android App with foreground service using Rust Native Libraries. The service does file-system monitoring and \nmakes the logs available at http://localhost:3000/fs.\n\n_This demo is not tested on Windows. PR welcome!_\n\n## Getting Started On Linux\n\nA `docker-compose.yml` and `Dockerfile` are available in this repository. `docker compose up` should build and run the app.\n\n1. Install [rustup](https://rustup.rs)\n2. Install the stable toolchain\n    ```shell\n    rustup toolchain install stable\n    ```\n\n3. Add (required) android targets\n    ```shell\n    rustup target add aarch64-linux-android\n    rustup target add armv7-linux-androideabi\n    rustup target add i686-linux-android\n    rustup target add x86_64-linux-android\n    ```\n4. Install [JDK 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)\n5. Add the following environment variables\n    ```shell\n    export JAVA_HOME=/usr\n    export ANDROID_HOME=$HOME/.android_sdk\n    ```\n    \u003e _Note:_ The `java` binary should be in `$JAVA_HOME/bin/`\n\n6. Install [command-line tools](https://developer.android.com/studio). Make sure that \n    `$ANDROID_HOME/cmdline-tools/latest/bin` contains `sdkmanager` binary. Add\n    to `PATH`.\n    ```shell\n    mkdir -p $ANDROID_HOME/cmdline-tools\n    wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -O temp.zip\n    unzip -d $ANDROID_HOME/cmdline-tools temp.zip\n    mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest \n    rm temp.zip\n    export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin\n    sdkmanager --help # must work\n    ```\n\n7. Accept SDK license .\n    ```shell\n    mkdir $ANDROID_HOME/licenses\n    echo \"24333f8a63b6825ea9c5514f83c2829b004d1fee\" \u003e $ANDROID_HOME/licenses/android-sdk-license\n    ```\n\n8. Install dependencies using `sdkmanager`. The following packages are required to build the app. \n    ```shell\n    sdkmanager \"build-tools;30.0.3\" \"emulator\" \"ndk;25.2.9519653\" \"patcher;v4\" \"platform-tools\" \"platforms;android-33\"\n    ```\n\n    | Path                 | Version      | Description                     | Location             |\n    | -------------------- | ------------ | ------------------------------- | -------------------- |\n    | build-tools;30.0.3   | 30.0.3       | Android SDK Build-Tools 30.0.3  | build-tools/30.0.3   |\n    | emulator             | 32.1.13      | Android Emulator                | emulator             |\n    | ndk;25.2.9519653     | 25.2.9519653 | NDK (Side by side) 25.2.9519653 | ndk/25.2.9519653     |\n    | patcher;v4           | 1            | SDK Patch Applier v4            | patcher/v4           |\n    | platform-tools       | 34.0.3       | Android SDK Platform-Tools      | platform-tools       |\n    | platforms;android-33 | 2            | Android SDK Platform 33         | platforms/android-33 |\n\n9. Clone the repository \u0026 chdir into it and build.\n    ```shell\n    ./gradlew build\n    ```\n\n## Demo\n\n### FileSystem Monitoring\n\n\u003cimg alt=\"FS Monitoring\" src=\"demo/fs.gif\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubconsciouscompute%2Fandroid_rust_service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubconsciouscompute%2Fandroid_rust_service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubconsciouscompute%2Fandroid_rust_service/lists"}