Skip to content

Common issues

James Brown edited this page Aug 5, 2025 · 29 revisions

Why choose SWM?

SWM add additional features on top of scrcpy and adb. It is opinionated and dedicated to command line users.

Usually features provided by SWM are no where to be found yet.

With SWM, you can:

  • Display and control two apps from the same android phone simultaneously
  • Config IME preference per app, eliminating the need for complex manual IME switching
  • Utility scripts and commands simplifying your actions on Android, like the Termux shell

Therefore SWM is a unique tool for advanced Android users.

What is Gboard?

Gboard is Google keyboard, a proprietary app developed by Google that offers Desktop-like IME experience when used with a physical keyboard or scrcpy --keyboard=uhid mode.

I do not have root. What to do?

Technically not all features in SWM require root. It is planned to examine the phone thoroughly and check all functionalities at first run, so only supported features would be executed.

If you need all features of SWM, you can:

  • Go to Lineage OS homepage and find one capable of
  • Root your phone right now if it supports root
  • Bring your own Android simulator

Can I run SWM in Termux?

This is planned. You can check the TODO items in cli.py

You have so many TODO items, when will they get completed?

A TODO Kanban for SWM is underway.

What if SWM does not run?

Consider upgrade SWM by pip install -U swm-android.

If upgrade does not work, remove the baseconfig file at ~/.swm/config.json.

Run initialization by swm init.

Examine if all requirements for running SWM have met.

If all the steps above does not work, please create a new issue in this repo.

How to connect to a wireless/remote device?

It takes a bit of adb and scrcpy knowledge to get it right before connecting to remote or wireless devices.

SWM allows you to customize adb and scrcpy command line prefixes and additional environment variables, if you know what you are doing.

See this comment.

On macOS, psutil seems not functioning and showing up an error message containing "net_connections"

You would need root to list network connections of other processes on macOS using psutil.

This error message would be converted into warning in the future release, and will be eventually resolved if there is a way to find the control port of an active scrcpy session with a non-root user.

See this issue.

Are binaries downloaded by SWM safe to use?

Binaries are hosted on the GitHub release page of SWM in a centralized manner to ensure consistency and convenience.

However, the safety is not guaranteed since these files are not compiled by me, and have not undergone any virus or malware test.

Most binaries are coming from open source projects hosted on Github, except for Gboard, which is proprietary software developed by Google.

Will disclose source URLs in the release page soon.

Still unsure about the safety of SWM binaries, what to do?

If you are in doubt, you can prepare these files and put them into ~/.swm in the following order: (remember to make some of the files executable, or all of them by chmod -R 777 *).

apk
├── ADBKeyboard.apk
└── beeshell.apk
pc-binaries
├── adb
├── fzf
├── icon.png
├── scrcpy
├── scrcpy.1
└── scrcpy-server
android-binaries
├── aapt
│   ├── aapt-aarch64
│   └── aapt-armhf
└── aapt2
    ├── aapt2-aarch64
    └── aapt2-armhf
java-jar
└── bsh.jar
logo
└── logo.png

After you done preparing files on your own, run touch ~/.swm/.INITIAL_BINARIES_DOWNLOADED.

I have specified IME policy in app config, but IME is not showing up.

You may have to click the text area twice to enable specified IME.

If your configured IME is still not showing up, consider close the scrcpy window and relaunch the app.

The video performance seems to be poor.

Scrcpy streaming quality depends on three things:

  • The speed of USB-C port (or micro USB) on your phone
  • The speed of cable connecting your phone to PC
  • The speed of USB port on PC

For comparison, with the same Android phone setup (like OnePlus Ace 2V), a high grade cable (like ORICO 40Gbps USB-C to USB-C) connected to a recent MacBook (like MacBook Air M1, 2020) is usually better than a mid-range cable (like UGREEN USB-C to USB-A 3.0) connected to an average mini PC (like GMK N100).

You are encouraged to try multiple setups and find the best among them.

I don't have high-end gears. How to improve performance of SWM?

A variable FPS mechanism is planned. It requires SWM to alter streaming frame rate real time, by prioritizing the only focused window and diminishing others, which may requires recompiling scrcpy.

SWM fails to dump badging and shows 'CANNOT LINK EXECUTABLE "./aapt": library "libandroid-fw.so" not found: needed by main executable'

It means your Android phone lacks required files to run SWM provided aapt.

It could be resolved by either running aapt on PC after pulling APK from device, or fall back to default SWM icon.

In the future, you can also fix this issue by configuring "retrieve_app_icon: false" in app configuration (currently not working).

Fixes are underway.

I cannot launch any app in a new display using scrcpy. Can SWM do that?

SWM is just a thin wrapper around adb and scrcpy. It cannot do something the foundation binaries are uncapable of.

However it is possible to switch apps using SWM. You can run swm adb shell monkey -p <package-name> 1 for manual switching (may need multiple invocations). The dedicated switching command will be implemented in the near future.

It is recommended you to run swm scrcpy --list-apps to get one package id, and swm scrcpy --new-display --start-app=<package-id> to test functionality.

A test could be done based on these commands, and place a success/faliure flag to the Android device marking the functionality of multi-display app orchestration.

SWM may integrate this test in the near future.

Some apps fail to run in new display mode sometimes.

The underlying cause is largely unknown. scrcpy --new-display is an experimental feature built on top of Android experimental multi-display. Android is actively developing a Dex-like desktop environment. Both scrcpy and Android may get improvements overtime.

It is planned to fall back to main display launch mode when this error is detected.