Tag Info

Hot answers tagged

12

In adb shell or terminal emulator (and most likely over SSH) you can use the pm utility to install apps. The command is: pm install /sdcard/app1.apk The following are the switches of pm: usage: pm [list|path|install|uninstall] pm list packages [-f] [-d] [-e] [-u] [FILTER] pm list permission-groups pm list permissions [-g] [-f] ...


6

That pretty much depends on two things: the area you're living in the manufacturer's fairness/good will For 1., inside the EU there's a ruling that, put simple, "software changes" such as root won't void your hardware warranty. You might lose "support" concerning software things, but if some hardware component shows problems (e.g. your battery starts ...


6

I'd suggest you plug your phone into a pc with the sdk (or at least adb) installed and in debugging mode. After this, write a script that goes through your apps and installs them via adb, e.g. adb install x:\path\to\app1.apk.


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


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


4

I didn't have my Android with me right now to test, but with the Android Terminal Emulator if you go to the menu, you might be able to use the "Command line" or "Initial command" option.


4

Try the setprop command below: setprop sys.usb.config rndis,adb


4

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.


3

When adb shell is executed, the Android side also launches adb which then executes /system/bin/sh -. This path is hard-coded in system/core/adb/services.c: 347 #if ADB_HOST 348 #define SHELL_COMMAND "/bin/sh" 349 #define ALTERNATE_SHELL_COMMAND "" 350 #else 351 #define SHELL_COMMAND "/system/bin/sh" 352 #define ALTERNATE_SHELL_COMMAND "/sbin/sh" 353 #endif ...


3

You may be in luck; I just finished building git for KBOX2. Once I test it and figure out how to run a staged install for redistribution purposes, I can upload it and post a link EDIT: I've contacted the KBOX2 developer; if the client works hopefully he can package it for download/install to the KBOX2 system. If you're feeling adventurous (or impatient), ...


3

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) The first number you see in the commands is the ...


3

Dynamic DNS service would work. Get your laptop to update your dynamic domain with it's local ip, and then whenever your phone connects to a new wifi network, resolve that domain, if you get a hit, you're either good or happened to find someone with the same local ip! Similar to that, you could get your laptop to post it's ip to a server somewhere (web, ...


2

You can use avahi (wiki) (or a similar piece of Zeroconf software) to discover computers on the network and publish the list for your phone to retreive. See Are there any other Java libraries for bonjour/zeroconf apart from JMDNS? for Java Zeroconf implementations.


2

If you don't want a server-based solution, your laptop could listen to the network for a specific broadcast packet. A broadcast packet will be rerouted to every device in the same network, but devices that aren't listening to it should ignore it.


2

I'm not too keen on the why, but sh on CyanogenMod is a bit watered down. As Joachim noted in the comments, usually you can modify PS1 to change your prompt, but it doesn't properly expand prompt variables: # ps $$ <-- Just showing that the current shell is /system/bin/sh ps $$ USER PID PPID VSIZE RSS WCHAN PC NAME root 1055 ...


2

Search for SwiFTP or FTPServer in the market. They turn your phone into an FTP server and will let you connect using the client of your choice, which would include the bash ftp client.


2

try putting sh in front of your command, eg.: sh ./scp or sh -c ./scp


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

Launching apps in Android isn't straightforward. You'll have to use am start combined with certain <PARAMS> to launch the app or a particular section of it. From the comments, it seems that you may want to launch the text file using ES Note Editor. In that case, first identify the activity responsible for the edit window you see when the file is ...


2

That's rather a shell scripting question to be asked at Super User. Your answer can be found here: Extract filename and extension in bash: for file1 in $SYSAPP*.apk.odex; do mv "${file1}" "${file1%.*}.odex" done for file2 in $SYSPRIVAPP*.apk.odex; do mv "${file2}" "${file2%.*}.odex" done should work on most shells, supposedly. Update: You can ...


2

This is more of a linux question, and it may need to be moved to superuser.se, but I can answer it. On linux, you string commands using && (or || or just ;). With &&, the first command must finish executing and have no error codes in order for the next command in the sequence to run. In your setup, it looks like you want to open an ADB ...


1

Apparently the only (?) way to do this, is by using a named pipe like this: mkfifo myp1 || exit mkfifo myp2 || exit sort list1 >myp1 & sort list2 >myp2 & diff myp1 myp2 rm -f myp1 myp2 This need to be put into a mksh shell function in order to be of any real command line use. Another tricky part seem to be that AOS has implemented some kind ...


1

Took me a while to find this answer, so sharing here... Lollipop uses different routing tables with rules per user and/or interface. Here is a sample when I'm connected on wifi: root@hammerhead:/ # ip rule show 0: from all lookup local 10000: from all fwmark 0xc0000/0xd0000 lookup legacy_system 13000: from all fwmark 0x10063/0x1ffff lookup ...


1

In addition to this answer you can use the following solution which is taken from rohitverma's answer here and noticed in Lucky's comment. am start -a android.intent.action.VIEW -d <FILEPATH> -t text/plain --activity-clear-task It will execute com.android.internal.app.ResolverActivity activity of android system with all candidates registered ...


1

If the script isn't dependent on Terminal IDE but on shell only, then you can use Tasker to create a home screen shortcut which would execute the script. Brief instructions: Choose Task Shortcut widget in your current launcher. Create a task name and tap +→ Code → Run Shell. Enter the details there as per your need. Save the task, choose 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 ...


1

I am using the same method and yes SSH is great! But it seems when you SSH to Android it gets a different shell than sh so if you put sh in front of the command it should work. Here's an example: sh /system/bin/pm install app1.apk


1

There's an application called Network Discovery (available on F-Droid, may also be on the Android Market) that attempts to identify devices on the network your phone is connected to. As it's Free Software, you could try to see if you can modify it or use portions of it for your purposes. Not a "here's an APK" answer, but if you have to write something, ...



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