diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ac9ac377..775588c4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -13,6 +13,108 @@ env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
+ android-release:
+ name: Release (android)
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Check out Git repository
+ uses: actions/checkout@v4
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ run_install: false
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 24
+ cache: pnpm
+
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: 17
+
+ - name: Setup Android SDK
+ uses: android-actions/setup-android@v3
+
+ - name: Install Android SDK packages
+ shell: bash
+ run: |
+ set -euo pipefail
+ sdkmanager \
+ "platforms;android-36" \
+ "build-tools;35.0.0" \
+ "ndk;27.2.12479018"
+
+ - name: Setup Rust Android targets
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
+
+ - name: Install dependencies
+ run: pnpm install --no-frozen-lockfile
+
+ - name: Build Android release APKs
+ run: pnpm android:build
+ env:
+ ANDROID_NDK_VERSION: 27.2.12479018
+ ANDROID_API_LEVEL: 35
+
+ - name: Sign Android release APKs
+ run: pnpm android:sign
+ env:
+ ANDROID_SIGNING_KEYSTORE_BASE64: ${{ secrets.ANDROID_SIGNING_KEYSTORE_BASE64 }}
+ ANDROID_SIGNING_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEYSTORE_PASSWORD }}
+ ANDROID_SIGNING_KEY_ALIAS: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}
+ ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
+
+ - name: Package Android APKs with standardized names
+ shell: bash
+ run: |
+ set -euo pipefail
+ if [[ "${{ github.ref }}" == refs/tags/* ]]; then
+ version="${{ github.ref_name }}"; version="${version#v}"
+ else
+ version=$(grep -m1 '^version' src-tauri/Cargo.toml | sed 's/.*"\(.*\)"/\1/')
+ fi
+ mkdir -p dist/android
+ declare -A labels=(
+ [arm]=arm
+ [arm64]=arm64
+ [x86]=x86
+ [x86_64]=x64
+ )
+ for abi in arm arm64 x86 x86_64; do
+ src="src-tauri/gen/android/app/build/outputs/apk/${abi}/release/app-${abi}-release.apk"
+ if [[ ! -f "$src" ]]; then
+ echo "::error::Signed Android APK not found: $src"
+ find src-tauri/gen/android/app/build/outputs/apk -type f -name '*.apk' -print || true
+ exit 1
+ fi
+ dest="dist/android/Risuko_${version}_android_${labels[$abi]}.apk"
+ cp "$src" "$dest"
+ echo "packaged: $dest"
+ done
+
+ - name: Upload Android APKs to GitHub Release
+ if: startsWith(github.ref, 'refs/tags/')
+ uses: softprops/action-gh-release@v2
+ with:
+ tag_name: ${{ github.ref_name }}
+ files: dist/android/*.apk
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Upload Android APK artifacts (manual builds)
+ if: ${{ !startsWith(github.ref, 'refs/tags/') }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: app-android
+ path: dist/android/*.apk
+
release:
name: Release (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
diff --git a/.gitignore b/.gitignore
index bff0ba71..ffdd02a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,6 +27,8 @@ release
# tauri
src-tauri/target
-src-tauri/gen
+src-tauri/gen/*
+!src-tauri/gen/android/
+!src-tauri/gen/android/**
*.node
\ No newline at end of file
diff --git a/README-CN.md b/README-CN.md
index 6e916a7a..961f2be1 100644
--- a/README-CN.md
+++ b/README-CN.md
@@ -86,6 +86,20 @@ pnpm run dev
pnpm run build
```
+### Android
+
+需要 Android SDK 36、build-tools 35.0.0、NDK 27.2.12479018,以及 Rust 的 Android 目标
+
+```bash
+# Debug 包,单 ABI(快一些)
+pnpm android:build:debug
+
+# Release 拆 ABI 打包,并签名
+pnpm android:build:signed
+```
+
+签名相关的环境变量在 `scripts/sign-android-apks.mjs`:`ANDROID_SIGNING_KEYSTORE_PATH`(CI 用 `ANDROID_SIGNING_KEYSTORE_BASE64`)、`ANDROID_SIGNING_KEYSTORE_PASSWORD`、`ANDROID_SIGNING_KEY_ALIAS`,可选 `ANDROID_SIGNING_KEY_PASSWORD`
+
## 🛠 技术栈
- [Tauri v2](https://v2.tauri.app/)
diff --git a/README.md b/README.md
index cf11b970..9264e17c 100644
--- a/README.md
+++ b/README.md
@@ -84,6 +84,28 @@ pnpm run dev
pnpm run build
```
+### Android
+
+Requires Android SDK 36, build-tools 35.0.0, NDK 27.2.12479018, and Rust Android targets.
+
+```bash
+# Debug build, single ABI (faster)
+pnpm android:build:debug
+
+# Release APKs (split per ABI), then sign
+pnpm android:build:signed
+```
+
+A few files under `src-tauri/gen/android/` are autogenerated by Tauri and gitignored on purpose:
+
+- `tauri.settings.gradle` — has hardcoded paths into your local Cargo registry, would break on other machines
+- `app/tauri.build.gradle.kts` — plugin dependency list
+- `app/tauri.properties` — version numbers pulled from `tauri.conf.json`
+
+`pnpm android:build` regenerates all three every time. If they go missing or look stale, just run a build. Don't commit them.
+
+Signing reads `ANDROID_SIGNING_KEYSTORE_PATH` (or `ANDROID_SIGNING_KEYSTORE_BASE64` in CI), `ANDROID_SIGNING_KEYSTORE_PASSWORD`, `ANDROID_SIGNING_KEY_ALIAS`, and optionally `ANDROID_SIGNING_KEY_PASSWORD`. See `scripts/sign-android-apks.mjs`
+
## 🛠 Technology Stack
- [Tauri v2](https://v2.tauri.app/)
diff --git a/package.json b/package.json
index e25c9ec2..069d6a7d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "risuko",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "A full-featured download manager",
"homepage": "https://risuko.vercel.app",
"author": {
@@ -19,6 +19,11 @@
"build": "node scripts/build.mjs",
"dev:renderer": "vite --config vite.renderer.config.ts --mode development --port 9080",
"pack:renderer": "vite build --config vite.renderer.config.ts --mode production",
+ "android:dev": "node scripts/android-env.mjs pnpm exec tauri android dev",
+ "android:build": "node scripts/android-env.mjs pnpm exec tauri android build --apk --split-per-abi",
+ "android:build:debug": "node scripts/android-env.mjs pnpm exec tauri android build --debug --target aarch64 --apk --split-per-abi",
+ "android:build:signed": "pnpm android:build && pnpm android:sign",
+ "android:sign": "node scripts/sign-android-apks.mjs",
"fmt": "pnpx @biomejs/biome check --write --max-diagnostics none",
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
"knip": "pnpx knip --fix",
diff --git a/packages/risuko-app/package.json b/packages/risuko-app/package.json
index 04dfbe46..23fd08de 100644
--- a/packages/risuko-app/package.json
+++ b/packages/risuko-app/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/app",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko download manager — launches the desktop app, downloading it from GitHub Releases on first run",
"license": "MIT",
"repository": {
diff --git a/packages/risuko-cli/npm/darwin-arm64/package.json b/packages/risuko-cli/npm/darwin-arm64/package.json
index d18d5d19..b22afb97 100644
--- a/packages/risuko-cli/npm/darwin-arm64/package.json
+++ b/packages/risuko-cli/npm/darwin-arm64/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-darwin-arm64",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko CLI binary for macOS ARM64",
"repository": {
"type": "git",
diff --git a/packages/risuko-cli/npm/darwin-x64/package.json b/packages/risuko-cli/npm/darwin-x64/package.json
index 32438324..cbc31f60 100644
--- a/packages/risuko-cli/npm/darwin-x64/package.json
+++ b/packages/risuko-cli/npm/darwin-x64/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-darwin-x64",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko CLI binary for macOS x64",
"repository": {
"type": "git",
diff --git a/packages/risuko-cli/npm/linux-arm64-gnu/package.json b/packages/risuko-cli/npm/linux-arm64-gnu/package.json
index 8fa156ed..e6c1ecf5 100644
--- a/packages/risuko-cli/npm/linux-arm64-gnu/package.json
+++ b/packages/risuko-cli/npm/linux-arm64-gnu/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-linux-arm64-gnu",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko CLI binary for Linux ARM64",
"repository": {
"type": "git",
diff --git a/packages/risuko-cli/npm/linux-x64-gnu/package.json b/packages/risuko-cli/npm/linux-x64-gnu/package.json
index 48931c4c..e204df4f 100644
--- a/packages/risuko-cli/npm/linux-x64-gnu/package.json
+++ b/packages/risuko-cli/npm/linux-x64-gnu/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-linux-x64-gnu",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko CLI binary for Linux x64",
"repository": {
"type": "git",
diff --git a/packages/risuko-cli/npm/win32-arm64-msvc/package.json b/packages/risuko-cli/npm/win32-arm64-msvc/package.json
index 722661e2..c79e0b42 100644
--- a/packages/risuko-cli/npm/win32-arm64-msvc/package.json
+++ b/packages/risuko-cli/npm/win32-arm64-msvc/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-win32-arm64-msvc",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko CLI binary for Windows ARM64",
"repository": {
"type": "git",
diff --git a/packages/risuko-cli/npm/win32-x64-msvc/package.json b/packages/risuko-cli/npm/win32-x64-msvc/package.json
index 3419cb77..f0a04bce 100644
--- a/packages/risuko-cli/npm/win32-x64-msvc/package.json
+++ b/packages/risuko-cli/npm/win32-x64-msvc/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli-win32-x64-msvc",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko CLI binary for Windows x64",
"repository": {
"type": "git",
diff --git a/packages/risuko-cli/package.json b/packages/risuko-cli/package.json
index 6e2dbaec..bba3f6d5 100644
--- a/packages/risuko-cli/package.json
+++ b/packages/risuko-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/cli",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko download engine CLI — multi-protocol downloads (HTTP, BitTorrent, ED2K, M3U8, FTP/SFTP)",
"license": "MIT",
"repository": {
@@ -24,12 +24,12 @@
"bin.js"
],
"optionalDependencies": {
- "@risuko/cli-darwin-arm64": "0.3.3",
- "@risuko/cli-darwin-x64": "0.3.3",
- "@risuko/cli-linux-arm64-gnu": "0.3.3",
- "@risuko/cli-linux-x64-gnu": "0.3.3",
- "@risuko/cli-win32-arm64-msvc": "0.3.3",
- "@risuko/cli-win32-x64-msvc": "0.3.3"
+ "@risuko/cli-darwin-arm64": "0.3.4",
+ "@risuko/cli-darwin-x64": "0.3.4",
+ "@risuko/cli-linux-arm64-gnu": "0.3.4",
+ "@risuko/cli-linux-x64-gnu": "0.3.4",
+ "@risuko/cli-win32-arm64-msvc": "0.3.4",
+ "@risuko/cli-win32-x64-msvc": "0.3.4"
},
"engines": {
"node": ">= 18"
diff --git a/packages/risuko-js/npm/darwin-arm64/package.json b/packages/risuko-js/npm/darwin-arm64/package.json
index 68eac77b..20ad4015 100644
--- a/packages/risuko-js/npm/darwin-arm64/package.json
+++ b/packages/risuko-js/npm/darwin-arm64/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-darwin-arm64",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko JS native module for macOS ARM64",
"repository": {
"type": "git",
diff --git a/packages/risuko-js/npm/darwin-x64/package.json b/packages/risuko-js/npm/darwin-x64/package.json
index 330fdcad..02dcadc8 100644
--- a/packages/risuko-js/npm/darwin-x64/package.json
+++ b/packages/risuko-js/npm/darwin-x64/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-darwin-x64",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko JS native module for macOS x64",
"repository": {
"type": "git",
diff --git a/packages/risuko-js/npm/linux-arm64-gnu/package.json b/packages/risuko-js/npm/linux-arm64-gnu/package.json
index 1d5f0935..604ac4ee 100644
--- a/packages/risuko-js/npm/linux-arm64-gnu/package.json
+++ b/packages/risuko-js/npm/linux-arm64-gnu/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-linux-arm64-gnu",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko JS native module for Linux ARM64",
"repository": {
"type": "git",
diff --git a/packages/risuko-js/npm/linux-x64-gnu/package.json b/packages/risuko-js/npm/linux-x64-gnu/package.json
index 8a516fa4..6a2d90a9 100644
--- a/packages/risuko-js/npm/linux-x64-gnu/package.json
+++ b/packages/risuko-js/npm/linux-x64-gnu/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-linux-x64-gnu",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko JS native module for Linux x64",
"repository": {
"type": "git",
diff --git a/packages/risuko-js/npm/win32-arm64-msvc/package.json b/packages/risuko-js/npm/win32-arm64-msvc/package.json
index 17c36271..c3fdcc47 100644
--- a/packages/risuko-js/npm/win32-arm64-msvc/package.json
+++ b/packages/risuko-js/npm/win32-arm64-msvc/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-win32-arm64-msvc",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko JS native module for Windows ARM64",
"repository": {
"type": "git",
diff --git a/packages/risuko-js/npm/win32-x64-msvc/package.json b/packages/risuko-js/npm/win32-x64-msvc/package.json
index c0eac006..f1931cd4 100644
--- a/packages/risuko-js/npm/win32-x64-msvc/package.json
+++ b/packages/risuko-js/npm/win32-x64-msvc/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/js-win32-x64-msvc",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko JS native module for Windows x64",
"repository": {
"type": "git",
diff --git a/packages/risuko-js/package.json b/packages/risuko-js/package.json
index 0e2f72a5..d47e5cb4 100644
--- a/packages/risuko-js/package.json
+++ b/packages/risuko-js/package.json
@@ -1,6 +1,6 @@
{
"name": "@risuko/risuko-js",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Risuko download engine — Node.js native bindings for multi-protocol downloads (HTTP, BitTorrent, ED2K, M3U8, FTP/SFTP)",
"main": "index.js",
"types": "index.d.ts",
@@ -34,12 +34,12 @@
}
},
"optionalDependencies": {
- "@risuko/js-darwin-arm64": "0.3.3",
- "@risuko/js-darwin-x64": "0.3.3",
- "@risuko/js-linux-x64-gnu": "0.3.3",
- "@risuko/js-linux-arm64-gnu": "0.3.3",
- "@risuko/js-win32-x64-msvc": "0.3.3",
- "@risuko/js-win32-arm64-msvc": "0.3.3"
+ "@risuko/js-darwin-arm64": "0.3.4",
+ "@risuko/js-darwin-x64": "0.3.4",
+ "@risuko/js-linux-x64-gnu": "0.3.4",
+ "@risuko/js-linux-arm64-gnu": "0.3.4",
+ "@risuko/js-win32-x64-msvc": "0.3.4",
+ "@risuko/js-win32-arm64-msvc": "0.3.4"
},
"engines": {
"node": ">= 18"
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 73e86376..868d375a 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -7,3 +7,16 @@ allowBuilds:
esbuild: true
unrs-resolver: true
vue-demi: true
+minimumReleaseAgeExclude:
+ - '@risuko/cli-darwin-arm64@0.3.3'
+ - '@risuko/cli-darwin-x64@0.3.3'
+ - '@risuko/cli-linux-arm64-gnu@0.3.3'
+ - '@risuko/cli-linux-x64-gnu@0.3.3'
+ - '@risuko/cli-win32-arm64-msvc@0.3.3'
+ - '@risuko/cli-win32-x64-msvc@0.3.3'
+ - '@risuko/js-darwin-arm64@0.3.3'
+ - '@risuko/js-darwin-x64@0.3.3'
+ - '@risuko/js-linux-arm64-gnu@0.3.3'
+ - '@risuko/js-linux-x64-gnu@0.3.3'
+ - '@risuko/js-win32-arm64-msvc@0.3.3'
+ - '@risuko/js-win32-x64-msvc@0.3.3'
diff --git a/scripts/android-env.mjs b/scripts/android-env.mjs
new file mode 100644
index 00000000..c066af59
--- /dev/null
+++ b/scripts/android-env.mjs
@@ -0,0 +1,112 @@
+#!/usr/bin/env node
+import { spawn } from "node:child_process";
+import { existsSync } from "node:fs";
+import { join } from "node:path";
+
+const sdkRoot =
+ process.env.ANDROID_HOME ||
+ process.env.ANDROID_SDK_ROOT ||
+ "/opt/homebrew/share/android-commandlinetools";
+const ndkVersion = process.env.ANDROID_NDK_VERSION || "27.2.12479018";
+const ndkHome = process.env.ANDROID_NDK_HOME || join(sdkRoot, "ndk", ndkVersion);
+const prebuiltRoot = join(ndkHome, "toolchains", "llvm", "prebuilt");
+const prebuiltHostCandidates = [
+ process.platform === "darwin" && process.arch === "arm64" ? "darwin-arm64" : "",
+ process.platform === "darwin" ? "darwin-x86_64" : "",
+ process.platform === "linux" ? "linux-x86_64" : "",
+ process.platform === "win32" ? "windows-x86_64" : "",
+ "darwin-arm64",
+ "darwin-x86_64",
+ "linux-x86_64",
+ "windows-x86_64",
+].filter(Boolean);
+const prebuiltHost = prebuiltHostCandidates.find((host) =>
+ existsSync(join(prebuiltRoot, host)),
+);
+if (!prebuiltHost) {
+ console.error(`Android NDK prebuilt toolchain not found under: ${prebuiltRoot}`);
+ process.exit(1);
+}
+const llvmBin = join(prebuiltRoot, prebuiltHost, "bin");
+const api = process.env.ANDROID_API_LEVEL || "35";
+const javaHomeCandidates = [
+ process.env.ANDROID_JAVA_HOME,
+ "/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home",
+ "/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home",
+ process.env.JAVA_HOME,
+].filter(Boolean);
+const javaHome = javaHomeCandidates.find((path) =>
+ existsSync(join(path, "bin", "java")),
+);
+const javaBin = javaHome ? join(javaHome, "bin") : "";
+
+if (!existsSync(llvmBin)) {
+ console.error(`Android NDK LLVM toolchain not found: ${llvmBin}`);
+ process.exit(1);
+}
+
+const env = {
+ ...process.env,
+ ANDROID_HOME: sdkRoot,
+ ANDROID_SDK_ROOT: sdkRoot,
+ ANDROID_NDK_HOME: ndkHome,
+ NDK_HOME: ndkHome,
+ ...(javaHome ? { JAVA_HOME: javaHome } : {}),
+ PATH: `${javaBin ? `${javaBin}:` : ""}${llvmBin}:${process.env.PATH || ""}`,
+ CC_aarch64_linux_android: join(llvmBin, `aarch64-linux-android${api}-clang`),
+ CXX_aarch64_linux_android: join(llvmBin, `aarch64-linux-android${api}-clang++`),
+ AR_aarch64_linux_android: join(llvmBin, "llvm-ar"),
+ RANLIB_aarch64_linux_android: join(llvmBin, "llvm-ranlib"),
+ CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER: join(
+ llvmBin,
+ `aarch64-linux-android${api}-clang`,
+ ),
+ CC_armv7_linux_androideabi: join(llvmBin, `armv7a-linux-androideabi${api}-clang`),
+ CXX_armv7_linux_androideabi: join(llvmBin, `armv7a-linux-androideabi${api}-clang++`),
+ AR_armv7_linux_androideabi: join(llvmBin, "llvm-ar"),
+ RANLIB_armv7_linux_androideabi: join(llvmBin, "llvm-ranlib"),
+ CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER: join(
+ llvmBin,
+ `armv7a-linux-androideabi${api}-clang`,
+ ),
+ CC_i686_linux_android: join(llvmBin, `i686-linux-android${api}-clang`),
+ CXX_i686_linux_android: join(llvmBin, `i686-linux-android${api}-clang++`),
+ AR_i686_linux_android: join(llvmBin, "llvm-ar"),
+ RANLIB_i686_linux_android: join(llvmBin, "llvm-ranlib"),
+ CARGO_TARGET_I686_LINUX_ANDROID_LINKER: join(
+ llvmBin,
+ `i686-linux-android${api}-clang`,
+ ),
+ CC_x86_64_linux_android: join(llvmBin, `x86_64-linux-android${api}-clang`),
+ CXX_x86_64_linux_android: join(llvmBin, `x86_64-linux-android${api}-clang++`),
+ AR_x86_64_linux_android: join(llvmBin, "llvm-ar"),
+ RANLIB_x86_64_linux_android: join(llvmBin, "llvm-ranlib"),
+ CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER: join(
+ llvmBin,
+ `x86_64-linux-android${api}-clang`,
+ ),
+};
+
+const args = process.argv.slice(2);
+if (args.length === 0) {
+ console.log(`ANDROID_HOME=${env.ANDROID_HOME}`);
+ console.log(`ANDROID_NDK_HOME=${env.ANDROID_NDK_HOME}`);
+ if (env.JAVA_HOME) {
+ console.log(`JAVA_HOME=${env.JAVA_HOME}`);
+ }
+ console.log(`PATH prefix=${llvmBin}`);
+ process.exit(0);
+}
+
+const child = spawn(args[0], args.slice(1), {
+ stdio: "inherit",
+ env,
+});
+
+child.on("exit", (code, signal) => {
+ if (signal) {
+ process.kill(process.pid, signal);
+ return;
+ }
+ process.exit(code ?? 1);
+});
diff --git a/scripts/sign-android-apks.mjs b/scripts/sign-android-apks.mjs
new file mode 100644
index 00000000..db6e3e25
--- /dev/null
+++ b/scripts/sign-android-apks.mjs
@@ -0,0 +1,161 @@
+#!/usr/bin/env node
+import { spawnSync } from "node:child_process";
+import { existsSync, mkdtempSync, readdirSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { basename, dirname, join, resolve } from "node:path";
+
+const projectRoot = resolve(new URL("..", import.meta.url).pathname);
+
+const envFile = resolve(projectRoot, ".env");
+if (existsSync(envFile)) {
+ process.loadEnvFile(envFile);
+}
+
+const apkRoot = resolve(
+ projectRoot,
+ "src-tauri/gen/android/app/build/outputs/apk",
+);
+
+function fail(message) {
+ console.error(message);
+ process.exit(1);
+}
+
+function run(command, args, options = {}) {
+ const result = spawnSync(command, args, {
+ stdio: "inherit",
+ env: process.env,
+ ...options,
+ });
+ if (result.status !== 0) {
+ fail(`${command} failed with exit code ${result.status}`);
+ }
+}
+
+function versionParts(version) {
+ return version.split(".").map((part) => Number(part));
+}
+
+function compareVersions(a, b) {
+ const left = versionParts(a);
+ const right = versionParts(b);
+ const length = Math.max(left.length, right.length);
+ for (let index = 0; index < length; index += 1) {
+ const diff = (left[index] || 0) - (right[index] || 0);
+ if (diff !== 0) {
+ return diff;
+ }
+ }
+ return 0;
+}
+
+function findBuildTool(name) {
+ const explicit = process.env[`${name.toUpperCase()}_PATH`];
+ if (explicit) {
+ return explicit;
+ }
+ const sdkRoot = process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT;
+ if (!sdkRoot) {
+ fail("ANDROID_HOME or ANDROID_SDK_ROOT is required to locate Android build tools");
+ }
+ const buildToolsRoot = join(sdkRoot, "build-tools");
+ if (!existsSync(buildToolsRoot)) {
+ fail(`Android build-tools directory not found: ${buildToolsRoot}`);
+ }
+ const versions = readdirSync(buildToolsRoot)
+ .filter((entry) => existsSync(join(buildToolsRoot, entry, name)))
+ .sort(compareVersions)
+ .reverse();
+ if (versions.length === 0) {
+ fail(`${name} not found under ${buildToolsRoot}`);
+ }
+ return join(buildToolsRoot, versions[0], name);
+}
+
+function findUnsignedApks(root) {
+ if (!existsSync(root)) {
+ fail(`APK output directory not found: ${root}`);
+ }
+ const results = [];
+ const stack = [root];
+ while (stack.length > 0) {
+ const current = stack.pop();
+ for (const entry of readdirSync(current, { withFileTypes: true })) {
+ const fullPath = join(current, entry.name);
+ if (entry.isDirectory()) {
+ stack.push(fullPath);
+ } else if (entry.isFile() && entry.name.endsWith("-unsigned.apk")) {
+ results.push(fullPath);
+ }
+ }
+ }
+ return results.sort();
+}
+
+function resolveKeystore() {
+ const keystorePath = process.env.ANDROID_SIGNING_KEYSTORE_PATH;
+ if (keystorePath) {
+ return { path: keystorePath };
+ }
+ const encoded = process.env.ANDROID_SIGNING_KEYSTORE_BASE64;
+ if (!encoded) {
+ fail(
+ "ANDROID_SIGNING_KEYSTORE_PATH or ANDROID_SIGNING_KEYSTORE_BASE64 is required",
+ );
+ }
+ const dir = mkdtempSync(join(tmpdir(), "risuko-android-signing-"));
+ const path = join(dir, "release.keystore");
+ writeFileSync(path, Buffer.from(encoded, "base64"));
+ return { path, cleanup: () => rmSync(dir, { recursive: true, force: true }) };
+}
+
+const storePassword = process.env.ANDROID_SIGNING_KEYSTORE_PASSWORD;
+const alias = process.env.ANDROID_SIGNING_KEY_ALIAS;
+if (!storePassword) {
+ fail("ANDROID_SIGNING_KEYSTORE_PASSWORD is required");
+}
+if (!alias) {
+ fail("ANDROID_SIGNING_KEY_ALIAS is required");
+}
+if (!process.env.ANDROID_SIGNING_KEY_PASSWORD) {
+ process.env.ANDROID_SIGNING_KEY_PASSWORD = storePassword;
+}
+
+const apksigner = findBuildTool("apksigner");
+const zipalign = findBuildTool("zipalign");
+const keystore = resolveKeystore();
+const unsignedApks = findUnsignedApks(apkRoot);
+
+if (unsignedApks.length === 0) {
+ fail(`No unsigned release APKs found under ${apkRoot}`);
+}
+
+try {
+ for (const unsignedApk of unsignedApks) {
+ const outputApk = unsignedApk.replace(/-unsigned\.apk$/, ".apk");
+ const alignedApk = join(
+ dirname(unsignedApk),
+ `${basename(unsignedApk, ".apk")}-aligned.apk`,
+ );
+ run(zipalign, ["-f", "-p", "4", unsignedApk, alignedApk]);
+ run(apksigner, [
+ "sign",
+ "--ks",
+ keystore.path,
+ "--ks-key-alias",
+ alias,
+ "--ks-pass",
+ "env:ANDROID_SIGNING_KEYSTORE_PASSWORD",
+ "--key-pass",
+ "env:ANDROID_SIGNING_KEY_PASSWORD",
+ "--out",
+ outputApk,
+ alignedApk,
+ ]);
+ run(apksigner, ["verify", "--verbose", "--print-certs", outputApk]);
+ rmSync(alignedApk, { force: true });
+ console.log(`signed: ${outputApk}`);
+ }
+} finally {
+ keystore.cleanup?.();
+}
\ No newline at end of file
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 577a31c1..f74a0a78 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -41,9 +41,9 @@ dependencies = [
[[package]]
name = "aes"
-version = "0.9.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8"
+checksum = "f1fc76eaeac4c9164506c466d4ffdd8ec9d0c5bf57ee97177c4d8eceb3a0e138"
dependencies = [
"cipher 0.5.2",
"cpubits",
@@ -71,7 +71,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e22c0c90bbe8d4f77c3ca9ddabe41a1f8382d6fc1f7cea89459d0f320371f972"
dependencies = [
"aead 0.6.0-rc.10",
- "aes 0.9.0",
+ "aes 0.9.1",
"cipher 0.5.2",
"ctr 0.10.1",
"ghash 0.6.0",
@@ -751,9 +751,9 @@ dependencies = [
[[package]]
name = "brotli"
-version = "8.0.2"
+version = "8.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560"
+checksum = "8119e4516436f5708bbc474a9d395bf12f1b5395e93a92a56e647ac3388c8610"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -762,9 +762,9 @@ dependencies = [
[[package]]
name = "brotli-decompressor"
-version = "5.0.0"
+version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
+checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -1688,9 +1688,9 @@ dependencies = [
[[package]]
name = "displaydoc"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"
dependencies = [
"proc-macro2",
"quote",
@@ -2936,9 +2936,9 @@ dependencies = [
[[package]]
name = "hyper"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"
+checksum = "eb92f162bf56536459fc83c79b974bb12837acfed43d6bc370a7916d0ae15ecc"
dependencies = [
"atomic-waker",
"bytes",
@@ -3331,9 +3331,9 @@ dependencies = [
[[package]]
name = "jiff"
-version = "0.2.26"
+version = "0.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30457d51cb0e68ee18184b30cd9eb8e1602a20837c321f6ea9706b94f1c681c3"
+checksum = "392c70591e8749fe235ddaf513e6f58b26bce3dcc16524cecc8936f75afa161e"
dependencies = [
"jiff-static",
"log",
@@ -3344,9 +3344,9 @@ dependencies = [
[[package]]
name = "jiff-static"
-version = "0.2.26"
+version = "0.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05f86e4f0326c61ae6c00b04d9009aaeda644d0b5bdfbf6c67247f492f42b3f3"
+checksum = "47b605b0c050d845fc355bb11eb3f9a8deddc218ea60c76e61aa1f2adfb2c96a"
dependencies = [
"proc-macro2",
"quote",
@@ -3604,9 +3604,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "libredox"
-version = "0.1.16"
+version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c"
+checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3"
dependencies = [
"libc",
]
@@ -3760,9 +3760,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.8.0"
+version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
[[package]]
name = "memoffset"
@@ -3945,6 +3945,12 @@ dependencies = [
"thiserror 1.0.69",
]
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
[[package]]
name = "ndk-sys"
version = "0.6.0+11769913"
@@ -4863,7 +4869,7 @@ version = "0.8.0-rc.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5a777c6e26664bc9504b3ce3f6133f8f20d9071f130a4f9fcbd3186959d8dd6"
dependencies = [
- "aes 0.9.0",
+ "aes 0.9.1",
"aes-gcm 0.11.0-rc.3",
"cbc 0.2.1",
"der",
@@ -5111,7 +5117,7 @@ version = "3.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"
dependencies = [
- "toml_edit 0.25.11+spec-1.1.0",
+ "toml_edit 0.25.12+spec-1.1.0",
]
[[package]]
@@ -5483,7 +5489,7 @@ dependencies = [
[[package]]
name = "risuko"
-version = "0.3.3"
+version = "0.3.4"
dependencies = [
"apple-native-keyring-store",
"base64 0.22.1",
@@ -5491,8 +5497,10 @@ dependencies = [
"dbus-secret-service-keyring-store",
"dirs 6.0.0",
"fs4",
+ "jni",
"keyring-core",
"log",
+ "ndk-context",
"open",
"regex",
"risuko-cookies",
@@ -5559,7 +5567,7 @@ dependencies = [
[[package]]
name = "risuko-cli"
-version = "0.3.3"
+version = "0.3.4"
dependencies = [
"base64 0.22.1",
"clap",
@@ -5576,7 +5584,7 @@ dependencies = [
[[package]]
name = "risuko-cookies"
-version = "0.3.3"
+version = "0.3.4"
dependencies = [
"rookie",
"serde",
@@ -5588,9 +5596,9 @@ dependencies = [
[[package]]
name = "risuko-engine"
-version = "0.3.3"
+version = "0.3.4"
dependencies = [
- "aes 0.9.0",
+ "aes 0.9.1",
"async-trait",
"axum",
"base64 0.22.1",
@@ -5646,7 +5654,7 @@ dependencies = [
[[package]]
name = "risuko-http"
-version = "0.3.3"
+version = "0.3.4"
dependencies = [
"async-compression",
"async-stream",
@@ -5680,7 +5688,7 @@ dependencies = [
[[package]]
name = "risuko-napi"
-version = "0.3.3"
+version = "0.3.4"
dependencies = [
"base64 0.22.1",
"dirs 6.0.0",
@@ -5768,7 +5776,7 @@ checksum = "324b92f459d3e42da294e14e8eb150d2215fcfb7c966838bc1127cd68bc05a0d"
dependencies = [
"aead 0.6.0-rc.10",
"aes 0.8.4",
- "aes 0.9.0",
+ "aes 0.9.1",
"aes-gcm 0.11.0-rc.3",
"bitflags 2.11.1",
"block-padding 0.3.3",
@@ -7640,9 +7648,9 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.25.11+spec-1.1.0"
+version = "0.25.12+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b"
+checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7"
dependencies = [
"indexmap 2.14.0",
"toml_datetime 1.1.1+spec-1.1.0",
@@ -9529,18 +9537,18 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.8.48"
+version = "0.8.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
+checksum = "bce33a6288fa3f072a8c2c7d0f2fdbb90e28298f0135c1f99b96c3db2efcc60b"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.48"
+version = "0.8.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
+checksum = "8fd425244944f4ab65ccff928e7323354c5a018c75838362fdce749dfad2ee1e"
dependencies = [
"proc-macro2",
"quote",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 34752024..4688e422 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -2,7 +2,7 @@
members = ["risuko-engine", "risuko-bt", "risuko-cli", "risuko-napi", "risuko-http", "risuko-cookies"]
[workspace.package]
-version = "0.3.3"
+version = "0.3.4"
authors = ["YueMiyuki"]
edition = "2021"
rust-version = "1.82"
@@ -47,7 +47,6 @@ tauri-plugin-store = "2"
tauri-plugin-deep-link = "2"
tauri-plugin-dialog = "2"
tauri-plugin-shell = "2"
-tauri-plugin-autostart = "2"
tauri-plugin-process = "2"
tauri-plugin-fs = "2"
tauri-plugin-notification = "2"
@@ -59,10 +58,7 @@ tokio = { workspace = true }
log = { workspace = true }
dirs = { workspace = true }
open = "5"
-trash = "5"
tauri-plugin-clipboard-manager = "2.3.2"
-tauri-plugin-nosleep = { git = "https://github.com/pevers/tauri-plugin-nosleep", rev = "6f6ab76ec171d075476b585282290fcf2e1c40b5" }
-tauri-plugin-single-instance = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
@@ -86,4 +82,18 @@ windows-native-keyring-store = "1"
[target.'cfg(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "android"))))'.dependencies]
dbus-secret-service-keyring-store = { version = "1", features = ["crypto-rust"] }
+[target.'cfg(not(target_os = "android"))'.dependencies]
+trash = "5"
+tauri-plugin-nosleep = { git = "https://github.com/pevers/tauri-plugin-nosleep", rev = "6f6ab76ec171d075476b585282290fcf2e1c40b5" }
+tauri-plugin-autostart = "2"
+tauri-plugin-single-instance = "2"
+
+[target.'cfg(target_os = "android")'.dependencies]
+# JNI bridge so we can dispatch Android `Intent`s with explicit MIME types
+# and `Intent.createChooser`. `tauri-plugin-shell::open` only calls
+# `Intent(ACTION_VIEW, uri)` with no extras, which lets generic
+# wildcard-MIME apps like Messages intercept any content URI we send.
+jni = "0.21"
+ndk-context = "0.1"
+
[dev-dependencies]
diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json
index 0a044f7d..b72c1047 100644
--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -25,7 +25,16 @@
"dialog:allow-open",
"dialog:allow-message",
"shell:default",
- "shell:allow-open",
+ {
+ "identifier": "shell:allow-open",
+ "allow": [
+ { "url": "file://**" },
+ { "url": "https://**" },
+ { "url": "http://**" },
+ { "url": "mailto:**" },
+ { "url": "tel:**" }
+ ]
+ },
"store:default",
"fs:default",
{
@@ -56,10 +65,7 @@
"os:default",
"notification:default",
"notification:allow-notify",
- "autostart:default",
"deep-link:default",
- "nosleep:allow-block",
- "nosleep:allow-unblock",
"clipboard-manager:default",
"clipboard-manager:allow-read-text",
"clipboard-manager:allow-write-text"
diff --git a/src-tauri/capabilities/desktop.json b/src-tauri/capabilities/desktop.json
new file mode 100644
index 00000000..5824ff77
--- /dev/null
+++ b/src-tauri/capabilities/desktop.json
@@ -0,0 +1,11 @@
+{
+ "identifier": "desktop",
+ "description": "Desktop-only capabilities for Risuko",
+ "windows": ["main"],
+ "platforms": ["macOS", "windows", "linux"],
+ "permissions": [
+ "autostart:default",
+ "nosleep:allow-block",
+ "nosleep:allow-unblock"
+ ]
+}
diff --git a/src-tauri/gen/android/.editorconfig b/src-tauri/gen/android/.editorconfig
new file mode 100644
index 00000000..ebe51d3b
--- /dev/null
+++ b/src-tauri/gen/android/.editorconfig
@@ -0,0 +1,12 @@
+# EditorConfig is awesome: https://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = false
+insert_final_newline = false
\ No newline at end of file
diff --git a/src-tauri/gen/android/.gitignore b/src-tauri/gen/android/.gitignore
new file mode 100644
index 00000000..68262551
--- /dev/null
+++ b/src-tauri/gen/android/.gitignore
@@ -0,0 +1,22 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
+key.properties
+keystore.properties
+
+/.tauri
+
+# Autogenerated by `tauri android build`
+/tauri.settings.gradle
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/.gitignore b/src-tauri/gen/android/app/.gitignore
new file mode 100644
index 00000000..0504c979
--- /dev/null
+++ b/src-tauri/gen/android/app/.gitignore
@@ -0,0 +1,7 @@
+/src/main/**/generated
+/src/main/jniLibs/**/*.so
+/src/main/assets/tauri.conf.json
+
+# Autogenerated by `tauri android build`
+/tauri.build.gradle.kts
+/tauri.properties
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/build.gradle.kts b/src-tauri/gen/android/app/build.gradle.kts
new file mode 100644
index 00000000..f26cb414
--- /dev/null
+++ b/src-tauri/gen/android/app/build.gradle.kts
@@ -0,0 +1,71 @@
+import java.util.Properties
+
+plugins {
+ id("com.android.application")
+ id("org.jetbrains.kotlin.android")
+ id("rust")
+}
+
+val tauriProperties = Properties().apply {
+ val propFile = file("tauri.properties")
+ if (propFile.exists()) {
+ propFile.inputStream().use { load(it) }
+ }
+}
+
+android {
+ compileSdk = 36
+ namespace = "app.risuko.mobile"
+ defaultConfig {
+ manifestPlaceholders["usesCleartextTraffic"] = "false"
+ applicationId = "app.risuko.mobile"
+ minSdk = 24
+ targetSdk = 36
+ versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
+ versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
+ }
+ buildTypes {
+ getByName("debug") {
+ manifestPlaceholders["usesCleartextTraffic"] = "true"
+ isDebuggable = true
+ isJniDebuggable = true
+ isMinifyEnabled = false
+ packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
+ jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
+ jniLibs.keepDebugSymbols.add("*/x86/*.so")
+ jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
+ }
+ }
+ getByName("release") {
+ isMinifyEnabled = true
+ proguardFiles(
+ *fileTree(".") { include("**/*.pro") }
+ .plus(getDefaultProguardFile("proguard-android-optimize.txt"))
+ .toList().toTypedArray()
+ )
+ }
+ }
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+ buildFeatures {
+ buildConfig = true
+ }
+}
+
+rust {
+ rootDirRel = "../../../"
+}
+
+dependencies {
+ implementation("androidx.webkit:webkit:1.14.0")
+ implementation("androidx.appcompat:appcompat:1.7.1")
+ implementation("androidx.activity:activity-ktx:1.10.1")
+ implementation("com.google.android.material:material:1.12.0")
+ implementation("androidx.lifecycle:lifecycle-process:2.10.0")
+ testImplementation("junit:junit:4.13.2")
+ androidTestImplementation("androidx.test.ext:junit:1.1.4")
+ androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
+}
+
+apply(from = "tauri.build.gradle.kts")
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/proguard-rules.pro b/src-tauri/gen/android/app/proguard-rules.pro
new file mode 100644
index 00000000..4d581b80
--- /dev/null
+++ b/src-tauri/gen/android/app/proguard-rules.pro
@@ -0,0 +1,24 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+-keep class app.risuko.mobile.MainActivity { *; }
+-keep class app.risuko.mobile.RisukoForegroundService { *; }
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/proguard-tauri.pro b/src-tauri/gen/android/app/proguard-tauri.pro
new file mode 100644
index 00000000..065e16c0
--- /dev/null
+++ b/src-tauri/gen/android/app/proguard-tauri.pro
@@ -0,0 +1,5 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+
+-keep class app.risuko.mobile.TauriActivity {
+ public app.tauri.plugin.PluginManager getPluginManager();
+}
diff --git a/src-tauri/gen/android/app/src/main/AndroidManifest.xml b/src-tauri/gen/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..d3ef2bc2
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/java/app/risuko/mobile/MainActivity.kt b/src-tauri/gen/android/app/src/main/java/app/risuko/mobile/MainActivity.kt
new file mode 100644
index 00000000..33e22398
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/java/app/risuko/mobile/MainActivity.kt
@@ -0,0 +1,397 @@
+package app.risuko.mobile
+
+import android.Manifest
+import android.content.ActivityNotFoundException
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.graphics.Color
+import android.net.Uri
+import android.os.Build
+import android.os.Bundle
+import android.os.Environment
+import android.provider.DocumentsContract
+import android.provider.Settings
+import android.util.Log
+import android.webkit.WebView
+import androidx.activity.OnBackPressedCallback
+import androidx.activity.SystemBarStyle
+import androidx.activity.enableEdgeToEdge
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.core.app.ActivityCompat
+import androidx.core.content.ContextCompat
+import androidx.core.view.WindowCompat
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
+
+class MainActivity : TauriActivity() {
+ private var pendingDirectoryRequestId: String? = null
+ private var appWebView: RustWebView? = null
+ private var requestedNotificationPermission = false
+ private val directoryPicker = registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) { uri: Uri? ->
+ val requestId = pendingDirectoryRequestId
+ pendingDirectoryRequestId = null
+ if (requestId != null) {
+ if (uri != null) {
+ try {
+ contentResolver.takePersistableUriPermission(
+ uri,
+ Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION,
+ )
+ } catch (_: Exception) {
+ }
+ }
+ nativeOnDirectoryPicked(requestId, uri?.toString())
+ }
+ }
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ current = this
+ enableEdgeToEdge()
+ super.onCreate(savedInstanceState)
+ setSystemBarsForTheme(false)
+ onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
+ override fun handleOnBackPressed() {
+ dispatchAndroidBack()
+ }
+ })
+ }
+
+ override fun onWebViewCreate(webView: WebView) {
+ appWebView = webView as? RustWebView
+ }
+
+ override fun onDestroy() {
+ if (current === this) {
+ current = null
+ }
+ super.onDestroy()
+ }
+
+ private external fun nativeOnDirectoryPicked(requestId: String, uri: String?)
+
+ private fun hasExternalStorageAccess(): Boolean {
+ return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ Environment.isExternalStorageManager()
+ } else {
+ ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED
+ }
+ }
+
+ private fun requestExternalStorageAccess(): Boolean {
+ if (hasExternalStorageAccess()) {
+ return true
+ }
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ val packageUri = Uri.parse("package:$packageName")
+ val intent = Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION, packageUri)
+ try {
+ startActivity(intent)
+ } catch (_: Exception) {
+ startActivity(Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION))
+ }
+ } else {
+ ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), 4737)
+ }
+ return false
+ }
+
+ private fun setSystemBarsForTheme(darkMode: Boolean) {
+ // Android 15 (API 35) deprecated the `window.statusBarColor` and
+ // `window.navigationBarColor` setters. On those releases the framework
+ // draws system bars edge-to-edge and supplies its own scrim when needed.
+ // The androidx `enableEdgeToEdge(statusBarStyle, navigationBarStyle)`
+ // overload handles both cases: it sets the scrim color explicitly on
+ // API < 29/32, and on API >= 30 it flips icon appearance via
+ // `SystemBarStyle.dark`/`light` without going near the deprecated setters
+ val navScrimLight = Color.rgb(253, 248, 255)
+ val navScrimDark = Color.rgb(20, 18, 24)
+ val statusBarStyle = if (darkMode) {
+ SystemBarStyle.dark(Color.TRANSPARENT)
+ } else {
+ SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT)
+ }
+ val navigationBarStyle = if (darkMode) {
+ SystemBarStyle.dark(navScrimDark)
+ } else {
+ SystemBarStyle.light(navScrimLight, navScrimDark)
+ }
+ enableEdgeToEdge(statusBarStyle, navigationBarStyle)
+ // `SystemBarStyle` handles icon appearance on API >= 30, but on older
+ // releases the inset controller is still the documented surface for
+ // flipping light/dark icons. Setting it explicitly also catches the
+ // rare case where the activity is rebuilt after a config change with a
+ // stale appearance. The call is cheap and idempotent either way
+ WindowCompat.getInsetsController(window, window.decorView).apply {
+ isAppearanceLightStatusBars = !darkMode
+ isAppearanceLightNavigationBars = !darkMode
+ }
+ }
+
+ private fun dispatchAndroidBack() {
+ val script = "window.dispatchEvent(new CustomEvent('risuko-android-back'))"
+ appWebView?.post {
+ appWebView?.evaluateJavascript(script, null)
+ }
+ }
+
+ private fun ensureNotificationPermission() {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
+ return
+ }
+ if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) {
+ return
+ }
+ if (requestedNotificationPermission) {
+ return
+ }
+ requestedNotificationPermission = true
+ ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 4738)
+ }
+
+ companion object {
+ private var current: MainActivity? = null
+
+ @JvmStatic
+ fun pickDirectory(requestId: String): Boolean {
+ val activity = current ?: return false
+ activity.runOnUiThread {
+ try {
+ activity.pendingDirectoryRequestId = requestId
+ activity.directoryPicker.launch(null)
+ } catch (_: Exception) {
+ activity.pendingDirectoryRequestId = null
+ activity.nativeOnDirectoryPicked(requestId, null)
+ }
+ }
+ return true
+ }
+
+ @JvmStatic
+ fun requestAllFilesAccess(): Boolean {
+ val activity = current ?: return false
+ if (activity.hasExternalStorageAccess()) {
+ return true
+ }
+ activity.runOnUiThread {
+ activity.requestExternalStorageAccess()
+ }
+ return false
+ }
+
+ @JvmStatic
+ fun setSystemBars(darkMode: Boolean) {
+ current?.runOnUiThread {
+ current?.setSystemBarsForTheme(darkMode)
+ }
+ }
+
+ @JvmStatic
+ fun showDownloadNotification(progress: Int, activeCount: Int, detail: String) {
+ current?.runOnUiThread {
+ val activity = current ?: return@runOnUiThread
+ activity.ensureNotificationPermission()
+ RisukoForegroundService.show(activity, progress, activeCount, detail)
+ }
+ }
+
+ @JvmStatic
+ fun hideDownloadNotification() {
+ current?.runOnUiThread {
+ val activity = current ?: return@runOnUiThread
+ RisukoForegroundService.hide(activity)
+ }
+ }
+
+ // Opens `path` in a file manager and reports the outcome back so the
+ // caller can surface a useful error string. Returns "ok" on success or
+ // a diagnostic string otherwise. We try three intent shapes because no
+ // single one works on every device:
+ // 1. ACTION_VIEW with `vnd.android.document/directory` MIME wrapped
+ // in a chooser. Files by Google and AOSP DocumentsUI both claim
+ // this
+ // 2. Same intent without the chooser, so the system can launch the
+ // default handler directly when only one app matches
+ // 3. ACTION_VIEW with the URI alone, letting the documents provider
+ // infer the MIME. Broader compatibility at the cost of pulling in
+ // generic handlers
+ // If one variant throws, we move on to the next. We only give up and
+ // report back to Rust once all three fail
+ @JvmStatic
+ fun revealFolder(path: String): String {
+ val activity = current ?: return "no_activity"
+ val resultRef = java.util.concurrent.atomic.AtomicReference("ok")
+ val latch = CountDownLatch(1)
+ activity.runOnUiThread {
+ try {
+ resultRef.set(tryRevealFolder(activity, path))
+ } catch (e: Throwable) {
+ Log.w(REVEAL_TAG, "revealFolder threw for path=$path", e)
+ resultRef.set("error: ${e.javaClass.simpleName}: ${e.message ?: "(no message)"}")
+ }
+ latch.countDown()
+ }
+ val completed = try {
+ latch.await(5, TimeUnit.SECONDS)
+ } catch (_: InterruptedException) {
+ Thread.currentThread().interrupt()
+ return "interrupted"
+ }
+ if (!completed) {
+ return "timeout"
+ }
+ return resultRef.get()
+ }
+
+ private const val REVEAL_TAG = "RisukoReveal"
+
+ private fun tryRevealFolder(activity: MainActivity, path: String): String {
+ if (path.isBlank()) {
+ return "empty_path"
+ }
+ val docId = buildExternalStorageDocId(path)
+ if (docId == null) {
+ Log.w(REVEAL_TAG, "buildExternalStorageDocId returned null for path=$path")
+ return "invalid_path:$path"
+ }
+ val authority = "com.android.externalstorage.documents"
+ val docUri = try {
+ DocumentsContract.buildDocumentUri(authority, docId)
+ } catch (e: Throwable) {
+ Log.w(REVEAL_TAG, "buildDocumentUri failed for docId=$docId", e)
+ return "uri_error:$docId"
+ }
+ val treeUri = try {
+ DocumentsContract.buildTreeDocumentUri(authority, docId)
+ } catch (e: Throwable) {
+ Log.w(REVEAL_TAG, "buildTreeDocumentUri failed for docId=$docId", e)
+ null
+ }
+ val treeDocUri = treeUri?.let { tree ->
+ try {
+ DocumentsContract.buildDocumentUriUsingTree(tree, docId)
+ } catch (e: Throwable) {
+ Log.w(REVEAL_TAG, "buildDocumentUriUsingTree failed for docId=$docId", e)
+ null
+ }
+ }
+ Log.i(REVEAL_TAG, "revealFolder path=$path docUri=$docUri treeUri=$treeUri treeDocUri=$treeDocUri")
+
+ // We deliberately do NOT add FLAG_GRANT_READ_URI_PERMISSION here.
+ // Adding it makes the system enforce that the calling app already
+ // has permission on the URI, which we never asked for: the only
+ // SAF grant we hold is for the picker-selected download root, not
+ // this arbitrary subfolder. Files by Google and AOSP DocumentsUI
+ // both query the documents provider with their own credentials,
+ // so dropping the grant flag lets them resolve the URI on their
+ // own instead of failing with a SecurityException at startActivity
+ val dirMime = DocumentsContract.Document.MIME_TYPE_DIR
+ val newViewIntent: (uri: Uri, mime: String?) -> Intent = { target, mime ->
+ Intent(Intent.ACTION_VIEW).apply {
+ if (mime != null) {
+ setDataAndType(target, mime)
+ } else {
+ setData(target)
+ }
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ }
+ }
+ // Each attempt has two halves:
+ // - probe: the ACTION_VIEW intent we run `queryIntentActivities`
+ // against to decide if there's a real handler. We always probe
+ // the inner ACTION_VIEW; querying `Intent.ACTION_CHOOSER` would
+ // just return the system ChooserActivity and tell us nothing
+ // - launchFactory: builds the intent we actually `startActivity`
+ // on. For the chooser variant we wrap a fresh ACTION_VIEW in
+ // `Intent.createChooser`, which lets the user pick between
+ // multiple file managers and bypass any "always open with"
+ // default the system has stored
+ data class Attempt(
+ val label: String,
+ val probe: Intent,
+ val launchFactory: () -> Intent,
+ )
+ val attempts = mutableListOf()
+ if (treeDocUri != null) {
+ attempts += Attempt(
+ label = "tree-doc+dirmime",
+ probe = newViewIntent(treeDocUri, dirMime),
+ launchFactory = { newViewIntent(treeDocUri, dirMime) },
+ )
+ attempts += Attempt(
+ label = "tree-doc+nomime",
+ probe = newViewIntent(treeDocUri, null),
+ launchFactory = { newViewIntent(treeDocUri, null) },
+ )
+ }
+ attempts += Attempt(
+ label = "doc+dirmime",
+ probe = newViewIntent(docUri, dirMime),
+ launchFactory = { newViewIntent(docUri, dirMime) },
+ )
+ attempts += Attempt(
+ label = "chooser+doc+dirmime",
+ probe = newViewIntent(docUri, dirMime),
+ launchFactory = {
+ Intent.createChooser(newViewIntent(docUri, dirMime), "Open folder with").apply {
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ }
+ },
+ )
+ attempts += Attempt(
+ label = "doc+nomime",
+ probe = newViewIntent(docUri, null),
+ launchFactory = { newViewIntent(docUri, null) },
+ )
+
+ val errors = mutableListOf()
+ for (attempt in attempts) {
+ val resolved = activity.packageManager.queryIntentActivities(attempt.probe, 0)
+ if (resolved.isEmpty()) {
+ Log.w(REVEAL_TAG, "no handler for ${attempt.label} intent for path=$path")
+ errors.add("${attempt.label}: no_handler")
+ continue
+ }
+ try {
+ activity.startActivity(attempt.launchFactory())
+ Log.i(REVEAL_TAG, "revealFolder ${attempt.label} succeeded (resolved=${resolved.size})")
+ return "ok"
+ } catch (e: ActivityNotFoundException) {
+ Log.w(REVEAL_TAG, "${attempt.label} dispatch failed: ActivityNotFoundException", e)
+ errors.add("${attempt.label}: ActivityNotFoundException")
+ } catch (e: SecurityException) {
+ Log.w(REVEAL_TAG, "${attempt.label} dispatch failed: SecurityException", e)
+ errors.add("${attempt.label}: SecurityException: ${e.message ?: "(no message)"}")
+ } catch (e: Throwable) {
+ Log.w(REVEAL_TAG, "${attempt.label} dispatch failed: ${e.javaClass.simpleName}", e)
+ errors.add("${attempt.label}: ${e.javaClass.simpleName}: ${e.message ?: "(no message)"}")
+ }
+ }
+
+ Log.w(REVEAL_TAG, "revealFolder exhausted all attempts for path=$path: $errors")
+ return errors.joinToString("; ")
+ }
+
+ private fun buildExternalStorageDocId(path: String): String? {
+ val primaryPrefix = "/storage/emulated/0/"
+ return when {
+ path == "/storage/emulated/0" || path == "/storage/emulated/0/" -> "primary:"
+ path.startsWith(primaryPrefix) -> {
+ val rel = path.removePrefix(primaryPrefix).trimEnd('/')
+ if (rel.isEmpty()) "primary:" else "primary:$rel"
+ }
+ path.startsWith("/storage/") -> {
+ val rest = path.removePrefix("/storage/").trimEnd('/')
+ val slash = rest.indexOf('/')
+ if (slash < 0) {
+ "$rest:"
+ } else {
+ val volume = rest.substring(0, slash)
+ val rel = rest.substring(slash + 1)
+ if (rel.isEmpty()) "$volume:" else "$volume:$rel"
+ }
+ }
+ else -> null
+ }
+ }
+ }
+}
diff --git a/src-tauri/gen/android/app/src/main/java/app/risuko/mobile/RisukoForegroundService.kt b/src-tauri/gen/android/app/src/main/java/app/risuko/mobile/RisukoForegroundService.kt
new file mode 100644
index 00000000..beb3d70f
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/java/app/risuko/mobile/RisukoForegroundService.kt
@@ -0,0 +1,111 @@
+package app.risuko.mobile
+
+import android.app.Notification
+import android.app.NotificationChannel
+import android.app.NotificationManager
+import android.app.PendingIntent
+import android.app.Service
+import android.content.Context
+import android.content.Intent
+import android.os.Build
+import android.os.IBinder
+import androidx.core.app.NotificationCompat
+
+class RisukoForegroundService : Service() {
+ override fun onBind(intent: Intent?): IBinder? = null
+
+ override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
+ ensureChannel(this)
+ val progress = intent?.getIntExtra(EXTRA_PROGRESS, 0)?.coerceIn(0, 100) ?: 0
+ val activeCount = intent?.getIntExtra(EXTRA_ACTIVE_COUNT, 0)?.coerceAtLeast(0) ?: 0
+ val detail = intent?.getStringExtra(EXTRA_DETAIL).orEmpty()
+
+ if (activeCount <= 0) {
+ stopForeground(STOP_FOREGROUND_REMOVE)
+ stopSelf()
+ return START_NOT_STICKY
+ }
+
+ startForeground(NOTIFICATION_ID, buildNotification(this, progress, activeCount, detail))
+ return START_STICKY
+ }
+
+ companion object {
+ private const val CHANNEL_ID = "risuko_downloads"
+ private const val CHANNEL_NAME = "Downloads"
+ private const val NOTIFICATION_ID = 4737
+ private const val EXTRA_PROGRESS = "progress"
+ private const val EXTRA_ACTIVE_COUNT = "activeCount"
+ private const val EXTRA_DETAIL = "detail"
+
+ fun show(context: Context, progress: Int, activeCount: Int, detail: String) {
+ val intent = Intent(context, RisukoForegroundService::class.java).apply {
+ putExtra(EXTRA_PROGRESS, progress.coerceIn(0, 100))
+ putExtra(EXTRA_ACTIVE_COUNT, activeCount.coerceAtLeast(0))
+ putExtra(EXTRA_DETAIL, detail)
+ }
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ context.startForegroundService(intent)
+ } else {
+ context.startService(intent)
+ }
+ }
+
+ fun hide(context: Context) {
+ context.stopService(Intent(context, RisukoForegroundService::class.java))
+ }
+
+ private fun ensureChannel(context: Context) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
+ return
+ }
+ val manager = context.getSystemService(NotificationManager::class.java)
+ val existing = manager.getNotificationChannel(CHANNEL_ID)
+ if (existing != null) {
+ return
+ }
+ val channel = NotificationChannel(
+ CHANNEL_ID,
+ CHANNEL_NAME,
+ NotificationManager.IMPORTANCE_LOW,
+ ).apply {
+ setShowBadge(false)
+ }
+ manager.createNotificationChannel(channel)
+ }
+
+ private fun buildNotification(
+ context: Context,
+ progress: Int,
+ activeCount: Int,
+ detail: String,
+ ): Notification {
+ val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)
+ ?: Intent(context, MainActivity::class.java)
+ val pendingIntent = PendingIntent.getActivity(
+ context,
+ 0,
+ launchIntent,
+ PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
+ )
+ val title = if (activeCount == 1) {
+ "1 active download"
+ } else {
+ "$activeCount active downloads"
+ }
+ val text = detail.ifBlank { "$progress% complete" }
+
+ return NotificationCompat.Builder(context, CHANNEL_ID)
+ .setSmallIcon(R.drawable.ic_notification)
+ .setContentTitle(title)
+ .setContentText(text)
+ .setContentIntent(pendingIntent)
+ .setOngoing(true)
+ .setOnlyAlertOnce(true)
+ .setShowWhen(false)
+ .setProgress(100, progress.coerceIn(0, 100), false)
+ .setPriority(NotificationCompat.PRIORITY_LOW)
+ .build()
+ }
+ }
+}
diff --git a/src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 00000000..2b068d11
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/src/main/res/drawable/empty_splash_icon.xml b/src-tauri/gen/android/app/src/main/res/drawable/empty_splash_icon.xml
new file mode 100644
index 00000000..4ad30eb4
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/drawable/empty_splash_icon.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml b/src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..07d5da9c
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/res/drawable/ic_notification.xml b/src-tauri/gen/android/app/src/main/res/drawable/ic_notification.xml
new file mode 100644
index 00000000..238de351
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/drawable/ic_notification.xml
@@ -0,0 +1,10 @@
+
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/res/layout/activity_main.xml b/src-tauri/gen/android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 00000000..4fc24441
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 00000000..2ffbf24b
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..98aec124
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..98aec124
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 00000000..98aec124
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..73847fd9
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..73847fd9
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 00000000..73847fd9
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..5e95e2a7
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..5e95e2a7
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 00000000..5e95e2a7
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..16773d7d
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..16773d7d
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 00000000..16773d7d
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..05a1bf2c
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..05a1bf2c
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 00000000..05a1bf2c
Binary files /dev/null and b/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/src-tauri/gen/android/app/src/main/res/values-night/themes.xml b/src-tauri/gen/android/app/src/main/res/values-night/themes.xml
new file mode 100644
index 00000000..60e3bcd1
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/res/values-v31/themes.xml b/src-tauri/gen/android/app/src/main/res/values-v31/themes.xml
new file mode 100644
index 00000000..5fefdde6
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/values-v31/themes.xml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/res/values/colors.xml b/src-tauri/gen/android/app/src/main/res/values/colors.xml
new file mode 100644
index 00000000..f8c6127d
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/src/main/res/values/ic_launcher_background.xml b/src-tauri/gen/android/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 00000000..ea9c223a
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #fff
+
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/src/main/res/values/strings.xml b/src-tauri/gen/android/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..204ffb59
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+ Risuko
+ Risuko
+
\ No newline at end of file
diff --git a/src-tauri/gen/android/app/src/main/res/values/themes.xml b/src-tauri/gen/android/app/src/main/res/values/themes.xml
new file mode 100644
index 00000000..60e3bcd1
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/values/themes.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/src-tauri/gen/android/app/src/main/res/xml/file_paths.xml b/src-tauri/gen/android/app/src/main/res/xml/file_paths.xml
new file mode 100644
index 00000000..782d63b9
--- /dev/null
+++ b/src-tauri/gen/android/app/src/main/res/xml/file_paths.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src-tauri/gen/android/build.gradle.kts b/src-tauri/gen/android/build.gradle.kts
new file mode 100644
index 00000000..607240bc
--- /dev/null
+++ b/src-tauri/gen/android/build.gradle.kts
@@ -0,0 +1,22 @@
+buildscript {
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath("com.android.tools.build:gradle:8.11.0")
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+tasks.register("clean").configure {
+ delete("build")
+}
+
diff --git a/src-tauri/gen/android/buildSrc/build.gradle.kts b/src-tauri/gen/android/buildSrc/build.gradle.kts
new file mode 100644
index 00000000..5c55bba7
--- /dev/null
+++ b/src-tauri/gen/android/buildSrc/build.gradle.kts
@@ -0,0 +1,23 @@
+plugins {
+ `kotlin-dsl`
+}
+
+gradlePlugin {
+ plugins {
+ create("pluginsForCoolKids") {
+ id = "rust"
+ implementationClass = "RustPlugin"
+ }
+ }
+}
+
+repositories {
+ google()
+ mavenCentral()
+}
+
+dependencies {
+ compileOnly(gradleApi())
+ implementation("com.android.tools.build:gradle:8.11.0")
+}
+
diff --git a/src-tauri/gen/android/buildSrc/src/main/java/app/risuko/mobile/kotlin/BuildTask.kt b/src-tauri/gen/android/buildSrc/src/main/java/app/risuko/mobile/kotlin/BuildTask.kt
new file mode 100644
index 00000000..f764e2ad
--- /dev/null
+++ b/src-tauri/gen/android/buildSrc/src/main/java/app/risuko/mobile/kotlin/BuildTask.kt
@@ -0,0 +1,68 @@
+import java.io.File
+import org.apache.tools.ant.taskdefs.condition.Os
+import org.gradle.api.DefaultTask
+import org.gradle.api.GradleException
+import org.gradle.api.logging.LogLevel
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.TaskAction
+
+open class BuildTask : DefaultTask() {
+ @Input
+ var rootDirRel: String? = null
+ @Input
+ var target: String? = null
+ @Input
+ var release: Boolean? = null
+
+ @TaskAction
+ fun assemble() {
+ val executable = """pnpm""";
+ try {
+ runTauriCli(executable)
+ } catch (e: Exception) {
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ // Try different Windows-specific extensions
+ val fallbacks = listOf(
+ "$executable.exe",
+ "$executable.cmd",
+ "$executable.bat",
+ )
+
+ var lastException: Exception = e
+ for (fallback in fallbacks) {
+ try {
+ runTauriCli(fallback)
+ return
+ } catch (fallbackException: Exception) {
+ lastException = fallbackException
+ }
+ }
+ throw lastException
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ fun runTauriCli(executable: String) {
+ val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
+ val target = target ?: throw GradleException("target cannot be null")
+ val release = release ?: throw GradleException("release cannot be null")
+ val args = listOf("tauri", "android", "android-studio-script");
+
+ project.exec {
+ workingDir(File(project.projectDir, rootDirRel))
+ executable(executable)
+ args(args)
+ if (project.logger.isEnabled(LogLevel.DEBUG)) {
+ args("-vv")
+ } else if (project.logger.isEnabled(LogLevel.INFO)) {
+ args("-v")
+ }
+ if (release) {
+ args("--release")
+ }
+ args(listOf("--target", target))
+ }.assertNormalExitValue()
+ }
+}
\ No newline at end of file
diff --git a/src-tauri/gen/android/buildSrc/src/main/java/app/risuko/mobile/kotlin/RustPlugin.kt b/src-tauri/gen/android/buildSrc/src/main/java/app/risuko/mobile/kotlin/RustPlugin.kt
new file mode 100644
index 00000000..4aa7fcaf
--- /dev/null
+++ b/src-tauri/gen/android/buildSrc/src/main/java/app/risuko/mobile/kotlin/RustPlugin.kt
@@ -0,0 +1,85 @@
+import com.android.build.api.dsl.ApplicationExtension
+import org.gradle.api.DefaultTask
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.kotlin.dsl.configure
+import org.gradle.kotlin.dsl.get
+
+const val TASK_GROUP = "rust"
+
+open class Config {
+ lateinit var rootDirRel: String
+}
+
+open class RustPlugin : Plugin {
+ private lateinit var config: Config
+
+ override fun apply(project: Project) = with(project) {
+ config = extensions.create("rust", Config::class.java)
+
+ val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
+ val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
+
+ val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
+ val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
+
+ val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
+
+ extensions.configure {
+ @Suppress("UnstableApiUsage")
+ flavorDimensions.add("abi")
+ productFlavors {
+ create("universal") {
+ dimension = "abi"
+ ndk {
+ abiFilters += abiList
+ }
+ }
+ defaultArchList.forEachIndexed { index, arch ->
+ create(arch) {
+ dimension = "abi"
+ ndk {
+ abiFilters.add(defaultAbiList[index])
+ }
+ }
+ }
+ }
+ }
+
+ afterEvaluate {
+ for (profile in listOf("debug", "release")) {
+ val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
+ val buildTask = tasks.maybeCreate(
+ "rustBuildUniversal$profileCapitalized",
+ DefaultTask::class.java
+ ).apply {
+ group = TASK_GROUP
+ description = "Build dynamic library in $profile mode for all targets"
+ }
+
+ tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
+
+ for (targetPair in targetsList.withIndex()) {
+ val targetName = targetPair.value
+ val targetArch = archList[targetPair.index]
+ val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
+ val targetBuildTask = project.tasks.maybeCreate(
+ "rustBuild$targetArchCapitalized$profileCapitalized",
+ BuildTask::class.java
+ ).apply {
+ group = TASK_GROUP
+ description = "Build dynamic library in $profile mode for $targetArch"
+ rootDirRel = config.rootDirRel
+ target = targetName
+ release = profile == "release"
+ }
+
+ buildTask.dependsOn(targetBuildTask)
+ tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
+ targetBuildTask
+ )
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src-tauri/gen/android/gradle.properties b/src-tauri/gen/android/gradle.properties
new file mode 100644
index 00000000..2a7ec695
--- /dev/null
+++ b/src-tauri/gen/android/gradle.properties
@@ -0,0 +1,24 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app"s APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
+android.nonFinalResIds=false
\ No newline at end of file
diff --git a/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar b/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..e708b1c0
Binary files /dev/null and b/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties b/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..c5f9a53c
--- /dev/null
+++ b/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue May 10 19:22:52 CST 2022
+distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/src-tauri/gen/android/gradlew b/src-tauri/gen/android/gradlew
new file mode 100755
index 00000000..4f906e0c
--- /dev/null
+++ b/src-tauri/gen/android/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/src-tauri/gen/android/gradlew.bat b/src-tauri/gen/android/gradlew.bat
new file mode 100644
index 00000000..107acd32
--- /dev/null
+++ b/src-tauri/gen/android/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/src-tauri/gen/android/settings.gradle b/src-tauri/gen/android/settings.gradle
new file mode 100644
index 00000000..39391166
--- /dev/null
+++ b/src-tauri/gen/android/settings.gradle
@@ -0,0 +1,3 @@
+include ':app'
+
+apply from: 'tauri.settings.gradle'
diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png
index 1b789827..51f0f97b 100644
Binary files a/src-tauri/icons/128x128.png and b/src-tauri/icons/128x128.png differ
diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png
index d42a0af6..3333630a 100644
Binary files a/src-tauri/icons/128x128@2x.png and b/src-tauri/icons/128x128@2x.png differ
diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png
index 4ac821ba..c6fa8ac2 100644
Binary files a/src-tauri/icons/32x32.png and b/src-tauri/icons/32x32.png differ
diff --git a/src-tauri/icons/64x64.png b/src-tauri/icons/64x64.png
index 86640d70..153e63cb 100644
Binary files a/src-tauri/icons/64x64.png and b/src-tauri/icons/64x64.png differ
diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png
index e9fbf229..02ddaa00 100644
Binary files a/src-tauri/icons/Square107x107Logo.png and b/src-tauri/icons/Square107x107Logo.png differ
diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png
index daa3deb4..c2f03379 100644
Binary files a/src-tauri/icons/Square142x142Logo.png and b/src-tauri/icons/Square142x142Logo.png differ
diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png
index 7464c2bc..4dfd6ca1 100644
Binary files a/src-tauri/icons/Square150x150Logo.png and b/src-tauri/icons/Square150x150Logo.png differ
diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png
index 0493e7ba..46995803 100644
Binary files a/src-tauri/icons/Square284x284Logo.png and b/src-tauri/icons/Square284x284Logo.png differ
diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png
index 0fa60fc9..58a149cf 100644
Binary files a/src-tauri/icons/Square30x30Logo.png and b/src-tauri/icons/Square30x30Logo.png differ
diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png
index 35409a19..02fb9194 100644
Binary files a/src-tauri/icons/Square310x310Logo.png and b/src-tauri/icons/Square310x310Logo.png differ
diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png
index 14d1f91e..8348f6f9 100644
Binary files a/src-tauri/icons/Square44x44Logo.png and b/src-tauri/icons/Square44x44Logo.png differ
diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png
index 945994be..f5620878 100644
Binary files a/src-tauri/icons/Square71x71Logo.png and b/src-tauri/icons/Square71x71Logo.png differ
diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png
index 58eaf048..4311f1f7 100644
Binary files a/src-tauri/icons/Square89x89Logo.png and b/src-tauri/icons/Square89x89Logo.png differ
diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png
index b18ebcd6..431526ad 100644
Binary files a/src-tauri/icons/StoreLogo.png and b/src-tauri/icons/StoreLogo.png differ
diff --git a/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png b/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png
index 4c4f3063..98aec124 100644
Binary files a/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png and b/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png differ
diff --git a/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png b/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png
index 4c4f3063..98aec124 100644
Binary files a/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png and b/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png b/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png
index 4c4f3063..98aec124 100644
Binary files a/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png and b/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png b/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png
index 87441160..73847fd9 100644
Binary files a/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png and b/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png differ
diff --git a/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png b/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png
index 87441160..73847fd9 100644
Binary files a/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png and b/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png b/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png
index 87441160..73847fd9 100644
Binary files a/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png and b/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png b/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png
index 39e4e0b1..5e95e2a7 100644
Binary files a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png and b/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png differ
diff --git a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png b/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png
index 39e4e0b1..5e95e2a7 100644
Binary files a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png and b/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png b/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png
index 39e4e0b1..5e95e2a7 100644
Binary files a/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png and b/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png b/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png
index 24a4afbe..16773d7d 100644
Binary files a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png and b/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png b/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png
index 24a4afbe..16773d7d 100644
Binary files a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png and b/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png b/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png
index 24a4afbe..16773d7d 100644
Binary files a/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png and b/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png b/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png
index 10466600..05a1bf2c 100644
Binary files a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png and b/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png b/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png
index 10466600..05a1bf2c 100644
Binary files a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png and b/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png b/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png
index 10466600..05a1bf2c 100644
Binary files a/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png and b/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/src-tauri/icons/android/values/ic_launcher_background.xml b/src-tauri/icons/android/values/ic_launcher_background.xml
index ea9c223a..e1ed886c 100644
--- a/src-tauri/icons/android/values/ic_launcher_background.xml
+++ b/src-tauri/icons/android/values/ic_launcher_background.xml
@@ -1,4 +1,4 @@
- #fff
+ #141218
\ No newline at end of file
diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns
index 6edb5acd..f43271a9 100644
Binary files a/src-tauri/icons/icon.icns and b/src-tauri/icons/icon.icns differ
diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico
index 62c2b723..24fbd10f 100644
Binary files a/src-tauri/icons/icon.ico and b/src-tauri/icons/icon.ico differ
diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png
index c544ee8a..b82293af 100644
Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differ
diff --git a/src-tauri/icons/icon.svg b/src-tauri/icons/icon.svg
index c5f9910a..4dc6bdee 100644
--- a/src-tauri/icons/icon.svg
+++ b/src-tauri/icons/icon.svg
@@ -1,4 +1,5 @@
-