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

0
votes
1answer
11 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".
0
votes
0answers
9 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
13 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
874 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
1k views

How to start root shell with Android Studio?

I just installed Android Studio. How do I get into root shell on my phone? Or do I have to download ADB separately?
2
votes
1answer
67 views

Where is the battery animation called when charger connected to phone (OFF)?

I have Moto E (Rooted) which turn on when connected with USB via Laptop but not when connected to Wall charger instead it shows Battery animation. I got to know that battery animation is at ...
1
vote
2answers
1k 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
922 views

Why the file path the phone tells me ,I couldn't find in 'adb shell'?

I used my new Moto X phone, then I encountered a basic problem. It's running Android 4.4.2. I take a photo, and want to send it to my PC. The Gallery app tells me the photo is at ...
0
votes
1answer
37 views

How to resize partitions when /system isn't mounted in recovery

I have a Runbo X5-King phone which is manufactured by a small Chinese company. I need to shrink /system and expand /data. All tutorials I can find online say to run fdisk in recovery, but the problem ...
1
vote
2answers
857 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 ...
11
votes
2answers
4k views

Toggling USB mass storage on (or off) via adb commands

Background: I have a USB stick Android device (e.g. RikoMagic) which I mostly run in "headless" mode. Among other things, I've already figured out how to shut it down via a combination of adb and the ...
1
vote
0answers
220 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 ...
0
votes
1answer
188 views

Where is the battery animation called?

I have a tablet from China, it's a Q8H Allwinner. It is rooted, and I've browsed the internal storage for hours to find the battery animation, I found them at framework-res.apk... Now I want to find ...
0
votes
0answers
9 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 ...
0
votes
0answers
21 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
0answers
16 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 ...
27
votes
4answers
102k 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
2answers
82 views

Trying FTP file located in /data/data

I'm trying to use WinSCP to FTP a file out of /data/data (well, it's directory is contained in the /data/data directory, which is the important part). But I get a "Code: 5" error from WinSCP, access ...
15
votes
2answers
17k views

What useful Android Shell commands do you know? [closed]

There are questions pertaining to the use of the Android Shell or to finding a documentation of the Shell commands on Android. Since I haven't found anything convenient, I would like to use this ...
1
vote
0answers
113 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 ...
8
votes
6answers
4k views

How to prevent adb shell from exiting upon Ctrl+C

When I adb shell into my device (from Windows desktop), and run some command there, sometimes I want to terminate that command. The standard unixy way to do it is with Ctrl+C key combination. However, ...
9
votes
2answers
8k 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 ...
0
votes
1answer
1k 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* ...
0
votes
0answers
1k 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 ...
1
vote
1answer
157 views

Colored output in adb, e.g. for ls command

Is it possible to have colored output in adb shell, e.g. for the ls command? I've tried ls --color=auto . etc, but that doesn't seem to work. Colored output, however, works in adb shell, e.g. with ...
1
vote
1answer
68 views

How to do math operations in android shell?

To do math operations in Linux shell, bc language can be used. For example, echo `echo "scale=4;sqrt(400)"|bc -l` This will give output of 20.0000 Unfortunately bc is not available on android. My ...
4
votes
2answers
2k views

how to turn on/off automatic date/time settings

I would like to be able to turn the automatic date time settings on and off from tasker. I don't see a way to do this directly but I can use tasker to issue a shell command. I know I can just use ...
0
votes
1answer
225 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
2answers
222 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: 1- Booting into recovery. 2- Connecting to PC via USB cable. 3- Sending the command fastboot ...
10
votes
5answers
12k views

Where can I find documentation for shell commands?

For using a shell commands through a terminal program, where can I find documentation or help or man pages for the commands as implemented in Android? While it would be nice to have them on the ...
0
votes
1answer
366 views

Getting files using adb shell

I have a rooted Galaxy S4 device which runs Android 4.4.2 & I'm trying to get the files of an application using adb shell, when I navigate to where my directory is and get the root access in shell ...
0
votes
0answers
90 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
711 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 ...
0
votes
2answers
508 views

Is it possible to cat a file to an android phone and dd to /dev/xxx on the fly with just adb shell?

adb shell dd if=/dev/block/mmcblk0p7 > backup.bin works to backup android phone partition to computer but when I want to restore using cat backup.bin | adb shell dd of=/dev/block/mmcblk0p7 ...
0
votes
0answers
19 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
1answer
100 views

Serious issue of ADB auto exiting

ADB always exits by itself causing (many times) almost wiping my data folder on PC instead of /data on Android. It does this even while I'm typing commands (!) as if there is a timer that makes it ...
1
vote
0answers
242 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, ...
0
votes
0answers
277 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]: ...
1
vote
2answers
51 views

ls -b in android shell

If im not mistaking, using ls -b should output escape characters with some sort of representation, but it seems like this option isn't available. Is there an alternative, or is it impossible to have a ...
0
votes
0answers
183 views

How do I connect an existing VPN connection on my Android device using adb?

Under Wireless & networks > VPN I have an existing profile for an L2TP VPN. I'd like to use adb to connect (and disconnect) that profile from the command line. It would looks something like ...
2
votes
2answers
9k 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
60 views

Polling JavaScript from shell script in Android?

I want to measure the real, system and user time for running a web benchmark (1). It basically runs some pre-stored site data emulating basic human interaction. It contains index.html, results.html ...
0
votes
1answer
166 views

SH Script to Rename .apk.odex files

I have written a script to utilize dexopt-wrapper to odex a folder of .apk's #!/bin/sh SYSAPP=/mnt/extSdCard/FilesToOdex/system/app/ SYSPRIVAPP=/mnt/extSdCard/FilesToOdex/system/priv-app/ for i1 in ...
0
votes
1answer
426 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 ...
21
votes
3answers
46k views

How can I run a script on boot?

I'm accustomed to running scripts on boot in Linux, but I'm not sure how to do this in Android. I'd like to start my SSH daemon on start, so I'll always be able to connect. How can I run an arbitrary ...
0
votes
1answer
433 views

Run shell script in background process no matter what activity in foreground? [closed]

I have a shell script that looks does the following: # /mnt/sdcard/touch.sh sleep 10 while [ 1 ]; do input swipe 700 380 1020 600 1000 input tap 960 540 input swipe 1220 700 900 480 1000 ...
4
votes
3answers
3k views

Can I connect to a shell from a PC to my Android using bluetooth or USB?

I want to run some commands on my rooted android phone. It is not very practical to interact with a shell using the touch screen, therefore I wanted to run a daemon on it and connect to it from a PC. ...
1
vote
1answer
286 views

How can I syncronize android time with machine via ADB

How can I update android time via ADB? I know I can run this comand via windows cmd: adb shell date -s 20140414.130000 But I need to synchronize the time with my windows machine. Is this possible ...
0
votes
1answer
273 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
0answers
66 views

How can I detect if a shell script is running on Android?

What is the most reliable way to detect if a script is running on Android (instead of a regular Linux build)? To run scripts, I'm using bash, the Terminal app, and BusyBox.