Where an app is stored very much depends on several criteria:
System apps / pre-installed-bloatware-apps are stored in /system/app with privileged apps in /system/priv-app
(which are mounted read-only to prevent any changes). You may also find system apps in /custpack/app's subdirectories.
normal apps in internal memory go to /data/app
some apps (encrypted ...
WINDOWS: In the current version of Android Studio, ADB.exe is located in %USERPROFILE%\AppData\Local\Android\sdk\platform-tools\. Earlier versions of Android Studio have it in %LOCALDATA%\Android\sdk\platform-tools instead.
MAC: Find the ADB executable in ~/Library/Android/sdk/platform-tools.
Android Studio does not contain ADB, you need Android SDK for it (it is installed on first run of Android Studio 0.9.x and newer). ADB is located in sdk\platform-tools.
It's possible to add to PATH in Windows and use Terminal inside Android Studio only by command: adb shell and after use su get root shell.
Locate the SDK platform tools folder (e.g. C:\...
To put it shortly, adb (Android Debug Bridge) is a utility made to be installed on a computer, in order to let it gain a shell on a phone that's either connected via USB cable, or on the same Wi-Fi network.
On certain devices running Android Lollipop (5.1.1) and possibly lower versions of the OS, it was possible to trick a device into connecting ...
Running the following command as root should enable USB tethering:
service call connectivity 32 i32 1 on Ice Cream Sandwich (4.0)
service call connectivity 33 i32 1 on Jelly Bean (4.1 to 4.3)
service call connectivity 34 i32 1 on KitKat (4.4)
service call connectivity 30 i32 1 on Lollipop (5.0)
service call connectivity 31 i32 1 on Lollipop (5.1) according ...
You might need to activate adb root from the developer settings menu. If you run adb root from the cmd line you can get:
root access is disabled by system setting - enable in settings -> development options
root access is disabled by system setting - enable in settings -> development options
Once you activate the root option (ADB only or Apps ...
I found sort of a workaround for this (at least for a rooted phone). If a phone is rooted, busybox is most probably installed. stty is part of busybox.
stty intr ^x
Redefines Ctrl+X to act as a break command, e.g. what was previously Ctrl+C.
For Android 6.0
To Enable use :
For GPS : adb shell settings put secure location_providers_allowed +gps
For Network : adb shell settings put secure location_providers_allowed +network
To Disable :
GPS : adb shell settings put secure location_providers_allowed -gps
For Network : adb shell settings put secure location_providers_allowed -network
Android is safely shutting down vital parts of the runtime.
The OS is also broadcasting intents to tell apps and services to gracefully close. These, in turn, flush their caches of all data and shared preferences, save what-nots to the sqlite database, et cetera.
In other words, apps and services are given a chance to do their cleanup ...
Is it possible to enable Location Services(GPS or Google NetworkLocation) via ADB or Terminal Emulator?
The command is:
adb shell settings put secure location_providers_allowed gps
settings would makes changes into settings.db (part of com.android.providers.settings)
put is to update key location_providers_allowed with value gps in table secure.
What is the device doing exactly when I'm pushing the (hardware) power button? I guess that's the most friendly way.
You get to see a dialog with an option to power off the device (stock Android doesn't offer reboot). It appears that ShutdownActivity is called upon when you long press Power button.
Anyhow, this is what you can try, remotely or locally, ...
As I wrote in my comment, there are some special characters needing extra care when working at the shell prompt (or in shell scripts). One of them is the $ sign, which usually indicates a variable. If that should be taken literally, you need to escape it (or enclose the entire string by single quotes). Similar rules for quotation marks.
How your command ...
For Android Oreo and possibly for Nougat too I suppose, run:
adb shell get-current-user #returns USER_ID of the foreground user
adb shell dumpsys activity | grep mCurrentUser
You output would be:
0 is always the user Id for the owner (primary user). Any other number, say 10 or 11, would reflect a secondary user (...
This is due to 2 things:
The file does not have execute permissions [AND]
The file cannot gain executable permissions as it is on the SD Card. The SD Card's filesystem can accept file permissions, however it is mounted with the noexec flag, as stated in a comment. This stops files being executed.
Copy the net-snmp-5.7.2 directory to the /data/...
Most shell commands in Android are not GNU versions or a POSIX-compliant implementation, they are either from Toolbox or Busybox and mostly stripped down versions.
A lot of commands in /system/bin are symlinks to /system/toolbox. I haven't found much documentation about it, just the source at https://android.googlesource.com/platform/system/core/+/jb-mr1-...
This will kill the root zygote process and cause a Android system refresh.
This does not restart your phone's hardware, only the Android processes.
By default (in Linux), the kill/killall commands do give the processes a graceful way to shut down, though it depends on the zygote implementation whether this in turn gracefully shuts down your ...
You should be able to call the messaging intent with
am start -a android.intent.action.VIEW "sms:numberhere" -e "sms_body" "hello"
Using the intent command as described here:
Alas, the UsbStorageActivity doesn't use an intent to enable and disable USB mass storage, so there's no way to achieve this using am. It instead calls the functions StorageManager.enableUsbMassStorage and `StorageManager.disableUsbMassStorage to do its work. As these functions are hidden in the framework, it's not possible to write an app to do this, either....
As explained by the comments and Liam's answer, this is due to the noexec flag used by the system when mounting the sdcard. If your configure file is a shell script (as it usually is), you can still trick it to be executed:
cd to the directory as you described above, and then execute sh configure.
sh is the Shell interpreter, and that binary should be ...
Your device is not rooted. To see what Rooting is and how to go about doing it:
What does "to root a phone" mean?
Once you have rooted your device, you will be able to access the Super User state of your device (SU). Just be aware that rooting could brick your device if done incorrectly, as could and tampering ...
In Android, the DNS Cache is not on the OS level (Linux), but on the Java level (managed by java.net.InetAddress). Therefore, it is not possible to list the cache contents from the shell, however you can access it from the Java code.
Please see Java DNS cache viewer question on StackOverflow, one of the answers has a sample Java code that prints the ...
There is some documentation on the AOSP site:
Plus several Howtos like e.g.
Android, writing events low level touch screen automated shell
Turning the output from getevent into something something that can be used
How to emulate key presses
adb shell sendevent, sending touch like events
Android, low level shell click on screen
However, the ...
adb is not available in the bootloader, try using fastboot instead
for a quick and dirty rundown of flashing your device with a new image using fastboot:
adb reboot bootloader
use fastboot devices to verify your device is visible, if not, you're probably running windows, and you have to install some funky drivers.
if you don't see 'unlocked' at the bottom ...
There is a pretty bad method using adb shell input tap, Get the coordinates for enable tethering and substitute
adb shell input tap <x> <y>
Or navigate to enable radio using adb shell input keyevent. Just have a look at,
adb shell input
Again this confines to a particular device.
On my Android 4.0.4 (ICS) Xperia ray, they are stored in /mnt/asec/XXX-1/pkg.apk.
XXX is the Google Play ID of the application.
For example, Firefox is found at /mnt/asec/org.mozilla.firefox-1/pkg.apk and Skype is found at /mnt/asec/com.skype.raider-1/pkg.apk.
Following zuul's comment I took these screenshots from my phone to confirm my answer.
WARNING: I have not tested this procedure.
You would need to have fstrim in system/bin. This XDA post has a DropBox download link.
start up adb and then switch users to root.
$ adb shell from your os terminal.
$ su to switch to the root user.
To copy fstrim to your /system/bin path you first need to mount the system path as Read/Write from adb or some ...
A way to dynamically get the PID of the dhcp process, and kill it altogether, would be to run:
var=$(ps | grep dhcp)
kill $(echo -n $var | cut -d " " -f 0)
line 1 asks for root permissions;
line 2 assigns the output of ps (which lists the active processes), filtered by grep with the keyword dhcp, to the variable var;
line 3 calls kill to ...