First of all, I have inside an android Operating System a chroot environment created using Linux Deploy. I am able to access it from Android using a terminal emulator and root permission. I would like to run a script inside it. However, when trying to run the script, or even normal shell commands, it doesn't executes and returns this error:
"No such file or directory"
So, I am wondering, is it there a way to execute, from the host within a chroot environment, commands/scripts? Has the problem to do with the proper setting of the environment PATH variable?
I am able to execute ls command within the chroot environment but when printing with the -la argument it doesn't even show the . and .. directories. Could someone explain why is this happening and how could we overcome this issue?
P.D.: I've posted this issue in unix/linux stack exchange because I thought it concerns more to it. However, if you recommend me to also post it in stackoverflow or any other, I am open to do so.
Best Answer
It sounds like you may not have fully configured your chroot environment. Here are instructions for setting up a Debian chroot on Android:
There are lots of other OS-specific instructions online for setting up a chroot, e.g.:
Ubuntu chroot
Debian chroot
CentOS chroot
The bottom line is that you typically would install the programs into your chroot environment before trying to execute them. What have you done to setup your chroot?