Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
24
votes
7
answers
47727
views
Wireless Android debugging not working
I am using the Android Studio Chipmunk edition. My Android device is connected to the WiFi and my PC is connected to the same router through ethernet cable. My devices are running Android 12. So, it seems like I am fulfilling all the requirements. I was able to connect a few times and able to instal...
I am using the Android Studio Chipmunk edition. My Android device is connected to the WiFi and my PC is connected to the same router through ethernet cable. My devices are running Android 12. So, it seems like I am fulfilling all the requirements.
I was able to connect a few times and able to install apps wirelessly. However, I am failing now. One of the following two things happens each time:
- The QR scanner does not do anything when I scan the code as if it didn't recognize the QR code at all.
- The QR code is recognized and I get a message about the pairing taking a while.
I also tried using the six-digit code for pairing by none of my devices are showing up under "Available Wi-fi Devices".
What am I doing wrong?
Real Noob
(341 rep)
Aug 8, 2022, 09:43 AM
• Last activity: Jun 5, 2025, 06:56 PM
2
votes
2
answers
1024
views
Set static wireless debugging port on Android 14
I have 2 Android 14 phones. Both have Wireless Debugging enabled. Both are paired with the `adb` server PC. All devices are connected to the same WLAN. One of the phones always uses a static port in `IP Address & Port` menu entry. The other does not, it always randomizes the port. Network & Debug Ne...
I have 2 Android 14 phones. Both have Wireless Debugging enabled. Both are paired with the
adb
server PC. All devices are connected to the same WLAN. One of the phones always uses a static port in IP Address & Port
menu entry. The other does not, it always randomizes the port. Network & Debug Networking options are the same for both phones.
How to I make it keep the port static **on phone** (NOT with adb tcpip
, it will not work in this case at all)?
Phones:
1. OnePlus 8 Pro (instantnoodlep
, IN2020 CN
), Android security update 2024-09-05 - uses dynamic port
2. Motorola moto g(7) plus (lake
), Android security update 2024-09-05 - uses static port
tsilvs
(375 rep)
Oct 6, 2024, 08:36 PM
• Last activity: Mar 19, 2025, 04:49 PM
23
votes
5
answers
55030
views
How do you pair a Device for Wireless Debugging with a QR Code?
There doesn't seem to be much written on this, but I see an option to pair my device with a QR code scanner. Is there a way to pair my phone with my computer by generating a QR code on my computer and scanning it from my phone? I'm running Ubuntu 20.04. I'm using the Pixel 4a running Android 11. 
joshpetit
(341 rep)
Mar 8, 2021, 11:15 AM
• Last activity: Mar 7, 2025, 03:13 PM
1
votes
1
answers
2901
views
"Could not launch inspector studio.network.inspection" when using App Inspector on Android Studio Bumblebee 2021.1.1.1 with WiFi pairing
When we use a "pair device using WiFi" in Android Studio Bumblebee version 2021.1.1, in the "App Inspection" section, it gives us an error in reading the "Database". > Could not launch inspector studio.network.inspection: Inspector with given id studio.network.inspection already exists. It was launc...
When we use a "pair device using WiFi" in Android Studio Bumblebee version 2021.1.1, in the "App Inspection" section, it gives us an error in reading the "Database".
> Could not launch inspector studio.network.inspection: Inspector with given id studio.network.inspection already exists. It was launched by project: sap.
>
> This could happen if you launched the same inspector from two different projects at the same time, or if a previous run of the current project crashed unexpectedly and didn't shut down properly.
>
> [Restart]
Nothing happened after pressing the "Restart" button.
How to fix it?

Pouria Hemi
(111 rep)
Feb 20, 2022, 11:54 AM
• Last activity: May 22, 2024, 08:51 AM
2
votes
1
answers
303
views
Unable to connect via adb on a firewalled Android device
Connecting from Linux, using an older adb (downloaded at tried 1.0.41 just to troubleshoot this - no difference, except that the messages now do include "Connection refused"), and the devices runs Android 9. This has worked fine literally for years, but all of a sudden, I can no longer connect to a...
Connecting from Linux, using an older adb (downloaded at tried 1.0.41 just to troubleshoot this - no difference, except that the messages now do include "Connection refused"), and the devices runs Android 9.
This has worked fine literally for years, but all of a sudden, I can no longer connect to a device via TCP/IP. I can't think of anything that has changed.
The device has a static IP (and I usually connect and disconnect multiple times per day), and I do run a firewall on it (AFWall+), which has never caused a problem in the past.
$ ADB_TRACE=1 adb connect 192.168.0.2
main: 1915:140003988076352 | Handling commandline()
adb_query: 1915:140003988076352 | adb_query: host:connect:192.168.0.2
_adb_connect: 1915:140003988076352 | _adb_connect: host:version
WriteFdExactly: 1915:140003988076352 | writex: fd=3 len=4: 30303063 000c
WriteFdExactly: 1915:140003988076352 | writex: fd=3 len=12: 686f73743a76657273696f6e host:version
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4 got=4
4f4b4159 OKAY
_adb_connect: 1915:140003988076352 | _adb_connect: return fd 3
adb_connect: 1915:140003988076352 | adb_connect: service host:connect:192.168.0.2
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4 got=4
30303034 0004
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4 got=4
30303230 0020
_adb_connect: 1915:140003988076352 | _adb_connect: host:connect:192.168.0.2
WriteFdExactly: 1915:140003988076352 | writex: fd=3 len=4: 30303161 001a
WriteFdExactly: 1915:140003988076352 | writex: fd=3 len=26: 686f73743a636f6e6e6563743a313732 host:connect:192
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4 got=4
4f4b4159 OKAY
_adb_connect: 1915:140003988076352 | _adb_connect: return fd 3
adb_connect: 1915:140003988076352 | adb_connect: return fd 3
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=4 got=4
30303237 0027
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=39
ReadFdExactly: 1915:140003988076352 | readx: fd=3 wanted=39 got=39
756e61626c6520746f20636f6e6e6563 unable to connec
unable to connect to 192.168.0.2:5555
Any ideas what might cause this?
confused
(61 rep)
Apr 16, 2024, 09:39 AM
• Last activity: Apr 17, 2024, 02:11 AM
2
votes
0
answers
69
views
Programatically query port # for Wireless ADB?
Every time Wireless Debugging is enabled, its listening port is randomized. Is there an way to programatically identify the current listening port for Wireless ADB connections, such as via a system shell, secure_settings access, or an existing ADB connection?
Every time Wireless Debugging is enabled, its listening port is randomized. Is there an way to programatically identify the current listening port for Wireless ADB connections, such as via a system shell, secure_settings access, or an existing ADB connection?
ETL
(211 rep)
Apr 12, 2024, 08:26 PM
1
votes
1
answers
567
views
Android Wireless Debugging Runs Under Different Private IP Range than WiFI
Android 13 on Unihertz Jelly Star. Never had a problem up until today when I was attempting to use `scrcpy` and got annoyed enough by the constantly changing port number assignment for the Wireless Debugging server to finally try to solve the annoyance. (I'm referring to the relatively recent change...
Android 13 on Unihertz Jelly Star. Never had a problem up until today when I was attempting to use
scrcpy
and got annoyed enough by the constantly changing port number assignment for the Wireless Debugging server to finally try to solve the annoyance. (I'm referring to the relatively recent change that randomizes the wireless server's port number to somewhere in the range of 30,000-49,999, rather than the long standard 5555.) Somehow I've caused it to start up under the 10.x.x.x IP range even though my home network is on the 192.168.x.x range, and I can't seem to get it to revert permanently.
I've tried "Reset WiFi, mobile, & BT" options twice now, and the relief it gives is very brief. I've turned off mobile data to eliminate that potential source of IP assignment. I've been through several reboots, connecting both wirelessly and via USB from the PC, and I just can't keep the ADB server on the home IP range (WiFi itself remains on the expected range). I suspect it might have something to do with the USB connection, but I can't seem to pin it down. It's just so bizarre to me.
I only have a cursory understanding of TCP/IPv4 that I learned years before I'd ever even heard of IPv6, and I've been out of the tech field of work ever since (a couple decades now) so I'm at a loss on how to further track the problem down. Any help to avoid having to reset the phone and set it up again (assuming that would even resolve the issue) would be appreciated!
No root, stock ROM (after one update) - however I *am* using [Shizuku](https://shizuku.rikka.app/) , which gives some root-like abilities to apps programmed to take advantage of it.
The only seemingly acceptable solution I (sort of) found was a reference to "the LADB" fix that didn't actually describe, nor link to it. A bit more looking around made it clear they likely meant using the [LocalADB](https://github.com/tytydraco/ladb) app's ability to run a command upon startup. Basically, it seemed they were using it to restart the ADB server, explicitly telling it to use the standard port in the process via the command adb tcpip 5555
.
When I first tried using it, adb complained that there were multiple possible devices to target the command to (I'm a bit foggy because I was up late doing this, but I think I tried this both with the USB plugged in as well as not). I modified the startup command to adb disconnect; adb tcpip 5555
and that seemed to work, but left it in a sort of bootloop where it'd lose the connection (of course) and attempt to reconnect, and then once again run my command string. I dropped the disconnect part and instead gave it the -e option to refer specifically to the tcpip connection, but effectively got the same result (which makes sense).
Further searching/reading up on it gave me the impression (but again no explicit step-by-step) that this was expected - they weren't looking to use LADB anyway, but instead just using it to accomplish the goal of restarting the server on the correct port. As such, once the bootloop-like behavior started, they just killed the LADB app.
That seemed to work for me as well, but somewhere along the way of setting things back up after resetting my network connections - WiFI credentials (I've two local networks), USB ADB connection, Shizuku setup, scrcpy, etc. - the Wireless Debugging server goes back to the 10.x.x.x range and nothing I do changes it.
I will try to step-by-step it later today, but haven't the time at the moment. I was hoping someone with more TCP/IP understanding than I have might point me at the likely problem in the meantime.
N.B.: Of course, in updating this to include a link to the LADB app, I noticed on the site it mentions being incompatible with Shizuku ATM. Seems odd to me that this would be the end result of that, but I'm obviously asking here because I'm not an expert. At the very least, it's an additional avenue of exploration.
SanctimoniousApe
(11 rep)
Feb 18, 2024, 10:07 AM
• Last activity: Apr 1, 2024, 03:41 PM
1
votes
0
answers
42
views
Is it possible using Cerberus to enable ADB Debugging on my broken android
I have a OnePlus Nord 5G and stupidly I never enabled `ADB Debugging`, and now the screen is completely ruined. However, I still have the Cerberus connectivity. I have tried through the various means `Start Service` and `Start Application` to try and enable ADB debugging. Is this at all possible or...
I have a OnePlus Nord 5G and stupidly I never enabled
ADB Debugging
, and now the screen is completely ruined. However, I still have the Cerberus connectivity. I have tried through the various means Start Service
and Start Application
to try and enable ADB debugging. Is this at all possible or am I chasing a dead end?
I have also downloaded Screen Stream through Google Play to my phone and then started it remotely through Cerberus with hopes of trying to connect. However, I am met with a Press Start to begin
on the Screen Stream webpage 192.168.1.106:8080
. Any way around this as I cannot touch the screen to begin anything.
ThunderBandit
(11 rep)
Jun 30, 2023, 11:30 AM
• Last activity: Jun 30, 2023, 05:48 PM
2
votes
0
answers
82
views
How to list all SSIDs on which ADB Wireless is allowed?
When connecting a phone to ADB wirelessly, the user must allow Wireless Debugging on the current wifi network, with an option to remember the preference. Is there a way to programmatically read the list of SSIDs on which Wireless Debugging has been permanently allowed?
When connecting a phone to ADB wirelessly, the user must allow Wireless Debugging on the current wifi network, with an option to remember the preference.
Is there a way to programmatically read the list of SSIDs on which Wireless Debugging has been permanently allowed?
ETL
(211 rep)
Jun 15, 2023, 05:30 AM
1
votes
0
answers
422
views
Wireless ADB is connecting forever after wifi turned off and on
I connected my Watch (Galaxy Watch5) to wireless debug to Android Studio (latest), with "Pair using pairing code". Everything worked perfectly, but the watch turned off its wifi, and obviously the debug procedure exited. After I turned back on the Wifi on the watch, Android Studio keeps connecting f...
I connected my Watch (Galaxy Watch5) to wireless debug to Android Studio (latest), with "Pair using pairing code".
Everything worked perfectly, but the watch turned off its wifi, and obviously the debug procedure exited.
After I turned back on the Wifi on the watch, Android Studio keeps connecting for a few minutes then fails:
What can I do to prevent this? I don't want to reboot my computer every single time when the watch decides it's too warm for it to keep the wifi on.
(With Tizen watches I had never had any issues like this. Great improvement.)

Daniel
(291 rep)
Mar 19, 2023, 04:35 PM
15
votes
1
answers
8385
views
Device not shown on ADB even after pairing for wireless debugging on Linux
Wireless debugging seems to pair, but then the device just does not show up. I tried it on Mac and it works, but it does not work on Linux. I am on a Samsung phone. I run `adb pair [IP]:[PORT] [CODE]`. It executes successfully and tells me that I am paired with the device. Then I run `adb devices` a...
Wireless debugging seems to pair, but then the device just does not show up. I tried it on Mac and it works, but it does not work on Linux. I am on a Samsung phone.
I run
adb pair [IP]:[PORT] [CODE]
. It executes successfully and tells me that I am paired with the device. Then I run adb devices
and it is just blank.
On my phone, it doesn't say that it is paired to myuser@hostname, but rather root@hostname for some reason. I even tried logging in as root and listing the devices but it is of no avail.
The above steps work fine and list the device on a Mac. The phone also shows "Connected" next to the hostname and user, and the user is not root but rather the username.
I have tried-:
1. Disabling firewall
2. Trying the tools from the official repository, AUR package, google website, etc.
3. Restarting my PC and Android phone
synti-chocolate
(161 rep)
May 29, 2021, 03:02 PM
• Last activity: Dec 8, 2022, 09:09 AM
1
votes
0
answers
690
views
Remote connect adb to android device
How can I use adb shell for an android device wireless and remotely? With ssh, wifi, or bluetooth. For example can I connect to my mobile from laptop with bluetooth and use adb shell in laptop for my mobile?
How can I use adb shell for an android device wireless and remotely? With ssh, wifi, or bluetooth. For example can I connect to my mobile from laptop with bluetooth and use adb shell in laptop for my mobile?
Reza Hosseinzadeh
(33 rep)
Apr 24, 2022, 05:22 PM
1
votes
0
answers
208
views
Wireless debugging option disabled after flight mode enabled and disabled
I am working on an app so need to connect to the device through wireless pairing. I frequently put the device in flight mode and this turns off the wireless option as desired. But when I switch off the flight mode, the wireless debugging option remains disabled. What's more, after manually enabling...
I am working on an app so need to connect to the device through wireless pairing. I frequently put the device in flight mode and this turns off the wireless option as desired. But when I switch off the flight mode, the wireless debugging option remains disabled. What's more, after manually enabling the wireless debugging, the IP port gets changed so I have to connect via
adb connect
and give the new IP port address every time.
Is there any way to make the device automatically enable the wireless option after the flight mode is deactivated (if it was enabled previously)? Or at least to force the device to use the same port number every time?
androthyroid
(11 rep)
Jan 26, 2022, 10:01 AM
• Last activity: Jan 27, 2022, 04:53 PM
Showing page 1 of 13 total questions