cmake: Update from 3.10.3 to 3.11.0
[termux-packages] / packages / proot / termux-chroot
index 7e49a42..79801b1 100755 (executable)
@@ -31,6 +31,14 @@ ARGS="$ARGS -b /vendor:/vendor"
 # and $HOME so that Termux programs with hard-coded paths continue to work:
 ARGS="$ARGS -b /data:/data"
 
+
+# Bind Magisk binary directories so root works, closing per Issue #2100.
+if [ -d /sbin ] && [ -d /root ]; then
+       # Both of these directories exist under Android even without Magisk installed,
+       # The existence check is to ensure that it doesn't break if this changes.
+       ARGS="$ARGS -b /sbin:/sbin -b /root:/root"
+fi
+
 if [ -f /property_contexts ]; then
        # Used by getprop (see https://github.com/termux/termux-packages/issues/1076)
        # but does not exist on Android 8.