Tag Info

Hot answers tagged

13

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


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.


8

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.


7

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


6

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


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

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


5

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


4

/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


4

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


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

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


4

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


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

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


3

You cannot execute either binary or shell script that resides on the external sdcard due to the execute permission bit being blocked. Either move the script temporarily to a location other than sdcard (if you're not rooted - you're in a bit of a spot there...) After reading the posting on xda, it would appear that something is amiss, notify the developer ...


3

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


3

Most of the terminal commands in android are the limited version of standard Linux/Unix/POSIX terminal commands, provided by the toolbox program. Notably absent from toolbox is the cp (file copy) command, you must use cat file1 > file2 instead. If you spend a lot of time in the shell, you may want to install busybox, which provides a richer set of ...


3

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


3

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


3

I tried to do uname -a on my CM10.1 (Samsung Galaxy S2) on the built-in Terminal app. It returns: Linux localhost 3.0.31-CM-g17c7b6e #1 SMP PREEMPT Tue Feb 19 01:11:17 PST 2013 armv71 GNU/Linux Kernel version: 3.0.31-CM-g17c7b6e SMP: Symmetric Multi-Processor support PREEMPT: kernel preemption is enabled Kernel date: Tue Feb 19 01:11:17 PST 2013 ...


2

Since I stumbled over the same problem as you did I started to compile a list of useful commands in the Android Shell including examples. A German version is on my blog.


2

As far as I know (not from US/CA) the P999 is a T-Mobile G2X device with vanilla Android, whereas P990 is LG Optimus 2x. The specs are mostly similar but there are certain differences, such as the OS customization. Maybe a custom ROM will bring the functionality to the G2X as well.


2

i was able to stop the top process and still stay in shell by typing the following in this order: C CTRL+Z CTRL+M if I did not type all 3 of those combos it would not stop and I would have to CTRL+C to exit the shell. I found this by just trying different combinations of keys and found it by accident. YMMV


2

There is some documentation on the AOSP site: getevent 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 ...


2

Emulator app should be able to run another app from its own directory. That directory is called something like /data/data/com.super.emulator. Try giving the full path to the app you want in emulator. If you want to get a compiler for Android, you can use NDK. Easy to get, free to use. Can't you also push your file to /system/bin via adb? I don't know if ...


2

diff and patch are Unix/Linux commands used to easily check for differences, send updates to huge files by shipping only the differences, etc. (see Wikipedia). They are mostly used in development (to update source code), but can also serve practical purposes in non-development environments. applypatch is one of those patch-tools on Android, and used e.g. ...


2

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


1

Most likely you can't run the program because of libraries on the device you ripped it from being missing from the device you copied it to. Since your end goal is to compile a program and run it natively on the phone, might I suggest you use the Android NDK? The NDK documentation includes STANDALONE-TOOLCHAIN.HTML which explains how to cross-compile a ...



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