Android Physical Devices
About 1366 wordsAbout 5 min
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 
Enforcingmode. Please switch to other touch modes, or temporarily switch SELinux toPermissivemode. - Due to the extreme complexity of the Android ecosystem, try changing the 
Connection Configurationin MAASettings-Connection SettingstoGeneral Mode,Compatibility Mode,2nd Resolution, orGeneral Mode (Block Exception Output)until one mode works properly. - Since MAA only supports 
16:9aspect ratios, devices with non-16:9or9:16screen ratios (including most modern devices) need to have their resolution forcibly changed. If your device's native screen ratio is16:9or9:16, you can skip theChange Resolutionsection. - 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 Adaptationoption 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 Debuggingon 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 InstallationandUSB 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 deviceThe alphanumeric combination before
deviceis 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 unauthorizedIf you consistently get "unauthorized" or "offline" status, restart both your device and computer. If that doesn't help, delete the
.androidfolder 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 1080x1920If you have multiple devices, add the parameter
-s <target device serial number>betweenadbandshell:# 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 1080x1920Some 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.
Warning
It is known that the Account Switching feature may not work properly on some physical devices. MAA primarily works in PC emulator environments, so there are no plans to fix this issue.
If you encounter this problem, you can modify the screen density (DPI) through any of the following methods (recommended value range: [100-800]):
- Use the command 
adb shell wm density <DPI>to directly modify the DPI - Adjust 
Developer Options → Minimum Widthto indirectly modify the DPI by changing theMinimum Width 
Note: DPI and Minimum Width are inversely proportional, with the conversion formula: Minimum Width = Screen Width(px) / (DPI / 160)
Be aware that this operation carries risks and may cause the device to malfunction. Please ensure you know what you are doing. You are responsible for any device failures.
It is strongly recommended to revert these changes before the next device reboot. If you forget the default values, regardless of which method was used to modify them, you can always use the command adb shell wm density reset to restore them.
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 26Rename the first file to
startup.batand 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 Scripttostartup.batandEnd Scripttofinish.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 IsolationorGuest Networkcan 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 connectedFind 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>:5555in 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 Debuggingand enable it. TapPair device with pairing codeand 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!
 
