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
2answers
3k views

ls command works but not with options?

In my terminal app when I type ls /? it gives me ls /d. Where can I find the other options? For example I want to list the file attributes and file length. I have tried also busybox to no avail.
2
votes
1answer
528 views

`adb shell ime list` commands - Please clarify!

What do the following two commands mean adb shell ime list -s adb shell ime list and why don't the return anything at all? See code below: aneesh@nb-14:~$ adb shell ime list -s aneesh@nb-14:~$ adb ...
0
votes
1answer
70 views

Flaw in `adb shell ime list -a`?

I wanted to understand how to work with IMEs. More precisely, I was trying to figure out how to disable in a single command one can disable all the input methods so that the hardware keyboard takes ...
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 ...
2
votes
0answers
242 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 ...
0
votes
2answers
720 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
2answers
8k views

How to put a ROM on read-only /sdcard, while adb shell not working (HTC One X)

I've been searching my _ off for two days now to find a solution for my problem, but I can't find one working for me. What I do have right now: NO working ROM (I believe because of a failed atempt ...
1
vote
2answers
571 views

How to install bundles of additional terminal commands for rooted devices?

I rooted a HTC Wildfire S device recently and flashed an Android 4.1.2 AOKP Jelly Bean Custom ROM. One benefit is that I can use the terminal now. I'm a little used to using terminal emulators on ...
0
votes
2answers
121 views

How to find files related to a process

I was using adb shell to have a peek at what's going on a Sony Xperia Z phone. I've noticed a few services (e.g. com.sonymobile.socialengine.plugins, com.google.android.youtube, etc.). I'd like to ...
7
votes
1answer
6k 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 ...
1
vote
0answers
202 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
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
130 views

How to launch Google Keep from shell?

Using command from http://learnandroid.blogspot.in/2008/01/run-android-application-from-command.html I want to launch keep from shell.
2
votes
0answers
2k 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 ...
4
votes
2answers
4k 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 ...
2
votes
1answer
19k views

Why can't I get root access from shell?

> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called SD Maid that is able to operate ...
6
votes
1answer
727 views

Why do linux commands not work properly on android?

> adb shell sh-4.1$ ls -F -F: No such file or directory -F switch works fine on my Ubuntu. Why doesn't it work on android? Is there a way to make it work?
2
votes
3answers
14k 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 ...
0
votes
1answer
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 ...
0
votes
1answer
4k views

Error when trying to use adb shell in recovery mode

I have a Chinese phone which I've been unable to install ClockworkMod on. I decided to try booting into recovery mode to manually backup/restore the system partition. However, if I plug my phone into ...
2
votes
2answers
1k views

What is the applypatch tool and how does one use it?

I recently stumbled upon the applypatch tool, but I couldn't find any documentation for it online. Here is the usage output (this is after typing adb shell) shell@android:/ $ applypatch --help ...
1
vote
1answer
288 views

Make iso of sdcard + data directory

I need to be able to make an iso file of the /mnt/sdcard and /data/ directories on both rooted and nonrooted phones(for forensic analysis). Older phones I can mount to my linux machine and run mkisofs ...
4
votes
1answer
1k views

Is it possible to set device's Latitude and Longitude using ADB SHELL?

I know how to set locatlon for emulators using device configuration interface from Motodoev Studio for example. But, how I can set locatlon for a device?
5
votes
2answers
8k views

adb “Permission denied” to run a “./configure” file

I need to run a configure file into my android phone so I think the best way to do this is to use the adb shell command. I'm running an Android emulator onto a Windows-7 platform, and there I'm ...
1
vote
0answers
2k 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 ...
0
votes
1answer
491 views

No Devices on shell

I try to send an intent using an android-shell. The app starts, "su" works nice, but when I enter something like "adb shell am broadcast -a android.intent.action.SCREEN_ON" I receive an error: ...
0
votes
1answer
413 views

Command or script to read a binary file and skip some bytes every X bytes

I am trying to find an Android shell command that is able to read a file but that has the power to skip, for example 512 bytes every 1024 bytes. Does such a command exist and is available for ...
9
votes
2answers
5k 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 ...
3
votes
2answers
2k views

Can't connect to the device with ADB when it's in recovery mode

I am having some problems with my Samsung Galaxy S2 and I want to start an fschk session on the device. So, I installed Android SDK with platform-tools. I can access to the device when it's normally ...
3
votes
0answers
299 views

ADB Shell command that can test MLS / SPC codes? [closed]

I am a Republic Wireless subscriber with the Motorola Defy XT. The Defy is a decent phone, but unfortunately very little space has been dedicated to internal application storage (300MB) and often we ...
5
votes
1answer
440 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. ...
8
votes
4answers
5k views

Running applications from a terminal emulator

I have a rooted Nexus 7 Jelly Bean tablet and whenever I attempt to run an application from a terminal emulator app after chmod 777ing it and using the syntax ("./applicationName") it insists that I ...
3
votes
3answers
1k views

Shell script to kill custom apps, run another app then restart killed apps?

Is it possible to make a shell script that would run using Smanager, for example, to do the following: Kill a list of custom apps loaded from a file Run one custom app loaded from the same file When ...
3
votes
2answers
9k views

Documentation for adb shell getevent / sendevent

Is there any documentation on the format of the getevent and sendevent shell commands? specifically the ones for touchevents. or is this device-dependent? it is a bit hard to guess what those ids are ...
-1
votes
1answer
133 views

Rooting Motorolla X2 adb shell problem

i tried this tutorial and in step 1 i followed method 2. I try step 3, and when i try adb shell it works fine. but the line after, sh /sdcard/motoroot-step1.sh, I get sh: Can't open ...
2
votes
0answers
862 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
301 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 ...
2
votes
2answers
812 views

copy folder structure from internal memory to sd-card

I use the amazon downloader to buy mp3s with my android device. My problem now is that I cannot change the download folder but want the files to be moved to my sdcard. I already found a cron tool to ...
4
votes
3answers
4k views

Broken Screen + Using adb shell to run vnc server

I have an HTC HD2 with a completely busted screen, I tried repairing it with a replacement screen but broke the ribbon cable to the screen (oops) sad day, I've got two of these and I've been running ...
1
vote
1answer
1k views

Shell utterly borked, toolbox claims “no such tool”

HTC Magic, rooted with CyanogenMod 5. Tried to install busybox using "Busybox Installer" from the Market, ended up with a strangely borked system. Android does not boot, freezes on the splash screen. ...
8
votes
1answer
4k views

Rooted phone - sending SMS message via command line

I have a rooted Droid (Sholes), with ConnectBot installed. I can ssh into it via dropbear copied to /system/xbin, and/or also the instance of Debian installed on it via the "Linux Installer" ...
0
votes
1answer
2k views

Android-adapted BusyBox binary for rooted phone

I would like to place a place BusyBox on my rooted Android phone, and I would like to have a version that has "sh" as an alias for "ash" so that I can replace the standard /system/bin/sh with a ...
7
votes
6answers
3k 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, ...
6
votes
1answer
2k views

Is there a way to list the local dns cache?

I would like to get a list of my current cache on my phone, what is the command to issue in order to retrieve that list ? I would like to get a command and not an app that does that, since i want to ...
3
votes
1answer
2k views

How to access a linux shell from my phone via bluetooth?

Basically I want to send shell commands from my phone to my PC (Ubuntu 11.10) via bluetooth. Why? Because I don't always have WLAN and WLAN on my phone sucks. All possible solutions are welcome. I ...
3
votes
1answer
868 views

I want to execute shell commands on my pc from my android via USB

I have a linux box, without any network interface, only usb. I have my andorid phone, and the USB cable. I would like to connect from my android device to the linux box,and execute shell commands on ...
11
votes
4answers
24k 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 ...
0
votes
1answer
139 views

My Optimus X2 was missing its custom android

While I was waiting for my new LJ Optimus X2 (P999) mobile I watched a couple of youtube reviews and it always came with extra features to android. But my phone is pretty much vanila android. Is it ...
13
votes
2answers
14k 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 ...
11
votes
1answer
3k views

Start an Android application via a shell script?

Is it possible to start an actual Android application from the command line in Android? For example, say I'd simply like to start/bring to the front my calendar. Is there a way that I can do this ...