0

I want to create a script that would close an app, then restart it twice each 24 hours and then automatically click on a few buttons to configure the app to the way it was previously.

Background: I use a tablet to monitor the live video from my security cameras with an app. The problem is that once or twice a day, the live video feeds lock up and do not update. Restarting the app fixes this.

Is there a way to do this? Please note that I don't know anything about scripting or coding. I was hoping that there might be a simple app that would allow me to create a series of instructions that would activate x times per day -- or to know where to find someone who could create this for me.

  • Do you have root, this is major for auto tap scripts – Gadget Guru Sep 5 '16 at 21:17
  • Whether you manage to automate it or not, you should contact the app developer to tell them that their app breaks in this way. If there's no option to do it from inside the app, you can contact them from the app's page on Google Play. – Dan Hulme Sep 6 '16 at 10:33
1

Call Super User ( root access )

  su    

change 1 second sleeper to 24hours

 sleep 86400

  sleep 1
  sh /directory to this script/autoscript.sh   
  exit   

Close this script after opening another instance of it.
So all in one script it's

  su   
  sleep 1
  sh /directory to this script/autoscript.sh    
  exit 

In this example,

you would need to make this as a text document and save it as autoscript.sh

Instead of autoscript.txt

Now open Terminal Emulator and type

sh storage/sdcard1/autoscript.sh

Terminal will auto start the script !

  • If I've helped, i think you say solution verified or something :) – Gadget Guru Sep 5 '16 at 23:54
  • PT, I greatly appreciate that you have created this script. But the situation is that my tablet is not rooted and I also have no idea how to use this script: how to activate or run it. But you have certainly tried to be very helpful -- I just wish I knew enough so I could use your generous work. – A J Sep 7 '16 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.