fandreuz / TUI-ConsoleLauncher

Linux CLI Launcher for Android
Other
1.24k stars 254 forks source link

A complete list of allowed commands? And more questions. #131

Open Fieel opened 6 years ago

Fieel commented 6 years ago

Hello,

i checked the tutorial, FAQs and various links and couldn't find a list of acceptable commands i can safely run, am i missing something? I know i can print a list of stuff with 'help' but i'm talking about the native unix commands.

Which commands from the unix environment can i run? Can i run any kind of script? I noticed i can create and run .sh scripts for now.

How is the username choosen? My username is a weird string composed of random characters and strings.

mkoutsouris commented 6 years ago

T-UI isn't installed in the root or system directory, so your ability to run any command of significance is severely restricted. The T-UI launcher lives in a subdirectory of your portion of the Android directory...the part you can read-write-delete from, because it's your data.

You can run a script which affects only files and folders you have permissions to.

I'm not sure, but I believe the launcher has a toybox of commands which are T-UI specific, along with more general ones.

The final thing to keep in mind is that T-UI isn't a terminal emulator, and shouldn't be used as such. It's a launcher...a lightweight way of accessing your apps and files, without all the RAM-sucking regular launchers need because there's wallpaper, icons, effects, etc.

I hope this helps.

-Mike

From: Filipe Madureira Sent: Wednesday, November 22, 2:36 PM Subject: [Andre1299/TUI-ConsoleLauncher] A complete list of allowed commands? And more questions. (#131) To: Andre1299/TUI-ConsoleLauncher Cc: Subscribed

Hello, i checked the tutorial, FAQs and various links and couldn't find a list of acceptable commands i can safely run, am i missing something? I know i can print a list of stuff with 'help' but i'm talking about the native unix commands. Which commands from the unix environment can i run? Can i run any kind of script? I noticed i can create and run .sh scripts for now. How is the username choosen? My username is a weird string composed of random characters and strings. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAndre1299%2FTUI-ConsoleLauncher%2Fissues%2F131&data=02%7C01%7Cmkoutsouris%40hotmail.com%7C31ab1a2c75cd459e9f4408d531e8c54f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636469798161544212&sdata=VhJ99ustMpUDspM67WDA9RlaW8RksoLzriY1dcoYrkg%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAfeOs8yw8HEnMc1VLNok0CKYI6Mmlosrks5s5IXegaJpZM4Qn-Co&data=02%7C01%7Cmkoutsouris%40hotmail.com%7C31ab1a2c75cd459e9f4408d531e8c54f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636469798161544212&sdata=pW9C3eN%2BFlx9pjF%2FtIhG%2BFvEd9aT%2FQa9HL%2FFxDuHc9Y%3D&reserved=0.

Fieel commented 6 years ago

@mkoutsouris

without all the RAM-sucking regular launchers need because there's wallpaper, icons, effects, etc.

How big is the impact change on the battery life?

mkoutsouris commented 6 years ago

I have noticed a significant increase in battery life, and a gain of almost a gig of RAM.

While running T-UI, I could go almost 2 days of regular use before recharge. I do tend to switch between Samsung's TouchWiz launcher and T-UI, so I really notice the difference.

-Mike

From: Filipe Madureira Sent: Thursday, November 23, 10:00 AM Subject: Re: [Andre1299/TUI-ConsoleLauncher] A complete list of allowed commands? And more questions. (#131) To: Andre1299/TUI-ConsoleLauncher Cc: mkoutsouris, Mention

@mkoutsourishttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmkoutsouris&data=02%7C01%7Cmkoutsouris%40hotmail.com%7Cc9d80c05b7124fcaf50808d5328b497e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470496164315001&sdata=dqQM7hAMLDR55%2B9ItuZWbnzku6YNdc9tV%2FI4sn1rWnc%3D&reserved=0 without all the RAM-sucking regular launchers need because there's wallpaper, icons, effects, etc. How big is the impact change on the battery life? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAndre1299%2FTUI-ConsoleLauncher%2Fissues%2F131%23issuecomment-346654135&data=02%7C01%7Cmkoutsouris%40hotmail.com%7Cc9d80c05b7124fcaf50808d5328b497e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470496164315001&sdata=WlWXl4HTI5lBzB5TBNVqPrMPymB%2BNf2MykBbweMR9tw%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAfeOs5rg8uAW8C4JwqkjQ1I8_bZwqkmkks5s5ZaHgaJpZM4Qn-Co&data=02%7C01%7Cmkoutsouris%40hotmail.com%7Cc9d80c05b7124fcaf50808d5328b497e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636470496164315001&sdata=VzvfE9CNJUA5ZoRGC8sMqLp4ONK72ovfdXjWQSvBWOw%3D&reserved=0.

Fieel commented 6 years ago

I can't even run the ping command at the moment. It takes 10 second to give me any output, which is 100% packet losses. Every time, for 2 weeks now.

tukusejssirs commented 6 years ago

to get the list of Android shell commands (which are not the aame as UNIX/Linux commands, although some work like them, the available option might differ), run shellcommands

as for the ping, I just to run ping -c4 8.8.8.8 without any problem ...

and what scriptsyou can run? any Android-specific script, that isa script you've written specificly for Android OS and a specific version of it ... the reason for this is that, e.g., df command from Linux coreutils outputs sizes in bytes (i think), but on Android in 'human-readable' format (equivalent to Linux df -h) ...

alternative to stock Android shell commands is BusyBox, using which you can install more Android-specific commands not available in stock Android ...

and about the user name—I don't know, but I think it reads some Android settings provided by oem ... my user name isuser ;)

tukusejssirs commented 6 years ago

just found out that for tui, you can set set username and deviceName (aka hostname in Linux) whatever you want with config -set [username|deviceName] "whatever you want"

Fieel commented 6 years ago

Sometimes commands like ping (i think all commands with constant output really) don't show any output and after a while i get a screen literally spammed with thousand of outputs (imagine a ping command running for an hour but you have no idea because there is no output, and all of a sudden the screen is filled with pings).

Anyways thank you for the username and devicename command, i've finally been able to change username ahah.

I'm not running any script atm, but i'd love to, just for fun, without a real documentation how could it, though? I'll see what i can find with the shellcommands list

tukusejssirs commented 6 years ago

I presume that the delayed output of Android Shell commands is caused the fact the tui is not a terminal emmulator (as @mkoutsouris already said), but, in a sense, an 'emulator of terminal emulator packaged as launcher'.

What I think it is doing is running the user-input command in Android terminal emulator (in background), catches the output (probably after some delay or after every x seconds to minimise the resources usage) and finally outputs on the screen.

Agreed, it'd be better if it would be more like a terminal emulator, or even be a terminal emulator, but the latter would require to re-code it from scratch.

As for the scripting, first you need to know what you are about to script and the possible programs/apps you could use. I think the wifi etc tui commands could be used too (you would not need to code them from scratch), but that would not be Android-specific, but tui-specific. When I have time, I'll try 6o write some scripts, but no ETA I have. ;)

Indestopable commented 5 years ago

I managed to start the ping command but cannot stop it. How do we simulate a CTRL-C break in this cli?

Indestopable commented 5 years ago

Never mind.... There is literally a CTRLC command lol

igotapochahontas commented 4 years ago

How did you create/run a .sh file? What directory does it need to be in to be "executable" from the "terminal"?