Repository navigation
Usage Guide Physical Device
This guide applies to non-rooted Android phones. There are two setups:
- NKAS on PC + game on Android phone (recommended)
- NKAS on Android phone + game on Android phone (in testing)
How it works: NKAS runs on the PC and connects to the phone over adb (USB or wireless debugging); all screenshots and control go through the adb channel.
- Go to Settings → About phone.
- Tap Build number about 7 times until you see "You are now a developer".
Open Developer options and turn on debugging. There are three ways to connect; pick one:
💡 Run all adb commands below in the NKAS Console: sidebar System → Console. The console is off by default; enable it first on the Deploy page via the "Enable Web Console" switch.
- Turn on Wireless debugging.
- Open the wireless debugging details page and note the IP address and port (e.g.
192.168.1.65:39165). - Enter that
IP:portas the Serial in NKAS; NKAS will runadb connectautomatically.
⚠️ The wireless debugging port is random: it changes every time you toggle wireless debugging off and on. If the connection fails, check the current port on the phone first.
- Connect the phone to the PC with a USB cable.
- Turn on USB debugging.
- When the phone asks "Allow USB debugging?", check Always allow and confirm.
- Verify the connection in the NKAS Console:
It works if the device appears with status
adb devicesdevice, for example:If the status isList of devices attached 0123456789ABCDEF deviceunauthorized, the authorization prompt on the phone has not been confirmed yet; if it isoffline, replug the cable or try another one. - Enter the serial shown by
adb devices(0123456789ABCDEFin the example) as the Serial in NKAS.
Older phones (Android 10 and below) have no Wireless debugging toggle. You can switch adbd to TCP mode with adb tcpip instead; the port is fixed at 5555 and does not change:
- Connect the phone over USB as in Option 2 and confirm it shows up in
adb devices. - Switch adbd to TCP mode in the console:
adb tcpip 5555restarting in TCP mode port: 5555means success. - Unplug the USB cable. The phone and the PC must be on the same LAN (same WiFi).
- Find the phone's LAN IP: Settings → WLAN → tap the connected WiFi (e.g.
192.168.1.65). - Connect in the console:
adb connect 192.168.1.65:5555connected to 192.168.1.65:5555means success. - Run
adb devicesagain to confirm; the list should show192.168.1.65:5555 device. - Enter
192.168.1.65:5555as the Serial in NKAS (use your phone's actual IP).
⚠️ TCP mode does not survive a phone reboot: after rebooting, reconnect over USB and runadb tcpip 5555again.
⚠️ Wireless connections require the phone and PC on the same LAN; if it fails, check whether the phone IP changed and whether both are on the same network.
Go to Instance → NKAS (⚙️) → Emulator/Device in the sidebar:
ADB Settings group:
| Setting | What to enter on a physical device |
|---|---|
| Serial | Option 1: IP:port from the wireless debugging page; Option 2: the USB serial; Option 3: the IP:5555 used with adb connect
|
| Screenshot Method | ADB |
| Control Method | MaaTouch (recommended) / uiautomator2 (requires installing uiautomator2) |
Physical Device group:
- Enable physical device mode: turn on.
- Auto restore resolution on stop: recommended to keep on; see the next section.
- Resolution control: the "Set resolution" / "Restore resolution" buttons switch manually.
In-game settings:
Same as the emulator version — set the language to Simplified Chinese and enable Bloom and Color Grading (see the game settings section of the Emulator Guide).
NKAS templates and coordinates are based on 720x1280 @ 240dpi. On a physical device the workflow is:
-
When the instance starts: the phone resolution is automatically set to
720x1280, DPI240. -
When the instance stops:
wm size reset+wm density resetrestore the native resolution automatically.
⚠️ Changing the resolution kills foreground apps. If the game is already in the foreground, starting the script will cold-start it — the correct order is to start NKAS first and let the script launch the game itself. Stopping the script also reloads a running game when the resolution is restored.
- Auto-unlock: not supported yet.
(In testing)