AI SMART HUB· Guide
Phones · Chapter 9/14

Phones: control a whole rack of Android phones from your PC

Turn on USB debugging, connect ADB, the connection assistant that finds problems, shared commands for the whole rack, the full Box Phone inside the tool, proxies for phones and the phone command reference.

3 min read · updated Nov 20, 2026

The phone features run scripts on real Android phones plugged into the PC by USB: 15 phones at once, and one phone failing does not affect the others.

How it works

PartWhat it isThink of it as
ADBThe "talk line" between the PC and the phone over USBA phone line
uiautomator2A small app installed on the phone that lets the tool read the screen as text and tap / type / swipe like a fingerSomeone who reads the screen and taps for you
ThreadEach phone runs its own threadOne worker per phone
ScriptA list of steps, like a browser scriptA work instruction sheet

Strong point: the tool finds buttons by text (e.g. Log In|Đăng nhập), so it taps correctly on phones with different resolutions.

Preparation (once)

  1. On every phone: Settings → About phone → tap Build number 7 times to unlock Developer options → turn on USB debugging. If there is USB debugging (Security settings), turn it on too.
  2. Better turn off the PIN / screen lock so the tool can unlock the phone.
  3. Plug in the cable. The phone asks "Allow USB debugging?" → tick Always allow → OK.
💡 On first connection the tool installs a small app and the AdbKeyboard keyboard on the phone (so it can type Vietnamese). That is normal.

The Phones page in the tool

Connection & shared commands tab

  • The connection assistant checks each step and writes the fix right below any failing one: is there a box_phone folder, are the libraries installed, is ADB running, are phones visible.
  • Phone "not allowed": unlock the screen → tick Always allow. Phone "disconnected": replug, change the port, or Restart ADB.
  • Phone table: phone name, serial, status, battery.
  • Shared commands for all or one phone: 💡 Wake, 🌙 Screen off, 🏠 Home, ◁ Back, 🔋 Battery, Open link.

Box Phone (full) tab: click it and the tool starts Box Phone in the background and shows its whole interface inside the page (5–15 seconds the first time). Here you write phone scripts, Scan screen (lists every button / text / input visible), run and read reports.

⚠ Don't run phone scripts in 2 places at once (the page in the tool and the separate Box Phone window).

Proxies for phones

Phones cannot fill in proxy user/password themselves, so the PC sits in between and does it:

  1. Paste proxies, one per line: line 1 for phone 01, line 2 for phone 02… Or add a PROXY column to the account file.
  2. Pick how to connect: Over USB (recommended, no shared wifi needed) or Over wifi (the phone uses PC IP:port).
  3. Test proxy → Assign proxy to selected phones. The tool sets the proxy on the phone and prints the IP the phone will use.
  4. Closing the tool removes the proxies. If the PC shuts down suddenly the phones lose internet: reopen the tool and press Remove proxy or Assign again.

Scripts have commands to assign a proxy, remove it and check the IP, so you can be sure each phone uses the right proxy.

Account data for phones

Excel / CSV file: column MAY = phone number (01, 02…), other columns depend on the job (EMAIL, PASS, LINK…). Leave MAY empty and accounts are shared out in phone order. In scripts use {@EMAIL}, {$variable}, {may}.

Phone command reference

Read from the installed Box Phone (51 commands):

📱 Apps · 7 commands

Open appopen_appNEW

Open an installed app. Don't know the package name? Press « 📱 Pick app on test phone » to search a list, or open the app by hand on the test phone and press « Get RUNNING app ».

App (package name)Pause afterwards (seconds, e.g. 1 or 1-2)
Close appclose_appNEW

Force-close the app (like swiping it away in recents).

App (package name)
Clear app dataclear_appNEW

Clearing app data = logged out, like a fresh install.

App (package name)
Uninstall appuninstall_appNEW

Uninstall the app from the phone.

App (package name)
Install APK from PCinstall_apkNEW

Install an .apk from the PC onto the phone. Skipped if already installed.

APK filePackage name (to check if installed)
Install app from Play Storeinstall_storeNEW

Opens the Play Store, taps Install, waits for it to finish.

App (package name)Wait at most (seconds)
Open linkopen_linkNEW

Open a link. Choose an app to open it there directly (e.g. discord.gg links in Discord).

LinkOpen with app (blank = phone decides)Pause afterwards (seconds, e.g. 1 or 1-2)

👆 Tap & type · 12 commands

Tap buttontapNEW

Tap a button / text / field. Press 🎯 to pick it on the test phone's screen, or 📷 to click on a screenshot.

Wait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
Long presslong_tapNEW

Long-press a button (opens menus…).

Hold for (seconds)Wait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
Type into fieldtypeNEW

Tap a field then type. From the account file: {@EMAIL}, {@PASS}…; from a variable: {$name}. No field chosen = type into the focused field.

Text to typeClear the field firstPress Enter after typingHide text in the log (passwords)Wait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
Type from Excel (by column)type_excelNEW

Each phone types one line of one COLUMN of the Excel/CSV: phone 01 → 'From line', phone 02 → next line… E.g. 15 phones, From line 1 → lines 1-15; From line 16 → lines 16-30. Line 1 = right below the header row.

Excel / CSV fileSheet (blank = first sheet)Column nameFrom line (phone 01 takes this line)Account index on the phone / batch index (inside a LOOP write {$clone}How to split lines when each phone has several accountsPhones per batch (batch mode)Accounts per phone (per-phone mode)Clear the field firstPress Enter after typingHide text in the log (passwords)Save the typed text to a variable (reuse with {$name})Wait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
Tap IMAGEtap_imageNEW

For apps whose buttons can't be read (games, drawn UIs…): the tool keeps taking screenshots and taps the centre of the template when found. Press ✂ to crop a template from the test phone's screen.

Template image (cropped from test phone)Minimum similarity (%)Search only in region % (x1,y1,x2,y2 — blank = whole screen)Tap offset (px, e.g. 0,40 = 40px lower)Wait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
Swipe screenswipeNEW

Swipe to scroll / switch tabs.

DirectionTimesPause between tries (seconds)Swipe FROM point (optional, e.g. 8%,80%)Swipe TO point (optional, e.g. 8%,20%)Duration of one swipe (seconds, larger = slower, blank = 0.35)
Swipe until seenscroll_findNEW

Keep swiping until the text / button appears (long lists).

Swipe directionSwipe at most (times)Tap it once seenSwipe FROM point (optional, e.g. 8%,80% = left column)Swipe TO point (optional, e.g. 8%,20%)Duration of one swipe (seconds, larger = slower, blank = 0.35)OR stop when this template IMAGE is seen (optional, e.g. a + sign)Image similarity (%)Search image only in region % (x1,y1,x2,y2, e.g. 0,0,20,100 = left colIf this text appears = wrong tap → auto Back (e.g. Edit Profile)
Press keypressNEW

Press one key (all PC keyboard keys + phone keys + Ctrl/Shift/Alt combos). Type a few letters in the Key box to filter (e.g. 'ctrl', 'arrow', 'f5'). Other combos can be typed by hand, e.g. ctrl+shift+t.

KeyHow many presses
Back buttonbackNEW

Press the Back button (◁).

Times
Home buttonhomeNEW

Go to the home screen.

Lock screen rotationrotateNEW

Lock the screen to PORTRAIT (or landscape); apps can't rotate it. Pick 'Auto rotate' to restore. Best placed at the start of the script.

Screen orientation
Wake + unlockwakeNEW

Turn the screen on and swipe up to unlock (phone without a passcode).

⏳ Wait · 4 commands

Wait for IMAGEwait_imageNEW

Wait until the template image appears (no tap). Reports an error on timeout.

Template image (cropped from test phone)Minimum similarity (%)Search only in region % (x1,y1,x2,y2 — blank = whole screen)Wait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
Pause (seconds)waitNEW

Pause a few seconds. '2-4' = random 2 to 4 seconds to look human.

Seconds (e.g. 3 or 2-4)
Wait until seenwait_forNEW

Wait until the screen shows this text / button (e.g. wait for a page to load).

Wait at most (seconds)
Wait until gonewait_goneNEW

Wait until this text / button disappears (e.g. 'Loading').

Wait at most (seconds)

🔀 Conditions & loops · 13 commands

IF seenif_existsNEW

Run the steps below only IF the screen shows this text / button. The tool adds END IF after it.

Wait at most (seconds)
IF IMAGE seenif_imageNEW

Run the steps below IF the screen shows this template image. The tool adds END IF after it.

Template image (cropped from test phone)Minimum similarity (%)Search only in region % (x1,y1,x2,y2 — blank = whole screen)Wait at most (seconds)
IF IMAGE NOT seenif_no_imageNEW

Run the steps below IF the screen does NOT show this template image.

Template image (cropped from test phone)Minimum similarity (%)Search only in region % (x1,y1,x2,y2 — blank = whole screen)Wait at most (seconds)
IF NOT seenif_missingNEW

Run the steps below only IF this text / button is NOT seen.

Wait at most (seconds)
IF phone has appif_appNEW

Run the steps below if this app is installed.

App (package name)
IF phone lacks appif_no_appNEW

Run the steps below if the app is NOT installed (e.g. to install it).

App (package name)
IF variable …if_varNEW

Compare a variable (from a 'Read text into variable' step).

Variable nameConditionCompare value
ELSEelseNEW

Place between IF … and END IF: the steps after it run when the condition is FALSE.

END IFend_ifNEW

Closes the IF block.

LOOP N timesrepeatNEW

Repeat the steps below N times. The tool adds END LOOP after it. Inside the loop: {$lap} = pass 1, 2, 3…; {$lap0} = 0, 1, 2… (put it in 'Index' so pass 1 taps the first, pass 2 the second…); {$lap_ten} = blank, 1, 2… (e.g. Discord{$lap_ten} → Discord, Discord1, Discord2).

Times (up to pass)Start from pass (blank = 1)
END LOOPend_repeatNEW

Closes the loop.

Break loopbreakNEW

Leave the LOOP immediately.

Auto-dismiss surprise popupsauto_closeNEW

Place once at the START of the script. From then on, whenever the tool is looking for a button and sees a popup with this text (e.g. Protections for Teens), it taps the dismiss button (e.g. Got It) and carries on.

When this text is seen (separate several with |)Then tap the button with this text (separate with |) — write back = prOr tap coordinates (when there is no text button, e.g. 50%,15%)

📦 Data & variables · 9 commands

Read text into variableget_textNEW

Read the text of an on-screen element into a variable, reuse it with {$name}.

Save to variable namedWait at most (seconds)
Set variableset_varNEW

Assign a value to a variable, reuse it with {$name}.

Variable nameValue
Get 2FA codetotpNEW

Generate the 6-digit code from the 2FA secret (SECRET column of the account file), save it to {$otp}.

2FA secretSave to variable
2FA code from Excel (by column)totp_excelNEW

Take the 2FA SECRET from an Excel column (phone 01 → 'From line', phone 02 → next line…), compute the 6-digit code, save it to a variable (default {$otp}). Tick 'Type right away' to type it into a field now, or use 'Type into field' with {$otp} in a later step.

Excel / CSV fileSheet (blank = first sheet)Column holding the 2FA secretFrom line (phone 01 takes this line)Account index on the phone / batch index (inside a LOOP write {$clone}How to split lines when each phone has several accountsPhones per batch (batch mode)Accounts per phone (per-phone mode)Save code to variableType the code into the field right away (pick the field above)Clear the field firstPress Enter after typingWait for a fresh code if under (seconds) leftWait at most (seconds)Pause afterwards (seconds, e.g. 1 or 1-2)
ScreenshotscreenshotNEW

Take a screenshot into the anh_chup/ folder.

File name (blank = automatic)
Write loglogNEW

Write one line to the log (for tracking).

Content
Write report (CSV file)reportNEW

Append one line to bao_cao/<file>.csv (time, phone name, serial added automatically). Separate columns with | ; variables allowed, e.g. {$clone}|{$link}|OK.

Report file nameContent (columns separated by |)
Toast on phonenotifyNEW

Show a toast on the phone (e.g. a reminder to do something by hand).

Content
ADB command (advanced)shellNEW

Run any adb shell command (for advanced users).

CommandSave result to variable (optional)

🌐 Network & proxy · 4 commands

Attach proxyset_proxyNEW

Attach a proxy to the phone (by phone number in the Proxy tab, or the PROXY column of the account file).

Own proxy (blank = by phone number)No proxy = use the real networkCheck IP after attaching
🔄 Rotate proxy IP (every N accounts)rotate_proxyNEW

Place at the START of each account: once an IP served N accounts, call the provider API to change IP, wait for the new one, check for duplicates with other phones. Set token / N on Proxy page → Rotate proxy. IP saved to {$ip}.

Rotate every N accounts (blank = Proxy page setting)Always rotate (ignore account count)Extra pause after rotating (seconds)Save IP to variableOwn proxy (blank = by phone number)
Remove proxyclear_proxyNEW

Remove the proxy, the phone uses its real network.

Check phone IPcheck_ipNEW

Open an IP-check page in Chrome on the phone, save it to {$ip_may}.

Expected IP (blank = don't compare)Save to variable

🏁 End · 2 commands

END: OKdoneNEW

Stop this phone and report SUCCESS.

Note
END: ERRORfailNEW

Stop this phone and report ERROR with a reason.

Reason

Honest limits

  • Captchas inside apps (hCaptcha…) are not solved automatically yet; a script can wait for you to solve it by hand and then continue.
  • Many accounts on the same wifi / IP get flagged easily. Use a separate 4G SIM or a proxy per phone.
© 2026 AI Smart Hub · Automate Intelligence. Elevate Possibilities. · Updated Nov 20, 2026
Home · Blog · Terms · Zalo · Telegram