From: michalbednarski Date: Sat, 10 Mar 2018 21:35:53 +0000 (+0100) Subject: proot: Update for accept and MagiskSU support (#2235) X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/4d85b1148a161d259f4e5806ac338b25d22337c2 proot: Update for accept and MagiskSU support (#2235) * Added arguments for proot to enable the use of MagiskSU from within termux-chroot. * Restore original shebang to termux-chroot for pull-request. * Added folder existence check to ensure MagiskSU changes don't break termux-chroot on later versions of Android, just in case. * proot: Update for accept -> accept4 translation --- diff --git a/packages/proot/build.sh b/packages/proot/build.sh index 39a3ebce..1741bc0b 100644 --- a/packages/proot/build.sh +++ b/packages/proot/build.sh @@ -1,11 +1,11 @@ TERMUX_PKG_HOMEPAGE=https://proot-me.github.io/ TERMUX_PKG_DESCRIPTION="Emulate chroot, bind mount and binfmt_misc for non-root users" # Just bump commit and version when needed: -_COMMIT=9553bc6b65f705b26249cf70244bff9ab8e935e9 +_COMMIT=c24fa3a43af2336a93f63fe3fb3eac599f0e3592 TERMUX_PKG_VERSION=5.1.107 -TERMUX_PKG_REVISION=5 +TERMUX_PKG_REVISION=6 TERMUX_PKG_SRCURL=https://github.com/termux/proot/archive/${_COMMIT}.zip -TERMUX_PKG_SHA256=8602a43aa0ce16e0f8248cde726eac11938cae78ad04b4ef75a9c62870db3cc5 +TERMUX_PKG_SHA256=185e01d02a0bbf93036d143500e747e06b95fa6056fc1b8c1a093764b467e5b8 TERMUX_PKG_DEPENDS="libtalloc" termux_step_pre_configure() { 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.