Tanish Ranjan Logo
Tanish Ranjan
Back to Projects

Grip Shift

March 2025
AndroidKotlinJetpack Compose

An Android app that transforms a smartphone into a low-latency Xbox controller for Windows PC gaming, using USB or BLE to send inputs with a sleek Jetpack Compose UI.

Grip Shift

GripShift

GripShift is an innovative Android application that transforms a smartphone (Android 8.0+ without root) into a low-latency game controller, emulating an Xbox controller to send inputs to a Windows PC for gaming. With support for both USB Accessory Mode and Bluetooth Low Energy (BLE), GripShift delivers a seamless gaming experience with minimal latency, making it a versatile tool for gamers. Its tagline, "Control the Game, Shift the Play," reflects its mission to redefine how players interact with their games.

Features

  • Xbox Controller Emulation: Emulates a full Xbox controller with 14 buttons (A, B, X, Y, Start, Back, LB, RB, LSB, RSB, D-Pad Up/Down/Left/Right), 2 analog joysticks (Left/Right), and 2 analog triggers (Left/Right).
  • Low-Latency Input: Sends a 12-byte packet matching XInput’s XINPUT_GAMEPAD structure (2 bytes for buttons, 1 byte each for triggers, 2 bytes each for joystick axes) at 250Hz via USB (4ms latency) and 125Hz via BLE (8ms latency).
  • Interactive UI: Built with Jetpack Compose, featuring custom components like GamepadButton (toggle/press), Joystick (draggable), and Trigger (slider) for intuitive control.
  • Connection Management: Includes a Settings screen to select USB or BLE, connect/disconnect devices, and manage configurations (currently manual BLE MAC entry, with scanning planned).
  • No Root Required: Designed to work without root access, ensuring broad accessibility for Android users.

Technologies Used

  • Kotlin: Primary language, leveraging coroutines for asynchronous operations like packet sending and connection handling.
  • Jetpack Compose: Utilizes declarative UI to create interactive and responsive components tailored for game controller inputs.
  • Hilt: Implements compile-time dependency injection for ViewModels, repositories, and managers, ensuring a modular and testable codebase.
  • Android APIs: Uses UsbManager for USB Accessory Mode and BluetoothGatt for BLE, with no external connectivity libraries for lightweight performance.
  • Clean Architecture: Structured with Domain, Data, and Presentation layers, including use cases ( ConnectDeviceUseCase, SendGamepadInputUseCase), repositories (UsbRepository, BluetoothRepository), and a GamepadViewModel.

Purpose

GripShift was developed to provide gamers with a cost-effective and portable alternative to traditional game controllers by turning their Android smartphones into fully functional Xbox controllers. By supporting both USB and BLE connectivity, the app ensures low-latency input for a smooth gaming experience on Windows PCs. Its no-root requirement and user-friendly design make it accessible to a wide audience, while its Clean Architecture and Hilt integration ensure a scalable and maintainable codebase for future enhancements.

Status

  • In Development: GripShift has a functional MVP with full UI, USB/BLE packet sending, and basic connection handling. Ongoing work includes USB device selection, BLE device scanning, a Windows kernel driver for input reception, UI polish, robust error handling, and testing (unit/integration). Challenges like USB closeAccessory errors have been resolved, with permissions handling still in progress.

Link

  • This project is currently private and in development. For more details, please contact me.

Tech Stack

  • Kotlin
  • Jetpack Compose
  • BLE
  • USB

Interested in similar projects?

I'm available for freelance projects and collaborations.

Get in Touch