Skip to content

Instantly share code, notes, and snippets.

@kairusds
Last active March 24, 2023 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kairusds/1d4e32d3cf0d6ca44dc126c1a383a48d to your computer and use it in GitHub Desktop.
Save kairusds/1d4e32d3cf0d6ca44dc126c1a383a48d to your computer and use it in GitHub Desktop.
Instructions for connecting Termux's android-tools adb to the current device via Wireless debugging and fixing phantom process killing

Install android-tools if you haven't already:

pkg update ; pkg upgrade
pkg install android-tools

adb pair ipaddr:port

Where ipaddr:port is taken from the menu shown after clicking from Developer options > Wireless debugging > Pair device with pairing code. Use splitscreen to show the Wireless debugging setting below the Termux app when pairing.


After pairing successfully, run the following commands to either connect or disconnect:

adb connect ipaddr:port

adb disconnect

Where ipaddr:port is shown in the Wireless debugging menu as IP address & Port.

After Termux has connected via Wireless debugging, run the command below to fix phantom process killing. (Android 12L and above)

adb shell "settings put global settings_enable_monitor_phantom_procs false"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment