# AI use cases for Droidline (KnifeLemon/Droidline)

Repo: [KnifeLemon/Droidline](https://github.com/KnifeLemon/Droidline) | Use cases: 5 | Page: https://dedupedai.com/use-cases/knifelemon-droidline/

Droidline is a tool that lets code, the command line, or an AI agent control real Android phones through a paired PC server, without ADB, a USB cable, or root.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Test your Android app on real phones from a script: https://dedupedai.com/use-cases/knifelemon-droidline/test-your-app-on-real-phones/
- Let an AI agent look at and operate a phone: https://dedupedai.com/use-cases/knifelemon-droidline/give-an-ai-agent-a-phone/
- Run one routine across a shelf of phones, each with its own proxy: https://dedupedai.com/use-cases/knifelemon-droidline/run-a-shelf-of-phones-with-proxies/
- Read a login code from a phone notification during a test: https://dedupedai.com/use-cases/knifelemon-droidline/collect-a-login-code-from-a-notification/
- Automate a small daily phone chore from the command line: https://dedupedai.com/use-cases/knifelemon-droidline/automate-a-daily-phone-chore/

## How to test your Android app on real phones from a script with Droidline

Repo: [KnifeLemon/Droidline](https://github.com/KnifeLemon/Droidline) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Write a Python or Node.js test that taps, types, and checks text on a real phone.

**Who it is for:** A mobile developer or QA engineer who needs to check a login or other flow on real hardware, without setting up developer options or USB debugging on the phone.

**The problem:** Emulators miss real device behavior, and wiring up ADB and USB debugging for each test phone is slow to set up and fragile to maintain.

**The outcome:** A script that launches your app, fills in a field, taps a button, and reads back a greeting from the screen, running against a phone paired over Wi-Fi.

### Steps

1. Run `droidline serve` on your PC and leave it running.
2. Install droidline-agent.apk on the phone, turn on the accessibility service, the Droidline keyboard, notifications and unrestricted battery use, then run `droidline pair` and scan the QR code in the app's Pair tab.
3. Install the client with `pip install droidline` or `npm install droidline`.
4. Write a script that calls connect(), launch(), input(), touch() and get_text() against your app's package name and element ids.
5. Run the script and check the printed text matches what your app should show.

### Prompt to paste into your agent

```text
Using the Droidline repo at https://github.com/KnifeLemon/Droidline, write a Python script that connects to the paired phone, launches <app package name>, enters <test value> into the field with id <field id>, taps <button text>, and prints the text of the element with id <result id>. Verify the printed text equals <expected text> and report pass or fail.
```

### Caveat

Droidline only uses permissions an ordinary app can get, so it cannot unlock a PIN, pattern or password lock screen, and games or custom-drawn apps may expose no elements to target.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/knifelemon-droidline/test-your-app-on-real-phones/

## How to let an AI agent look at and operate a phone with Droidline

Repo: [KnifeLemon/Droidline](https://github.com/KnifeLemon/Droidline) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Connect Claude Code or Cursor to a phone through MCP so it can read the screen and act.

**Who it is for:** A developer who wants an AI coding or assistant agent to check how a mobile app behaves and perform steps on a real phone.

**The problem:** Agents cannot see or touch a phone screen on their own, so checking a mobile flow means doing every step by hand.

**The outcome:** An agent that reads the phone's screen tree, takes screenshots, and taps or types through the Droidline MCP tools.

### Steps

1. Run `droidline serve` on your PC and pair a phone with `droidline pair`.
2. Register the MCP server in Claude Code with `claude mcp add droidline -- droidline mcp`, or add the mcpServers entry from the README to Cursor.
3. Add `--read-only` to the server args if the agent should only observe the screen.
4. Ask the agent to dump the current screen and describe the elements it sees.
5. Ask the agent to perform one step, such as touching a named button, then confirm the result with a screenshot.

### Prompt to paste into your agent

```text
Using the Droidline repo at https://github.com/KnifeLemon/Droidline, register its MCP server with the paired phone, then dump the current screen and list every element with its text and id. Verify the list includes <expected element text> and report it back as JSON.
```

### Caveat

An agent with full tool access can act on the phone's real apps, so start with --read-only or a --tools list until you trust what it will do.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/knifelemon-droidline/give-an-ai-agent-a-phone/

## How to run one routine across a shelf of phones, each with its own proxy with Droidline

Repo: [KnifeLemon/Droidline](https://github.com/KnifeLemon/Droidline) | Difficulty: Advanced | Time: 3 hours | Basis: From the README

Drive many phones from one PC, each sending chosen apps through its own upstream.

**Who it is for:** An operations person who runs the same daily app routine on several phones and needs each phone on its own network path.

**The problem:** Running the same routine on many phones means managing each one by hand, and routing per app usually needs root or extra hardware.

**The outcome:** One PC runs the same routine on several named phones in parallel, with chosen apps sent through a socks5 or http upstream set per phone.

### Steps

1. Run `droidline serve` on the PC and pair each phone with `droidline pair`, giving each phone a name you choose.
2. Set a socks5 or http upstream for each phone so its chosen apps use a local VPN route, one upstream per phone.
3. Write one script that takes a phone name and runs the routine against it, then start it for each phone.
4. Check the status of each phone for connection, route and permissions before the daily run.
5. Read the printed results per phone and rerun any phone that failed the routine.

### Prompt to paste into your agent

```text
Using the Droidline repo at https://github.com/KnifeLemon/Droidline, write a script that runs the same routine on each paired phone in <phone list>, with each phone using its own proxy upstream. Output one JSON line per phone with its name and a pass or fail result. Verify every phone reports a route in its status before it runs the routine.
```

### Caveat

The README does not give a single command to set proxy upstreams, so confirm the exact setup in the Remote phones and recipes docs before you rely on it.

Risk, account pooling: Running one routine across many phones with different proxies can look like account pooling to the apps you automate, so check the terms of each service before you do this.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/knifelemon-droidline/run-a-shelf-of-phones-with-proxies/

## How to read a login code from a phone notification during a test with Droidline

Repo: [KnifeLemon/Droidline](https://github.com/KnifeLemon/Droidline) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Wait for a notification on the phone and use its text in your test flow.

**Who it is for:** A QA engineer testing a sign-in that sends a one-time code by text message or notification.

**The problem:** Automated tests stall at a code sent to a phone, and the code is hard to pass into the app without manual steps.

**The outcome:** A test that waits for the code notification, reads the code from the app, and enters it in the login field.

### Steps

1. Run `droidline serve` and pair the phone with `droidline pair`.
2. Trigger the sign-in flow from your script so the code is sent to the phone.
3. Wait for the notification on the PC side and read the code from the app that received it.
4. Enter the code into the login field with input() and tap the confirm button.
5. Verify the next screen loads by checking for an expected element.

### Prompt to paste into your agent

```text
Using the Droidline repo at https://github.com/KnifeLemon/Droidline, write a Python test that starts the sign-in flow in <app package name>, waits for the notification that carries the one-time code, enters it into the field with id <code field id>, and checks that the element with text <expected text> appears. Report pass or fail and the code length, not the code itself.
```

### Caveat

Android 15 and later hide one-time codes in notifications from apps, so the code may have to be read inside the app instead.

Risk, credentials: The one-time codes and login details the script handles are sensitive, so keep them out of logs and shared output.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/knifelemon-droidline/collect-a-login-code-from-a-notification/

## How to automate a small daily phone chore from the command line with Droidline

Repo: [KnifeLemon/Droidline](https://github.com/KnifeLemon/Droidline) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

Run a Wi-Fi toggle or a value check on the phone on a schedule from your PC.

**Who it is for:** A person with a spare or personal Android phone who repeats the same small task each day, such as turning Wi-Fi off at night.

**The problem:** Small repeated taps on a phone add up, and most Android automation needs developer setup or root.

**The outcome:** A command that performs the chore on the phone and a scheduled run that repeats it without manual taps.

### Steps

1. Run `droidline serve` on the PC and pair the phone with `droidline pair`.
2. Test the chore once from the command line, for example `droidline touch text "Network & internet"` followed by a touch on the toggle label.
3. Take a screenshot to confirm the result with `droidline screenshot shot.png`.
4. Put the same commands in a script and schedule it with your system's task scheduler to run each night. (inferred, check the README)
5. Check the next morning that the phone is in the state you expected.

### Prompt to paste into your agent

```text
Using the Droidline repo at https://github.com/KnifeLemon/Droidline, run the command line steps to open the Wi-Fi setting on the paired phone and toggle it off, then save a screenshot to <path>. Verify the screenshot shows the toggle in the off state and report the result.
```

### Caveat

The README does not give one command to switch Wi-Fi, because Settings differs by phone maker and Android version, so you may need to adjust the labels in the recipes for your phone.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/knifelemon-droidline/automate-a-daily-phone-chore/
