AppManager icon indicating copy to clipboard operation
AppManager copied to clipboard

OnePlus Nord 4 - not able to connect

Open StormProductionsMusic opened this issue 2 months ago • 1 comments

Describe the existing feature/documentation

Connecting via any methods available in the app

Describe your problem(s)

I'm not able to connect via any of the methods in the app:

  • Wireless debugging: After pairing and entering the code in the notification, it stays stuck for 2-3 minutes on "Connecting via Wireless debugging", then asks for the port that it usually automatically retrieves, then stays stuck again for 2-3 minutes before saying it couldn't connect.

Tried connecting via Wireless debugging on my PC and pasting the commands in the app, the server has started but no changes happened in the app.

ADB over TCP stays stuck same as Wireless;

And root is not present on my phone at all.

Can someone please guide me, am I doing something wrong, or are OnePlus devices not compatible with the app at all?

Thanks!

Additional context

No more context - everything is in the field above.

StormProductionsMusic avatar Oct 29 '25 12:10 StormProductionsMusic

Alright — since adb tcpip / adb connect and all the usual commands truly didn’t change anything, we’re now squarely at the diagnostic + advanced workaround stage. I’ll give you a compact, actionable plan you can run right now (PC + USB), plus a couple of advanced tricks that sometimes succeed on OxygenOS devices, and exact log commands to collect proof for a OnePlus bug report if nothing works.

Do the diagnostic steps below in order and paste the outputs if you want me to read them and point to the exact failure line.


  1. Quick checks — confirm current adbd binding & properties

Run these on the PC (with phone connected via USB and adb authorized):

confirm device

adb devices

check adb tcp prop

adb shell getprop service.adb.tcp.port adb shell getprop persist.adb.tcp.port

check adbd process & SELinux mode

adb shell ps -A | grep adbd adb shell getenforce

check listening sockets (use toybox/netstat or ss)

adb shell "toybox netstat -an | grep 5555 || ss -ltnp | grep 5555 || netstat -an | grep 5555"

What to look for

getprop service.adb.tcp.port should be 5555 after adb tcpip 5555.

netstat/ss output should show either 0.0.0.0:5555 or :::5555 LISTEN.

If you only see 127.0.0.1:5555 LISTEN — adbd is bound to loopback only (this is the exact OnePlus problem).


  1. If it’s bound to 127.0.0.1 (loopback) — test a workaround: USB tethering (quick)

Sometimes OxygenOS binds adbd to loopback but will listen on the USB-tether/host interface. USB tethering makes the phone appear on your PC network and sometimes forces adbd to listen on that interface.

  1. On the phone: Settings → Network & Internet → USB tethering (enable).

  2. On PC run:

find PC-visible device IP (example look)

adb shell ip -f inet addr show usb0 || adb shell ip addr show

try to connect from PC to that ip

adb connect <phone_usb_tether_ip>:5555

If adb connect succeeds, great — you have a wireless-like connection via the USB-tether network and can then unplug USB and try a normal adb connect to wifi IP. If it fails, continue.


  1. Try forcing adbd to bind to all interfaces (repeat safely)

Run these (you said they ran commands, but try in this exact order and capture outputs):

adb root adb shell setprop service.adb.tcp.port 5555 adb shell stop adbd adb shell start adbd adb shell getprop service.adb.tcp.port adb shell "toybox netstat -an | grep 5555 || ss -ltnp | grep 5555 || netstat -an | grep 5555"

Notes:

adb root may fail on non-rooted builds. If it fails, ignore adb root and continue.

If netstat still shows only 127.0.0.1:5555 — the system is intentionally limiting adbd to loopback.


  1. Capture adbd / system logs while reproducing the connect

This is the single most useful thing to attach to a bug report or to analyze why the socket never opens.

Run this on PC, then immediately attempt adb connect :5555 from another shell (or from the phone) while these logs are recorded:

save logcat focusing on adbd and system events

adb logcat -c adb logcat -v threadtime > adbd-logcat.txt &

also capture kernel dmesg/messages (a few seconds)

adb shell dmesg > adbd-dmesg.txt

capture iptables/nft rules (to detect drops)

adb shell su -c "iptables -L -n -v" > iptables.txt 2>/dev/null || adb shell "iptables -L -n -v" > iptables.txt 2>/dev/null

capture properties & socket listing

adb shell getprop > props.txt adb shell "toybox netstat -an | grep 5555 || ss -ltnp | grep 5555 || netstat -an | grep 5555" > sockets.txt

Collect these files and either paste the relevant parts here (adbd error lines from adbd-logcat.txt) or attach them to OnePlus/Issue tracker.

Key log lines we want to see: anything with adbd, reject, bind, permission denied, SELinux, or iptables DROP messages.


  1. Advanced: check SELinux denies

If getenforce returned Enforcing, SELinux might be blocking the bind. Capture SELinux denials:

adb shell dmesg | grep -i avc > selinux_avc.txt adb shell su -c "ausearch -m avc -ts recent" > ausearch.txt 2>/dev/null || true

If you see AVC denial messages referring to adbd or socket, that proves the system intentionally blocks it. (If you don’t have ausearch, dmesg sometimes contains the denies.)


  1. If you have root (Magisk): quick permanent fix

If the phone is rooted, one of these works almost always:

  1. Install the Magisk module ADB Insecure (or patch adbd to bind 0.0.0.0).

  2. Or run:

adb shell su -c "setprop persist.adb.tcp.port 5555 && stop adbd && start adbd"

Root eliminates OxygenOS sandboxing and adbd will bind correctly to Wi-Fi.


  1. If nothing above makes adbd bind to 0.0.0.0 — final options

Use Shizuku via USB once (keeps app privileges and avoids wireless pairing entirely). This is not “wireless” but achieves the goal of letting App Manager run without constant PC. (I can give exact commands again.)

Use PC as the primary access point — keep a persistent USB connection if you must manage the phone remotely.

Collect logs and file a OnePlus bug (attach the log files from step 4). This is the only way to get a firmware-level fix.

I can also prepare a ready-to-send bug-report template including the exact commands you ran and placeholders for the log outputs — paste the lines you collected and I’ll format it.


TL;DR (What your outputs will tell you)

If netstat shows 0.0.0.0:5555 → ADB-over-TCP should work. If still failing, it’s network/firewall on PC or router.

If 127.0.0.1:5555 only → OxygenOS is binding adbd to loopback (system block). You need root or an OTA fix.

If logs show SELinux / iptables denies → OnePlus patch required (or root to bypass).


If you want, I’ll:

  1. Give you a single 1-click script to run the diagnostic commands and collect logs into a zip, or

  2. Format the bug report message for OnePlus/GitHub and insert the log snippets (paste the snippet outputs here).

Which of those two do you want right now? (I can also just produce the script and the report text at once.)

kirt717n-cyber avatar Nov 02 '25 09:11 kirt717n-cyber