General :: Send SMS Via ADB Shell From PC To Android Phone?
Oct 26, 2011is it possible to send sms via adb shell from pc to android phone (via usb) ??

is it possible to send sms via adb shell from pc to android phone (via usb) ??
I am looking for a way to send an email, preferably with an attachment, from a command line shell script (bourn/ash/whatever-it-is). No user interaction is a requirement.
It looks like an "am start" command might be able to do it via launching another app, and I've seen some examples out there, but nothing that I've had success with.
I have a big rsync backup script that I run to back up my device to my server, but I want to be able to email myself a notification if the backup fails, along with a copy of a log file. This script runs on a regular basis via a scheduler without any user interaction, but I have noticed that rsync has been failing recently and I've needed to re-run it manually later.
I am a pro Linux sysadmin but don't know jack about Java. I do bash, python, perl, and some C. My current script is just a sh shell script.
FYI my device is a Nexus One on Cyanogen 7.2. FYI I own the mail server here. I use k9mail as my primary mail app but the gmail app could be used as well.
If there was just a "mail" command.
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.
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.
Can't find information on how to print out documentation on android shell commands while in the shell. Something along the lines of.
View 4 Replies View RelatedHow 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?
I have an Amazon Kindle and the SGS2 which I take out and about with me.
I want to be able to transfer documents to and from the phone and Kindle (already got SSH access to the Kindle over WiFi) while out and about.
My phone is rooted and I've installed dropbear SSH. I can use connectbot to SSH into the phone locally but the shell I'm presented with doesn't see `scp`. I believe this is supposed to be included with dropbear? How do I get scp from this shell?
The reason I'm looking to do it all from a root shell on the phone is becuase I believe this is the only way to get access to the clients connected to the virtual access point. Hence I'll be able to:
be in the middle of the desert, create a WiFi tethering hotspot with the phone (though it has no signal), connect the Kindle to the phone via this access point, get a root shell on the phone and scp documents from the phone to the Kindle.
I believe I am as far as this final step but need an extra kick to get me there. Perhaps I need to install another shell?
I'm a noob to like all of this so bare with me, I love jailbreaking and rooting stuff, just because I love being in complete control of my device....so thats the main reason why I rooted my samsung moment. I usually gain experience from all of this by looking on youtube tutorials or going to threads, I've never asked or seeked helped personally until now. So my question is what can I do with my phone now? I have an idea of how I would put new roms on my moment but I want to be sure of what I'm doing before I brick my phone from a careless mistake. How to get started on a Rooted phone in a nut shell?
View 5 Replies View RelatedI am wondering what terminal command I can use to check if a process has been cached. On my Sprint Galaxy Nexus, rooted, with the latest build of the Paranoid Android jelly bean rom, I can go to my settings, click on apps, swipe to the "Running Apps" list, and click on the button at the top of the screen that says "Show Cached Processes," and that displays the list that I am trying to access. My reasoning for doing this, is to use "Secure Settings" in conjunction with "Tasker" to check if my "Groove IP" application is running. Initially, I was trying to use "pgrep -l com.*" and check that list for "com.gvoip" too see if "Groove IP" is running in the tray (pull down menu), but if the process is cached, it still shows up in that list. How to get a list of cached processes from terminal.
View 4 Replies View Relatedif there is an folder app or a way to get the cool folders from TSF SHell with their nice animation or feature to pull out the apps with a wipig gesture?
View 1 Replies View RelatedSome directory of the Wallpapers of TSF Shell?
I want set one as my lookscreen.
Is there any method to install a modding zip, like SystemUI mod, via adb shell instead of CWM?
View 3 Replies View Relatedi want to run su -c "chroot some/folder /some/script" from within a shellscript but it just does nothing for a moment and fails then. it works if i run it directly from the shell or if i am already root.
View 2 Replies View RelatedI changed my email password on my PC. now I can't receive or send emails on my phone. I tried to change my phone email password but it does not take.
View 1 Replies View RelatedWhat i'm trying to do is play PC games on my Nexus 4 over WiFi/3G. Which I can successfully do
The hurdle i'm trying to overcome however is getting my PS3 controller (Paired to my Nexus 4) to act as a gamepad on the PC's side.
I can successfully pair the PS3 controller and have it emulate mouse/keyboard inputs which is acceptable for keyboard buttons. But trying to use the right analogue stick as a mouse to look around is hopeless
Is there an app which can send gamepad inputs over the network? That way, I can select 'gamepad' in games and everything should work correctly.
The latest version of Google Now (2.1) doesn't like being flashed. If you flash it via CWM it seems to break voice search functionality, causing a force close.
Playing with the adb shell, I discovered that the pm install command works nicely:
Code:
pm install [APKNAME].apk
So, I thought this would be perfect to execute in a shell script via CWM/Edify.
So far I've tried all manner of commands. First I was trying the above command in a install.sh file, before I realised that "pm" wasn't present anywhere in /sbin/ (the header of my shell script is #!/sbin/sh").
So, I've tried this:
Code:
#!/sbin/sh
exec /system/bin/pm install data/media/install/Velvet.apk
Here is the update script:
Code:
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Mounting data...");
run_program("/sbin/busybox", "mount", "/data");
[Code] .....
Which, copies the files correctly. This also isn't my first time running scripts in my installer, but this is the first time I've attempted this. To no avail. This same command works in the adb shell, though.
Also, is there another way of flashing that may work? I heard about putting the original file ("Velvet.apk") in /system/app and then putting the updated version in /data/appcom.google.andorid.googlequicksearch-1.apk but this doesn't work either.
Running the above script in Busybox installer's script running function also works perfectly. The only thing it won't do is install from CWM.
i have created a TSF Shell theme and is working perfectly on my device. However, the same is not the case when installed from Play Store. The theme refuses to show up in TSF Shell themes.
View 2 Replies View RelatedCyanogenmod 7.2 has vim (and nano) installed, but when i use vim, the full size of my terminal is unused, and the cursor position and what is displayed become asynchronous. I have tried setting TERM=linux and TERM=xterm (I'm using OS X terminal which emulates an xterm), but neither get me a working vim. vi, which is part of busybox works fine. nano also fails to use the height of my terminal window, and additionally the enter key is broken.
Any way config to get a working vim using android?
i am using spb for a long time.but there are many other cool, clean launchers which do not need as much cpu/ram.so i do not need most of the spb thinks. i do not use most of the spb widgets.but i really really love the 3d sms and 3d birthday widget.
It is not possible to get widgets running outside there own launcher.i searched the web for a really long time to find widgets which are looking as cool as this 2 widgets.tell me such widgets so that i can drop spb and use it in an other launcher?
is there any tool for creating TSF Shell theme ? (like go theme factory)
View 1 Replies View RelatedCan I send an email without invoking any activity (with Send/SendTo action)? Just compose a mail and send to recipient from my application.
View 7 Replies View RelatedI received text messages from my husband's phone # but he swears he didn't send them, they said: busy right now, talk to you later. Is there something in the settings that he activated without knowing what it was, because one of his co-workers got the same text right.
View 3 Replies View RelatedI know this is going to sound pretty lame but I have never had a need to send or receive a text message but now find that it might be useful. I have a Droid Global phone but I have no idea of how to text. I just want to be able to send and receive text messages from my grandkids.
View 5 Replies View RelatedI'm looking for a way to send streaming movies on my HTC One (primarily Redbox Instant) to my Panasonic Viera smart TV. I can send Youtube videos to it so it seems it may be possible. But I don't see any options on Redbox Instant for doing this. I've tried using the mhl adapter and it just doesn't work good at all and I'd rather go wireless through DNLA anyway. Since I already have a smart TV, I'd rather not have to buy chromecast, but if that works I may have to.
View 2 Replies View Relatedis there an app for that? i don't use wifi at all and want an easy way of sending files from my phone to my PC when i'm at home, at work, on vacation etc.
data isn't an issue as i'm on unlimited
HTC sensation blackscreen, trying to flash a nand backup. ADB, fastboot and Shell working.
I got into shell, can #ls that directory ok ..#cd sdcard... try to #ls sdcard or any other folder and will not show content. Im not up with linux commands. I believe I am missing a mount command somewhere.
What Im after is the location of backup folder so I can see the filename of the nand backup to restore in fastboot. And the commands necessary to restore a nand backup via adb, shell or fastboot.
What does this mean? is it normal? i have it showing up quite a few times in my superuser logs. like, several times within a minute. today is the first day. been running this rom for about a week.
I read that disabling usb debugging will stop it, but thats already disabled...
I am running dmans stock ics for samsung captivate glide.
I have chinese tablet, probably it's a any product of MID, becouse on start appear MID logo, perhaps it's only firmware from MID devices. At the back I can see m70008 maybe it's version of tablet. That tablet was blocked by too much write bad pattern and don't know google e-mail. So I tried do wipe data via adb, and probably I do wipe all . Tablet stuck on bootscreen, and system don't start. If I try run shell via adb I get error "- exec '/system/bin/sh' failed: No such file or directory (2) -"what I have to do ?.
View 1 Replies View RelatedI'm using ICS (AOKP with some CM9 patches). I'd like "adb shell" to bring up bash instead of mksh. Is there any way to do this? I tried linking /bin/sh to `which bash`, but that caused system problems--I lost USB debugging completely and had to restore from nandroid backup.
View 2 Replies View RelatedI am trying to create a tasker automated thing, which would show a scene which will have a button to execute a shell command (The command should be executed as root). how to do it?
Code:
reboot recovery