dnscrypt-proxy-android icon indicating copy to clipboard operation
dnscrypt-proxy-android copied to clipboard

Module's uninstall doesn't work as it should

Open d3cim opened this issue 4 years ago • 2 comments

Describe the bug DNSCrypt module doesn't remove the internal dnscrypt-proxy folder once removed from Magisk.

To Reproduce Steps to reproduce the behavior:

  1. Download the latest dnscrypt-proxy-android version
  2. Disable network connections (no internet)
  3. Install the .zip downloaded
  4. Reboot
  5. Open Magisk > Modules > DNSCrypt-Proxy 2 > Remove
  6. Reboot
  7. See dnscrypt-proxy folder still at storage/emulated/0/dnscrypt-proxy path

Expected behavior (i.e. solution) Once removed the module should remove all of its rests, without leaving the dnscrypt-proxy folder in the internal memory.

Device informations:

  • Android: 11
  • Magisk: 24.1

Additional context

What I know

  • uninstall.sh won't work with /sdcard for some devices because that path isn't mounted until data is decrypted (fixed in #L2-L4).
  • It doesn't work on devices having Android 11 or higher.
  • It work on devices having Android 7 or lower.

What I don't know

  • If it work on Android 8 devices.
  • If it work on Android 9 devices.
  • If it work on Android 10 devices.

d3cim avatar Feb 09 '22 08:02 d3cim

I think it is supposed to work that way, a lot of apps and magisk modules leave behind their folders in storage/emulated/0/, because most of the times there are config files that the user wants to keep in case they reinstall. It happens on Linux also, whenever you uninstall a package/app, even if you force the command to clean everything, most of the time they leave folders behind in /home/[user]/.config or /home/[user]/.local, with config files, databases, etc. The next time you reinstall the software, you don't need to set it up. And it is always just a couple of kilobytes of data, so no biggie. You can always remove them manually though.

cypherpunk1984 avatar Mar 25 '22 10:03 cypherpunk1984

I understand, what has been described is plausible but it cannot be so because the configuration files are not moved into any hidden folder, moreover the demonstration is that on devices with Android 7 or lower it works. It is almost certainly due to the fact that the device keeps its content encrypted until it is completely unlocked and the script does not work correctly in its current state.

d3cim avatar Mar 29 '22 09:03 d3cim