The shell is a piece of software that provides an command-line interface to the operating system. Use this tag for shell-specific issues; general command-line issues should use the 'command-line' tag instead. See full tag wiki for other related tags.

learn more… | top users | synonyms

-2
votes
0answers
34 views

Using 'su' in a shell script

I have root installed on Lollipop 5.0 and I'm trying to root explorer to make a shell script that: backs up a file called c_1 deletes all files beginning with c_ renames a file called data to ...
0
votes
0answers
29 views

How to run alsamixer command for android shell

I am trying to configure sound for a specific sound card and I need AlsaMixer to open but I can't find the right command to open it from terminal. Any help would be appreciated
-3
votes
0answers
26 views

Exploiting or exploited? Battery.sh

I found this script /system/bin/battery.sh Wondering what it's doing there and If it can be exploited to gain root. #!/system/bin/sh test1=cat /etc/battery.conf test2=${test1:0:${#test1}-2} chown ...
0
votes
0answers
20 views

Change path via script?

Currently, after I shell into my devices I run this script: #!/system/bin/sh export PATH=$PATH:/data/local/tmp echo $PATH /system/bin/sh The sh at the end of the script inherits the new path from ...
1
vote
1answer
72 views

How do I install missing command line tools onto an Android device?

Android installations do not always have all the tools one would expect to have on a Unix-like system. For example, right now I have a problematic device which doesn't have find CLI utility. I mean, ...
0
votes
0answers
46 views

No prompt in Terminal Emulator after failed install of SuperSu/replace KingRoot

I have a Huawei Union (y538) and rooted it using KingRoot. I then followed a guide to replace KingRoot with SuperSu. Terminal Emulator displayed some permission errors, SuperSu opened, but the install ...
0
votes
0answers
142 views

adb>shell returns “error: closed” - how to “open” adb shell access through adb sideload

my device got broken but i am still able to connect usb in the stock recovery mode. if i try to start a shell via adb while the device is in recovery mode, i fail. my terminal echos the line: "error: ...
-2
votes
2answers
39 views

android command line shell

I have a Nokia X running Android 4.4.4 and I have Terminal Emulator and Busybox 1.24 installed but I can't still find some useful commands to perform several operations with the command line ...
0
votes
0answers
185 views

Activate and disable GPS through adb shell on Marshmallow (Android 6.0)

It used to be possible to disable location using adb shell prior to Android 6.0 using this line: adb shell settings put secure location_providers_allowed ' ' And enabling high accuracy mode using ...
0
votes
0answers
48 views

Overlapping data and sdcard partitions; no USB access

After making some incredibly clumsy choices in TWRP v2.8.6.0, my Xiaomi MI2S can no longer mount /sdcard when booting into the system. Storage information shows that the system spans all of the ...
1
vote
0answers
85 views

Lenovo S6000 - Auto power on after connecting charger

I searched the web to automatically power on my lenovo tablet after connecting the charger, but all the guides are for samsung and some other brands. File /system/bin/playlpm doesn't exist in lenovo ...
-1
votes
1answer
24 views

Shell command for going to home screen HTC LTEVO

I am using this app that unlocks/locks your phone when you cover it, but whenever it unlocks, it opens up the app. I am trying to use automatit pro to run a shell command to go to homescreen at screen ...
2
votes
0answers
32 views

How to scroll horizontally in Terminal Emulator for Android

When I'm using Terminal Emulator for Android (also available here), long commands frequently scroll horizontally off the window. I feel quite dense, but I can't find a way to quickly scroll left and ...
0
votes
0answers
47 views

How can I run shell commands on a schedule?

I would like to be able to run shell commands on a schedule, similar to running commands from cron on Linux. The commands I have in mind are native shell script, or perhaps Python scripts, if I could ...
0
votes
0answers
40 views

How do I avoid losing root shell in rooted Android?

I have: Successfully rooted my Android 5.0 (custom ROM) Installed busybox Installed Android-Terminal-Emulator However on the command prompt, whenever I use su or /system/xbin/su, it shows the: ...
-1
votes
2answers
31 views

Invoking in the terminal

I have downloaded Python 3 and a terminal emulator. But when I type python3 in the terminal, it says "not found". How do I run the python interactive shell inside the terminal?
0
votes
0answers
49 views

Permission denied

[ASL] gives this error in library installations: %ANDROID%\platform-tools\adb.exe push %NATIVE% /data/local/asl-native --->RUN '/data/local/asl-native':Permission denied How can I overcome this ...
1
vote
0answers
3k views

adb shell -> su: not found

How can I overcome this problem? Devices: Samsung Galaxy TabS - Android 4.4.2 HTC M8 - Android 5.0.1 The two devices have the same problem.
0
votes
0answers
35 views

How to read shell commands documentation in android

I have busybox installed in phone. Also, my device is rooted. I tried to use man command: $ man ls However, it returns no manual entry for 'ls'. I tried to navigate to /bin/busybox but there is no ...
0
votes
2answers
124 views

How to pull mmcblk0 to a windows pc?

So here is what i want to pull : mmcblk0 whith it's size 15.7 GB. C:\adb>adb shell shell@android:/ $ su su shell@android:/ # fdisk -l /dev/block/mmcblk0 fdisk -l /dev/block/mmcblk0 Disk ...
0
votes
0answers
347 views

Using the Cerberus shell to input commands

I'd like to use the Cerberus shell to input commands like taps, swipes, and text. I know how to do it using the command line and ADB shell, but I don't have USB debugging enabled on my Nexus6, so I'm ...
0
votes
1answer
169 views

Check OpenSSL version in Android with Java runtime or shell command

I have a problem with checking OpenSSL version in Android device. I've tried to grep OpenSSL from system/lib/libssl.so with java runtime.exec, but it doesn't work? Anyone can help me, how to make a ...
0
votes
1answer
83 views

Issuing adb shell commands with arguments

So I can issue a shell command on my GalaxyS5 device using this: $ adb shell run-as com.steenriver.littlecrane 'sh -c pwd' /data/data/com.steenriver.littlecrane $ adb shell run-as ...
0
votes
1answer
144 views

Automating adb commands

is there a way to run adb shell commands via windows? I would like to run a batch script such as this adb shell mount -o rw,remount /system exit Currently when i run the batch script it only ...
0
votes
0answers
81 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 ...
1
vote
1answer
67 views

Deleting 'infinite' recursive directory

I created a new folder inside /sdcard/ and something went wrong with it since other 600 sub-folders (one inside the other) were created as well. I noticed the problem when trying to rename the ...
2
votes
0answers
36 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 ...
1
vote
1answer
150 views

SQLite database operation from Android terminal

I want to do SQLite command like sqlite3 myDb.db, or do other SQLite command from Android shell, like Terminal Emulator or something else. I have tried googling for these, but no luck. Is it possible ...
1
vote
1answer
84 views

How to run 2 shell scripts from ramdisk?

I am attempting to setup my ramdisk to fire off 2 sets of scripts. 1 is ramdisk /sbin only, the others are user allowed scripts # Check Properties on property:dp.early_init.done=1 chmod 0777 ...
0
votes
0answers
56 views

Is it possible to start an infinite loop within init.d?

I would like to create an init.d script to control the fan of my Odroid XU3 under Lollipop 5.1.1, CyanogenMod 12.1. I already make one on linux which is working well and would like to port it to ...
0
votes
0answers
59 views

Run Bash Script from Terminal

I have modified a kernel's ramdisk to include a "settings" terminal run bash script. However, when I type in terminal su dp I get file is not found. dp exists in the ramdisk as /sbin/dp I've ...
4
votes
1answer
228 views

Disable touchscreen input via console

I'm looking for a way to disable and enable the phone's touchscreen via console, and possibly the physical buttons, so to prevent finger touches from being processed. The phone is a Samsung Galaxy ...
1
vote
1answer
211 views

Create symlink/mount/bind in root [closed]

I want to compile (through make) on my Android phone. I have root access. I have almost all the things set up. But there's this hitch. All the configure files have a shebang of #!/bin/sh. I can ...
2
votes
1answer
63 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 ...
2
votes
2answers
2k views

How do i recover my wifi pass from android using adb?

I'm connected to a wifi spot with my android, but i'd like to connect with my laptop aswell. I don't want to root my phone (warranty and stuffs) nor reset the router, as it has complex settings on it. ...
0
votes
0answers
45 views

How can I run a file on my phone, via the terminal on my computer?

I'm doing this. There is a detailed version of what I did. Now someone suggested me to install TWRP recovery, it could be installed via the playstore, but now I have no idea on how to make android ...
0
votes
2answers
117 views

Turn off radio layer hardware calls to save battery when your broadband hardware is gone

With reference to my question here: IM-A870L Radio Interface Layer broke down Summary: My android phone broadband chip is dead. For some reason, its not working anymore. Now I can use the phone for ...
0
votes
0answers
74 views

Where are settings for `svc power stayon true` stored?

I want to make a simple utility where I can read the current setting for the stayon portion of svc, and also change it. I got changing the setting down, but how do I find out the current value of it? ...
0
votes
1answer
227 views

What does “svc power stayon wireless” do?

Looking at the reference to svc on my phone there are options for svc power stayon [true|false|usb|ac|wireless]. I'm curious what usb, ac, and wireless do when you use them? I tried svc power stayon ...
0
votes
1answer
314 views

Getting message “Unknown id: netcfg” while setting up usb0 interface for reverse tethering

I am trying to setup reverse tethering between Sony Xperia 4.0.4(rooted) and Linux 12.04. I'm following steps from Matthew Read's answer on this post, How to set up reverse tethering over USB? All ...
0
votes
0answers
30 views

Android package manager (pm) returns blank on every command

For example if I run the command pm list packages, pm list permission-groups, pm uninstall com.google.android.apps.books, etc. All return blank and seem to have done nothing. I do have root, I'm ...
1
vote
0answers
68 views

Ngrok (compiled for Arm5) crash on android: can't find core dump files!

I downloaded Ngrok which I want to install on a old HTC Hero [the project is to transform the phone in a ipcam, reachable behind a NAT network], so I chose the version compiled for Arm5. You can find ...
4
votes
1answer
142 views

How to see all TCP connections being routed for hotspot?

I want to see a list of all active TCP connections on my Android device, regardless of whether they terminate in the device. E.g., when my phone is serving as a WiFi hotspot, I would like to see all ...
1
vote
0answers
245 views

How can I run a shell script when some WiFi is connected?

I have a really simple shell script, that just adds a route to my internal development machine. This is useful, as that machine has some LXC containers inside, so I can reach all my containers from my ...
0
votes
0answers
124 views

Why does my PATH get set differently for SSH Droid?

I've noticed that depending upon how I enter my rooted phone I get a different PATH setting: # ADB bash-3.2$ adb shell shell@kfotetzx:/ $ echo $PATH ...
0
votes
1answer
229 views

Why does SSH Server (Ice Cold Apps) with a command fail?

I wish to ssh into my rooted Android Samsung Galaxy S4 v4.4.2 phone and run a command. I have SSH Server installed. If I just SSH, it works fine: bash-3.2$ ssh -p 35151 10.1.10.22 ...
2
votes
2answers
82 views

Why does stat report no space on / (root) but space available on /system?

On my rooted Android 4.4.2 Samsung Galaxy S4 phone with armv7l chipset, if I start a shell, I can use the stat command, but some devices report strange. In particular, the / device shows zero size, ...
1
vote
1answer
100 views

Parted says external SD card has no partitions, but Android can still read it

I have a 16GB external SD card that I'm currently using for my music collection. Android reads it just fine, and CWM mounts it perfectly. I'm on Gingerbread (I have my reasons). I opened up adb shell ...
0
votes
1answer
44 views

What is the pathname to my application executable? [closed]

I wish to get the pathname for an application I am creating and have installed via Eclipse and ADB. My application is installed as I see an icon that I can invoke to launch successfully my ...
2
votes
0answers
248 views

Setting IncognitoModeAvailability policy for Google Chrome on an Android tablet?

Google Chrome supports an “IncognitoModeAvailability” policy that I want to set on my Android (Jelly Bean) tablet. I tried to set up the policies as described here: ...