I formatted a SDCard in ext4 and copied an ArchVersion on it to run it from Android like in this guide (step 7). Of course my device is rooted and I am running the following scripts and commands in the Terminal Emulator as superuser.
- Phone: Sony Xperia Z1
- Model number: C6903
- Android version: 5.1.1
- Build Number: 14.6.A.1.236
sh storage/emulated/0/linux/linux.sh 2> storage/emulated/0/linux/output.txtthe device ends up in Android again because the command
chroot /data/local/mnt /init.sh can't execute /init.sh: Permission denied.
#!/system/bin/sh export LINUXROOT=/data/local/mnt export TMPDIR=/tmp export HOME=/root export USER=root export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH export TERM=vt100 sh ./mount.sh # works fine sh ./stopandroid.sh # works fine echo "******* Your chroot-environment is starting now ********" chroot $LINUXROOT /init.sh # can't execute /init.sh: Permission denied echo "******* You exited the chroot-environment, unmounting... ********" sh ./umount.sh sh ./startandroid.sh echo " ## DONE"
I already found some posts about this issue together with LinuxonAndroid and BusyBox. I do not use LinuxonAndroid and installed BusyBox from Google Play Store which should solve the problem when running another BusyBox-version what I do not.
Like it is stated here it may require to
chmod 0755 /data/data/com.zpwebsites.linuxonandroid/files/busybox which is not possible in my case, because obviously the folder
com.zpwebsites.linuxonandroid does not exist.
So I searched for busybox inside
/data/data, found one file and changed permission:
chmod 0777 data/data/stericson.busybox/files/bb/busybox.
I also changed the permissions of init.sh:
chmod 777 init.sh
I also tried to run the command
chroot /data/local/mnt /init.sh in the terminal with the same result.
After these changes I really do not have a clue whats wrong.