Hot answers tagged shell
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) normal apps in internal memory go to /data/app some apps (encrypted on internal storage?) go to /data/app-private Apps stored on ...
If it helps, I found ADB.exe here in a new Android Studio 1.0.2 install: C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools
While looking around my Android filesystem, I found that it did, in fact have a /etc/init.d/ directory. After peeking around in there, I found /etc/init.d/20userinit with the following lines: if [ -e /data/local/userinit.sh ]; then log -p -i -t userinit "Executing /data/local/userinit.sh"; busybux chmod +x /data/local/userinit.sh; logwrapper /...
They are stored in /data/app/ but unless your phone is rooted all you will see is an empty folder.
App Management Use Android package manager pm usage: pm [list|path|install|uninstall] pm list packages [-f] pm list permission-groups pm list permissions [-g] [-f] [-d] [-u] [GROUP] pm list instrumentation [-f] [TARGET-PACKAGE] pm list features pm path PACKAGE pm install [-l] [-r] [-t] [-i ...
If I'm interpreting "on the computer" correctly to mean "I want to use the command line on my computer to read an .apk file's permissions" then you can do that with aapt on a local file like so: C:\>aapt d permissions "MyApp.apk" package: com.app.myapp uses-permission: android.permission.ACCESS_NETWORK_STATE uses-permission: android.permission.INTERNET ...
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 SDK platform tools folder (eg: C:\android\...
Yes there is, Check out the application Better Terminal or Android Terminal Emulator both are support from 1.5
Addresses are cached for 600 seconds (10 minutes) by default. Failed lookups are cached for 10 seconds. From everything I've seen, there's nothing built in to flush the cache. This is apparently a reported bug in Android because of the way it stores DNS cache. Clearing the browser cache doesn't touch the DNS, the "hard reset" clears it because it simply ...
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.
From http://stackoverflow.com/users/119895/macarse: 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 ...
Using adb, I believe it is possible: am [start|instrument] am start [-a <action>] [-d ] [-t <mime_type>] [-c <category> [-c <category>] ...] [-e <extra_key> <extra_value> [-e <extra_key> <extra_value> ...] [-n <component>] [-D] [<uri>] am instrument [-e <arg_name> <...
Simple, really: 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 ...
If you have a wireless network set up I can recommend to connect via SSH. It allows you to access and fully manage your Android in a few minutes. For Linux or Putty users there is no difference to a standard terminal using SSH besides some specific Android commands. Moreover, some file managers such as Nautilus support the SSH protocol so you will have the ...
Recently I had similar requirement, and I found 'busybox' utility. The terminal emulator apps are useful however those support very few commands. However 'busybox' gave me access to most of the generally used Linux commands. Here is how I used it.
On a typical Linux system the cache is cleared by running /etc/init.d/nscd restart, but at least my ROM doesn't use nscd to cache DNS. You can check if yours does, but I doubt it. I've seen suggestions that clearing the brower cache would clear DNS cache too, but one sure way is to do a hard reboot (shutdown, remove battery for 30s, reattach battery and boot)...
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 ...
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-...
killall zygote 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 ...
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: http://learnandroid.blogspot.com/2008/01/run-android-application-from-command.html http://stackoverflow.com/questions/4967448/send-sms-in-android
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....
Yes, just use ADB over USB and run adb shell. See http://developer.android.com/guide/developing/tools/adb.html#shellcommands
/data/init.sh runs at boot, if you have root you can edit it as you like. Be careful ;) Edit: Apparently you might need to shoehorn the edited script into the boot image as well. Info on how to do that here: http://forum.xda-developers.com/showthread.php?t=443994
It appears to be defined in /init.rc, at least on my device: export PATH /sbin:/system/sbin:/system/bin:/system/xbin I don't think you can edit this file directly though, even with root access, because it is part of the read-only boot image, not the /system partition. If you want to edit it then I guess you would have to unpack, edit and re-pack the boot ...
You may have a look at http://www.busybox.net/downloads/BusyBox.html for a description of busybox and the commands provided by it. And trust me, if you are going to do work in the console, you probably want to use busybox.
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 ...
Another way is to simply go to Settings→About phone, where you should see (depending on your CyanogenMod version) an item "CyanogenMod updates", and (with all CM versions) "CyanogenMod-Version":
The Scripting Layer for Android also includes a shell.
The only way to do this in Android is to do a hard reboot. The necessary command-line tools are not normally available, however in my tests a hard reboot has always done the trick for me (Galaxy Nexus, and HTC Desire, various ROMs). This is a pain, but it is quicker than the 10min cache timeout.
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 ...
Only top voted, non community-wiki answers of a minimum length are eligible