Module's uninstall doesn't work as it should
Describe the bug
DNSCrypt module doesn't remove the internal dnscrypt-proxy folder once removed from Magisk.
To Reproduce Steps to reproduce the behavior:
- Download the latest dnscrypt-proxy-android version
- Disable network connections (no internet)
- Install the
.zipdownloaded - Reboot
- Open
Magisk > Modules > DNSCrypt-Proxy 2 > Remove - Reboot
- See
dnscrypt-proxyfolder still atstorage/emulated/0/dnscrypt-proxypath
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.shwon't work with/sdcardfor some devices because that path isn't mounted until data is decrypted (fixed in #L2-L4). - It doesn't work on devices having
Android 11or higher. - It work on devices having
Android 7or lower.
What I don't know
- If it work on
Android 8devices. - If it work on
Android 9devices. - If it work on
Android 10devices.
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.
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.