Installing and Configuring Augmented Intelligence on Google Pixel 4
Note: The default Android Configuration Manager / Gradle target is now
pixel7pro(Pixel 7 Pro).
Use this page only for Pixel 4 / 4 XL. See Pixel7Pro-Install.md for the default flavor.
This guide walks through building, installing, and pairing the Augmented Intelligence mobile companion with your desktop _AugmentedIntelligence agent on a Google Pixel 4 or Pixel 4 XL.
The Pixel 4 build (pixel4 flavor) is optimized for:
- Snapdragon 855 (ARM64 /
arm64-v8a) - Adreno 640 GPU (TFLite GPU delegate for on-device vision)
- 6 GB RAM (lower camera analysis rate and memory settings)
- Android 10+ (API 29 minimum)
The phone app does not run the full Windows desktop binary. It connects to your desktop agent over your local network for commands, microphone streaming, dashboard access, and optional on-device object detection.
Architecture overview
flowchart LR
subgraph phone [Pixel 4]
AgentTab[Agent tab]
AudioTab[Audio tab]
DashTab[Dashboard tab]
VisionTab[Vision tab]
end
subgraph desktop [Desktop _AugmentedIntelligence]
Remote[Remote commands :7710]
AudioIn[Android audio ingest :7711]
Web[Web dashboard :8787]
end
AgentTab -->|TCP commands| Remote
AudioTab -->|PCM mic stream| AudioIn
DashTab -->|HTTP WebView| Web
VisionTab -->|optional command| Remote
| Phone tab | Desktop service | Default port |
|---|---|---|
| Agent | remote commands |
7710 |
| Audio | android audio ingest |
7711 |
| Dashboard | web server |
8787 |
| Vision | Local TFLite on phone; can also send vision commands to desktop | — |
Prerequisites
On your Pixel 4
- Pixel 4 or Pixel 4 XL running Android 10 or newer
- Phone and desktop on the same Wi‑Fi network (or routed LAN with no client isolation)
- Developer options enabled (tap Build number seven times in Settings → About phone)
- USB debugging enabled (Settings → System → Developer options), if installing via USB
On your desktop (Windows)
_AugmentedIntelligencebuilt and running (any GPU or CPU variant)- Windows Firewall allows inbound TCP on ports 7710, 7711, and 8787 for private networks
- You know your desktop’s LAN IP address (for example
192.168.1.10)
To build the APK (developer machine)
- Android Studio (recommended) or Android SDK + JDK 11+
- Project path:
android/AugmentedIntelligence/
Step 1 — Build the Pixel 4 APK
Option A: Android Studio (recommended)
- Open
android/AugmentedIntelligencein Android Studio. - Wait for Gradle sync to finish.
- Open Build → Select Build Variant.
- Choose
pixel4Release(notpixel7proRelease/universalRelease). - Run Build → Build Bundle(s) / APK(s) → Build APK(s).
Output APK:
android/AugmentedIntelligence/app/build/outputs/apk/pixel4/release/app-pixel4-release.apk
Package name on device: ai.crockett.augmentedintelligence.pixel4
Option B: PowerShell build script
From the repository root:
.\scripts\build_android_pixel4.ps1 -Flavor pixel4 -InstallAdb
-InstallAdbinstalls the APK on a USB-connected Pixel 4 automatically.- Requires
ANDROID_HOME(or Android SDK at%LOCALAPPDATA%\Android\Sdk). - If
gradlew.batis missing, open the project once in Android Studio to generate the Gradle wrapper.
Step 2 — Install on your Pixel 4
Option A: USB + ADB
- Connect the Pixel 4 via USB.
- On the phone, approve the Allow USB debugging prompt.
- Install:
adb install -r "android\AugmentedIntelligence\app\build\outputs\apk\pixel4\release\app-pixel4-release.apk"
Use -r to replace an existing install.
Option B: Sideload the APK
- Copy the APK to the phone (Google Drive, USB file transfer, etc.).
- Open the file with a file manager.
- If prompted, allow Install unknown apps for your file manager.
- Confirm install.
After install, the launcher shows Augmented Intelligence (Pixel 4).
Step 3 — Prepare the desktop agent
Start _AugmentedIntelligence on your Windows PC. Pick a shared secret token (example: my-home-token-2026).
Run these commands in the desktop agent (typed or spoken):
remote commands start 7710 my-home-token-2026
android audio start 7711 my-home-token-2026
web server start
rsi agent profile AndroidCompanion
Verify services:
remote commands status
android audio status
web server status
Optional: automated desktop prep (Lua)
simple script execute lua_scripts/Android-Companion-Agent.lua
Set environment variables before running if you use non-default ports:
| Variable | Default |
|---|---|
ANDROID_HOST |
192.168.1.42 |
ANDROID_REMOTE_PORT |
7710 |
ANDROID_WEB_PORT |
8787 |
ANDROID_TOKEN |
(empty) |
Find your desktop LAN IP
On Windows PowerShell:
Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notmatch 'Loopback' } | Select-Object IPAddress, InterfaceAlias
Use the address on your Wi‑Fi adapter (for example 192.168.1.10).
Windows Firewall
Allow inbound rules for TCP 7710, 7711, and 8787 on your private network profile, or temporarily allow _AugmentedIntelligence.exe through the firewall while testing.
Step 4 — Configure the phone app
- Open Augmented Intelligence (Pixel 4) on the phone.
- Go to the Settings tab.
- Enter:
| Field | Value |
|---|---|
| Desktop host | Your PC’s LAN IP (e.g. 192.168.1.10) |
| Remote commands port | 7710 |
| Mic audio stream port | 7711 |
| Web dashboard port | 8787 |
| Auth token | Same token as desktop (e.g. my-home-token-2026) |
- Tap Save connection.
The Settings tab also shows the device profile line. On a real Pixel 4 it should report Profile: pixel4 and matched for hardware.
Permissions
On first use, grant:
- Microphone — required for the Audio tab
- Camera — required for the Vision tab
If denied, open Settings → Apps → Augmented Intelligence (Pixel 4) → Permissions and enable them.
Step 5 — Test each feature
Agent tab
- Enter a command, e.g.
web server status. - Tap Send.
- You should see the desktop response in the card below.
Useful preset commands (also on the Agent tab):
rsi agent profile AndroidCompanionandroid audio statusweb server statushardware statusllm status
Tap Ping to send web server status quickly.
Audio tab
- Grant microphone permission if prompted.
- Tap Start stream.
- Speak near the phone; the desktop should log ingest activity.
On desktop, confirm:
android audio status
Tap Desktop status on the phone to send android audio status as a remote command.
Dashboard tab
- Open the Dashboard tab.
- The WebView loads
http://<desktop-ip>:8787/. - Use shortcut buttons: Home, Overlays, Timeline, Graph, Commands, Profiles, Plugins.
Traffic is HTTP on your LAN (cleartext allowed by the app for local dashboards).
Vision tab
- Grant camera permission.
- The rear camera preview appears.
- With no model file, you get preview only.
Optional on-device detection: copy a TFLite model to:
android/AugmentedIntelligence/app/src/main/assets/models/detect.tflite
Rebuild and reinstall the APK. The app uses the GPU delegate on Pixel 4 when supported; the status line shows gpu or cpu.
Tap Send vision command to desktop agent to run simple image on the desktop.
Default ports and protocol summary
| Service | Port | Phone → desktop |
|---|---|---|
| Remote commands | 7710 | token <TOKEN> then cmd <command> |
| Android audio | 7711 | AUTH <TOKEN> header, then PCM16LE frames |
| Web dashboard | 8787 | HTTP in WebView |
If you change ports on the desktop, update the same values in the phone Settings tab.
Troubleshooting
“ERROR” or timeout on Agent tab
- Confirm desktop IP is correct (not
127.0.0.1on the phone). - Phone and PC must be on the same network; guest Wi‑Fi often blocks device-to-device traffic.
- Run
remote commands start 7710 <TOKEN>on desktop. - Token on phone must exactly match desktop token.
- Check Windows Firewall for port 7710.
Audio stream fails or disconnects
- Run
android audio start 7711 <TOKEN>on desktop. - Match token in phone Settings.
- Keep the app in the foreground during streaming.
- Check firewall for port 7711.
Dashboard blank or won’t load
- Run
web server starton desktop. - Open
http://<desktop-ip>:8787/in the phone’s Chrome browser. If Chrome fails, fix network/firewall before using the app tab. - Check firewall for port 8787.
Profile shows “mismatch”
You installed the pixel4 APK on non–Pixel 4 hardware (or an emulator). The app still works; use the universal flavor for other devices:
.\scripts\build_android_pixel4.ps1 -Flavor universal
Vision: “No TFLite model loaded”
Expected until you add detect.tflite under assets/models/ and rebuild.
Build errors in Android Studio
- Install SDK Platform 35 and NDK via SDK Manager.
- Select build variant
pixel4Release. - File → Sync Project with Gradle Files.
Security notes
- Use a strong, private token on home networks; anyone on the LAN who knows the token and port can send commands to your desktop agent.
- Remote command and audio channels are not TLS-encrypted; they are intended for trusted local networks only.
- Do not expose ports 7710, 7711, or 8787 to the public internet without additional protection.
Quick reference checklist
Desktop
- [ ]
_AugmentedIntelligencerunning - [ ]
remote commands start 7710 <TOKEN> - [ ]
android audio start 7711 <TOKEN> - [ ]
web server start - [ ]
rsi agent profile AndroidCompanion - [ ] Firewall allows 7710, 7711, 8787
- [ ] LAN IP noted
Pixel 4
- [ ]
pixel4ReleaseAPK installed - [ ] Settings: host, ports, token saved
- [ ] Microphone and camera permissions granted
- [ ] Agent tab returns a response to
web server status - [ ] Audio tab streams successfully
- [ ] Dashboard loads in WebView
Related files
| Path | Purpose |
|---|---|
android/AugmentedIntelligence/ |
Android Studio project |
scripts/build_android_pixel4.ps1 |
Build/install helper |
lua_scripts/Android-Companion-Agent.lua |
Desktop pairing script |
AndroidAudioIngest.cpp |
Desktop mic ingest service |
docs/AugmentedIntelligenceSystems.md |
Broader system overview |
For help with desktop installation, see installer/install.ps1 and docs/AugmentedIntelligenceSystems.md.