0x192 / universal-android-debloater

Cross-platform GUI written in Rust using ADB to debloat non-rooted android devices. Improve your privacy, the security and battery life of your device.
GNU General Public License v3.0
15.36k stars 816 forks source link

After exit, UAD leaves adb.exe running #772

Open 10miles opened 1 year ago

10miles commented 1 year ago

UAD runs automatically adb.exe, but upon exit, adb.exe process is left running and should be stopped from Task Manager under Windows. With adb.exe running, OS cannot detach properly device from USB port.

This I find wrong - to run adb.exe from UAD and to stop it from Task Manager.

Rudxain commented 1 year ago

This happens on Linux too.

The solution is

adb kill-server

for all OSes.

Repeatedly running and stopping processes may consume more system-resources than keeping them alive. However, I agree that if adb isn't already running, and UAD is the only program triggering it, then UAD should be responsible for closing that process too.

Perhaps there should be a setting that controls the auto-kill behavior?

Ishatix commented 10 months ago

How about just a "Disconnect" button that sends the adb kill-server command?

Rudxain commented 10 months ago

How about just a "Disconnect" button that sends the adb kill-server command?

That sounds better! It would allow users to decide when to stop using ADB. But it would also be nice of there was an opt-in auto-kill setting.

However, when using ADB/TCP/IP, adb disconnect should be issued before adb kill-server