← All posts

Frida on a Cloud Android Phone: Hook Any App at Runtime (2026)

Oct 05, 2026 · By Xavier Fok

Frida lets you hook into a running app and rewrite its behaviour from the outside, no recompiling, no patched APK. It’s the tool you reach for when you want to see what an app is really doing at runtime. It works fine against a real cloud phone, but a remote device adds a couple of wrinkles around how frida-server is reached and how apps detect instrumentation. Here’s the practical setup.

I run a real cloud phone farm, so this is the version for a genuine Android device on a real SG mobile IP, not an emulator that half the apps you’d want to study refuse to run on in the first place.

why a real device beats an emulator here

A lot of the apps worth instrumenting are exactly the ones that detect emulators and bail. Banking apps, fraud SDKs, anti-cheat, region-locked apps, they check the build fingerprint, the sensors, the CPU. On an emulator you never even get to the screen you wanted to hook. On a real cloud phone the app runs normally, because the device is a normal phone, so you can actually attach to the live process and watch it work.

what you need on the phone

Frida has two halves: the frida tools on your machine, and frida-server running on the phone. The server needs to run with enough privilege to inject into other processes, which in practice means a rooted device or a debuggable target app.

Install the client side first:

pip install frida-tools
frida --version    # note this version exactly

The frida-server build on the phone has to match your client version. A mismatch is the single most common failure, and it shows up as a vague “unable to connect” rather than a clear version error. Pull the matching frida-server for the device architecture (usually arm64) and push it over network adb.

push frida-server over network adb

You’re not plugged in, so everything goes over the adb connection you opened to the cloud phone:

adb connect <phone-host>:<adb-port>
adb -s <phone-host>:<adb-port> push frida-server-<ver>-android-arm64 /data/local/tmp/frida-server
adb -s <phone-host>:<adb-port> shell "chmod 755 /data/local/tmp/frida-server"
adb -s <phone-host>:<adb-port> shell "su -c /data/local/tmp/frida-server &"

That last line backgrounds the server. On a rooted device it listens on port 27042 inside the phone. The question is how you reach it from your laptop, and that’s the remote wrinkle.

reaching frida-server across the network

frida-server listens on the phone’s loopback by default, so you can’t hit it directly across the internet. Two clean options:

The first is to ride adb, which already has a tunnel to the device. Forward the Frida port through adb and talk to localhost:

adb -s <udid> forward tcp:27042 tcp:27042
adb -s <udid> forward tcp:27043 tcp:27043
frida-ps -H 127.0.0.1:27042

Forward both 27042 and 27043. Frida uses the second port for some session traffic, and forgetting it gives you a process list that works but sessions that hang.

The second option is to start frida-server bound to all interfaces with -l 0.0.0.0, but only do that on a device you trust on a network you control, because it opens injection to anything that can reach the port. Through adb forwarding is the safer default.

your first hook

Here’s a small script that hooks a Java method and logs every call with its argument and return value. Save it as hook.js:

Java.perform(function () {
  const Target = Java.use("com.example.app.Crypto");
  Target.encrypt.overload("java.lang.String").implementation = function (input) {
    console.log("[+] encrypt called with: " + input);
    const result = this.encrypt(input);
    console.log("[+] encrypt returned: " + result);
    return result;
  };
});

Attach it to the running app through the forwarded port:

frida -H 127.0.0.1:27042 -n com.example.app -l hook.js

Or spawn the app fresh so you catch early startup logic, which is where a lot of detection and key setup lives:

frida -H 127.0.0.1:27042 -f com.example.app -l hook.js --no-pause

-f spawns and --no-pause lets it run immediately. Use spawn mode when the thing you want to hook happens before you could ever attach by hand.

the gotchas, ranked by how often they bite

Symptom Cause Fix
“failed to spawn / unable to connect” client and server versions differ match frida --version to the server build exactly
frida-ps works but sessions hang only port 27042 forwarded also adb forward port 27043
app crashes on launch under Frida app detects frida-server rename the server binary, use a non-default port
“su: not found” device not rooted use a rooted device or a debuggable build of the target
process not in the list app not running yet use -f spawn mode instead of -n attach

detection, honestly

Some apps look for Frida. They scan for the default port 27042, the process name frida-server, or threads named gum-js-loop. If the app dies the instant you attach, that’s what’s happening. The usual countermeasures are to rename the server binary, run it on a non-standard port, and use spawn mode with an early anti-detection hook. This is an arms race and I’m not going to pretend there’s a permanent answer. What I will say is that a real device gets you past the first wall, the emulator check, which is the one that stops most people before they even get to the Frida question.

why the network setup is worth it

The payoff of doing this on a cloud phone instead of a handset on your desk is that the device is persistent and you can leave frida-server running, reconnect tomorrow, and pick up the same session state. And because it’s a real SG device on a real mobile IP, region-gated apps actually load, so you can instrument the Singapore build of an app from anywhere.

where cloudf.one fits

All of this assumes a real Android device you can adb into and, for Frida, root on. That’s what we run at cloudf.one: real phones in Singapore on real SG mobile IPs, persistent and dedicated, reachable over adb. There’s a free trial on the cloudf.one home page if you want a device to push frida-server onto and start hooking. The code YT30 takes a bit off the first month.

The recipe: match your Frida versions, push frida-server over network adb, forward both ports through adb, and attach to localhost. The remote part is just the port forwarding; the hooking itself is ordinary Frida.

Get new guides and videos first — join the Telegram channel.

40% off until 31 December 2026
Real phones in Singapore, each with its own mobile IP.
Introductory price until 31 December 2026. A dedicated phone straight away, no queue.