Android 12 Developer options adb "Wireless debugging" option keeps turning off - Android Q&A, Help & Troubleshooting

The Android 12's new features for 'Developer options' 'Wireless debugging' is fantastic because you never need a USB cable anymore to connect between the PC and the Android phone using adb (e.g., when using Vysor or scrcpy).
However, I am CONSTANTLY having to turn the Developer options for "Wireless debugging" back on because that Developer option for Wireless debugging goes from ON to OFF (and stays off) every time the Wi-Fi is turned off on the phone.
Is there any way to keep the Developer option for Wireless debugging on?

GalaxyA325G said:
Is there any way to keep the Developer option for Wireless debugging on?
Click to expand...
Click to collapse
Hello and good afternoon, @GalaxyA325G
Prior to your next posting please read the guidances that are stuck on top of every forum like
[Read Before Posting]QUESTIONS DO NOT BELONG IN GENERAL
Hello Everybody, In order to attempt to keep this forum neat and tidy the moderation team is asking you to post your questions into the Questions and Answers (Q&A) forum and not into the General section. You can find the Q&A forum by clicking...
forum.xda-developers.com
and the others. I've moved the thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator

Unfortunately, the question remains unanswered.
Here's some additional background for those who haven't kept up with the wonderful new changes in Android 11 and above...
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
Bear in mind that Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to KEEP that random port from constantly changing on us.
One way to do that is to keep the Developer options Wireless debugging option turned on, hence the question asked in this thread of...
Is there any way to keep the Developer option for Wireless debugging on (even if the Wi-Fi automatically turns itself off)?

Digging further into the forum search... I found this thread....
Permanent Wifi on Unrooted Device
So I just set this option but I'm not sure yet how to tell if it worked.
adb shell settings put global cw_disable_wifimediator 1
Click to expand...
Click to collapse

Hi: only you need to disable riru or lsposed from magisk manager Then restart your device you're problem is solved.

GalaxyA325G said:
Digging further into the forum search... I found this thread....
Permanent Wifi on Unrooted Device
So I just set this option but I'm not sure yet how to tell if it worked.
Click to expand...
Click to collapse
Did it work?

XDrz said:
Hi Master ! I want help ! How can I turn on "wireless debugging" by root command without touch screen or usb debug?
I just want my phone turn on the "wireless debugging" after each reboot. I've wrote some cmd in a script file and let it run after system start:
svc wifi disable
sleep 5 # have a wait to ensure wifi is off
svc wifi enable
sleep 5 # have a wait to ensure it connected to PC hotspot
su
setprop service.adb.tcp.port 7777
# setprop persist.adb.tcp.port 7777 # have to try
stop adbd
start adbd
exit
I've tried many times and I'm tried. I found that there is no properties like "wifi_adb" or "debug.adb_wifi" can let me turn on wirelesss debugging switch after reboot. I have to touch it on screen so that I can connect adb over wifi.
is there any method to let the phone auto enable "wireless debugging"(even always enable) after reboot? I have ROOT !!! I SHOULD COUDL DO IT ![cry][cry] [cry] [cry] [cry]
Click to expand...
Click to collapse
I just have tried commands above and none of them could work. it just changes wifi adb port to what you want but no cmd can enable "wireless debugging" switch under developer options. why there is no properties like "debug.hwui.force_dark" that can be auto enable by "setprop".
even I'm rooted...

Related

[Q] What generally happen by switch on "USB Debugging"

Hey,
My question is quite simple.
What generally happens in the Android System, when i switch on or off the USB Debugging? Is there a constant in the Android System Configuration, wich is turn on or off? How can the adb attached the devices, wich are turn on USB Debugging?
Hope you understand what i mean.
Thanks!
Thomas
Usb Debugging
If you want to know what is USB debugging and what does it do... heres your answer.. USB Debugging allows the android sdk and your computer to communicate with your android device and transfer data , basically lets you control your android phone from your SDK. It is a tool for developers . It can be activated by going to settings > developer options > USB debugging.
Tschakle said:
Hope you understand what i mean.
Click to expand...
Click to collapse
Nope.

USB Debugging enable on boot?

I've turned on the developer options and can enable the USB Debugging option to be able to use Titanium backup. However I notice when I reboot the device it gets disabled again. Does anyone know of something/somehow to ensure it's enabled on boot?
Thanks!
---Eric
Got it, need root shell of course:
- Remount /system in readwrite mode.
- Add this to /system/build.prop: persist.service.adb.enable=1
- Save, remount as read only.
- Reboot.
Well...didn't really work...though it did, any ideas? USB debugging for me has to be manually picked each time.
So what seems to work for me upon reboot is that I use SManager and have a script run as root at boot up:
#!/system/bin/sh
echo 1 > /data/property/persist.service.adb.enable
This seems to enable USB debugging upon each boot. The build.prop worked once, but did not seem to keep it enabled.
Any chance anyone else has come up wth a different way to retain USB debugging on reboot? I just had to rebuilt my phone from scratch by restoring from stock and executing a script at boot up could potentially be fatal. I'm a linux admin so I do know what I am doing but without a unlocked bootloader and the ability to recover from a CWM backup, I'd rather not mess with the OS too much if possible.
x86cpu said:
So what seems to work for me upon reboot is that I use SManager and have a script run as root at boot up:
#!/system/bin/sh
echo 1 > /data/property/persist.service.adb.enable
This seems to enable USB debugging upon each boot. The build.prop worked once, but did not seem to keep it enabled.
Click to expand...
Click to collapse
JCDinPGH said:
Any chance anyone else has come up wth a different way to retain USB debugging on reboot? I just had to rebuilt my phone from scratch by restoring from stock and executing a script at boot up could potentially be fatal. I'm a linux admin so I do know what I am doing but without a unlocked bootloader and the ability to recover from a CWM backup, I'd rather not mess with the OS too much if possible.
Click to expand...
Click to collapse
I use Tasker with the secure plugin.
It allows turning on USB Debugging. I use it to turn on USB Debugging as a condition after boot.
Also the worst case with a script, you re-install/flash the OS.
I've reinstalled my Verizon LG G3 from stock ROM twice now. The first time I rooted it with IOROOT and the USB debugging option stays enabled after reboot. The second time I rooted it with Stump root and the USB debugging option does not stay enabled after reboot. No idea what is different between them but maybe someone else can dig through and figure it out.
I have the same problem, when I reboot the phone and open titanium backup.
tech_head said:
I use Tasker with the secure plugin.
It allows turning on USB Debugging. I use it to turn on USB Debugging as a condition after boot.
Also the worst case with a script, you re-install/flash the OS.
Click to expand...
Click to collapse
Could you share how to set this up? Thanks
bamemanxxa3416 said:
Could you share how to set this up? Thanks
Click to expand...
Click to collapse
Set up a task with the "secure Settings" plug in.
You are going to go into the "System Actions" and select "USB Debugging" then select the radio button to "On" then save.
Now you are going to create a profile that uses an Event.
The even will be a "System" type of event and under system you will see "device boot".
Once you have created the event add the USB Enable task you created.
This all assumes you know how to use tasker.
problem fixed......
tech_head said:
Set up a task with the "secure Settings" plug in.
You are going to go into the "System Actions" and select "USB Debugging" then select the radio button to "On" then save.
Now you are going to create a profile that uses an Event.
The even will be a "System" type of event and under system you will see "device boot".
Once you have created the event add the USB Enable task you created.
This all assumes you know how to use tasker.
Click to expand...
Click to collapse
Very nice instructions and thanks for taking the time
because of stumproot, if using iosroot then problem will never appear.
ericsmart said:
because of stumproot, if using iosroot then problem will never appear.
Click to expand...
Click to collapse
Actually not true.
I used ioroot and I have the issue of USB Debug not sticking.
That's why I came up with the way to fix it in tasker.
tech_head said:
Actually not true.
I used ioroot and I have the issue of USB Debug not sticking.
That's why I came up with the way to fix it in tasker.
Click to expand...
Click to collapse
but, it's good to have other solution, it's all good that you guided them who have similar problem.
I have the same problem as you.
tech_head thanks for giving this tasker newb enough bread crumbs that I was able to figure it out and solve the problem (and learn something in the process).
Real easy check usb debug,then plug phone into computer go to your folder that you have adb shift right click mouse all at once open cmd window here check Ethernet mode on phone check rsa cert when prompted type adb devices press enter then adb reboot then enter when LG logo appears unplug phone now your usb debug will always stay checked
WHATSAMATTA U ALUMNI
the tasker approach is now disabled and deathsquad737`s approach has caused it to stay checked... Thanks!
Hi Guys
I found a easy way to fix it.
1) turn on USB debugging
2) Connect G3 to your PC
3) Reboot your G3 when keep connected to PC
4) Unplug
Now the debugging option will be kept.

adb Unauthorized except in 5.1.1

I currently have 5.1.1 installed on my honor 5x and am able to use adb automatically without accepting an RSA prompt (have installed twrp, rooted, etc.) but when I dload a MM stock rom and use usb debugging it is unauthorized and I get no RSA prompt I've even gone as far as to delete /data/misc/adb from my device and adbkey.pub from my desktop but there is still no pop up authorization in MM
Developer options -> Revoke authorisation (something like that), replug. If that doesn't help, change connection mode to file transfer and try again.
ShadySquirrel said:
Developer options -> Revoke authorisation (something like that), replug. If that doesn't help, change connection mode to file transfer and try again.
Click to expand...
Click to collapse
I actually don't have a "revoke authorization" button below usb debugging, odd I know but I've tried all those options to no avail
Tsunetoma said:
I actually don't have a "revoke authorization" button below usb debugging, odd I know but I've tried all those options to no avail
Click to expand...
Click to collapse
Tried toggling the debugging switch? I had issues like these on one of my previous devices, but usually these were fixed with a simple port change or debug off/on switch, if revoke->replug didn't work.
Have you checked drivers, or if dmesg says something about the device, if you're on Linux? Sometimes even running multiple adb instances (like one from terminal and one from Android Studio, for example) can cause this behviour.
Enable rsa key authentication

Keep USB debugging enabled while disabling "Allow USB debugging" prompt (6.0)?

Keep USB debugging enabled while disabling "Allow USB debugging" prompt (6.0)?
I copy the same public/private key pair on all computers I use to adb into my phone. I know how to make adbd start listening on tcp on boot, but it's not safe because in my network, my phone gets a public IP address, and I could get a storm of auth requests..
How can I force Android to not display that prompt anymore?

Can't install apk on 2.0 to save my life

Must be the ADB issue on 7.1.1 but it's driving me crazy. I've tried adb debugging then using "adb install appname.apk" it doesn't work . Someone had a working method on 2.0 when it was a beta build but i can't find the thread. Help me out peeps!
You need universal ADB drivers working and enable ADB Debugging in Developer Settings of the watch. Check the device manager for devices without any drivers and verify that ADB Debuggin is active. Of course you need to activate these first. Go to the settings menu, and scroll down to "About" Tap it. Scroll down to the bottom again, where you see "Build" something Tap it seven times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. (If only it were that simple, eh?) Keep on tapping, and *poof*, you've got the developer settings back.

Categories

Resources