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
0answers
3 views

Android can't boot after disabling system application (stuck on a loading screen)

I am recently disable system app (com.xperia.home) and after that phone can't boot (infinite loop). I tried to load in to the cwm, then connect via adb shell to enable package as described here, but ...
1
vote
1answer
20 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, ...
0
votes
0answers
9 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
1answer
16 views

What is the pathname to my application executable? [on hold]

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 ...
1
vote
0answers
39 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: ...
0
votes
1answer
22 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
0answers
32 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
1answer
12 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
0answers
66 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
1answer
26 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
0answers
23 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
78 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
1answer
88 views

How to query/change the default gateway via bash on CM12?

When i do a 'busybox route' on CM12 i get this: localhost / # busybox route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.100.0 * ...
0
votes
0answers
32 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 ...
1
vote
0answers
142 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
1answer
98 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 ...
0
votes
0answers
50 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
2answers
662 views

Permission denied when accessing file pushed using boot insecure into my Nexus 4 with Android 5.0.1

I have a Nexus 4 with Android 5.0.1. I copy a file doing the following: I reboot to bootloader Boot using insecure boot.img: fastboot boot boot.img Pushed a file: adb push IMG_20140710_105128.jpg ...
0
votes
1answer
263 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
0answers
97 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. ...
1
vote
2answers
191 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
99 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
185 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 ...
2
votes
1answer
211 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 ...
0
votes
0answers
13 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
1answer
123 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
51 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 ...
2
votes
1answer
594 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
2answers
163 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 ...
1
vote
0answers
226 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
1answer
317 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
207 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 ...
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 ...
1
vote
1answer
609 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
874 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 ...
0
votes
1answer
2k 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
134 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 ...
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 ...
0
votes
0answers
24 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
209 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 ...
0
votes
0answers
688 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
165 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
329 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 ...
0
votes
0answers
84 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
260 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
2answers
1k 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
1answer
1k 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 ...
1
vote
2answers
20k 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?
0
votes
1answer
990 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
1answer
541 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 ...