websocat icon indicating copy to clipboard operation
websocat copied to clipboard

How do I use the android version?

Open zbot473 opened this issue 5 years ago • 5 comments

Basically what the title says.

zbot473 avatar May 07 '19 14:05 zbot473

Android version of Websocat is a command-line tool. There is no GUI or apk version of it.

  1. Get to android terminal, using Termux or other terminal app or adb shell
  2. Download websocat from Github releases (or build it) to some location where executables can reside. For example /data/local/tmp/ or /data/data/com.termux/files.
  3. Set executable bit: chmod +x websocat_.... Maybe rename from long name to just websocat.
  4. Optionally download curl's certificate bundle and set environment variable (there is something about this in the docs somewhre in the repository).
  5. Use websocat, e.g. with echo 1234 | ./websocat ws://echo.websocket.org.

If you just want to test some websocket using Android device, easiest method would probably be opening browser, going to https://websocket.org/echo.html and using WebSocket connector.

vi avatar May 07 '19 15:05 vi

I'm getting a segfault with the arm (correct architecture for my phone) package.

zbot473 avatar May 09 '19 23:05 zbot473

I tried using another server, but I will try the echo server

zbot473 avatar May 09 '19 23:05 zbot473

On Android you can also try generic ARM version like websocat_nossl_arm-linux-static. Does it work?

vi avatar May 10 '19 06:05 vi

On Android you can also try generic ARM version like websocat_nossl_arm-linux-static. Does it work?

It may fail to work because of socket functions in Android's C library seem to receive file descriptors from elsewhere instead of just using syscalls. Static ARM version uses raw syscalls and may fail to excersize permission to use network even if it is present for uid.

vi avatar Aug 29 '20 22:08 vi