yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] rogro82:
Hopefully ill have an update this week

Some new features:

Basic terminal emulation ( input handling, color support, cursor control ) etc.

The terminal has 2 gesture modes ( scroll, cursor ) and additional soft-input methods for keys like ctrl, escape etc.

Scroll-mode:

Normal scrolling, auto-scrolling and fast-scrolling (right-edge), double tap on top/bottom to jump.

Cursor-mode:

Edges of the screen will send d-pad (up/down/left/right) keys ( multiple pointers/fingers to control speed of repetition ).

Swipe up/down for page-up, page-down and swipe left/right for home and end keys.

The ability to start a terminal/process directly.

The ability to create aliases directly to a profile. Enabling an alias will add a shortcut in the launcher directly to the selected profile.

Currently 3 aliases can be set (terminal, su, sh). Sadly android is pretty limited in this area and it only allows enabled/disabling of components so there is no way to change titles, but i guess these 3 are most common.

As soon as Gscript will get out of alpha/development state it will go up on github, but at this moment too much core features are still being worked out.
[Android Apps and Games] overground:
That looks awesome! Will try out when you release.

Thanks for your work! :good:
[Android Apps and Games] rogro82:
Gscript alpha-3 download ( and updated changelog ) available in first post

* In case of issues please be clear and give as many details as possible.

* During the alpha-state i will keep multiple versions available for download ( so be sure to check version numbers ).

* During the alpha-state it is required to do a re-install instead of an upgrade ( because of possible breaking changes ).
[Android Apps and Games] rogro82:
Current work in progress for alpha-4:

schedules
[Android Apps and Games] rogro82:
and another feature for alpha-4 which will make it easier to manage scripts on multiple devices:

Google Drive library
[Android Apps and Games] Rihaan_luckystar:
group apps launcher script

Hi , I am using android ICS AOSP on my tablet, I have my device rooted. I have debian istalled as a loop device in the tablet. so, I want to have a link on my tab's home screen that automatically redirects me to open office application available in debian. the steps that I follow before getting the same are,

- launch debian linux through widget

-wait for terminal to show localhost#

-start vnc

-press on connect

-now i have debian running, right click,select office,select app

I want the above process be performed by a script, so that I get to the open office in one click!! Is it possible, can anyone help please, if not then where can I find my answer? :confused:

please tell me step by step and help me write that script.....thanks!
[Android Apps and Games] DualJoe:
Works properly so far on CM10.1. Thank you.

- [Bug] Libraries pointed to /data (or subfolder) don't show any files (root?)

- [Feature request] X seconds timeout after 'exit' (terminal window auto-close)

- [Feature request] No confirmation dialog when clicking shortcut (instant execution)
[Android Apps and Games] kapil_dheer:
Can somebody make a shell script to install all apk files in folder /sdcard/new using command

pm install -r .........

I fail to get the shell code for this and I'm new to linux.
[Android Apps and Games] rogro82:
- The issue with not showing any data is indeed because the app has no read rights there

- I will add an auto-close feature in the next version

- I will also add a setting to disable the dialog popup for shortcuts

Thanks for the suggestions!

I have been very busy last month, but I will release the latest work soon ( which includes a basic scheduler and drive support )
[Android Apps and Games] rogro82:
I am currently very limited in time ( because of a very busy work schedule ), but because gscript is a tool that "requires" root-access i feel the urge of releasing source so that people can safely use it.

The current code ( as-is ) can be found on my github:

https://github.com/rogro82/gscript

As soon as I have more time to contribute to gscript ( and xda in general ) I will continue to add improvements so feel free to post feature requests.

fyi:

the current code on github already contains an initial start on the google drive library as well as a basic scheduler
[Android Apps and Games] ildar_prophet:
That's so great! But could you please clarify the license of the code? (e.g. GPL, BSD, Creative commons etc.) People asking...
[Android Apps and Games] karandpr:
[MENTION=3983657]ildar_prophet[/MENTION]

https://help.github.com/articles/github-terms-of-service
[Android Apps and Games] ildar_prophet:
Nope, irrelevant.
[Android Apps and Games] karandpr:
https://help.github.com/articles/open-source-licensing

This was the link. ..if not explicitly mentioned, ithe code belongs to OP
[Android Apps and Games] ildar_prophet:
I wonder what OP is.

I don't like this hence asking [MENTION=962224]rogro82[/MENTION] .
[Android Apps and Games] karandpr:
OP=Original Poster=rogro82

Now my first link becomes relevant ....:highfive::victory:

https://help.github.com/articles/github-terms-of-service

It doesn't matter whether you like it or not . Unless explicitly mentioned ,the code belongs to rogro82 and will come under the purview of relevant copyright laws ...
[Android Apps and Games] ildar_prophet:
That's why I'm asking [MENTION=962224]rogro82[/MENTION] to explicitly confirm that, hoping that he intended to OpenSource the code...

BTW, the former version has the Code license: Apache License 2.0!
[Android Apps and Games] rogro82:
Copy of PM reply ( so that it is publicly available ):

Sorry I totally missed the post ( and quotes ).

I guess I totally forgot to add a license header while doing a quick push to github, but hereby I acknowledge that Gscript and the additional binaries ( gscript-input and gscript-exec ) are licensed as "Apache License 2.0".

I will soon add the appropriate license and headers ( most likely this weekend ).

Thanks,

Rob
[Android Apps and Games] DualJoe:
rogro82:

What do you think about implementing a Toast feature in your app? There is already an app doing this but its not working very well.

With that you can invoke a Toast with 'am start -a android.intent.action.MAIN -e message mytoastmessage -n com.rja.utility/.ShowToast' that is very helpful when using GScript unattended to get some feedback. I particularly would use it to verify if a mount was successful.

:o
[Android Apps and Games] rogro82:
Sorry for the late response but ive been very busy lately.

Gscript already includes gscript-input which allows you to send toasts and create input dialogs with checkboxes, radiobuttons or text input.

The first post has an example of how to accomplish that:

# items are ; seperated key:value pairs
# keys with a * prefix are pre-selected
# in case of radiobuttons only the first
# selected item will actually get selected

RESULT=$(gscript-input \
list \
"Choose" \
"Select multiple" \
"0:The first option;
*1:The second option;
*2:The third option;
*3:The last option;")

gscript-input \
toast \
"Selected items: $RESULT"

echo "Selected: $RESULT"

SELECTED=$(gscript-input \
list \
"Choose" \
"Select single" \
"0:The first option;
*1:The second option;
2:The third option;
3:The last option;" \
radio)

if [ $? -eq 1 ]; then
gscript-input \
toast \
"You selected $SELECTED"
fi

echo "Selected: $SELECTED"

NAME=$(gscript-input \
text-entry \
"Name" \
"Please enter your name")

if [ $? -eq 1 ]; then
gscript-input \
dialog-info \
"Welcome" \
"Welcome back $NAME"

echo "$NAME"
fi

gscript-input \
dialog-message \
"Finished" \
"Finished processing script.. do you want to exit now?" \
yesno

if [ $? -eq 1 ]; then
gscript-input \
toast \
"Goodbye $NAME"
exit
fi
[Android Apps and Games] MegaWEB.ORG.RU:
Error on install gscript_1.0.0-alpha3.apk

Try to install gscript_1.0.0-alpha3.apk is failure with message "Parse error / There is a problem parsing the package"!

P.S.: Hardware Device = HUAWEI-U9000 / Android version = 2.2.2 / Run under Total Commander with SU rules.
[Android Apps and Games] ildar_prophet:
Sounds like a broken package. Redowload.
[Android Apps and Games] MegaWEB.ORG.RU:
I have download GScript already from other forum

I have download GScript 1.1.2 from 4PDA.RU already.
[Android Apps and Games] chrhei:
Found Gscript today, love it. THX.
[Android Apps and Games] DualJoe:
[MENTION=962224]rogro82[/MENTION]:

Can you update Gscript for Lollipop? The native binaries do not run anymore on Android 5.

localhost bin # ./gscript-input
error: only position independent executables (PIE) are supported.
[Android Apps and Games] ildar_prophet:
Guys, I'm sorry to share that but I moved off the GScript: There's no more reasons (for me) using GScript: now the Terminal emulator can do the same since in 1.0.60 it has "Shortcuts" functionality.

Also available @ Play Market.
[Android Apps and Games] DualJoe:
It doesn't look like it has all the nifty features of gscript though like toasts, background invoke and such.

I could fix the PIE dependency by actually patching the check in 'linker' binary. Gscript still works on Android 5.1.1 but who knows for how long. I would appreciate it if gscript would be resurrected.
[Android Apps and Games] benmyers2941:
My thought was that a developer in the know could have a script loaded with their application. Then they don't have to integrate issuing commands into their application. It was a bit of an afterthought, and I agree of limited usefullness.
[Android Apps and Games] dirr:
Latest update when downloading from the zip gives an 'unsuccessful install.' Previous version where the .apk itself was uploaded still installs fine

Edit: I messed up somewhere and had to wipe, installed fine.
[Android Apps and Games] rogro82:
Ok let me know if everything is working as it should. :)
[Android Apps and Games] im.l0ltn:
Wonderful job. Thank you for making it open source and not charging money for it.
[Android Apps and Games] a1t:
Unable to install

I am also unable to install. The provided link doesnt not successfully install. Any suggestions? Thank you for your time.
[Android Apps and Games] rogro82:
The nature of the app requires it to be open-source in my opinion. I wouldnt want to give an application root rights without knowing what its doing exactly..

Although im very fond of money ( who isnt these days :D ) I dont think an application like this should be sold... im also not putting it on the Android Market as i cant give easy support over there.

Hopefully a lot of people can make a use of it.
[Android Apps and Games] rogro82:
I have no idea why it shouldnt install right... You downloaded the attached zip file from the 1st post and extracted it and then copied the .apk file to your phone?
[Android Apps and Games] a1t:
Install Resolved

I have it up and running now. I'm not exactly sure what happened. I took the DL and put it on the root of the SD, used AppInstaller and nogo. I then just got your newest apk a few minutes ago and it installed fine. I wish I could provide more info as to prevent this from happening in the future, but thanks! This is great.

I was wondering if anyone would like to include their script used to mount debian via gscript.

Thanks all!
[Android Apps and Games] a1t:
Quick quesion

I'm goin to put it out there that I may be a beginner to just try and save some time here. I have loaded the 'bootev.sh' into Gscript. When I run this script, (via Gscript) gscript_tmp.sh is created on the root of the /sdcard. At which point, I can call upon this script through the terminal.

If I understand correctly, I should not have to open the terminal for this script to work. Is this correct? If so, when I run the script loaded (now on my desktop of phone) I should have debian mounted and running in which case it is not working.

I can provide additional info if needed. Any help will be appreciated.
[Android Apps and Games] rogro82:
Does debian require the shell to stay alive? I dont have debian installed on my phone, but i'll install it later on to see if this is the case.
[Android Apps and Games] rogro82:
Ok... ive installed debian and like i thought it needs an open shell ( else debian will close ).

I think ill just add a shell so that you can choose either to run the scripts in background or in a new shell.
[Android Apps and Games] Meltus:
has anyone got debian working via this yet? i'm struggling a bit :P

nice app though, works great :D
[Android Apps and Games] a1t:
Debian

I'm at a standstill right now for getting Debian working via GScript too. I dont think this is a limitation of the app, just me. rogro82 has a great app and has been on top of updates, so I am sure it will only be a matter of time. (It does seem as if there is a demand for this apk)
[Android Apps and Games] prash:
This app just made things so much easier for me now, thank you so much :]

If you want some server space to host the files let me know I may be able to set something up. PM me if interested :]
[Android Apps and Games] short/y:
Nice app! Would it be possible to add the ability to display output? I could replace a couple of bloated utilities with a couple of scripts. df -h, netstat, ifconfig tiwlan0, top are all things I run regularly and there are a couple of apps I use to be able to do it from the GUI as opposed to opening Terminal and typing them in.
[Android Apps and Games] rogro82:
Im going to incorporate a terminal in the application so that people can choose between running there script in the background or let it run in a shell ( and thus being able to see the feedback ).

This way all scripts will work even the debian bootdeb that requires a running terminal and it will also allow you to run a script and then continue after it finished.

It will take me some time, but it will be there before monday i guess :)
[Android Apps and Games] Gimpeh:
Welp that explains why I couldnt get my debian script running. Thanks Rogro!
[Android Apps and Games] short/y:
Yahoo and double yahoo! Or, maybe, Google and double google! :D
[Android Apps and Games] Rafase282:
It i snot installing for me idk why.
[Android Apps and Games] jaapschaap:
Is it possible to let the script run on background (just a checkbox)? So we can start debian and LET IT RUN, instead of closing it after executing the script/comando...

I wil installe debian when that's done :)
[Android Apps and Games] rogro82:
Its because of the way things are executed that debian isnt working.

So i decided to change everything... executing a script now gives feedback and keeps the process running until it ends. Its running in its own thread so it wont kill the UI or force closes.

This way you CAN run debian as it doesnt finish ( bootdeb keeps running ). So you can just create a script that calls "su /sdcard/debian/bootdeb" run it... press the home button and start vnc and connect to it.

Only real problem is being unable to cleanly exit the process as i havent made a way to send input to the running process.... Ill look into that later on.

Also ill reimplement the "silent" run in background option as it now always shows the feedback and ill have to recreate the silent option.

Ill upload a new version in a few so people can give it a try.
[Android Apps and Games] rogro82:
Updated the first post... going to upload the source to the repository in a few seconds.
[Android Apps and Games] a1t:
Script to call bootdeb

rogro82 - thanks for the progress on this app!

I was wondering if you could give me a push in the right direction for writing a script that calls the bootdeb.sh

I think (no laughing - I have to start somewhere):

#!/bin/bash

su /root/sdcard/debian/bootdev.sh

Thanks for the assitance!
[Android Apps and Games] rogro82:
mine is:

su /sdcard/debian/bootdeb

So you were on the right track.. Im not laughing when questions asked :)

My linux knowledge also isnt that good... Only use it for development ( Java and kernel/driver development in C/C++ ) so I also need to ask things on a regular base.
[Android Apps and Games] Gimpeh:
The new update is failing to install. Any suggestions.
[Android Apps and Games] rogro82:
I have no clue why it doesnt install for some people. Can someone else report if installing went successful or does it fail for everyone?

Ill resign and zip the apk file again... maybe that will solve it.

edit:

reuploaded the zip file... can you try again? Are you sure you set the "Unknown sources" in Settings \ Applications
[Android Apps and Games] short/y:
Make sure you unzip it. The apk is in the zip.
[Android Apps and Games] Gimpeh:
Unzipped, Used the apps installer to install. It begins install but then says it was unsuccessful.
[Android Apps and Games] TheDudeOfLife:
Try the zip from the OP.

I didn't have any problems installing that version.
[Android Apps and Games] Gimpeh:
Zip from the OP? I don't quite understand. Dismorning I downloaded the latest version and unzipped it, put the APK in my SD card and installed. This was done via my laptop. The install failed then. I then deleted and have tried downloading the zip file directly to my SDcard from the website via the G1 itself and unzipped it using the unzip tool available in the market. Still it says installation unsuccessful.
[Android Apps and Games] speoples20:
OMG I love this app sooo much!!! One question were does it save the script files? I usually wipe my phone every so often would like them to save on the sdcard so i can just install the program again and run my cache to the sdcard scripts.
[Android Apps and Games] prash:
I'm also getting 'application install unsuccessful' when installing the latest version. Thanks for the updates, its looking like a great little tool I'll be using pretty much daily now.
[Android Apps and Games] a1t:
Proper Exit

CONFIRMED - running the script via GScript will launch Debian (no screenshot option - it just edits the text when using a shortcut) followed by VNC you can get the GUI.

Correct, the next step would be properly exiting debian and any apps you set up in .bashrc. I am wondering if one could create a script to terminate these processes from with Debain. Your thoughts?

Cheers!
[Android Apps and Games] rogro82:
Thanks for liking it.. im also using it on a daily base :)

My phone has only been rooted for a week now ( europe ) and finally im starting to like Android. Didnt bother development ( besides some small location awarness apps ) when it wasnt rooted, so im catching up as quick as I can.

As for the data its stored in a sqlite database so they are in the apps data folder i guess. If theres no easy way to back this up ill just create an "Export to xml" and "Import from xml" function. That way it will also make it easier for me to modify the database ( if needed ) in the future without having to worry about people loosing there scripts.

As for exiting Debian:

Ill look into a solution.. I guess making a textbox and a "send" button would be the most appropriate way, without just adding a feature that only is useful for debian. I want to keep things as common as can be. Or if someone could figure out a way in Debian itself that would also be great.

For people who are having problems to install:

Could you post up which version of android you are using?
[Android Apps and Games] Gimpeh:
Jf rc33 1.42
[Android Apps and Games] rogro82:
Same as i am.. Is the unknown sources checkbox enabled? Did one of the previous versions work?

Edit:

Uploaded the unzipped .apk file to the source project on google ( http://code.google.com/p/gscript-android/downloads/list )
[Android Apps and Games] Gimpeh:
Unknown sources is checked. The first version worked without a hitch.
[Android Apps and Games] rogro82:
Have you tried manually uninstalling that version and reinstalling the new one.
[Android Apps and Games] Gimpeh:
That was one of the first troubleshooting step I took. It had no effect.
[Android Apps and Games] rogro82:
Weird... i cant figure out why most people can install it and some just cant :rolleyes: The previous that mentioned not being able to install did a hard reset and then everything was working... so there must be something stored/set thats causing it to fail.

Development wise i didnt do anything else then the previous version... build->signed->zipped and then uploaded.
[Android Apps and Games] :
Thank you! Very useful.

How about an option for each script (maybe another checkbox next to "needs su") that forces it to ask for confirmation before running so I don't, for example, accidentally run my reboot script when I just wanted to run my backup script.
[Android Apps and Games] tubaking182:
to those having trouble, just put the apk on your computer and install from adb, i know it's a hassle but if you really want it try that. i don't know if it'll solve a problem because i just downoaded to the comp and did that anyway, i never tried to copy it to my phone and then install
[Android Apps and Games] manup456:
I named the folder themes and put the themes in folders in side that now where do i need to enter these commands?

echo "boot-recovery

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

reboot recovery
[Android Apps and Games] shaneaus:
Are you asking where to enter them within Gscripts?

If so, open Gscripts, select the "Menu" button, from the pop up menu select "Add Script,"

Type in the name of your script - I used "Load Theme"

Make sure the "Needs SU?" box is checked.

Type or Paste the above script into the box below the checkbox and select "Save"

I then long press the newly saved script and save it to the SDcard before I run it.

This is what I use to change between your MoonDust Theme and SoloRedu every other day! All I have to do is open up the script and change the MoonDust folder name to SoloRedu, Save, Then Run!

Also, see this thread for a script to change your fonts. I do the same thing to change fonts around to one I like to spice up/refresh a theme a little:

http://xdaforums.com/showthread.php?t=485431&page=6
[Android Apps and Games] beagz:
I just create a new script by opening gscript, press menu button, then add script.

type in the name. I use "theme_****" where **** is the name of the theme.

then just add that command into the script box and substitute the name of the theme in place of "aero".

For example...

I use your theme Moondust (sorry I did not capitalize the letters :) )

so I create a new script called theme_Moondust

I type:

echo "boot-recovery
--update_package=SDCARD:themes/moondust/update.zip" > /cache/recovery/command
reboot recover

into the box.

Then click save.

This allows me to keep the original update.zip file in /sdcard and load any theme from it's own folder.

If a theme doesn't load or locks I can reboot the phone and follow the regular update proceedure without having to remove the sdcard or use the computer.

Folder structure is /sdcard/themes/themename/update.zip

this way I never have to rename or copy/paste anything.
[Android Apps and Games] shaneaus:
That is what is so awesome about running this script. If the theme hangs on ruboot. You can pull the batt, get into recovery mode and run your OS image! No copying/rename/moving files!
[Android Apps and Games] Ethanaxd:
its possible to make an script to change the dns servers? like using opendns rather the dhcp`s ones?
[Android Apps and Games] djlucklu:
keep getting error file / directory doesnt exist. install abort with those steps and the one above yours
[Android Apps and Games] beagz:
are you using SDCARD in all capital letters?

It is case sensitive.
[Android Apps and Games] shaneaus:
Also, are you putting your file information in the code and not ours?

echo "boot-recovery

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

reboot recover

The colored/bold text must be the same as your file structure. In the above structure the user has a folder with all of his themes inside, inside that folder are other folders named for each theme that is inside the pertinent folder. In the above example inside the theme folder is the folder named moondust - inside moondust is the actual theme zip file that was renamed "update.zip"

The above colored/bold text must be replaced with your file system and I believe everything is case sensitive.