# Winds Render Worker 1.0.0 A signed native Android release app and an authenticated queue on this Linux server. The app renders compatible Three.js scenes on the device and uploads bounded video segments. Linux adds the prepared soundtrack, verifies media and extracts review frames. No cloud build service, paid rendering provider or screen-capture permission is required. ## Install and first test Download `https://files.winds-os.com/render-worker/winds-render-worker-1.0.0.apk`. Android 10 or later is required; actual WebGL 2 / H.264 export support is checked at runtime. 1. Open the APK and allow installation from your downloading browser when Android requests it. 2. Open **Winds Render Worker**, enter the private one-time code supplied in the conversation and tap **Pair this device**. 3. Allow notifications and unrestricted battery use when requested. In OnePlus app battery/startup settings, allow background activity / auto-launch if those options are available. The app includes a shortcut. 4. Tap **Start / resume worker**. Pairing queues a six-second aviation smoke test at 720×1280, 30 fps. After that file passes server media checks, a complete 42-second pilot is automatically queued. 5. Leave the app using Home, then test with the screen off. The persistent notification reports status and has a Stop action. Compare the server's completed frames/video and confirm the renderer identifies the phone GPU in diagnostics. This physical-device test is not established by the Linux browser test. If the private virtual display does not render on your device, enable **Use floating preview**, grant the optional **Display over other apps** setting, then tap **Retry last failed render**. This displays a small window containing only the render scene. It does not capture other apps. A retry may need the current render attempt to finish/fail first. Use **Watch latest rendered video** after completion, or **Copy diagnostics** to share status, model, WebView version, renderer and recent errors without the pairing token. A different device needs its own one-time pairing code. ## Background behavior and permissions - The user explicitly enables a foreground controller, with a visible notification, Stop control, renewable bounded partial wake lock and reconnect polling. Rendering additionally declares Android's `mediaProcessing` foreground-service type; its processing limit is not bypassed. - Active scenes use a hardware-accelerated WebView attached to an own-content private virtual display with a consumed ImageReader surface. Optional floating-preview mode is available for device-specific issues. Rendering uses exact timestamps, not real-time screen recording or `requestAnimationFrame` pacing. - Notification permission is requested through Android. Battery exemption is requested through Android settings with an explanation. Overlay permission is optional and requested only when that mode is selected. Internet/network/Wi-Fi state/wake-lock/foreground-service permissions are normal manifest permissions. No camera, microphone, location, contacts, broad file access, root or screen-capture permission is used. - Severe thermal throttling or an unplugged battery below 15% pauses work. Uploaded segments survive app/process/network interruptions. Five automatic attempts are allowed before a job is marked failed; the user or server can explicitly retry it. - Android 15+ limits background media-processing foreground services to six hours per 24 hours for apps targeting these versions. A timeout stops work and posts a resume notice. Reopening the app is necessary to resume. The app does not mislabel rendering as music playback to evade this limit. - After reboot or an app update, a resume notification is posted if enabled; the app does not launch a prohibited media-processing service from the boot receiver. Tap the notification and Start to resume. - Force-stop, revoked permissions, manufacturer task killing, no network and unsupported device graphics can prevent processing. No Android app can promise uninterrupted operation on every phone. Screen-off GPU operation, prolonged OnePlus behavior and sustained 20-minute workloads require the user's physical-device test. ## Server operations State lives in `/home/usr1/.local/share/winds-render-worker` with mode 0700, outside the web root. The system service is `winds-render-worker.service`, bound to localhost:18846. Nginx exposes only `/render-worker/api/` over the existing HTTPS host. The APK/runner/guide are static files at `/var/www/files.winds-os.com/render-worker`. ```sh python3 server/manage.py pair --hours 24 python3 server/manage.py status python3 server/manage.py enqueue --duration 42 --width 1080 --source /home/usr1/code2/content/vids/aviation-threejs --title 'Aviation 1080p review' python3 server/manage.py enqueue --duration 42 --width 720 --source /home/usr1/code2/content/vids/gaming-threejs-v4 --title 'Gaming revision' python3 server/manage.py cancel JOB_ID python3 server/manage.py retry JOB_ID python3 server/manage.py revoke DEVICE_ID sudo systemctl status winds-render-worker.service sudo journalctl -u winds-render-worker.service -n 60 ``` Pairing codes are single-use and expire. Devices receive independent tokens stored encrypted with Android Keystore; only token hashes are stored on the server. Never publish live codes, tokens, signing credentials, queue.sqlite or the private data directory. Generated results have unguessable share URLs. Source snapshots contain static composition files and assets, not credentials; review a new source folder before queueing it. Each job snapshots its source before dispatch; updating source does not mutate an active render. Jobs carry a device-bound random lease. Bounded raw MP4 uploads have SHA-256 checks, H.264/rate/resolution/frame-count validation and idempotent commit. Completion concatenates segments, copies the locally prepared soundtrack, checks durations and complete decode, and extracts three frames. Media verification is automatic; visual quality remains `pending` until reviewed. Enqueue a new snapshot after changing graphics for another iteration. There is no claim that a media-valid video necessarily matches a visual reference. ## Scene contract The trusted scene's `index.html` must expose `window.sample` with `ready`, `duration`, `canvas`, `renderAt(seconds)` and `setSize(width,height)`. Runtime files may reference local sibling HTML/JS/JSON and `assets/` / `vendor/`. The scene must be deterministic. Optional `sample.info` supplies renderer diagnostics. The source folder must be inside this video workspace. It must include an `assets/sound.m4a` soundtrack covering the job duration. Jobs currently use portrait 720×1280 or 1080×1920 at 30 fps, up to 1,200 seconds. Each segment is at most six seconds and 20 MiB; Android writes it to private cache and retries uploads. Linux owns audio muxing so the phone does not need an AAC encoder. Whole-film RAM buffering is avoided; full 20-minute reliability and thermal performance are not yet measured. ## Build and verify The native app is Java with no external Android runtime dependencies. Android SDK 36, Build Tools 36.0.0, AGP 8.13.0, Gradle 8.14.5 and Java 21 were used. Min SDK 29 / target SDK 36. The app is not debuggable and is signed with a dedicated RSA release key. Key material and passwords remain outside the source/public folders at the private signing directory; keep that key for compatible updates. The build helper uses the existing local installation paths; adjust them and provide your own signing environment when building elsewhere. ```sh ./build-release.sh python3 -m unittest discover -s server -p test_server.py -v ``` `server/test_host.py` and `test_renderer.mjs` provide an isolated browser rendering/upload/assembly test. `server/test_public_api.py` checks the actual HTTPS queue using the browser-produced segment and revokes its temporary QA device afterward. Public release metadata records the APK checksum, signing certificate and the scope of completed tests. There was no physical Android device connected to this server during creation; emulator/browser checks do not certify phone GPU or background behavior. Technical sources: [Android foreground-service limits](https://developer.android.com/develop/background-work/services/fgs/timeout), [foreground-service types](https://developer.android.com/develop/background-work/services/fgs/service-types), [WebView lifecycle](https://developer.android.com/reference/android/webkit/WebView), and [WebCodecs hardware preferences](https://www.w3.org/TR/webcodecs/#hardware-acceleration).