The script may not work for Android < 6.0.
Simply run unmount.sh
in Android terminal to unmount all external SD card(s), partitions formated as internal will be ignored.
To unmount when system starting up, put the script in /data/adb/service.d/
(Magisk root required) and execute chmod +x /data/adb/service.d/unmount.sh
. This will be useful if Linux Deploy installs in a SD card partition.
To turn on logs, change LOG_ON=false
to LOG_ON=true
, the log file will be /data/local/tmp/unmount.log
.