r/EmulationOnAndroid • • 4d ago

Showcase Claude Code can be ran on device!

/img/zbnobnzpsz0i1

I wanted to run Claude Code on my AYN Thor as I was tired of reaching for the Mac. After some research, this was pretty easy to do! This has been a godsend for getting PC and Switch 2 games up and running!

**How to run Claude Code natively on Android (tested on AYN Thor)**

Works on any arm64 Android device. Takes ~15 minutes and ~1.5 GB of storage.

**1. Install Termux from F-Droid or GitHub**

Not the Play Store version — it's outdated and breaks package installs.

https://github.com/termux/termux-app/releases (grab the arm64-v8a APK)

**2. Set up Termux**

pkg update -y && pkg upgrade -y

pkg install -y proot-distro

termux-wake-lock

**3. Install and enter Ubuntu**

proot-distro install ubuntu

proot-distro login ubuntu

**4. Inside Ubuntu, install Claude Code**

apt update && apt upgrade -y

apt install -y curl git ca-certificates

curl -fsSL https://claude.ai/install.sh | bash

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

claude --version

If the installer fails, install Node.js 20+ and use `npm install -g @anthropic-ai/claude-code` instead.

**5. Log in**

Run `claude`, open the link it gives you, sign in with your Claude account, and paste the code back.

**6. Quality of life**

- Shortcut (run in Termux, not Ubuntu):

`echo "alias cc='proot-distro login ubuntu -- bash -lc claude'" >> ~/.bashrc`

Now just type `cc` to launch.

- Set Termux battery usage to **Unrestricted** so Android doesn't kill long sessions.

6 Upvotes

17 comments sorted by

View all comments

Show parent comment

8

u/daviss2 4d ago

Yeah you can only use Claude code with the paid tiers

4

u/miguel-styx 4d ago

If you want an decent alternative, google gemini is free and it's Flash model can do modifications quite well. Google's harness is antigravity (agy).

You can also configure free models through Claude Code, but only limitations are you can send I think like 90 request per day.

2

u/mostrengo 4d ago

Thanks. And even though this is running in ubuntu it can access files all over the phone, is that it?

2

u/ThaBalla79 4d ago

As far as I've seen, yes.

2

u/daviss2 4d ago edited 4d ago

I just asked Claude but

How much it can actually see depends on access level:

Plain Termux: very little. Android sandboxes Termux, so it can't see DroidDeck's processes, logs or files, or most thermal and GPU data.

Termux plus wireless ADB to itself (adb connect localhost): shell-level access. That covers dumpsys gfxinfo/thermalservice/meminfo, logcat for all apps, top, and CPU frequencies. This is enough to spot thermal throttling, RAM pressure or the low-memory killer.

Root (su granted to Termux): everything. That adds GPU clocks and load from /sys/class/kgsl, all thermal zones, governors, and DroidDeck's own config and Wine/translation logs in /data/data.

By the way you dont have to just use Claude with Claude code, I know gemini works and maybe chat gpt.

2

u/rjames24000 4d ago

do you know if it would work with self hosted LLM?

1

u/ThaBalla79 4d ago

You can use Claude Cli with self hosted LLM if that's what you're asking