Android Physical Devices
Android Physical Devices
Warning
This method involves ADB command-line usage, has lower stability, and still requires computer connection. Not recommended for beginners.
Note
- Please also refer to Connection Settings.
- Starting from Android 10, Minitouch is no longer available when SELinux is in
Enforcing
mode. Please switch to other touch modes, or temporarily switch SELinux toPermissive
mode. - Due to the extreme complexity of the Android ecosystem, try changing the
Connection Configuration
in MAASettings
-Connection Settings
toGeneral Mode
,Compatibility Mode
,2nd Resolution
, orGeneral Mode (Block Exception Output)
until one mode works properly. - Since MAA only supports
16:9
aspect ratios, devices with non-16:9
or9:16
screen ratios (including most modern devices) need to have their resolution forcibly changed. If your device's native screen ratio is16:9
or9:16
, you can skip theChange Resolution
section. - Switch your device's navigation method to something other than
Full Screen Gestures
, such asClassic Navigation Keys
, to avoid accidental operations. - Please set the
Notched Screen UI Adaptation
option in the game settings to 0 to avoid task errors.
Tips
Typical 16:9
resolutions include 3840x2160
(4K), 2560x1440
(2K), 1920x1080
(1080P), and 1280x720
(720P).
Download and Run ADB Debug Tool to Connect Device
Download ADB and extract it.
Open the extracted folder, clear the address bar, type
cmd
, and press Enter.In the command prompt window that appears, type
adb
. If you see extensive help text, the command ran successfully.Enable
USB Debugging
on your phone. The process varies by manufacturer, so use a search engine to find instructions. Manufacturers may provide additional USB debugging options, such as MIUI'sUSB Installation
andUSB Debugging (Security Settings)
- enable these too.Connect your phone to the computer with a data cable and enter the following command in the command prompt:
adb devices
When executed successfully, it will show connected USB debugging devices.
Example of a successful connection:
List of devices attached VFNDU1682100xxxx device
The alphanumeric combination before
device
is the device serial number, which is also your MAAConnection Address
.
Modern Android devices require authorization on the device itself. Without authorization, you'll see:
List of devices attached VFNDU1682100xxxx unauthorized
If you consistently get "unauthorized" or "offline" status, restart both your device and computer. If that doesn't help, delete the
.android
folder in your user's personal directory and try again after restarting. Use search to find the exact location.
Change Resolution
Tips
Mobile screen resolution is specified as short edge × long edge
, not long edge × short edge
as with computer monitors. Determine the appropriate values for your specific device.
If you only have one device in your device list, run these commands to change/restore resolution:
# View current resolution adb shell wm size # Restore default resolution adb shell wm size reset # Change to 720p adb shell wm size 720x1280 # Change to 1080p adb shell wm size 1080x1920
If you have multiple devices, add the parameter
-s <target device serial number>
betweenadb
andshell
:# View current resolution adb -s VFNDU1682100xxxx shell wm size # Restore default resolution adb -s VFNDU1682100xxxx shell wm size reset # Change to 720p adb -s VFNDU1682100xxxx shell wm size 720x1280 # Change to 1080p adb -s VFNDU1682100xxxx shell wm size 1080x1920
Some apps with irregular designs may still have layout issues after resolution restoration. Usually, restarting the app or device resolves this.
Warning
Strongly recommended to restore the default resolution before restarting your device. Otherwise, depending on your device, unpredictable consequences may occur, including layout chaos, touch misalignment, app crashes, inability to unlock, etc.
Automate Resolution Changes
Create two text files in the MAA directory with the following content:
# Adjust resolution to 1080p adb -s <target device serial number> shell wm size 1080x1920 # Lower screen brightness (optional) adb -s <target device serial number> shell settings put system screen_brightness 1
# Restore resolution adb -s <target device serial number> shell wm size reset # Increase screen brightness (optional) adb -s <target device serial number> shell settings put system screen_brightness 20 # Return to home screen (optional) adb -s <target device serial number> shell input keyevent 3 # Lock screen (optional) adb -s <target device serial number> shell input keyevent 26
Rename the first file to
startup.bat
and the second tofinish.bat
.- If no confirmation dialog appears when changing the extension and the file icon doesn't change, search for "How to show file extensions in Windows."
In MAA's
Settings
-Connection Settings
, setStart Script
tostartup.bat
andEnd Script
tofinish.bat
.
Connect to MAA
Wired Connection
Tips
Wired connections don't need IP addresses or ports - just the device serial number from adb devices
.
- Enter the target device serial number from above into MAA's
Settings
-Connection Settings
-Connection Address
. - Link Start!
Wireless Connection
- Ensure your device and computer are on the same network and can communicate with each other. Router settings like
AP Isolation
orGuest Network
can block device communication - check your router documentation. - Wireless debugging is disabled after device restart and must be re-enabled.
Using adb tcpip
for Wireless Debugging
In the command prompt, enable wireless debugging:
adb tcpip 5555 # Add -s parameter to specify the serial number if multiple devices are connected
Find your device's IP address:
- Go to your phone's
Settings
-Wi-Fi
, tap the connected network to view the IP address. - The location varies by manufacturer - search for instructions if needed.
- Go to your phone's
Enter
<IP>:5555
in MAA'sSettings
-Connection Settings
-Connection Address
, e.g.,192.168.1.2:5555
.Link Start!
Using adb pair
for Wireless Debugging
Tips
adb pair
wireless pairing (available in Android 11 and later via Developer Options) allows connection without a physical USB connection, unlike adb tcpip
.
On your phone, go to Developer Options, tap
Wireless Debugging
and enable it. TapPair device with pairing code
and keep the popup open until pairing completes.Complete the pairing:
- In the command prompt, type
adb pair <IP address and port shown in the device popup>
and press Enter. - Enter the six-digit pairing code from the device popup and press Enter.
- When you see
Successfully paired to <IP:port>
, the device popup will close automatically, and your computer's name will appear in the paired devices list.
- In the command prompt, type
Enter the IP address and port shown on your device screen into MAA's
Settings
-Connection Settings
-Connection Address
, e.g.,192.168.1.2:11451
. This is different from the address used for pairing.Link Start!
Using Root to Enable Wireless ADB
If you have access to root, why do you need to read this document
- Download, install WADB and grant it root privileges. 2.
- Open WADB and start wireless adb. 3.
- Put the IP address and port provided by WADB into MAA
Settings
-Connection
-Connection Address
, such as192.168.1.2:5555
. - Link Start!