Updated 2015-02-22 13:55:08 by DoctorD90

Roy Keene's tclkit generation creates files that run on Android, among many other platforms. Here is what is necessary to be able to use them.

First, get a terminal emulator app. I use the Android Terminal Emulator written by Jack Palevich [1]. I have not compared other apps, but this one does what I have needed.

I have not rooted my Android phone, so there are rather strict limits on what can be done. For instance, there are few directories where executable files can be located, and many tools do not allow introspection of those locations. /data/tmp works on my phone, and /data/local/tmp may work elsewhere.

The code to download and execute the tclkit is below. Note that the "8.6.0" part of the filename will have to be updated as the current Tcl version changes.
cd /data/tmp

curl http://www.rkeene.org/devel/kitcreator/kitbuild/nightly/tclkit-8.6.0-android-arm-notk-xcompile > tclkit

chmod 755 tclkit

TMPDIR=~/tmp; export TMPDIR


If you have a rooted phone, and you want get tcl as interpreter from terminal you can also install widely or just update it. Insted of use /data/local/tmp folder, you can instal in /system/bin folder (this is the folder on my android 2.3.3).

To accomplish that task you will need to have installed BusyBox and use su command.

To get access to /system folder you have to mount /system in reade-write mode. To do that, you have to find mounting point (mount command) and remount it; then coping tclkit, chmod it 555, and remount /system in read-only mode.

To make all these steps simplier, i make a little code. I dont cover responsibility for it. I suggest you to check it manually steps per steps if it does all stuff rigth at first running.

Place this script in the same folder of your new tclkit for android and edit firsts lines with: your system path, your bin path, new tclkit name (ex. tclkit863) and old one (ex. tclkit861).

Run su to gain root access, and sh tclkit.sh where file tclkit.sh is the name of this script, also hosted here.
echo "*Started"

#Your /system folder, it may change
#Your bin folder
#Old tclkit version
#New tclkit version

#/system folder check
if ! [ -d "$psys" ]; then
        echo "$psys not found"
        echo "Please check for your /system folder path"

#/system/bin folder check
if ! [ -d "$pbin" ]; then
        echo "$pbin not found"
        echo "Please check for your /system/bin folder path"

#/dev/block/mtdblock2 /system yaffs2 ro 0 0
ln=$(mount | grep "$psys")

ptin=$(echo $ln | cut -d " " -f1)

ptout=$(echo $ln | cut -d " " -f2)

fs=$(echo $ln | cut -d " " -f3)

echo "*Mountig_System_RW"
mount -oremount,rw -t "$fs" "$ptin" "$ptout"

if [ -f "$pbin/$tclold"]; then
echo "*BackingUp_Old"
cp "$pbin/$tclold" "$tclold"

echo "*Removing_Old"
rm "$pbin/$tclold"

echo "*Installing_New"
cp "$tclnew" "$pbin/$tclnew"

echo "*chmod_555_New"
chmod 555 "$pbin/$tclnew"

echo "*Mountig_System_RO"
mount -oremount,ro -t "$fs" "$ptin" "$ptout"

echo "*Ended"

TJK - Here is a link to some more information.

Online Keene's KitCreator

Yet done android download

Tcl, Android, tclvfs, and .apk packaging work



MJ For using Android as a unixy box, you could check Terminal IDE [2] it allows you to run executables without need to root. It also has vi and other tools installed so you can pretty much work from you Android device.

RS 2013-10-27 - Indeed. I have Terminal IDE on tablet and phone. Tclkits run with no trouble in its environment (sqlite can't be loaded, though). The recommended editor is vim (enhanced to a tiny IDE for Java development), vi comes with busybox, but nano is also there (which I prefer). Best feature for me at the moment is telnetd, so I can use my netbook's screen and keyboard to login to the little devices, via WiFi.

Now if we had Tk for Android...