Tag Info

Hot answers tagged

23

Where an app is stored very much depends on several criteria: System apps / pre-installed-bloatware-apps are stored in /system/app (which is 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 external memory go to an encrypted container ...


19

They are stored in /data/app/ but unless your phone is rooted all you will see is an empty folder.


13

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 ...


12

Yes there is, Check out the application Better Terminal or Android Terminal Emulator both are support from 1.5


11

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 ...


10

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 ...


10

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.


9

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> ...


9

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.


8

Most shell commands in Android are not GNU versions or another 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 ...


7

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 ...


7

/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


6

The Scripting Layer for Android also includes a shell.


6

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 ...


6

Yes, just use ADB over USB and run adb shell. See http://developer.android.com/guide/developing/tools/adb.html#shellcommands


6

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


6

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 ...


6

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":


5

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 ...


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 ...


5

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.


5

Try: mount -o loop /sdcard/myimage.img myimage. "myimage" is where you can view the contents afterward.


5

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 ...


5

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. Solution: Copy the net-snmp-5.7.2 directory to the ...


5

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 ...


5

Simple, really: Android is safely shutting down vital parts of the run-time, broadcasting intents to notify apps/services to gracefully shut down, which in turn flush their caches for data and shared-preferences, save what-nots to the sqlite database, etc. In other words, apps and services are given a chance to do their clean up systematically. The ...


4

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. ...


4

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.


4

If you use mv on a directory containing files and subdirectories, it will move all of them. But in this case you may not want to move the amazonmp3 directory itself, so the command would be mv internalmemory/amazonmp3/* /sdcard/music/, assuming the internalmemory directory is correct. The actual names for the internal memory and sd-card depend on the ...


4

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, ...



Only top voted, non community-wiki answers of a minimum length are eligible