curl -fsSL https://raw.githubusercontent.com/olekkut/tandrv/main/install.sh | bashQuickstart • Benchmarks • Terminal Vision • Plugins • Architecture
Google Pixel devices (Pixel 6 through Pixel 11 Pro) contain custom Google Tensor TPUs (NPUs) capable of 15 to 50+ TOPS of INT8/FP16 matrix compute paired with 8 to 24 GB of unified LPDDR5X memory.
Legacy USB edge accelerators (such as the Google Coral Edge TPU) are limited to 4 TOPS, draw 2W of power, and fail to execute modern neural network operators (such as Atrous Spatial Pyramid Pooling and dynamic attention layers).
TANDrv (Tensor ADB NPU Driver) bridges host operating systems (Linux / Windows) directly to connected Google Tensor hardware. Via a host DKMS kernel module (/dev/tandrv0), zero-copy USB 3.2 AOA bulk transport, and an optimized Android LiteRT execution engine, TANDrv provisions connected Pixel phones as native hardware accelerators for computer vision, object detection, and generative language models.
Run the bootstrap installer on your host system:
curl -fsSL https://raw.githubusercontent.com/olekkut/tandrv/main/install.sh | bashOr via local clone:
git clone https://github.com/olekkut/tandrv.git && cd tandrv && bash install.shConnect your Google Pixel via USB (with USB Debugging enabled) and run:
tandrv onboardtandrv configures udev rules, verifies the USB 3.2 SuperSpeed link, deploys the headless NPU service, and verifies /dev/tandrv0.
python examples/tandrv_vision_tui.pyEmpirical evaluation results comparing a dedicated Google Coral USB Accelerator (Edge TPU) against a tethered Google Pixel 8 Pro (Tensor G3) running TANDrv over USB 3.2:
| Model Architecture | Workload Type | Google Coral USB (Edge TPU) | TANDrv Pixel 8 Pro (Tensor G3) | Evaluation Delta |
|---|---|---|---|---|
| MobileNet V2 (224x224 INT8) | Classification Throughput | 390 FPS (2.56 ms) | 395 FPS (2.53 ms) | Throughput Parity: Zero-copy kernel DMA matches dedicated ASIC throughput. |
| YOLOv8n (320x320 INT8) | Real-Time Object Tracking | 31.2 FPS (32.1 ms) | 35.2 FPS (28.4 ms) | +13% Throughput: Sustains multi-channel video tracking at 30+ FPS. |
| DeepLab V3 (513x513 Dense) | Semantic Segmentation | ❌ Failed (CPU Fallback: 350 ms) | 44.5 ms (22.5 FPS) | 8x Speedup: Native hardware execution of ASPP and dynamic atrous ops. |
| Gemma-2B / MobileLLM | Autoregressive LLM Streaming | ❌ Unsupported (Out of Memory) | 6.15 tokens/sec (162 ms/tok) | Architecture Support: Full KV-cache allocation in 12 GB unified RAM. |
┌─ TANDrv Real-Time Vision Pipeline (/dev/tandrv0 & ADB Bridge) ──────┐
│ │
│ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⢛⣛⣛⣛⣛⣛⣛⠛⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⡟⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⡇⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⡇⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⣷⡈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢁⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡙⠻⠿⠿⠿⠿⠿⠿⠟⢋⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ │
│ │
│ [PERSON] 89.2% confidence (bbox: [160, 80, 480, 400]) │
│ [FRAME] 640x480 @ 24-bit RGB -> 320x320 Normalized Tensor │
└──────────────────────────────────────────────────────────────────────┘
┌─ Google Pixel 8 Pro Hardware Telemetry ──────────────────────────────┐
│ Target: Tensor G3 TPU Core Thermal Headroom: 55.5% │
│ Transport Latency: 161.0 ms NPU Compute: 172.7 ms │
│ Total E2E Latency: 358.5 ms Framerate: 2.8 FPS │
└──────────────────────────────────────────────────────────────────────┘
TANDrv includes native integrations for homelab, edge NVR, and machine learning infrastructure:
- Frigate NVR Detector: Drop-in detector plugin for 24/7 multi-camera object detection.
- Home Assistant Component: Automated battery threshold protection and telemetry sensors.
- ONNX Runtime Provider: Seamless
tandrv.onnxruntime.InferenceSessiondrop-in for ONNX models. - Ollama Bridge: OpenAI/Ollama compatible streaming HTTP proxy for local LLM inference.
- Battery Cycle & Overcharge Protection: Automated smart-plug integration cycles battery between 60% and 80% state-of-charge, mitigating lithium-ion degradation during 24/7 continuous operation.
- Closed-Loop Thermal Controller: Continuously monitors
PowerManager.getThermalHeadroom()and dynamically modulates request rates to maintain optimal operating temperatures. - Dynamic Host Fallback: Routes inference requests to host CPU/GPU when thermal throttling is detected, resuming NPU offloading once the device has cooled.
tandrv/
├── core/ # Kernel drivers and low-level transport
│ ├── dkms/ # Linux Host Kernel Driver (/dev/tandrv0)
│ ├── android-gadget/ # Bare-Metal Android Kernel Gadget (f_tandrv.c)
│ └── udev/ # udev auto-mount rules
├── cli/ # tandrv CLI utility (Rust)
│ └── src/ # onboard, doctor, vision, bench commands
├── sdk/ # Developer SDKs (Python, C, Rust)
├── plugins/ # Ecosystem plugins (Frigate, Home Assistant, ONNX, Ollama)
├── mobile/ # Android NPU daemon & C++ NDK engine
├── examples/ # Standardized benchmark and vision demos
├── scripts/ # Installation and documentation scripts
├── docs/ # Architecture, benchmark, and compatibility documentation
├── install.sh # Universal bootstrap installer
└── README.md # Project documentation
- Aleksander Kutycki (@olekkut) — Architecture, Kernel Drivers & Core Engineering
TANDrv utilizes a split licensing model to ensure Linux kernel compliance while supporting frictionless enterprise adoption:
- Userspace (
cli/,sdk/,plugins/,mobile/,examples/): Licensed under the Apache License 2.0 (Enterprise-friendly with explicit patent grant protection). - Kernel Space (
core/dkms/,core/android-gadget/): Licensed strictly under GNU GPL v2.0 (Compliant with Linux Ring-0 symbol exports and memory management). - Linux UAPI Header (
core/dkms/tandrv_ioctl.h): Dual-licensed under(GPL-2.0 WITH Linux-syscall-note) OR Apache-2.0.