Android :: How To Send An SMS From A Shell
I would like to be able to send an actual SMS message from a shell using just the command line and not relying on any apk to do so. I am interested in sending this message between phones, not from the emulator to the phone. For example, by running the command: service call phone 2 s16 "1234567890"
I can place a call from phone to phone using the command line. The 'service list' command shows an isms service, which I can't seem to provide the correct arguments for. I would assume that one of the args should be a PDU string but haven't had any luck so far.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Android :: Send Coordinates To Droid Through A Shell Script?
I've got a question about android and GPS coordinates. I've got a script done in python, which opens a socket and sends a bunch of coordinates to an emulator. On the emulator I have an application running where I've registered an OnLocationListener. The idea is to capture the coordinates and animate the map towards those positions. The problem is that android gets the first position, animates the map towards it and then ignores the rest. This has become a pain in the neck and is killing me and my developer team.
View Replies!
View Related
Android :: ADB Shell Exiting Abnormally
I find that when I am running 2 android devices connected to 1 linux machine, I find I can get ADB shell to exit abnormally. If I start a shell on Device 1, then on Device 2 start a shell and type reboot. Device 2 resets like expected, but the shell on device 1 will exit. I find that functionality of running controlling multiple devices with ADB very useful for testing. My question is can anyone reproduce this? Has this been fixed upstream? Is ADB planning on first class support for multiple devices, or was this an after thought feature? Any help debugging this, or possible just a little information in the right direction so I can make a patch myself.
View Replies!
View Related
Android :: Possible To Run ADB Shell Command From Inside An App
I am trying to run an ADB shell command from inside an android app using the JAVA's Runtime.getRunTime.exec API. I am getting an error "ERROR/ProcessManager(1041): Error running adb: Permission denied". Wanted to check if there is any permission that I need to request to get it working or that running the adb shell command would not be allowed from with in the Android app. I am able to execute other linux commands like 'ls' from the android app though.
View Replies!
View Related
Android :: Run A Shell Command From Within Code
I am trying to execute a command from within my code, the command is "echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness" and I can run it without problems from adb shell I am using Runtime class to execute it : Runtime.getRuntime().exec("echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness"); However I get a permissions error since I am not supposed to access the sys directory. I have also tried to place the command in a String[] just in case spaces caused a problem but it didn't make much differense.
View Replies!
View Related
Android :: Possible To Run ADB Shell Hello.c Command From Inside An App
I have copied a file named hello(compiled form hello.c) in android data folder and using command like "adb shell datahello" in android machine terminal. and it give fine output. Actual Question is that is there is any way that in button click listener, i initiate the same command like "adb shell datahello" (or any other appropriate way to execute adb shell commands) and gets its output in TextView.
View Replies!
View Related
Android :: How To Examine SharedPreferences From Adb Shell
Now that we can Examining sqlite3 Databases from a Remote Shell, is it possible to examine SharedPreferences from adb shell? Since it would be much more convenient to examine and manipulate SharedPreferences from command line when debugging. Or put in another way, in what files SharedPreferences are saved, and how to view and modify these files?
View Replies!
View Related
Android :: How To Navigate To Program Data With Adb Shell?
My program creates a sqlite3 database. With the emulator I have been able to use adb shell and get to the file in /data/data/<package>/ databases/<database> to inspect data. But with a real phone, I just cant seem to find that file. I get some permission even doing an ls on the data directory. Any idea what I need to set up to navigate the filesystem? $ Mac-202: adb shell $ cd data $ ls opendir failed, Permission denied $
View Replies!
View Related
Android :: Not Able To Connect Device Using Adb -d Shell Command From Vista
I am trying to use "adb -d shell" command to start a shell on device (android dev 1 phone ) from my vista command line. But whenever I try giving such command it does not open any shell or interaction on the phone device. But instead it goes to the next line in the cmd as '$'. any help would really appreciable. I have installed adb_usb_windows. Previously I used work well with the emulator. Using adb command never troubled me. But now with new device, I am not able to open a shell using adb -d shell command on the phone.
View Replies!
View Related
Android :: Executing A Shell Script From Droid Application?
I am configuring wifi on my android based board using shell script. Now I want to execute the same script from android application. For that, I had used following code, but it didn't give any success till now, I had executed same script from "adb shell" prompt and it works nicely. Process exeCommands = Runtime.getRuntime().exec("/data/busybox/ board_script.sh"); is there anything else required than this?
View Replies!
View Related
HTC Incredible :: Pm Not Working In Adb Shell
I went here: Howto: Root the HTC Droid Incredible ? Technology ? Jonamerica.com. I followed the instructions and everything was working (for removing bloat) but the only thing that was not working is when i type: pm uninstall. for cityid i get: pm sbin/sh: pm: not found. Whats the deal? I read that entering su would fix that, but su is not recognized either.
View Replies!
View Related
Android :: Getting Result Of Executed Shell Command Fails / Hangs
I try to execute shell commands, this does work as it should. Even the result comes back (as is see on LogCat). The problem ist the last line of the result. Every time a readLine() on the last line occurs (which shouldn't occur, temp should be null), the app hangs forever and doesn't come back from the readLine call. Maybe you find the error. I tried readUTF and standart read(), all the same problem. And yes, the app got su-rights. try { Process process = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(process.getOutputStream()); DataInputStream osRes = new DataInputStream(process.getInputStream()); for (String single : commands) { os.writeBytes(single + " "); os.flush(); String temp = new String(); while( (temp = osRes.readLine()) != null) { Log.v("NITRO", temp); result2 += temp + " "; } } os.writeBytes("exit"); os.flush(); process.waitFor(); } catch (IOException e) { Toast.makeText(Main.this, "Error", Toast.LENGTH_LONG); } catch (InterruptedException e){ Toast.makeText(Main.this, "Error", Toast.LENGTH_LONG); } That is the StackTrace where it hangs when I stop debugger when hanging: OSFileSystem.readImpl(int, byte[], int, int) line: not available [native method] OSFileSystem.read(int, byte[], int, int) line: 118 ProcessManager$ProcessInputStream(FileInputStream).read(byte[], int, int) line: 312 ProcessManager$ProcessInputStream(FileInputStream).read() line: 250 DataInputStream.readLine() line: 309 Main$2$1.run() line: 84 ViewRoot(Handler).handleCallback(Message) line: 587 ViewRoot(Handler).dispatchMessage(Message) line: 92 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4627 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 868 ZygoteInit.main(String[]) line: 626 NativeStart.main(String[]) line: not available [native method]
View Replies!
View Related
Android :: Deliver Test Params Using Adb Shell Am Start Command
I wish to know how in java I should receive these parameters. I do know how to deliver parameters via adb shell am start command but I still have a problem to get them in java (android) code. My class extends InstrumentationTestCase and not Activity class! So I cannot perform: this.getIntent(). I anderstand that I need to create intent doing: Intent intent = new Intent(Intent.someAction); Can you help me to find out what action should I use here. I also read that there are secondary attributes: category, type, component, extras. I know that I also need to update the manifest file accordingly. Sorry for so many q/a.
View Replies!
View Related
Android :: GScript Easily Launch / Save Shell Scripts From UI
Ive created a small application, for people like me who dont like typing the same thing over and over. I use it for things like tethering and reboot. Its basically a small database in which you can save your scripts and run them easily from within Android ( either with normal shell or su ). Ive decided to make it open source ( project can be found on google code, a link is listed below ), so people don't have to be afraid something else is executed as root. Here are some scripts that have been created so far. script that calls the bootdeb.sh - su /sdcard/debian/bootdeb. Make lite version for themes, basically deletes system ringtones, notifications and alarms so themes install properly on rc33 update mount -o rw,remount -t yaffs2, /dev/block/mtdblock /system rm -r /system/media/audio/ringtones rm -r /system/media/audio/notifications reboot Backup system sounds to sdcard - cp -r /system/media/audio /sdcard/audio
View Replies!
View Related
Android :: Way To Execute Shell Script File From Droid Application
I am trying to execute a shell script from application using java.lang.Process API. The script file is executing properly as i am able to get logs but the line *$SETPROP net.if.default rmnet0* * * is not getting executed. has anyone able to execute .sh file from application succesfully. Code Snippet: *//* *str={"/system/bin/sh","/sdcard/test.sh"};* *Process p = Runtime.getRuntime().exec(str);* * * *//* * * test.sh: LOG=/system/bin/log SETPROP=/system/bin/setprop $LOG -t test"++Setting up default iface" $SETPROP net.if.default rmnet0 $LOG -t test"++Setting done "
View Replies!
View Related
Samsung Behold 2 :: Way To Thread For Adb Shell?
Due to the Over whelming Question Regarding how-to do things in Android system regarding ADB, I've Decided to make a thread regarding this Issue.. If you Have to ask a Question, be very clear so we can Keep this thread Clean.. Wiki Located here > ADB - Android Wiki. To Fix ADB in Linux, Visit this Thread > http://androidforums.com/all-things-root-behold-2/60949-adb-linux-replacement-fix-file.html.
View Replies!
View Related
HTC Incredible :: Shell / Holster Case
I picked up the Shell / Holster Combo case from my local VZW store today and absolutely love it. I feel like I'm always struggling to find the perfect phone case and rarely do. But this one is truly ideal to me. What I like:Securely clips on my belt. Easy to remove from holster, but virtually impossible to fall out accidentally. Always-on shell protects phone when not holstered When holstered, the screen faces inward - no risk of bumping into something and scratching it Allows access to all buttons and connections Extremely comfortable to hold Rubbery shell makes dropping the phone less likely If there is anything I don't like, it might be that the texture on the case doesn't look the most professional, and I work in a white-collar environment. But it certainly looks better than a texture-less design would.
View Replies!
View Related
Android :: Adb Shell Commands To Change Settings Or Perform Tasks On A Phone
How do I use adb to perform some automated tasks on my android phone? I need to find commands that I can issue from the command line (ideally, using a .bat file) that will be capable of more than simply opening an application or sending an input keyevent (button press). For instance, I want to toggle Airplane Mode on or off from the command line. Currently, the best I can do is launch the Wireless & network settings menu and then use input keyevents to click Airplane mode: CODE:................. There are quite a few drawbacks to this method, primarily that the screen has to be on and unlocked. Also, the tasks I want to do are much broader than this simple example. Other things I'd like to do if possible: 1.Play an mp3 and set it on repeat. Current solution: CODE:.................. 2.Play a video. (current solution: open MediaGallery, send keyevents, similar to above) 3.Change the volume (current solution: send volume-up button keyevents) 4.Change the display timeout (current solution: open sound & display settings, send keyevents) As before, these all require the screen to be on and unlocked. The other major drawback to using keyevents is if the UI of the application is changed, the keyevents will no longer perform the correct function. If there is no easier way to do these sort of things, is there at least a way to turn the screen on (using adb) when it is off? Or to have keyevents still work when the screen is off? I'm not very familiar with java. That said, I've seen code like the following (source: http://yenliangl.blogspot.com/2009/12/toggle-airplane-mode.html) to change a setting on the phone: Settings.System.putInt(Settings.System.AIRPLANE_MODE_ON, 1 /* 1 or 0 */); How do I translate something like the above into an adb shell command? Is this possible, or the wrong way to think about it?
View Replies!
View Related
Motorola Droid :: Need A Hard Shell Case
I have the Sedio case and I love it - but I need something I can throw the whole phone into for when I go mountain biking. I want to carry my droid to have a phone in case of emergency but I need to know that if I fall on my pack (and therefore the phone) I'm not going to shatter the screen.
View Replies!
View Related
Samsung Moment :: Shell / Terminal USB Commands?
I have a samsung moment that I seem to have inadverntantly disabled diagnostic usb access - if I have USB plugged in and then enable dial up networking in settings , USB disconnects - as soon as I disable DUN usb comes back up - I modified the setting in NV for scm from 3a to 2a and caused this, but I can't find a way to access non volatile memory any other way than through usb diagnostic mode
View Replies!
View Related
HTC Incredible :: Place Shell Scripts Write By Own?
1)Where can you place shell scripts you write for yourself? I tried placing them on the sdcard but they won't run from there. I tried placing them in /mnt/emmc but same problem. I tried making a /bin folder in the root directory but it gets erased when I reboot the phone. 2)Is there a way to edit my PATH to include this location. Normally I would put it in .profile or .bashrc in my home directory but there doesn't seem to be a home for the phone that I can tell when I access terminal emulator. root doesn't seem to have a HOME variable set either. How can I modify my environment? 3)Can you create a new user with specific permissions? I would like to create a user and have a folder that is only readable by that user on the phone. Maybe, not sure if this will work with apps etc. 4)Can bash be installed? 5)Can perl be installed?
View Replies!
View Related
|