Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [bash]

Bash is a command processor, typically run at the command-line, allowing the user to type commands which cause actions. Bash can also read commands from a file, called a script.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
518 views

Checking if audio is playing with bash script on Tasker

I have the small script below to check if audio is in use on my Android. if grep -q RUNNING /proc/asound/card*/pcm*/sub*/status; then echo "Playing" ; else echo "Idle"; fi It works nicely in the ...
2
votes
1answer
363 views

defining functions in TWRP

In "normal" android you start up a Terminal emulator or do "adb shell" and then from there you can defining a function by: function name { #code } name #runs "name" But by using adb shell over TWRP ...
1
vote
1answer
152 views

How to enable/disable lock screen from shell script when a special wifi SSID is present?

My Java skills are low, but I'm mastering shell. Is use LineageOS 14.1 (forked from cyanogenmod). I would like to create a shell script on a rooted devive to enable/disable lockscreen (PIN). I ...
1
vote
0answers
130 views

How to keep an ODROID device connectable via adb?

I'm using an Odroid (rooted) device running Android 5.1.1 on a local network and I'd like to be able to control it via adb. Currently I'm running this at startup: setprop service.adb.tcp.port 5555 ...
1
vote
0answers
583 views

Install Bash on rooted Kindle Fire

I just rooted my Kindle Fire and installed QuickSSHd, an SSH daemon app. I can log in via SSH (using Putty in Windows 7) and become root, etc. It appears, however, that the only shell installed is ...
0
votes
0answers
29 views

rooted device: how to run SSH server persistent even on reboot

I (linux user but not an expert) just moved from iOS to android, my device is rooted (Samsung s9) and I want a ssh server running all the time on my android device (I prefer openssh over dropbear) ...
0
votes
0answers
61 views

How to check installed TWRP version?

I’d like to know if there is a way to check what version of TWRP is installed using bash (using a file or command in Android). I could find /persist/.twrps only, which is data file. No command I have ...
0
votes
1answer
960 views

Moving files with Terminal Emulator on a non-rooted Android

I'm using the Terminal Emulator app on a non-rooted Android 5.0.2 phone. When moving files from a folder of the external SD card to another with: mv /storage/extSdCard/DCIM/Camera/* /storage/...
0
votes
0answers
38 views

Cant manage to mount sdcard on cyanogenmod

So I know that you are not found of cyanogenmod but I don't really know where else could I ask that. So I'm trying to use a classe 10 SD-card which is called "corrupted" when I first insert it. From ...
0
votes
1answer
2k views

Addon.d bash script for removing apks after nightly reflash on Android 5.1 CM12.1 not working

I'm trying to have a bash script in /system/addon.d/ that removes unwanted apks from a nightly Android 5.1 (CM12.1) install for my Galaxy Nexus phone. Each new nightly reflash will reinstall some ...
0
votes
0answers
544 views

Rooted phone no root access in bash but sh

on cm 12.1 (I know the nightlies) I experienced something very curious. at first, if I start a terminal emulator, I'm not root. I'm just the user the app is running in. so if I do echo $USER it ...
0
votes
1answer
429 views

Android Tethering - Shell To Python Code (SL4A API)

I know I can convert how I call an activity from within a shell to python code. So given the correct code can someone help me in that conversion? I know I can use pyjinus so that should be another ...
0
votes
0answers
1k views

sound alarm from terminal emulator

For my purposes, I want to create a simple bash script, that will notify me when appropriate conditions will meet. Is there a way to make a sound alert from Android Terminal Emulator? I'm running ...
0
votes
1answer
621 views

Error opening terminal: Screen

I just installed nano on my Nexus 9, which is rooted. However, when I try to run nano, it says "Error opening terminal: screen." bash-3.2# nano Error opening terminal: screen. Any help would be ...