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

5
votes
1answer
496 views

Getting total CPU time of a process

I need to get the total cpu time of a process in android. I am trying to use adb shell top commands, but it gives only cpu usage in terms of percentage. But I need the total cpu time of the process. ...
3
votes
1answer
4k views

Is it possible to enable Location Services via Shell?

Is it possible to enable Location Services(GPS or Google NetworkLocation) via ADB or Terminal Emulator? I'm on a rooted Phone. Extra Points: Is it also possible to change other system-related ...
1
vote
1answer
43 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
119 views

Is root ownership inherited in shell scripts? (rsync via ssh permission denied)

I am running Android Revolution HD 52.0 custom ROM (Android 4.3) with Koush's superuser 1.0.3.0 on a Samsung Galaxy S3 GT-I9300. In the hope of using some native shell applications on my phone for ...
1
vote
1answer
519 views

Transfer Files to Nexus 4 with Terminal

I want to transfer files to my Nexus 4 using the Mac Terminal. I tried to use the adb shell with adb push, but because I'm not root I'm not allowed to push to the sdcard. Is there any way to mount ...
0
votes
1answer
65 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 ...
0
votes
1answer
74 views

How do I mount an NFS share on an CM 12?

I'd like to mount an NFS share on my Android cell phone, with perhaps a mount-unmount button on the home screen. Any ideas of how to accomplish this? My /system/lib/modules is empty. It doesn't have ...
0
votes
1answer
19 views

Getting screen dimensions in a shell script

To run a game on my Nexus 5 (5.1), I need to change my screen resolution. I'm trying to write a shell script that will detect the current resolution and change it, basically a toggle. I know that I ...
0
votes
1answer
34 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) ...
0
votes
1answer
62 views

is there a way to run *.sh file by just touching it in a file manager?

I mean like it is when user opens an image file a pane opens where user can select app for given type. But when I'm clicking on *.sh file the first option that shows up is to open as ...
0
votes
1answer
293 views

Unable to start chinese tablet even after installing recovery

When I try to boot my chinese tablet it halts on a small android icon and does not go ahead. It is not a boot loop. I just stays there. It booted successfully a couple of hours ago after two days and ...
0
votes
1answer
132 views

How can I change pointer locations setting in developer options from adb shell?

I need to be able to select and deselect "pointer locations" from the developer options menu using adb. adb shell am start -n com.android.settings/.DevelopmentSettings, but once I'm there I can't ...
0
votes
1answer
157 views

How to read geolocation using adb shell

Is it possible to read geolocation data (either one provided by GPS or by GSM) using adb shell?
0
votes
1answer
75 views

How do I create an archive for easy extraction to /data/local/tmp/ in “adb shell”?

Usual shar archives fail to extact in adb shell due to problems with lock directory and temporary files for HERE documents. Zip archives are also not an option. How do I make an archive that can be ...
0
votes
1answer
1k views

Identifying an unknown Android tablet through adb/shell without relying on build.prop

I obtained a cheap unbranded tablet from a friend, without a box or anything and I need to figure out what kind of tablet it is, through software. What I've established so far is that the tablet is ...
3
votes
0answers
1k views

Simulate missed call from ADB shell

On the ADB shell, I run the command adb -s <serial_number> shell am start -a android.intent.action.CALL -d tel:123456 to place a call on my testing device. It works great. But I also want to ...
2
votes
0answers
319 views

How can I troubleshoot MTP on my Galaxy Nexus

My Galaxy Nexus 4.2.2 won't show up as a MTP device anymore. It looks like the phone is the problem, I want to debug the problem from that end. Like many before me, I tried everything, and then some ...
2
votes
0answers
1k views

Remount writable by all users?

I want to remount a read-only partition in read-write mode, but I want it to be writable for all users. So far I've got this: mount -o bind /someplace /someplace_else mount -o remount rw ...
1
vote
0answers
18 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 ...
1
vote
0answers
20 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 ...
1
vote
0answers
80 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. Here is a link that describes the policy, if you want to read more about it: ...
1
vote
0answers
233 views

I can't see new files throught windows explorer

i can't see my new(!) files on android throught windows explorer while i can do it by ES explorer or adb shell. Is there any way to fix it?
1
vote
0answers
16 views

How can I add the user of an application to the group of another application?

I'd like to add the user of one application to the group of another so that I can read the other applications private content without doing a su every time. I can't find the adduser or the useradd ...
1
vote
0answers
297 views

Bricked chinese android

Recently I edited build.prop of my Note 3 smn9006 clone with mtk6572 for enabling navigation bar, i.e qemu.hw.mainkeys=0 and restarted. Nothing happened. Then again I tried to enable navigation bar ...
1
vote
0answers
1k views

Preventing certain WAKELOCKS (NlpCollectorWakeLock, NlpWakeLock) with shell? (e.g. pm command)

As some of you might aware of, the notorious 'NlpCollectorWakeLock' and 'NlpWakeLock' are often the cause of considerable battery drain. I personally make some custom ROMs, and would like to ...
1
vote
0answers
198 views

How to execute shell script from suid binaries

I've a rooted phone and created a root:root owned binary with suid bit set. It's supposed to be a wrapper for a shell script that needs root to work. Calling system("/system/bin/sh ./script") doesn't ...
1
vote
0answers
469 views

built in command line pager/viewer like less? Without busybox or root access

Sometimes i investigate foreign phones, where i can't root or install any Apps. But i want to examine the filesystem via adb shell, and view some text-files. Like i usually do with a *nix-shell: with ...
1
vote
0answers
273 views

Android - shell utility to perpetually disable headset device?

I have an HTC Desire HD device that has some schmutz in the wired headset jack, and the output from 'logcat' (http://pastebin.com/cNZC8Wwc) shows it vacillating between 'Headset=true' and ...
1
vote
0answers
311 views

How to switch off HDMI

I have an android box with a HDMI port. Im connecting it to a projector. To the same projector Im also connecting a PC via VGA cable. Now I want to give my box a command to switch off the HDMI port, ...
1
vote
0answers
3k views

Flash update.img using flash_image

I want to flash a new ROM using the shell. (Need this later to do per app so there is no other way than shell). Here is what I tried connected to 192.168.1.9:5555 Pauls-MacBook-Pro:~$ adb shell ...
1
vote
0answers
356 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
54 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
24 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
0answers
16 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
30 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
0answers
11 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 ...
0
votes
0answers
37 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
33 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
0answers
93 views

How to find out currently running user name/ID from ADB

I am having Nexus 7 running multiple users. I am trying to find out which is currently running user using ADB. The best I could get so far was to check legacy directory linking which is either linked ...
0
votes
0answers
107 views

Mounting USB in android 4.1.2

I am trying to mount USB pen drive in my old Xperia phone running andorid 4.1.2 When I connect OTG device to my phone I get an USB power consumption error. After little search I found a command to ...
0
votes
0answers
130 views

How to pipe output of dd to a computer via adb shell?

I've accidentally wiped my phone and lost all my photos. I'm going to try to run photorec on an image of my phone. What I'd like to do is somehow something along these lines: adb shell dd if=/data ...
0
votes
0answers
73 views

Busybox Error: unknown option — eusage: nc

I've been trying to recover some photos and I've been following this guide here http://forum.xda-developers.com/galaxy-nexus/general/guide-internal-memory-data-recovery-yes-t1994705 However, after I ...
0
votes
0answers
135 views

adb shell command to edit sim manager

Is it possible to open the sim manager under setting in the android phone using an adb shell command? I have alot of Android 4.04 devices (300) where I need to enable data roaming in the sim manager. ...
0
votes
0answers
2k views

“shell has been granted superuser permissions” on non-rooted smartphone

My Galaxy S3 has just shown the blinking message "shell has been granted superuser permissions" (when clicking a Pinterest notification). The phone is not rooted and is running Android 4.0.4. What ...
0
votes
0answers
157 views

Why do some keyevents not working in Tasker on my device?

I've found that at least following keyevents don't work: 61 KEYCODE_TAB 22 KEYCODE_DPAD_RIGHT They work from adb shell and Hacker's keyboard but not from Tasker =/ Shell script contains only "input ...
0
votes
0answers
26 views

Is this command safe to run from / as root

find . * -depth -print0 | xargs -0 rmdir It finds and removes all empty folders (including hidden ones) recursively. I only tired it on my home folder and a pendrive in Linux PC and it worked but I ...
0
votes
0answers
898 views

shark (sniffer) cannot find shell commands

when I am trying to run shark it say: tmp-mksh: <stdin>[1]: tr: not found tmp-mksh: <stdin>[1]: cut: not found tmp-mksh: <stdin>[1]: killall: not found tmp-mksh: <stdin>[1]: ...
0
votes
0answers
82 views

Android (S2) can't connect to Raspberry by SSH

I cant connect to my Raspberry using SSH. With my Windows/Linux-PC it works normally. I tried to connect to it with the Android Shell and an SSH-App. With both I get the message "No route to host".
0
votes
0answers
541 views

Android: how to grant 666 privs to a device via ueventd.rc

I need to access an USB camera connected to my (rooted) Android. I'm on a Samsung Galaxy S4 with Android 4.2.2. I want to access it with a normal app, so I need the device to be world readable. I can ...
0
votes
0answers
2k views

Toogle 3G, Bluetooth, and WiFi with Android Linux or ADB commands

Since I have not found an Android command reference list (with meaning and usage of the command), I have some questions: Can I disable/enable 3G? Can I disable/enable bluetooth? Can I switch from ...