Appery - Connect to ssh - android

I am not sure this is the right place to ask, but I will give it a shot. First of all, please note I'm not an android developer, but a php programmer. That being said, I want to create a simple application with following functionality: connect to a server via ssh then send a list of instructions(of course, I need the response too).
I found appery.io, that helped me so far to create the interface, but I am not sure how to initiate a SSH connection. Any ideas?
Thank you!

Appery.io is a development environment. The app that you build simply runs in the browser, or the device (hybrid). Having said that, you can connect to any service/resource that's exposed via REST API when building an app in Appery.io

Related

How to make android app accessible to web browser

I want to create a pair of Android app (Server - Client) using Socket to communicate with each other in real time. I found the sample here http://androidsrc.net/android-client-server-using-sockets-server-implementation/ which works. The client can connect to the server. Now I think about making the server a... "web server" (I don't know if I'm calling it the right way) that can display what they (server and client) are communicating (maybe showing their chat or calculation...).
But when I type in the address and port (eg: http://172.16.1.21:8080/) into the browser (Chrome), the result is
172.16.1.21 sent an invalid response. ERR_INVALID_HTTP_RESPONSE
I guess it was responding but with some other kind of format that the browser doesn't understand. I tried calling with postman and got the error:
Could not get any response There was an error connecting to
172.16.1.21:8080.
I tried putting an index.html to the root of the storage (/storage/emulated/0/) but no luck
The idea would be the same as the app "Websharing" on store. All you need is that the phone and the Computer is on the same network. When access the app, the browser will show the content of the phone.
My idea is to show other information. I though about creating another "display-app" to show the result, but then what if I wan't to send some custom message to all client, then I will need an another phone, which is so difficult to have. Opening another tab is much easier. I don't want to risk using online service like Firebase because the internet connection may not be stable. Just local connection is fine for me.
I don't know that is it called, a keyword would be appreciated. I tried googling and found some suggestion that to run an app called "Tiny web server", I haven't tried it but I don't wan't to use a third-party app because the installation will be complicated and not support full customization.
Thank you for your time.

Local Proxy Server Running On Android Device

I am trying to write a http proxy server that would run on the device itself. In fact, need to find a way to capture the outbound http traffic generated by the device.
The code I have so far is compiling OK, it is based on the code found here: http://www.jtmelton.com/2007/11/27/a-simple-multi-threaded-java-http-proxy-server/
The problem is that the http request to the actual server would block and never return .
Is there a better way to write such a service without rooting the device?
You should check SandroProxy.
Can caputre traffic on non rooted device if os proxy settings are used, or with iptables rules on rooted one.
Traffic is stored it in local sqlite database. Captured data can be also examined by chrome devtools. To capture traffic in your app you should check source code for plugins. It has all the code for iptables redirections and proper settings.
Check out the wiki link on google source code HowToInterceptTrafficOnMyOwn
http://code.google.com/p/sandrop/wiki/HowToInterceptTrafficOnMyOwn
btw: send by sandroproxy support :)
I've been using a piece of software called proxydroid to use my device as a proxy server, and its the only one I've found which doesn't require root. I'm not sure if it will be any help to you, but its an open source project and the code can be found here:
https://github.com/madeye/proxydroid
I have noticed that the application will freeze after a while, or if a large number of request are sent at once, but I've not had chance to find out why this is happening.
Forget about setting proxy, use Facebook Stetho library (http://facebook.github.io/stetho/) to review all http requests and responses from emulator/device

Capture All Webservice Calls from Android APP

I have an app, and I would like to know the webservice URL that it calls. Is there anyway to find this out?
You should check your android logs first. If the app exposes no info about requests through this, the next best thing would be to decompile the app. If the URL is static, just looking through the data files will get you the address. If it is dynamic, you can modify the dalvik bytecode to have it log to logcat and recompile the apk. If all else fails, you can use tcpdump. You'll need root, and can follow this tutorial to utilize wireshark to visualize it easily.
You can do this using app tPacketCapture. It can store network dumps in a format that can be read by WireShark or other programs on your pc.
or you could set up a proxy for the phone, using fiddler and a PC, like this:
http://www.cantoni.org/2013/11/06/capture-android-web-traffic-fiddler
you'd get all the API requests quite easily then...

How to make call from android to a server ip address

I have to code in android for making an application which makes a call to an hadoop cluster node. I have an ip adress for the same i can login via putty on my windows machine.
I dont know how to make a call to that server from my android app?
And, how to run a executable jar file deployed on the hadoop node.
Any guidance or a sample code piece will be a big help.
Thanks in advance
Manu Misra
I suggest you want to login via SSH and execute a command on a server?
The better way would be to write a small 'server app', that provides an interface via http to start the processing. (You might have a look at Sinatra)
If you prefer ssh, you should have a look at ssh java libraries.

how to use android json webserver

Hello every one I am new with servers things. I want to develop program that get data from the database on the server and it's my first time I don't have any idea of this thing.
Let say like Login & Logout:
how can i make a virtual server for testing on my PC
how can i connect the emulator with this virtual server
how can i request the data from thee database
Do I need software like Xamp or Wamp? If yes how can I use it?
I found so many examples about the json and webserver but I don't know how to make virtual server and connect the emulator to it.
as I understand this problem you need two separate pieces of software. You will need 1) server. To begin with you can install XAMP and WAMP to get Apache running. There are millions of tutorials on how to set up an Apache web server online, and to begin with you could just return a string or a simple data structure (e.g. JSON or XML). As you want to do more complex things you can learn more, but in the beginning think "easy does it". From your text I anticipate that you just want to test as a proof of concept.
- What OS do you run BTW?
Another solution is to rent some space on a server accessible from the Internet. Then you could test your server-side regardless of where you are located.
Second you would need to create a program for the android. There are several guides, but have a look here: http://developer.android.com/training/basics/network-ops/index.html. If you choose to make your data available through the HTTP protocol there are very boilerplate-like procedures for how to download and parse the data.
If you are hosting the server-side on your local computer you would need to use local addressing, but if you choose to put it online you could acquire the data from everywhere as long as you have an internet connection.
Good luck!

Categories

Resources