Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mksh]

MirBSD Korn shell, or mksh, is a Free command interpreter (shell) intended for both interactive and shell script use. On Android 4 and newer, Android-x86 2.2 and newer, and some other variants, mksh is the system shell; older systems used ash, some older aftermarket firmwares used busybox sh. Please only add the mksh tag if the question relates to mksh.

1
vote
2answers
89 views

Lengthy sleep command not working in script

I've written a su.d script to periodically (every 4 hours) back up data from an app using a looped sleep command: #!/system/bin/sh ( # Wait for boot to complete until [ "$(getprop sys....
1
vote
1answer
305 views

How to Check if Script is run once device is booted?

I have a script I need to run once, and only once the phone is booted. I have attempted init.qcom.post_boot.sh, init.sec.boot.sh, debuggerd, and finally mkshrc While my script ran with debuggerd, I ...
5
votes
1answer
806 views

How to write android shell history to file

Using Terminal Emulator for Android, is there a way to enable a persistent command history? So far, I've tried the following: initial command of export HISTFILE=$HOME/.mksh_history user mksh profile ...
2
votes
1answer
572 views

Shell .profile or /etc/profile for old android 2.3.3

Just rooted my old phone with Android 2.3.3 and I would like to define some aliases for each shell I start (with adb or terminal app). I found this question where one answer says that /etc/profile (=/...
3
votes
3answers
771 views

Work-around for process substitution in mksh

An extremely useful feature of Bash, known as process substitution, is missing in the Android shell, mksh. This is highly unfortunate as it prevent you from doing things like: diff <(sort list1) &...
3
votes
3answers
7k views

Can I update the adb shell's environment variables?

I wanted to update the PATH environment variable permanently in the adb shell. I guessed the shell was mksh for I've found /system/bin/sh pointing to /system/bin/mksh. Then I tried Making a new file /...
0
votes
1answer
1k views

unexpected root request for mksh when turning wifi on or off

Since today, I see the following root warning when turning wifi on or off: Superuser Anfrage / Superuser request: mksh (1000) Angeforderter Benutzer / Requested User: ROOT (0) Befehl / Command: ip ...