Hi, I'm looking for a way to execute a couple of line of code through a terminal emulator.
Let me clarify,
I have an app that I want to execute the code by calling the terminal emulator and having it run that.
Obviously, I know that normally
Code:
getRuntime.exec()
would normally work, but for me that's not the case.
Any help would be greatly appreciated.
Are you capturing the command's response? stdio and stderr?
Sent from my SM-G925I using Tapatalk
Related
Does anybody have any good info or a list of commands we can use in ADB without root access? I am not clear if this is strictly an App developer tool when root access is not allowed or if there are still commands we can use to interact with our phones. Thanks for any commands posted in advance!
Just type adb and it will give you a list of commands, if you try to do anything that requires root it will tell you that you can't do it.
I think this should be in general also.
Sent from my ADR6300 using Tapatalk
Actually this has to do with Android development. Thank you for the refresh I forgot you could just type that in to get the commands.
im writing an app and it requires root permissions, can anyone help me out?
Normally you execute "sh" to open a shell and then you keep streaming commands to it.
The only difference is that you need to use "su" instead of "sh"
See http://code.google.com/p/netmeterle...statusled/utilclasses/ChargingLEDLib.java#295 for an example
Thank you so much!
Sent from my Nexus One using XDA App
Is there a way to make .bat like files? Or another way to run presaved terminal commands?
Sent from my GT-I5800 using Tapatalk
You're talking about android terminal emulators or adb shell? If so, write »#/system/bin/sh« into the first line and your commands into the following lines of a text file. Give your file execute permissions when you're done. Give it any name you like.
Then just run it from a shell prompt as you would do with any other command.
If you want do delve deeper into this, ask your favorite search engine for "shell language", "Bourne shell" or "SUSv4 shell". There are control structures, variables, functions - anything you'd expect from a full-fledged computer language.
P.S.: SD cards are often mounted with no execute permission. If your command file lives there, run it using "sh /sdcard/filename".
Thanks a lot! Very helpful!
Sent from my GT-I5800 using Tapatalk
Greetings to all!
Can You tell me how can i use shell in WF, what can i do in/with shell, is shell useful for working with, where can i find commands for android shell...?!
I'v installed it but when i type "Su" there is no action only "command not found" also when i type some other commands...
You must be rooted and have Superuser installed to allow terminal emulator to access SU.
Im rooted!
Have you got the Superuser App? Because, at the very least, atleast the "su" command should work on the terminal emulator, irrespective of others.
Anyway, some read through threads for shell and it's commands:
http://forum.xda-developers.com/showthread.php?t=718264
http://forum.xda-developers.com/showthread.php?t=826769
Yes, i have...Thats why is strange for me...
I rooted WF on my Linux Ubuntu 10.10...
You'll need the android development kit from google. Extra the tools to your personal user bin folder. (~/bin) add into your path statement. Open interval in you should not have adb working. In the terminal using adb issue adb shell. You will now be in a shell on your phone through your computer
Sent from my Incredible using Tapatalk
I know about Adb using phone shell with my Pc but i dont want that, i thought that shell can use only with phone without Pc...To bad...
Or i didnt understand you...!?
Hi, I don't have a PC but can I use a Terminal Emulator to extract the unlock code? Thanks!