X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/d32d5a28d589cfc12c9497d349b6b1b6c2c04196..012d550683529b3532ff8010c47e085eba96666e:/packages/proot/termux-chroot diff --git a/packages/proot/termux-chroot b/packages/proot/termux-chroot index 7e49a42c..79801b14 100755 --- a/packages/proot/termux-chroot +++ b/packages/proot/termux-chroot @@ -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.