I have my chroot environment setup (Alpine Linux) in /sdcard/alpine. I try running my chroot with the following commands:

chroot alpine /bin/busybox 

(busybox is the cli of Alpine)

I get the following error:

chroot: exec /bin/busybox: Permission denied.

How can I fix this?

My device specs:

Google Pixel XL (marlin)

Android 9.0

Rooted (obviously) with Magisk


Binaries can't be executed on /sdcard because it's an emulated filesystem with fixed file permissions, mounted with noexec mount option. Create alpine directory on some other filesystem e.g. /data:

~# mkdir -p /data/local/tmp/alpine/bin

Place your executable in newly created directory and do chroot:

~# cd /data/local/tmp
~# chmod 0755 alpine/bin/busybox
~# chroot alpine /bin/busybox sh

This will drop you to a root shell (UID 0) with changed root (/).

  • Since e.g. Termux is an app, and apps' data live under /data, the OP might be able to perform the whole procedure there. – Grimoire Sep 25 '19 at 0:56
  • @DeathMaskSalesman right – Irfan Latif Sep 25 '19 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.