ServDroid 0.1

ServDroid is an small web server (currently under development) for the Android platform [1]. At the moment version 0.1 can only be downloaded from this blog, but the future versions will be available in Android Market

If anybody has ideas or opinions they will be welcome.

Download ServDroid

Features

  • Version 0.1 only serve HTML pages (PHP implementations will be considered for in future versions).
  • Log of all request are saved in the Android database. This information can be dumped to a text file.
  • ServDroid can be configured to vibrate when a request is received.
  • Version 0.1 is not open source, but from version 0.1.x the source will be available under Apache licence.
  • The 404 error page can be personalised.
  • This version is only available in English. Later versions will be available in Spanish, Italian and French (if you would like localise the application for your own language feel free to send me the localized XML file).

Screenshots

References

[1] http://www.android.com/index.html

46 Responses to “ServDroid 0.1”

  1. Lennart Says:

    I have downloaded ServDroid on my Nexus One and it only seems to work the first time I connect to it.

    On the second and all subsequent times I connect I get a 404 error. This is regardless of whether I connect from inside the Nexus One or from my laptop using WiFi connection.

    I then tried to uninstall and reinstall it and now I get an Error starting process.

    Any ideas? This could be a great product, I am just trying to get it to work reliably.

  2. Lennart Says:

    One more thing, I noticed that when I uninstalled ServDroid it did not erase the directories on the SDCard. So I did it manually. Then when I reinstalled the ServDroid it did not seem to create the directories again.

  3. joanpuigsanz Says:

    Hello!

    The problem that you mentioned is probably because the folder /sdcard/servdroid/ was removed and when you start the server, it can not find the root folder at /sdcard/servdroid/var/

    I will add a check function in a future version to see if the folder exists and if not, ServDroid.web will create one.

    Try to install version 0.1.2, because version 0.1 is very unstable.

    You can download it from here or from Android Market.

    I think version 0.2 will be available in around two weeks.

    With regards to your aother comment, this is a feature, the folder is not removed automatically because the user might have contents that he/she may want to conserve.

    If you have any more feedback, it will be very welcome.

    Regards.

  4. eric true Says:

    force close in 0.1.2 when port number out of range.

  5. Tronseba Says:

    PHP support ?

  6. James Says:

    Hi.,.
    Any news/ update for version 0.2 release?

  7. dmitry Says:

    Hi!
    It’s a great project!
    What news about php implementations?

    • joanpuigsanz Says:

      At the moment, this project is moving slowly, because I am alone on this project and there are other issues that require my attention (if anybody wants to collaborate, their help is welcome)

      To implement PHP, Apache must be compiled with modified modules to be able to run under Android OS (In theory)

  8. Thomas Says:

    We waiting for php support 🙂

  9. jprlk Says:

    Nice!

  10. Pedro Says:

    Make it root compatible so we can open ports < 1024.

  11. Pete Says:

    Can this run in a chroot environment? (presume that the device has been rooted)

  12. Fail vs. Win (or Spy vs. Spy) | Woes – in a rack… Says:

    […] I get off the net, I’m going to try to get servDroid working. This package may be useful, in any case, it’ll be interesting. Having a web server […]

  13. Bernardo Says:

    I need it running on port 80, is it possible?

  14. tuxor Says:

    How is it possible to run on port 80.
    I downloaded latest version from https://code.google.com/p/servdroidweb/
    but when i change the port to 80 it just changes it right back to 8080?!
    best regards

  15. tuxor Says:

    Thanks a lot! This is so much appriciated..

    Best regards,
    tuxor

  16. tuxor Says:

    Hello again, sorry to bother.
    But when I set it to port 80 the server refuse to start ie. its not getting su permissions automatically from superuser app,
    Do I need to start it with a terminal commandline, and if so can you provide me with a simple command to start it?
    I tryid looking around for the “exe” to sodu it but I’m confused with the android way of doing thlngs, not very compareble to ordinary way of doings things in other os’es, or is it? Heh.. Some simple guidiance would make me a happy and hopefully a wiser noob. Heh.. Again thanks for making this great app, and your kind reply’s and help..
    tuxor

  17. NicolasR Says:

    Hello, I’m really interested in your project, you can find a lot of server for the Android plateform but most of the apps with a php implementation aren’t free. I’d like to localize your app for my country so my question is which xml file am i supposed to modify and will the app still be free after the php implementations?
    Thanks.

    • joanpuigsanz Says:

      Right now, the PHP implementation is stopped due to the lack of time 😦
      If you want to translate this app, you need the following file http://code.google.com/p/servdroidweb/source/browse/trunk/ServDroid/res/values/strings.xml

      If you will translate it, I will add the file to the app and upload a new version!!

      • tuxor Says:

        Hi,
        I noticed that every version above 1.3 has a nasty habit of crashing randomly every 2-3 days. 😦
        Also port 80 still does not work due to servdroid not asking for SU permission. I tried writing but got no answer so with your recent comment on time lack this project seems pretty dead unless someone else picks it up. I totally understand that there are other things in life that play in so I’m not nagging in any way. It’s just such a shame to see this great application go dead. It’s really the best web server for the android platform every other webserver

      • tuxor Says:

        only supports webapps. There is still no server like this that just serves pages without alot of bs.
        I actually use it daily, but unfortunately on port 8080, and I also had to revert back to v1.3. Anyways thanks for making this, I hope it some day matures to run on port 80, and php well that would be awesome! Btw sorry about the double post I pressed the wrong button on my iPhone, the buttons are so damn small.

        I’m hosting XBMC related guides and small programs for it, if anyone wants to have a look go here: http://81.161.149.87:8080/

        All the best tuxor

      • joanpuigsanz Says:

        I will take a look at this problem (the one that after 2-3 days crashes), if the it happens again, send me the bug report please :p

        I would like to continue this app, but there are no enough support 😦

        I will consider to continue the app and add some new stuff, you can add here some requests!

      • tuxor Says:

        Do you mean the log?
        Because my bug reports are pretty simple every version above 1.3 just crashes after a while running sometimes 1 day sometimes 2 or or sometimes even multiple times a day, and sometimes it just exits other times I get the message that the app crashed 😦 It’s really wierd I maybe think it happened when I added the front page, I think I’ll try make a simpler one and see if it still happens with the later versions. It’s just odd that there’s no problems with the 0.1.3 version. It’s been running for weeks on end without a hitch. What about the port 80 issue, is there anything you can do to invoke the superuser app? Or is there anything I can do to start it in SU mode, maybe from a shell or something, it would really be great. Thanks again for taking time to answer. Btw if it was on the google market I think it would get a much larger user base, I had to search quite sometime to find this great app.
        Again all the best. tuxor.

    • joanpuigsanz Says:

      It is already on the Android market (https://market.android.com/details?id=org.servDroid.web&hl=en)

      I will try to create a new version and find the bug! 🙂

  18. tuxor Says:

    Oh, sorry I did not know that. I’m really surprised that there isn’t more interest! 😦

  19. tuxor Says:

    Don’t forget the port 80 issue, or is there nothing that can be done?
    Or am I just an idiot who can’t figure it out?!

  20. tuxor Says:

    I get an error with 0,2b saying the program can not be installed on this device. damn I was really looking foward to this, could it be because i am stuck on android 1.6? 😦 can it be fixed . or is it to much to ask.

    Thanks and best regards tuxor

  21. joanpuigsanz Says:

    Ok, try the beta 2 here
    http://code.google.com/p/servdroidweb/downloads/detail?name=ServDroid.web-0.2-beta2.apk&can=2&q=#makechanges

  22. tuxor Says:

    Hi Again,
    Sorry to say that I get the same error. ;(

    Best regards tuxor

  23. joanpuigsanz Says:

    Try to uninstall the old version first, the signatures are different (because this beta version is just for testing)

  24. Alex Says:

    Hola Joan,

    Te escribo desde Barcelona y sobre todo, te felicito por una aplicación realmente estupenda. Aunque probablemente no esté preguntando la pregunta correcta, ahí va: hay alguna manera de tener un servidor DNS con tu aplicación? Me gustaría que una vez conectados, los que estén conectados, puedan meterse en cualquier web, pero que les salga siempre la misma home.

    Perdona si la pregunta es obvia!

    Un saludo,

    Alex

    • joanpuigsanz Says:

      Hola Alex!
      Si que se puede poner, pero la aplicación ServDroid no tiene ninguna opción para hacerlo, por lo que tienes que buscar alternativas…
      Puedes crear una aplicación que interaccione con el servicio de ServDroid (para la version 0.2.x) para ver cuando esta iniciado y registrar tu ip en el servidor DNS. Para poder comunicarte con el servicio de ServDroid.web necesitarás implementar el siguiente
      código. El problema es que no he creado ninguna wiki que explique como utilizar los servicios de ServDroid.web… intentaré hacerlo lo antes posible.
      Si quieres, te puedo ayudar a implementar los servicios, simplemente pregunta 😉

      • Alex Says:

        Muchas gracias por tu respuesta Joan. La verdad es que estoy buscando mucho una solución pero no la encuentro. Lo que me gustaría hacer es lo siguiente: 1) poner el telefono en modo Zona Wifi sin conectarme a 3G u otra fuente de internet 2) ejecutar tu servidor 3) permitir que la gente se conecte y lo más importante 4) que cualquier persona conectada, ponga la web que ponga en su dispositivo, le salga mi index.html. De esa manera, todos los que se conecten e intenten surfear, se encuentran con mi página principal.. no me queda claro exactamente como hacerlo o si se puede hacer con tu servidor… tendrías alguna idea por donde mirar? Moltes gracies! Alex

    • joanpuigsanz Says:

      Hola!
      Para el paso 4, yo te recomiendo que personalices la pagina de error (/sdcard/servdroid/var/www/error/404.html) y le pongas un pequeño javascript para que te redirija en caso de error a la pagina de inicio. Este ejemplo seguramente te ayudara 🙂
      http://www.tizag.com/javascriptT/javascriptredirect.php
      Ya dirás algo si ha dado resultado!

  25. blissweb Says:

    Hi,
    I’m looking for a web server which can redirect all web traffic to its home page. So that when someone connects to my hotspot and types in google.com it will only go straight to this web server and home page.

    Could you add a feature like that ??

    Thanks,

    Sean

  26. Owen Johnson Says:

    Great webserver app! Imusing on Google Nexus 7 (2013) & Sony Xperia Z without issues. Although would be great to have php functionality. So it knows what to do with .php files 😦

    The work you have done so far is fantastic. Rough around the edges, but it acts like Apache.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: