Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/posts/mobile-optimizer.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 145 additions & 0 deletions src/content/posts/en/tune-up-android-phone-mobile-optimizer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: "Before you buy a new phone, give your Android a tune-up"
description: "Find out what fills up or slows down your Android phone and reclaim space with mobile-optimizer, a plugin for Claude Code and Codex."
pubDate: 2026-11-30
lang: en
translationKey: mobile-optimizer
urlSlug: tune-up-android-phone-mobile-optimizer
tags: [ai, android, claude-code, codex]
author: Fedele Mantuano
draft: false
---

Apps take longer and longer to open. When you try to record a video, your phone warns you that it’s running out of space. You open Settings, see a nearly full bar and wonder what you can delete without losing something you need. So you try an app that promises a one-tap clean-up, maybe even a second one. A little while later, you’re back where you started and looking up the price of a new phone.

We built **mobile-optimizer** to help you figure out where to start before spending more money. It’s a plugin for Claude Code and Codex, two AI agents you can use on your computer. Connect the phone with a USB cable and ask, “Why is my Android phone so full?” Or pick one of the plugin’s commands to run a specific check straight away. The agent reads information from your phone, explains it in plain language and asks before making changes. There’s nothing to install on the phone.

Imagine that you have just 3 GB free and find out that your camera videos take up 38 GB. That already gives you somewhere to start. Move 18 GB of videos to your computer and you’re back to about 21 GB free, with room to start recording again. If an app is slowing things down, the plugin can help you identify it.

## What ADB is and why you need it

**ADB** stands for *Android Debug Bridge*. It’s Google’s official tool for letting a computer communicate with Android. The plugin uses it to read things like free space, installed apps and system statistics and to carry out the changes you approve. For a USB connection, you grant access on the phone’s screen. [Android’s guide to ADB](https://developer.android.com/tools/adb?hl=en)

## How to connect your phone to your computer

You’ll need an Android phone, a Mac, Windows or Linux computer, a USB cable that carries data, **Python 3.10 or later** and a local installation of Claude Code or Codex. Some cables only charge. If your phone charges but the computer can’t see it, try another cable.

If your phone has a USB‑C port and you need to buy a cable, choose one that matches the port on your computer. Both of these models transfer data at up to 480 Mbps.

- **USB‑C port (oval)** — [Amazon Basics USB‑C to USB‑C, 0.9 m](https://link.amazon/B0d5gvOeV)
- **USB‑A port (rectangular)** — [Amazon Basics USB‑A to USB‑C, 0.9 m](https://www.amazon.it/dp/B085SBD8LC)

### Install ADB on your computer

Open Terminal on Mac or Linux, or PowerShell on Windows. Use the command for your system:

- **macOS**, if you have Homebrew: `brew install --cask android-platform-tools`
- **Ubuntu or Debian**: `sudo apt install adb`
- **Windows**, if you have WinGet: `winget install Google.PlatformTools`

Each command installs ADB on your computer. For example, on Windows you’ll see PowerShell download and install the Google Platform Tools package. If you use another system or would prefer a manual download, see the project guide for alternatives or get the package from Google. [Mobile-optimizer guide](https://github.com/CodeGeeksAI/mobile-optimizer#step-1-install-adb-on-the-computer) · [Download Android SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools)

Open a new terminal window and run `adb version`. If you see something like `Android Debug Bridge version 1.0.41`, ADB is ready. To check Python, use `python3 --version` (or `python --version` on Windows). A result such as `Python 3.12.8` is fine.

### Turn on USB debugging and allow the connection

1. On your phone, open **Settings → About phone** and tap **Build number** seven times. On many Samsung phones you’ll find it under **Software information**. Enter your PIN if Android asks.
2. Find **Developer options** in Settings and turn on **USB debugging**.
3. Plug the phone into your computer and unlock it. When **Allow USB debugging?** appears, check that it’s your computer and tap **Allow**.
4. In your terminal, run `adb devices`. A line like `R58EXAMPLE device` means the connection works. If you see `unauthorized`, unlock the phone and accept the prompt. If the list is empty, check the cable and make sure USB debugging is on.

Menu names vary by phone. If you get stuck, the project guide shows where to look on different brands. [Device-specific instructions](https://github.com/CodeGeeksAI/mobile-optimizer#step-2-turn-on-developer-options-on-the-phone)

## How to install mobile-optimizer

Install the plugin in whichever agent you use on your computer. The first command adds the Code Geeks marketplace, the list of plugins the agent can download from. The second installs mobile-optimizer.

### In Claude Code

Enter these two lines, one at a time, in a local **Claude Code** session:

```text
/plugin marketplace add CodeGeeksAI/mobile-optimizer
/plugin install mobile-optimizer@codegeeks-mobile-optimizer
```

After the first line, you’ll see the new marketplace in the list. The second opens the mobile-optimizer details. Choose the user option to have it available in your other sessions on this computer. After installing it, start a new local session. [Claude Code plugin guide](https://code.claude.com/docs/en/plugins/install)

### In Codex

Enter these two lines, one at a time, in **your computer’s terminal**:

```bash
codex plugin marketplace add CodeGeeksAI/mobile-optimizer
codex plugin add mobile-optimizer@codegeeks-mobile-optimizer
```

Codex recognises the marketplace after the first line. Once the second finishes, start a new local Codex session and try `$mobile-doctor` with your phone connected. [Project installation instructions](https://github.com/CodeGeeksAI/mobile-optimizer#step-5-install-the-plugin)

## Seven commands, with an example for each

Enter these commands **in the agent’s chat**. In Claude Code they start with `/` and may show up with the plugin name first, for example `/mobile-optimizer:mobile-doctor`. In Codex they start with `$`. You can also type the example requests as written. The results below are illustrative and follow the same phone.

### 1. Check the connection with mobile-doctor

`/mobile-doctor` in Claude Code · `$mobile-doctor` in Codex

> Is my Android phone connected properly? Tell me how much free space I have.

The agent checks that ADB is available and that the phone is connected and authorised. It might show you the model, Android version and the **3 GB of free space** we’re starting with.

### 2. Find out what takes up space with mobile-storage

`/mobile-storage` in Claude Code · `$mobile-storage` in Codex

> Why do I have so little space left? Show me the largest folders and the ten biggest files.

The report shows how much space photos, videos and other files use, then highlights the biggest folders and files. In our example, camera videos take up **38 GB**, and just one is almost **4 GB**. Now you know where to look.

### 3. Move photos and videos with mobile-offload

`/mobile-offload` in Claude Code · `$mobile-offload` in Codex

> Show me which camera videos I recorded before 2026 could be moved to the Videos folder on my computer.

The agent puts together a plan, say **18 GB of videos**, for the folder you named and asks whether you want to move or copy them. If you choose to move them, the plugin organises them by year and month and removes each original only after verifying that your computer has an identical copy. To keep everything on the phone as well, ask it to “copy only”. You can also choose an external drive or a network folder your computer can already access.

### 4. Free up more space with mobile-cleanup

`/mobile-cleanup` in Claude Code · `$mobile-cleanup` in Codex

> Show me how much space I could reclaim from app caches and temporary files. Let me see the plan before you do anything.

Caches are files that apps rebuild as needed. In our example, the plugin finds about **700 MB of cached files** and **40 MB of temporary files**. You can pick which groups to clean up. If a group contains photos or videos, such as copies of files you sent on WhatsApp, ask to see the list before you decide. The plugin requires explicit approval for those files, and deletion is permanent.

### 5. See which apps you still use with mobile-apps

`/mobile-apps` in Claude Code · `$mobile-apps` in Codex

> Which large apps haven’t I opened for at least three months? Show me the list.

You might find a **1.2 GB** game you stopped playing. If you decide to uninstall it, that will also delete its local data, such as saved games that haven’t synced. The plugin also shows which preinstalled apps it can remove from your profile and how to bring them back.

### 6. Look into slowdowns with mobile-performance

`/mobile-performance` in Claude Code · `$mobile-performance` in Codex

> I have more storage now, but my phone still feels sluggish. Check which apps are using the most memory and processing power.

The agent checks **RAM**, the memory apps use while they’re open, along with processor activity. If a video app still tops the list on a second reading, for example, you have an app to look into. If what bothers you is the transition between screens, you can ask for shorter animations. The agent applies the change with your approval and shows what changed.

### 7. Check the phone’s condition with mobile-health

`/mobile-health` in Claude Code · `$mobile-health` in Codex

> Check my battery’s condition and tell me when the last security update was.

The report might show that Android considers the battery to be in good condition and that the last security update was on **1 September 2026**. You can then check in Settings whether a newer one is available. It also shows settings worth a look, such as wireless debugging. The information comes from the indicators Android makes available and can help you decide what to check in Settings.

## Try it before you replace your phone

Start with `mobile-doctor` and `mobile-storage`. In a few steps you can see what’s taking up space and decide whether to move some videos, remove an app you no longer use or look into a slowdown. If storage was the issue, you’ll notice the difference when you can save photos and videos again without a low-storage warning.

**Turn off USB debugging when you’re done.** On your phone, open **Settings → Developer options** and switch off **USB debugging**. This closes ADB access over USB until you enable it again.

Give it a try. If you found mobile-optimizer useful or it helped you reclaim space, **give us a star on GitHub**. [Visit the mobile-optimizer repository](https://github.com/CodeGeeksAI/mobile-optimizer)
Loading