coolman :
I want to start and stop adb wireless from an app using a rooted phone. I managed to start adb wireless daemon with these commands:
String cmds[] = {
"setprop service.adb.tcp.port 5555",
"stop adbd",
"start adbd"
};
Shell.su(cmds).exec();
But
String cmds[] = {
"stop adbd"
};
Shell.su(cmds).exec();
or
String cmds[] = {
"setprop service.adb.tcp.port 5555",
"stop adbd"
};
Shell.su(cmds).exec();
does not work to stop adb. At least it stops but I can't start it again with
setprop service.adb.tcp.port 5555
stop adbd
start adbd
How should I stop adb wireless properly from a rooted phone?
Korcholis :
I'm just guessing, but try removing the 5555 as a parameter (maybe passing an empty string in quotes, or passing nothing at all).
It smells a lot as this answer (although it talks about persisting it or not, but the way to do it might be the same):