Systemlessly mksh.rc for better Terminal experience to turn your device into a workstation :)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
noreply@dergoogler.com cf46299281
Added option to handle commands on exit
6 days ago
META-INF/com/google/android Add files via upload 9 months ago
common 1.2.7 2 weeks ago
system Added option to handle commands on exit 6 days ago
LICENSE Initial commit 9 months ago
README.md Added option to handle commands on exit 6 days ago
install.sh Added option to handle commands on exit 6 days ago
module.prop Added option to handle commands on exit 6 days ago

README.md

Systemless Mkshrc

Systemlessly Mkshrc for better Terminal experience to turn your device into a workstation :)

FIRST RUN!

DO SHOULD NOT RUN BASH WITH THIS MODULE

You should after the installation su in any terminal, to initialize the user/app folders. Every app has its own folder based on his username (/data/chuser/root).

Important

Module mkshrc

Supporting mkshrc for every own magisk module, just simply create <MODID>/system/etc/mkshrc.d/<name>.d.sh

Supported APIs:

  • sudo
  • setperm
  • setperm:insecure
    • This method uses root permissions. If you prefer an safer way please use setperm

Extended usage

There are more things to import:

How to import:

source $MKLIB/<folder>/<file>.sh

core/installed

Check if mkshrc is installed

[ -z $MKLIB ] && echo "Source fail!" && exit 122;

console/abort

# abort <code> <content>
abort 404 "Your file does not exist"

console/ui_print

# Available colors: none, red, green, yellow, white, cyan
ui_print cyan "Logged content"

util/setperm

⚠️ This file includes insecure methods

setperm $PREFIX/bin/* $USERID $USERID 0755

# Uses sudo in the backend
setperm:insecure $PREFIX/bin/* $USERID $USERID 0755

util/sudo

sudo ls

util/grepprop

⚠️ This file includes insecure methods

grepprop id /data/adb/modules/mkshrc/module.prop

# Uses sudo in the backend
grepprop:insecure id /data/adb/modules/mkshrc/module.prop

util/f2c

Alpha Fox2Code library parts. Thanks for the concept of this!

mkshrc-setenv "TEST_ENV" "Yolo"
mkshrc-getenv "TEST_ENV" # output: Yolo

mkshrc-add-path /data/bin \
          /system/bin

resolv.conf

Cloudflare

nameserver 1.1.1.1
nameserver 1.0.0.1

Google

nameserver 8.8.4.4
nameserver 8.8.8.8