We recently deployed a lot of android devices internally for displaying customized web page only.

  • Device: RKM MK902
  • OS: Android 4.4.2 Rooted
  • Wifi radius 8021x
  • Dolphin browser with kiosk mode and tab reload add-on (refresh page/30 sec)
  • Also have code in web page to refresh itself
  • Tried other apps to refresh browser in scheduled time window. (bad results)

The issue I am facing now is that even I setup refresh interval as 30 sec, but sometimes it still shows "page is not available", but I can access page manually from my desktop.

I am trying to find out if it is wifi issue or web server issue.

What I want to do is that have a script running on the android device accessing the page every 30 sec and log the result. My questions are

  1. how to write a script on android device? what language or what command?
  2. how to run this script on android device?
  3. how to log the results?
  4. how to schedule this script to run?

3 Answers 3


{ have no idea about creating Log :( And I know it is not proper solution but you can try to get solution using above mentioned apps.}

  1. Use plain text editor and save it as .sh. Shell or bash.
  2. Install Terminal Emulator, and type sh "your script path.sh" if you need root access, type su -c sh "your script path.sh"
  3. Log? you mean stdout? It will appear on terminal screen.
  4. Use Tasker or Install Script Launcher
  • Could you mention the hyperlinks for the said apps in the answer as well?
    – Firelord
    May 23, 2015 at 3:02
  • here you go: play.google.com/store/apps/…
    – user109741
    May 23, 2015 at 6:11
  • With Terminal Emulator installed how can I tell the stupid android/linux execute this script.sh ? Terminal Emulator does not appear to create an "association/intent" with .sh files? I don't want to deal with issuing commands on the CLI, it's the most backwards thing in the whole universe :) the enter key produce "q" I have to press Ctrl-J (bad memory of Unix from like 50 years ago).
    – Meryan
    May 18, 2022 at 6:13

You can use install Busybox, which provides you with many utilities such as awk, file, etc... and Terminal Emulator.

  1. Create a shell file with #!/system/bin/sh as the first line (shebang)
  2. Now place the completed script under /system/xbin or /system/bin and run it from the Terminal Emulator

The information is an excerpt from this article : http://www.pctips4u.com/2016/03/writing-shell-scripts-in-android.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .