yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] shaneaus:
@rogro82 - can you do one more thing for us?

Can you please have Gscript store the scripts in a folder on the SDcard - named... Gscript?

It would just be much more "tidy." I have a whole bunch of scripts now just in no directory on my SDcard.

Sure hate to beg.... But.... PLEASE!

Thanks for a great program! I use the heck out of it!
[Android Apps and Games] rogro82:
No problem... its indeed a bit nicer that way ;) Will see if i have some time left this week or next weekend to fix it.
[Android Apps and Games] :
when I do this it gives me an corrupt file error for system/app/vending.apk what is that?
[Android Apps and Games] shaneaus:
Don't know... But, considering the folder it is in it should be a file that works for all apps.

I would suggest that you remove that file from the mod/os you are using and push it to that file's location via adb (overwriting the current file) and see if that fixes your issue.
[Android Apps and Games] Gimpeh:
Can someone publish this on the market so that we can easily update the app?
[Android Apps and Games] BILEDEGRADEBLE:
how do you use this to backup all your apps?

is there an app/script that will backup all and/or delete all?
[Android Apps and Games] MontAlbert:
has anyone been able to get it so gscript can be used to make a reboot script for haykuros firmware?
[Android Apps and Games] beagz:
so far haykuro's roms do not allow the reboot command. So until he enables it someone would have to find another command to reboot the phone.
[Android Apps and Games] rogro82:
Ok like some people may have already noticed ive been pretty busy at work lately ( some big projects ) so i sadly didnt have a lot of time to make any improvements.

But luckily today i found some time to make the following updates :)

* The temp/executing file is now created in the applications cache folder so no need for the sdcard to execute scripts

* The script files can now be saved in /sdcard/gscript/ and can also be loaded from this folder.. this will keep your sdcard more organized

I will upload a new version ASAP and adjust the first post and upload the new source.

Thank you all for your input :)

If there are more requests please post them so I can take a look at it.
[Android Apps and Games] rogro82:
Updated first post and added the new download :)
[Android Apps and Games] prash:
Awesome, this is the most useful app I've used. I use it almost daily now. Thank you!

I had some issues getting the latest versions to install with RC33 1.42 as posted above but I went ahead and did adb install to get it working. Now I'm on the latest and loving the new options. Keep up the great work.

By the way have you looked into adding flags for ATrackDog to track for updates for users? I believe devs just have to add a few flags into the code and it'll be able to link to the file/website where users can download whenever there is an update. Check out this link for FAQ on how to do so: http://atrackdog.a0soft.com/faq.php#PX

Thanks again.
[Android Apps and Games] Ryanmo5:
Thanks for the update and for organizing sdcard better, much appreciated and love it!!
[Android Apps and Games] shaneaus:
AWESOME! Thanks

Well, you asked for it!

Hopefully, the last suggestion.

When one loads a script from the sdcard it places the script in the "narrative" window... But, it doesn't put the name of the script in the Name window.

Can you please alter it so that if one loads a saved script it also loads the name of the saved script in the "Name" window? Then if a user wants to keep the name the same they can... If they want to alter it they can.

I find that if I wipe and install a new OS I then have to re-load all of my scripts into Gscript. Having to name them again and re-save them is a hassle. With this change I just load them and save them. I don't have to "re-save" them to the sdcard again!

Thanks for all the hard work and I'll add you to the beer donation list I have on my computer - you, Haykuro, Lucid, and Sterickson... Dang it sucks being indebted to so many worthwhile people!
[Android Apps and Games] rogro82:
So just load the filename minus .sh in the script name box...

I will look into it tomorrow night or on saturday... ;)
[Android Apps and Games] shaneaus:
I could be wrong...

But, in an earlier version - when a script was ran with Gscript didn't the app display the script running? I seem to remember watching the script post, complete, and being able to see any errors.

I really liked that as I would know what was going on and if the script ran correctly.

The last few scripts I have it just says "Thread started!" If there was an error it will eventually post the error lines.

Is there anyway you can have the screen mirror the terminal emulator screen? That way we can see the script lines post and know when it was completed?

Or, if that is beyond the scope of this program...

Is there anyway there can be a message displayed if the script ran/completed without error? Such as... "Thread Completed!"??

Thanks for all your hard work!

Shaneaus
[Android Apps and Games] short/y:
Missing posts?

Has anybody else noticed we're missing posts from this thread? Post 72 is from 31 Mar and post 73 is from 21 Apr. Reason I noticed is there were some scripts that were posted around 19 Apr that I hadn't yet copied/downloaded and I went to pick them up today -- nowhere to be found! Did xda-developers hiccup and I missed the announcement/discussion?
[Android Apps and Games] prscott1:
Great app - love the updates! makes it easier to organize all my scripts.
[Android Apps and Games] rogro82:
Some small updates:

Ive now made it so that it yells "Script finished", when the script is finished, so that you know the script is totally finished and your not aborting it accidentally.

It now uses the name of the file when selecting load from file.

And one other feature... Auto closing of finished scripts. After a script is finished it will auto-close in 3 seconds unless you press somewhere in the terminal output ( during execution or when it is auto-closing ) then it aborts the auto-close function and you can just close it with the close-button.

Ill upload a new apk in a few.
[Android Apps and Games] Proxin:
People might have posted scripts that were against the Terms of Service for Xda... it's awfully easy to post a script that copies apps to the fat32 partition of the SD card, allowing them to be posted online and pirated. And that's against the ToS, so they could have just been removed without acknowledgment.

Or, people could have just forgotten about the thread for a while... happens sometimes.
[Android Apps and Games] tubaking182:
combination of both answers, there's another thread for the actual posting of scripts in the development forum and so people post there, and xda had a hiccup and we lost a weekend of functionality. they had to restore a backup of xda so we lost a few days of stuff.
[Android Apps and Games] shaneaus:
Tried loading a script from the sdcard and it didn't copy the Name...

Can someone else try it out and advise? I'm using version .10

It does save the title in edit mode.
[Android Apps and Games] rogro82:
There were indeed some posts lost during the hiccup... Dont think there were any illegal copy scripts posted in this thread else i would have said something about it... if you search closely you will find me pointing people not to ask for warez/illegal stuff on xda.

Not that im an angel, but being a developer I love getting paid by my boss... and for that he needs to earn money on me... and to do that he needs to actually sell the software i make instead of seeing it online 100000x :D

Ive posted an update in the first post.
[Android Apps and Games] rogro82:
Shaneaus... ive noticed that it doesnt work on adding only on editing... could you try to edit one and let me know if it works... ill fix it right away.
[Android Apps and Games] rogro82:
Updated the release in the first post and on the google code project
[Android Apps and Games] shaneaus:
Just tried out the new update.

So, the only script I have run successfully was to reboot... In which I received no feedback as the phone shut down.

If the program just reads "Thread started!" and doesn't shut down or provide any feedback whatsoever... Than am I to assume that the script did not run successfully?
[Android Apps and Games] rogro82:
Either it doesnt finish, or it doesnt output anything... can you post a script so i can give it a try and see what goes wrong.

Just try it with the most simplest of them all and just run a "ls"... it should output a directory listing. and the "Script finished" and should then auto-close.
[Android Apps and Games] rogro82:
I think I know what goes wrong for your scripts... do you use sh in them? If so can you try it without using sh... using sh in your scripts starts a new sh instance and so the output isn't available for the executing sh/su instance...

You shouldn't have to use sh/su commands in your script since its alreaady executed that way.

Can you give that a try and let me know if it works...

Edit:

That was indeed the issue.... So people if your scripts arent giving any feedback please be sure to not use sh/su...
[Android Apps and Games] shaneaus:
Ha - you hit it right on the money and put your post up at the same time I figured it out/PM'd you. I was absently typing in the "SU" prior to the script!

Once I took the SU out the scripts ran perfectly. AWESOME!

This is an app I run every day. It was great when I was on the JF/Lucid mod!

I was constantly using this to change themes and fonts!

No I just set my processor speed, re-start, etc. But, soon, we'll be using it every day again!

The only and last improvement I can think of would be if Gscript would sort the scripts in alphabetical order. But, that is VERY minor and I recognize that I am somewhat OCD! :D

10 star out of 10 star app!
[Android Apps and Games] Ryanmo5:
Well it looks like its not compatible for 1.5 jf's version. I can get into gscript but it doesn't execute commands. Hope you will find a fix soon, this is one of my must have apps.
[Android Apps and Games] jonnybueno:
I second this. Not working for me. I love this app, very useful. Please make this available on the market so I can update through there. Id pay 5$ for this.
[Android Apps and Games] beagz:
Just so you have information it works very well when using Dude's .93 cupcake edition. So the problem may be related to something in JF's build. Maybe a special modification made by him in the build? At any rate just FYI.
[Android Apps and Games] indiekid97:
I'll go ahead and be the third to confirm that GScript won't execute anything on JF 1.5.

It opens, reports "Threaded Started" and then...nothing.
[Android Apps and Games] Binary100100:
Could it be SU causing issues in 1.5?

Correct me if I'm wrong... but I think that it's only if you try using SU command or using the SU checkbox.

I had debian on my RC33 and it still works in Terminal Emulator.

So I enter a command in GSCript like:

Debian starts running but it says that I don't have root and terminates.

Now when I use the SU checkbox or enter SU in the script (like before "cd /sdcard/debian") it just sits there with "Thread Started".

So... could the SU command have something to do with GScript not working right?
[Android Apps and Games] savethechicken:
I think that it has something to do with the new superuser program. I am going to put the old SU program back on the rom and see if that makes a difference.

Will update with results shortly.

Still a no go Either by trying to install the old SU back on the rom through Terminal and even just adding to the JF rom like I have done in the past and resigning it. It will not show the old SU program in the list. So a no go I might try to wipe and see if that makes a difference but just dont want to do that right now. May wait to see what rogro82 can come up with
[Android Apps and Games] rogro82:
Yes, didnt have much time this weekend ( dutch queens day, which turned out in a disaster ) , but i just updated to JF1.5 and it seems to be that the new superuser whitelist behaves differently then the previous one and it doesnt allow scripts to be executed as su some how, using just sh does...

Ill look into it and if I cant find a quick solution ill ask JF what has changed, so I can fix it asap.
[Android Apps and Games] :
What script would you use to backup and restore your applications, I heard someone talking about using gscript to do this, and if its through nandroid, and fastboot using gscript how exactly would I do this? Any answer would help, thanks in advance.
[Android Apps and Games] Binary100100:
Well I just tried to rm superuser.apk and then rebooted. Unless I need to remove anything else other then the Superuser.apk app then it's not the superuser app because I still have the same issue. any ideas?
[Android Apps and Games] rogro82:
Its not just the superuser app but I guess also /system/bin/su has changed... but ill upload a new version in an hour for people to test..
[Android Apps and Games] rogro82:
Ok updated the first post with a new version and also uploaded it to the google code project... Please let me know if everything is working or not.

Ive tried some small script like reboot etc and all seems fine... if someone with some bigger scripts could try it please :)

About the question about putting it on the market:

I dont think putting it on the market will do the app any good. In here I can give support more easily, talk/listen to the people using it and i know that most request/bugs etc are taken seriously by the people in here..... and i wont get any FIRST in here :)

Maybe, if a lot of people would like it, ill create an update feature which will look for a newer version on the Google code project site... This way you can decide to update or not.

And if you really want to support my work you can always buy me a beer using the link in my signature, but you are totally free to do what you want. I don't want to use the market to make money using this app.... Id rather have people using it often just buy me a beer ;)
[Android Apps and Games] Ryanmo5:
Spoke too soon, looped my phone rebooting it. Now it wont stop looping, time to wipe
[Android Apps and Games] rogro82:
I havent had any issues like looping.... and i rebooted it like 5 times. you just did a reboot? or did anything before that could have caused it?
[Android Apps and Games] Ryanmo5:
I didnt do anything but install gscript, load reboot and rebooted.
[Android Apps and Games] indiekid97:
No Dice

Just updated and ran a few scripts, it seems that <i>short</i> scripts without su will now run but not anything longer

I tried running a cache clearing script I wrote a while back without su (it only wipes from /data/data, so there's no need to su) and the thread refused to start.

I'll put my phone in debug mode and post the output when I get back to a Debian box.
[Android Apps and Games] rogro82:
Can you put your script online here so I can see where it goes wrong or pm it to me.

Does it say "thread started" or "Script executing started"?
[Android Apps and Games] psjames:
Reboot and now looping

I just installed the latest GScript build on JF 1.5 so that the scripting would work. I created a script with su and the just reboot for the script. It rebooted but got stuck at the android screen.
[Android Apps and Games] jonnybueno:
I havent had any issues yet. Everything has been working fine for me. Are you guys using dxtop or ahome? I was having issues with those apps, and every once in a while, they would cause my phone to boot loop when reboot using terminal. After setting my home as default, i havent run into any problems.

Edit: Almost forgot. Thanks rogro82!!! You're the man!
[Android Apps and Games] hairpin:
Ok, not sure what everyone else here is using Gscript for, but my scripts are fairly simple.

Scripts that output a constant stream of information until closed seem to no longer work. Previously, they would spit out info until I closed the window and killed the process. An example of this is my tcpdump script.

tcpdump -i rmnet0 -qtn

(requires su checked)

This now just hangs at "Script executing started".

Simple scripts that either do a task and exit, or print info and exit seem to be working ok.

ifconfig

(requires su checked) is working ok.

reboot

(requires su checked) is working ok.

Hope this helps
[Android Apps and Games] rogro82:
Im working on it as we speak.... I had to change the script execution, because using the old way didnt work with the new superuser app... Only problem is that this way is more "sensitive" in terms of threading etc then the old way ( the same way the terminal app works ) was...

Hopefully I can fix it tonight...

Thank you all for your input and time...
[Android Apps and Games] savethechicken:
Thanks for the update I'm not havng any trouble running any scripts I write in the program but my problem is not reading the scripts that I have saved on the sd card from the previous loads. I even tried rewriting the scripts on my desktop(Ubuntu) and they are still not showing when I try to load a script. They just saved on sdcard root direcroy (/sdcard).
[Android Apps and Games] rogro82:
Ok ive been working hard to fix the problems with the longer running script.

Ive made some major changes and hopefully all is working.. I ran "du" and "logcat" without any problems.

Ill first upload the .zip file in here, before updating the first post, so people can test if its working correctly.

Please let me know if all is well ( It still needs some cleaning up code wise and the script output can be a bit nicer, but its good for now ).

Edit:

@savethechicken: To load the script files from the sdcard you need to make a folder on the sdcard called gscript and put the files in there. This has been changed to make peoples sdcards a bit more organized :) you can also just save one script and it will create the folder for you.
[Android Apps and Games] grazy:
The latest update is working on JF 1.5 ADP, thanks.

A fresh reboot is recommended after the update.
[Android Apps and Games] indiekid97:
The latest update is working for me as well.

Thanks for the great work!

I'd much rather have a messy working build, than one that doesn't function :]
[Android Apps and Games] shaneaus:
I downloaded the latest version from the Google site. Uninstalled the older version - than installed the newest one and rebooted.

It doesn't work for me. It shows Thread started and stops. The script obviously doesn't run because it doesn't reboot with the reboot script.

Any advice?
[Android Apps and Games] rogro82:
Can you try the one 2 posts above? Still need to update the first post and the google code site.

Edit:

New version also in first post and google code project site
[Android Apps and Games] beagz:
P

Confirm same result on Dude's .94
[Android Apps and Games] savethechicken:
Lol my bad Im guessing I need to read a little more... Thank you for the update works great.
[Android Apps and Games] MontAlbert:
new version, although it still says version 1.o, works great on dudes 0.94....

not that my scripts ar emuch good.... anyone want to share decent scripts with me? wipe cache script?
[Android Apps and Games] beagz:
Always helps to uninstall then install fresh. Working now.

Clearcache works for dude .94

rm -r /data/data/com.android.browser/cache/webviewCache

rm -r /data/data/com.google.android.apps.maps/cache/webviewCache

rm -r /data/data/com.google.android.street/cache

rm -r /data/data/com.android.vending/cache

rm -r /data/data/com.google.android.gm/cache/webviewCache

rm -r /data/data/mobi.beyondpod/cache/webviewCache
[Android Apps and Games] rogro82:
Glad to hear its all working :)
[Android Apps and Games] shaneaus:
Ver .13 is working for me as well. Thanks!

Also, here is a script I wrote. It is more for developers/debugging so I'll post it here as well as on the app page.

This should be elementary to any dev. But, I am not a dev! It is the first script I have written without input from anyone else. I was having an issue and wanted to find out if an app was causing it. This will save the logcat as text on the sdcard:

logcat -d >/sdcard/logcatoutput.txt

Hope this helps someone besides me! LOL
[Android Apps and Games] xidominicanoix:
anyone have a list of scripts that we can use

been searching for a while and havent come upon a list of them
[Android Apps and Games] BSDADON:
a couple of them are on here

http://xdaforums.com/showthread.php?t=488928
[Android Apps and Games] purg:
The first must have app imo

I have 1 question.

How can you request user input within a script?

The following I would have thought works but doesnt

echo "Please enter name :\n"
read name1
echo "Welcome $name1"
[Android Apps and Games] beagz:
I noticed that gscript does not handle this type of script. I tried it for a couple things and could not get it to work even though the scripts worked well in terminal.
[Android Apps and Games] rogro82:
For people that would like to be able to auto update using the market.... GScript is now for sale in the Android market..

This way you can support further development for the app.

I will also create a free lite version in the market... the free version will get a small ad in the main screen.

I hope people understand that, although i didn't like to put it on the market, I too need to make some money and this project has been taking a lot of my free time. I will keep giving everyone support in here and will keep updating this thread.

Regards,

Rob
[Android Apps and Games] Ryanmo5:
Nothing wrong with you getting paid for your work man, don't carry any guilt with it. It is a must have app and one of the best for root users, will be happy to support you
[Android Apps and Games] jonnybueno:
im really glad you put your app in the market. You should've asked more for it though. IMO its worth 5$ easily and I'd like for you to make some money since your app is so useful. Thank you
[Android Apps and Games] shaneaus:
I already sent you $20.00US for your work on Gscript...

But, that was a donation of thanks.

I'll gladly purchase it from the market as well!

Don't be abashed at asking to get paid for your hard work! Your program is the first one I install after apkInstaller when I have to wipe my phone!
[Android Apps and Games] justjimjpc:
Problem loading sh files into GScript

I d/l'd the zip file from this thread...

installed the apk on my g1 (rooted Jf adp 1.5)

i have maybe a doxen sh files in /sdcard directory

I have put the name into the "name" box in many combo nations put cant get gscript yo load the script ..

/sdcard/ext2rcvr.sh

ext2rcvr.sh

ext2rcvr

none of the above worked ... am I missing something I looked at the screen shots .. with the "reboot" example ..

Thanks Jim
[Android Apps and Games] beagz:
Files need to be in /sdcard/gscript to be seen.
[Android Apps and Games] rogro82:
Thank you all for your support and understanding! :)
[Android Apps and Games] justjimjpc:
It is the simple things ... Works as expected now ... Thanks Much for the help.
[Android Apps and Games] pershoot:
hey all.

im using gscript lite.

would this work to reboot in to recovery and flash an update.zip ?

#!/system/bin/sh

echo "boot-recovery --update_package=SDCARD:mytheme/update.zip" > /cache/recovery/command

reboot recovery
[Android Apps and Games] rogro82:
Copied over from the Gscript "scripts" thread:

echo "boot-recovery

--update_package=SDCARD:themes/aero/update.zip" > /cache/recovery/command

reboot recovery

The link to the scripts thread is:

http://xdaforums.com/showthread.php?t=488928

Dont use sh or su in your scripts because gscript already executes the scripts using sh or su.

For scripts that require root/su access make sure to check the "Needs su" checkbox.

Have fun :)
[Android Apps and Games] pershoot:
thx. i had it first with a space between boot-recovery and -- but it didnt like that. it needed the carriage return.