I have a small problem with a script that I am making for Android. I can't seam to get 'EOF' to work in 'mksh'. It is working fine in 'sh' and 'bash', but since 'mksh' is becomming the most used in Android I really need for it to work in all.
cat <<EOF
... lines here ...
EOF
This example will cause the fallowing error
can't create temporary file /sqlite_stmt_journals/mksh.(random): No such file or directory
I have seen others with this issue, but no real solution.
1) If you have root privileges:
When you open android shell then if you have root privileges of that device then run adb as root user.
instead of just
this will solve your problem.
2) if you can modify the sh binary in your android device then modify such that it will go to find path
or
above directory has read/write/execute permission for shell user.
3) Install Busybox and run as
Busybox cat <<EOF