Control Android apps and screens directly from your terminal
GitHub RepoImpressions2.3k

Control Android apps and screens directly from your terminal

@githubprojectsPost Author

Project Description

View on GitHub

Control Your Android Phone from the Terminal with PhoneDriver

Ever found yourself in a loop of picking up your Android phone to test an app, putting it down, typing a command, and picking it up again? Or wished you could script a series of UI actions for automated testing without a heavyweight cloud service? There's a new tool that cuts out the middleman and gives you direct control right from your command line.

PhoneDriver is an open-source project that lets you send commands to an Android device over ADB to simulate touches, swipes, text input, and more. It turns your terminal into a remote control for your phone's screen. It's the kind of simple, direct utility that feels like it should have existed all along.

What It Does

In essence, PhoneDriver is a Python-based CLI tool. It communicates with your Android device using the standard Android Debug Bridge (ADB). You issue commands like click, swipe, or text from your terminal, and PhoneDriver translates them into the appropriate ADB shell input commands. It can also fetch screenshots directly to your computer, making it possible to integrate visual feedback into scripts.

Why It's Cool

The beauty of PhoneDriver is in its simplicity and local-first approach. Unlike some automated testing frameworks, there's no need for a complex setup, an extra app on the phone, or a cloud infrastructure. It leverages the tools most Android developers already have installed—Python and ADB.

This opens up some neat use cases:

  • Quick Automation: Write a shell script to navigate your phone, post a repetitive social media update, or batch-install apps.
  • Developer Testing: Automate a specific user flow on your own app during development without leaving your IDE.
  • Accessibility Helper: Could be repurposed to script sequences that assist with repetitive touch tasks.
  • Just for Fun: Impress your friends by controlling your phone seemingly by magic from your laptop.

It's a focused tool that does one job well, which is always a win in a developer's toolkit.

How to Try It

Getting started is straightforward. You'll need Python and ADB set up and your Android device connected and authorized for debugging.

  1. Clone the repo:

    git clone https://github.com/OminousIndustries/PhoneDriver
    cd PhoneDriver
    
  2. Install the required Python package:

    pip install pillow
    
  3. Run the script with a command. For example, to click at coordinates (500, 1000):

    python phonedriver.py click 500 1000
    

Check out the GitHub repository for the full list of commands, including swipe, text, and screencap.

Final Thoughts

PhoneDriver isn't trying to be a full-blown testing framework. It's a lightweight, hackable bridge between your terminal and your phone. For developers who live in the command line, it feels natural and removes friction from simple tasks. It's the kind of project you might start using for one small thing and then gradually find more and more uses for. Give it a spin and see what you can automate.


Follow us for more cool projects: @githubprojects

Back to Projects
Project ID: f17494ad-3fc3-4ccb-ab88-4ec7be49a87cLast updated: March 2, 2026 at 05:24 AM