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
15 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
37 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
15 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.
0
votes
0answers
44 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 ...
0
votes
2answers
71 views

Installing stock Android on Galaxy S3 fails. How to see why?

I have tried installing AUT-I9300XXUGNA5-20140129183554.zip and O2U-I9300XXUGNA5-20140224162541.zip on my S3. They both fail with "Installation aborted", but I have no problem installing ...
0
votes
1answer
37 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
55 views

How to add a symbolic link to bypass unavailable busybox applet

I have BusyBox version v1.15.3 installed that came with the ROM gingerdx 31b. This busybox version cannot be updated/changed, because if it's being updated, the phone goes into a bootloop on the next ...
0
votes
0answers
37 views

built in command line pager/text-file-viewer? 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
1answer
67 views

How does hibernating an app work technically?

Hello how are you guys? I was wondering How Hibernating of an app works technically. I know about freezing an app (shell pm disable com.mypackage.name) but this also hides app icon from launcher. I ...
0
votes
0answers
16 views

Trigger sync of calendar/addressbook remotely

I would like to trigger the synchronization of calender and address book on the command line (using an adb command or a script). The background is that I have set up my own caldav and carddav server ...
0
votes
1answer
306 views

mount: Permission denied (when mounting /system directory on android device)

I have rooted Samsung Galaxy S4 (Int) using CynongenMod OS. I am trying to install and run an executable file which needs its configuration file to be copied to the /system directory. Now, after ...
1
vote
1answer
100 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 ...
-1
votes
4answers
242 views

Use ADB To Lock Phone

I have a security app that needs to be able to activate the default lockscreen but with a passcode. Is it possible to do this with android shell commands?
0
votes
1answer
54 views

Sending linux commands over serial

I have a question about being able to send Linux commands over a serial connection to an Android device. I have heard of putty and tried to use it, but i am ultimately lost with it. Like if I was in ...
0
votes
1answer
179 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
279 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* ...
1
vote
2answers
239 views

adb shell check if a certain directory exist on avd

i want to check if a certain directory (/data/textdata/ ) exist on the avd using adb shell. reading adb check if directory exists and push file if it does, i've used the code posted by prolink007 ...
2
votes
1answer
303 views

Disable browser prompt when using ADB to open an URL

I'm trying to open an URL using the ADB command: ./adb shell am start -a android.intent.action.VIEW -d URL When I have multiple browser support applications, I'm trying to open this using google ...
0
votes
1answer
150 views

Samsung Galaxy Note 1 /sdcard/ folder tree

Hi I am searching for the factory folder tree for Samsung Galaxy Note 1. I want the folder tree, so I can perform adb shell commands to access these directories. In a quest of recovering data. e.g. ...
0
votes
0answers
12 views

Where to find info on the “service call” shell command? [duplicate]

Using adb shell or a terminal emulator on the device, entering this will clear all notifications (requires su) service call notification 1 This will send an sms (doesn't require su) service call ...
1
vote
0answers
73 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 ...
0
votes
1answer
162 views

Can I run scripts on startup on rooted Galaxy Note 3?

I want to be able to run a shell command (e.g. mount) on startup on my Galaxy Note 3 (stock rooted Android 4.3) Typically on Linux that'd be done using /etc/init.d but I don't have that directory on ...
0
votes
0answers
36 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
1answer
3k 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
78 views

How to stop Android shell from echoing control characters?

When I su to root, any control character that I type is echoed by the Android shell. For example, when I type "ls /sd" followed by a tab, instead of displaying the default tab completion of ...
0
votes
1answer
127 views

adb shell ls giving strange results

Environment: running adb in command window on Windows XP PC running adbKonnect on Nook Simple Touch (rooted; running Android 2.1) When I type adb shell ls \sys I get a list of the folders there. ...
0
votes
0answers
252 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 ...
1
vote
1answer
2k views

Running TRIM from shell

Is it possible to run fstrim in stock android 4.3 from adb shell? I understand it runs every 24 hours when the device is plugged in and idle but I would like to run on demand to test a few theories.
1
vote
1answer
1k views

Android shell script permissions? [duplicate]

I have a rooted phone, and I was playing around with Terminal Emulator. I tried writing a simple shell script (test.sh) : #!/bin/sh echo "Hello, World!" Then I opened terminal emulator, cd'd to ...
0
votes
2answers
1k views

Android: “wipe data/factory reset” won't delete all directories in '/sdcard'

I'm trying to reinstall my Asus Transformer TF101 with Cyanogenmod, I select the "wipe data/factory reset" option in the ClockworkMod Recovery menu, but after installing it I find that the original ...
9
votes
1answer
2k 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 ...
0
votes
2answers
2k 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
367 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
59 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
1answer
1k 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
219 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
655 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
7k 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
432 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
102 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 ...
5
votes
1answer
5k 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
174 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
992 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
116 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
1k 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
3k 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
15k 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
637 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?
1
vote
3answers
12k 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
1k 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 ...