3

There is AirDroid, but it is

  1. Focused on contacts/messages/files, not on settings
  2. Too Web 2.0-ish, not easy to script

I want a simple tool to build my own solution with instead of mis-using some user-oriented application. It should listen some HTTP port and allow

  • to turn on/off wifi,
  • take photos,
  • pause/resume music,
  • adjust volume
  • adjust brightness
  • (and so on)

without any bells and whistles, so I can control the device using simple requests like curl http://localhost:8080/wifi/on or curl http://localhost:8080/music/pause.

/* Actually I want good and easy android control from Linux command line tools, but remote HTTP control tools seem more likely to exist, so asking about them */

1
  • 4
    Please don't ask for app recommendations. Instead, ask for solutions to an issue you're facing.
    – ale
    Commented Sep 6, 2012 at 12:53

2 Answers 2

1

The best solution if you're willing to write code is SL4A. This will give you the most flexibility. You could use the Python module with a lightweight web framework (like: bottle.py) or your favorite scripting language.

As a side note, get requests should not change state. Also make sure you implement some sort of security as this would make it possible for anyone to control your phone remotely.

2
  • "get requests should not change state" -> can be done with POSTs, also don't matter in very simple cases; "some sort of security" -> listen_address=127.0.0.1
    – Vi0
    Commented Sep 6, 2012 at 16:35
  • SL4A can run TCP server which accepts JSON commands which can do all mentioned functions (expect that taking photos works bad).
    – Vi0
    Commented Sep 7, 2012 at 10:58
1

GTalkSMS is worth a look (not HTTP but does also what you want, even easier accessible).

It's an open source XMPP bot (google code project) that you can add to your Google Talk friends list or communicate to with any XMPP client.

You need to find a suitable commandline/scriptable XMPP client for your solution yourself however (as the 'curl' replacement in your question), not sure what you like to use.

Here's an excerpt from the feature wiki on its Google Code project page:

Further Commands
send and receive files to/from the phone: "send", "ls"
enable disable bluetooth: "bluetooth"
[...]
take a photo and send it via XMPP: "photo"
[...]
geolocalize your phone - it will send you google maps links: "where"
[...]
get help, using "help:all"

3
  • Not all of your requirements may be implemented yet and may need some work, however it's FOSS. By the way: The developer of it is here around too, he might have some more info for you.
    – ce4
    Commented Sep 6, 2012 at 13:23
  • OK. Ideally I want a simple tool to build my own solution instead of mis-using some ready-made application.
    – Vi0
    Commented Sep 6, 2012 at 13:46
  • Well, it's meant for that kind of usage. You can add your own functionality by writing some scripts that you can then execute (to send various intents to control music/volume/brightness).
    – ce4
    Commented Sep 6, 2012 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .