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

1
vote
1answer
32 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 ...
2
votes
4answers
16k views

can't use adb shell in recovery mode

I have a china tablet named Quest. I have accidentally repeated pattern lock more than 5 times. Now I have also forgotten the email address. So for a factory-reset of my tablet I simply booted it ...
0
votes
0answers
8 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
18 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 ...
15
votes
2answers
15k views

What's the best way to restart Android via command line (remotely)?

I'm looking for the best / friendliest way to reboot my rooted android 4.1.1 device. I found these solutions so far: su -c "reboot" - Causes problems with wifi after restart on my device... I read ...
3
votes
1answer
54 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 ...
2
votes
2answers
69 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
140 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: ...
1
vote
1answer
53 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 ...
0
votes
1answer
42 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
1answer
241 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
2answers
210 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 ...
1
vote
1answer
48 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
3answers
1k views

Is it possible to run fastboot in a recovery mode shell (without connecting to PC)?

I have a method for unlocking the bootLoader of my HP SlateBook x2 running Android v4.3 consisting of: Booting into recovery. Connecting to PC via USB cable. Sending the command fastboot -i ...
2
votes
1answer
30 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 ...
5
votes
2answers
510 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. ...
1
vote
1answer
343 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
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 ...
1
vote
2answers
1k views

adb shell check if a certain directory exist on avd

I want to check if a certain directory (/data/textdata/ ) exists on the avd using adb shell. reading ...
2
votes
1answer
1k views

What does “adb shell ime list” commands do?

What do the following two commands mean? adb shell ime list -s adb shell ime list and why don't they return anything at all? See code below: aneesh@nb-14:~$ adb shell ime list -s aneesh@nb-14:~$ ...
39
votes
4answers
161k views

Where in the file system are applications installed?

I have installed a few Android applications both with the adb install MyApplication.apk command and via a webserver (like an alternative to Android Market). But where in the Android file system on my ...
0
votes
1answer
2k views

Permission denied when trying to mount USB storage

I'm trying to mount USB storage using the "Terminal Emulator" app with the following commands: mount -t vfat -o rw /dev/block/sd* /storage/usb1 or su mount -t vfat -o rw /dev/block/sd* ...
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 ...
21
votes
4answers
52k views

How can I flush the DNS Cache?

How can I clear my DNS cache on my android phone? (Droid3, Gingerbread, rooted to be specific) Ideally I'm looking for a command to run through a terminal emulator, something similar to ipconfig ...
2
votes
1answer
98 views

Where in the filesystem are settings saved? Namely ADB backup password

Where in the phone filesystem are settings saved? I've lost my ADB backup password and simply want to delete it. If it affects other settings that won't matter too much. I will be interfacing the ...
3
votes
3answers
8k views

How do I check if I have Cyanogenmod on my phone?

Is it possible to check using shell whether or not Cyanogenmod is installed on a device? In other words, something like uname -a (which tells the system Linux version and architecture). Can the ...
0
votes
2answers
625 views

How can I manage “desktop” icons

I want to remove all the icons on the desktop, (and also in the bottom bar) and place new ones via ADB. My script already removes all the apps, but icons/shortcuts remanin there! Is there any command ...
0
votes
1answer
194 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
98 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
0answers
33 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
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 ...
5
votes
4answers
23k views

Android ADB Shell Recovery Mounting

*Question: I need assistance mounting an Android phone's internal data using the Android ADB Shell while the unit is connected via USB and in recovery mode. How do I form a proper mount command? See ...
13
votes
3answers
11k views

Can I change some Android settings from the command line?

I would like to activate "USB tethering" from within a bash script, so is there any possibility to run a command line with adb shell to change some Android settings ? Edit1: The following command ...
1
vote
2answers
1k views

Can't set date via shell

I've tried date -u 1407697765 output: time 1407697765 -> 1407697765.0 settimeofday failed Bad file number and busybox date -s @1407697765 output: date: can't set date: Operation not ...
0
votes
1answer
2k views

Can not uninstall standard Android keyboard or get it back working

I want to uninstall the standard Android keyboard com.android.inputmethod.latin. I googled and found multiple threads discussing this problem. What I did so far: 1.) Uninstall via intent -> doesn't ...
0
votes
1answer
102 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
2answers
866 views

Motorla Defy+ being not possible to root. Script commands throwing errors when rooting android 2.3.6

It's getting very hard to root a Motorola Defy+ (mb256). My cellphone is accepting non android market apps, and USB debugging mode is enabled. I tried: - using z4Root app. - doing the scipt commands ...
0
votes
0answers
52 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
58 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
0answers
14 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
22 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
72 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
83 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 ...
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 ...
1
vote
2answers
2k views

How do I view/mount nandroid file on device?

From Android's terminal, I tried to mount a nandroid img: losetup -f gives "/dev/loop0". However, when I try losetup /dev/loop0 /sdcard/nandroid/... data.img it says no such directory. Same thing ...
0
votes
1answer
111 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
0answers
53 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
36 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
1answer
141 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 ...
2
votes
2answers
308 views

How do I display message from from `adb shell` (or a shell script)?

I expect it to be something like adb shell am start SomethingArcane ... "Hello, world" and the message box pops up on screen, saying "Hello, world".