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.
3
votes
1answer
326 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
49 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
101 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
0answers
52 views
Android Recovery
I am trying to find a way to reboot android devices into recovery. I know that you can use "reboot recovery", however not all toolbox versions support this. So I thought that I would make use of ...
0
votes
1answer
54 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.
0
votes
0answers
211 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 ...
3
votes
2answers
420 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
1answer
604 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 ...
3
votes
1answer
210 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
2answers
2k 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
452 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
1k 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 ...
0
votes
1answer
263 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
193 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
200 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?
3
votes
2answers
2k 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
1k 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
206 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
217 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 ...
0
votes
0answers
235 views
Delete network routes [closed]
How do I delete network routes on Android? Via an adb shell as root, I ran cat /proc/net/route to look at the routing table and then route del wlan0 to delete all wlan0 routes, but I get the error: ...
4
votes
2answers
805 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 ...
2
votes
0answers
611 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 ...
2
votes
0answers
187 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
267 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. ...
7
votes
3answers
3k 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
574 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 ...
2
votes
2answers
3k 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
99 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
465 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
226 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
494 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
1k 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
750 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. ...
6
votes
1answer
2k 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" ...
-1
votes
1answer
1k 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 ...
4
votes
5answers
2k 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
753 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
766 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
565 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 ...
6
votes
3answers
9k 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
136 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 ...
9
votes
1answer
5k views
What useful Android Shell commands do you know?
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 ...
8
votes
1answer
1k 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 ...
3
votes
2answers
926 views
Read APK permission by shell command
I want to read the requested permissions of an .apk file on the computer (android sdk is installed) via command line.
I.E.:
$ android read-permissions /path/to/someapp.apk
I know this is possible, ...
2
votes
3answers
782 views
How can I zip a folder into a zip file in Android to send over the Internet?
I have root, and I tried running the zip command from shell, but zip is not found. I think Android doesn't come with zip. How can I install zip on Android?
3
votes
2answers
2k 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. ...
11
votes
2answers
27k 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 ...
2
votes
2answers
3k views
Can i mount loopdevice in Android?
I have rooted my android phone and get a shell thr adb. I wanna mount a ROM image in android. But I always fail:
mount -o loop /sdcard/myimage.img /mnt
mount: can't setup loop device: No such file or ...
3
votes
2answers
1k views
2
votes
2answers
3k views
How to delete the history and cache in Opera Mobile (10.1) via shell?
I run Opera Mobile 10.1 on Android. My device is rooted. How can I clear the history and cache of the browser via shell?
As su, removing
...
