Skip to content

Commit

Permalink
Update README.md with new command'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cswl Coldwind committed Nov 14, 2017
1 parent b664e26 commit a5f07a5
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,72 @@

A su wrapper for Termux.

tsu (like tsu as in tsunami, you know ) is an su wrapper for the
tsu (like tsu as in tsunami, you know ) is an su wrapper for the
terminal emulator and packages for Android, Termux.

Unlike my quick,throwout script I wrote [a while back](https://gist.github.com/cswl/cd13971e644dc5ced7b2),
Unlike my quick,throwout script I wrote [a while back](https://gist.github.com/cswl/cd13971e644dc5ced7b2),
tsu will focus only on dropping into root shell from termux.
It seems running commands as root, would require something on a level of sudo.
Which turns out be too much for a bash script.

### Background

This comment has been minimized.

Copy link
@anonymous0435

anonymous0435 Feb 21, 2019

cswl / tsu
Code Issues 8 Pull requests 0 Projects 0 Wiki Pulse Community
tsu/ a5f07a5
Update README.md with new command'

@cswlcswl committed over 1 year ago
README.md
@@ -2,73 +2,72 @@

A su wrapper for Termux.

tsu (like tsu as in tsunami, you know ) is an su wrapper for the
tsu (like tsu as in tsunami, you know ) is an su wrapper for the
terminal emulator and packages for Android, Termux.

Unlike my quick,throwout script I wrote a while back,
Unlike my quick,throwout script I wrote a while back,
tsu will focus only on dropping into root shell from termux.
It seems running commands as root, would require something on a level of sudo.
Which turns out be too much for a bash script.

Background

Leave a line note
Cancel Leave line note
Termux relies on LD_LIBRARY_PATH enviroment variables to find it's libraries.
Termux relies on LD_LIBRARY_PATH enviroment variables to find it's libraries.
For security reasons some environent variables seem to be reset by su, unless
an --preserve-environent flag is passed.
tsu handles this for you and also launches your preferred shell.
su by default will use sh or mksh, depending upon how it is on your device.

Installation

tsu is now available as a termux package. Run the usual apt update to update the list of packages, then
tsu is now available as a termux package. Install it with.

apt install tsu
pkg install tsu

Usage

tsu - A su wrapper for Termux.
 Usage: 
Usage:
 tsu [-s|-p|-e]
tsu by default will try to launch an interactive shell. 
tsu by default will try to launch an interactive shell.
The interactive shell is searched as follows:
	User's chosen shell in $HOME/.termux/shell 
	User's chosen shell in $HOME/.termux/shell
	The bash shell if installed
	The default installed busybox sh shell from termux
	If you need to start another shell. See the -s option
 Options Explanation.
	
 -s [</path/to/shell>]
   Use an alternate specified shell. `//usr` is expanded to $PREFIX.
   For convience, if the path starts by `//usr` it will be expaned to Termux's $PREFIX, 
   For convience, if the path starts by `//usr` it will be expaned to Termux's $PREFIX,
   which is the usr directory of Termux.
   So -s '//usr/bin/bash' will be, "/data/data/com.termux/files/usr/bin/bash"
 -p
	Prepend /system/bin and /system/xbin to PATH.
	So that binaries in /system/bin and /system/xbin/bash will be
	prefrred over the ones provided by termux.
	Sometimes you may want to run the system binaries as root from Termux. 
	Or for cases, where some scripts might expect behavior from the 
	Sometimes you may want to run the system binaries as root from Termux.
	Or for cases, where some scripts might expect behavior from the
	default Android toolbox, busybox.
	
 -e
	Setup up some enviroment variables as when in Termux.
	This adds some default Termux variables, when you wanna run Termux commands from other places like 
	adb shell. 
	This adds some default Termux variables, when you wanna run Termux commands from other places like
	adb shell.
	Currently it sets HOME to Termux's home, and adds Termux's bin to PATH, following the -p option.

Contributing

Know something you wanna add/improve, you're more than welcome to open a issue or create a pull request.
The README was written in a hurry, so some help here too.
The README was written in a hurry, so some help here too.

License

Licensed under the ISC license. See LICENSE.

1 comment on commit a5f07a5
@Seliniux777
Seliniux777
commented 11 months ago
fix usage

Comment on a5f07a5

Leave a comment
Comment
Desktop version Sign out

Termux relies on LD_LIBRARY_PATH enviroment variables to find it's libraries.
Termux relies on LD_LIBRARY_PATH enviroment variables to find it's libraries.
For security reasons some environent variables seem to be reset by su, unless
an --preserve-environent flag is passed.
tsu handles this for you and also launches your preferred shell.
su by default will use sh or mksh, depending upon how it is on your device.


### Installation
`tsu` is now available as a termux package. Run the usual `apt update` to update the list of packages, then
`tsu` is now available as a termux package. Install it with.

```
apt install tsu
pkg install tsu
```


### Usage
```
tsu - A su wrapper for Termux.
Usage:
Usage:
tsu [-s|-p|-e]
tsu by default will try to launch an interactive shell.
tsu by default will try to launch an interactive shell.
The interactive shell is searched as follows:
User's chosen shell in $HOME/.termux/shell
User's chosen shell in $HOME/.termux/shell
The bash shell if installed
The default installed busybox sh shell from termux
If you need to start another shell. See the -s option
Options Explanation.
-s [</path/to/shell>]
Use an alternate specified shell. `//usr` is expanded to $PREFIX.
For convience, if the path starts by `//usr` it will be expaned to Termux's $PREFIX,
For convience, if the path starts by `//usr` it will be expaned to Termux's $PREFIX,
which is the usr directory of Termux.
So -s '//usr/bin/bash' will be, "/data/data/com.termux/files/usr/bin/bash"
-p
Prepend /system/bin and /system/xbin to PATH.
So that binaries in /system/bin and /system/xbin/bash will be
prefrred over the ones provided by termux.
Sometimes you may want to run the system binaries as root from Termux.
Or for cases, where some scripts might expect behavior from the
Sometimes you may want to run the system binaries as root from Termux.
Or for cases, where some scripts might expect behavior from the
default Android toolbox, busybox.
-e
Setup up some enviroment variables as when in Termux.
This adds some default Termux variables, when you wanna run Termux commands from other places like
adb shell.
This adds some default Termux variables, when you wanna run Termux commands from other places like
adb shell.
Currently it sets HOME to Termux's home, and adds Termux's bin to PATH, following the -p option.
```


### Contributing
Know something you wanna add/improve, you're more than welcome to open a issue or create a pull request.
The README was written in a hurry, so some help here too.
The README was written in a hurry, so some help here too.

### License
Licensed under the ISC license. See [LICENSE](https://github.com/cswl/tsu/blob/master/LICENSE.md).

1 comment on commit a5f07a5

@Seliniux777
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix usage

Please sign in to comment.