• u/lukmly013 💾 (lemmy.sdf.org)
    link
    English
    367 months ago

    Termux, definitely Termux. Best terminal emulator for Android.
    It basically gives your phone as much power as you can get from a locked down system.

    You can even install GUI in it. I use XFCE. Pretty useful for Handbrake as I am too dumb for ffmpeg, Firefox (desktop) because it won’t crash with huge uploads to e.g.: OneDrive like every mobile web browser when you lock your phone, NOAA-APT to decode APT imagery from NOAA 15, 18 and 19 satellites.

    Just some examples from what I use it for:

    • ping
    • traceroute
    • telnet/ssh client
    • wget for serious downloads and poor man website mirroring
    • tar for creating archives
    • gpg for encrypting files
    • gzip for compressing files
    • touch for modifying timestamps
    • Vim for text editing (yes, I know)
    • rsync for backups (if not using tar)

    Now it gets even better

    • socat for port forwarding
    • VNC Server (tigervnc) for accessing the Termux GUI
    • SSH Server (OpenSSH) for remote CLI access and secure port forwarding
    • NGINX server for serving the websites you mirrored with wget and as a forward proxy for other web-related services (to get them on same port, add basic authentication, use HTTPS,…). I also use it for serving videos in a lazy way (checkout fancyindex module).
    • kiwix-serve for serving archives from kiwix.org. I have (not only) the whole motherfucking English Wikipedia on my phone (110GB)!
    • Navidrome server to stream music locally stored on my phone (currently 1,339 songs at ~23GB) with a nice web-ui. Also supports adding internet radios.
    • Jellyfin server (under Ubuntu proot) if you have some movies too. I ditched this idea, but I tried it, and it works.
    • cloudflared for creating Cloudflare tunnels to perhaps access this from internet (if you feel OK about that). You can test it by creating quick tunnel which doesn’t even require account (limited to HTTP).
    • HTTP proxy server (tinyproxy) to use my phone for internet access (will also route it over VPN). If your carrier restricts hotspot usage, this is the way. For me it’s useful to circumvent blocking on school network without the need for any extra software on school PCs.

    You get the idea. Plenty of stuff to do with it.
    You can also run these distros under proot with proot-distro easily:
    Alpine, Arch, Artix, Debian, Deepin, Fedora, Manjaro, OpenKylin, OpenSUSE, Pardus, Ubuntu, Void.

    Oh, now for a warning. Things like NGINX save error logs to your storage by default. Sometimes (e.g.: your phone disconnected from Wi-Fi making an active interface disappear and logs being firehosed) they can rapidly fill it up. INTERNAL STORAGE FULL TO THE LAST BYTE MAY CAUSE A BOOTLOOP!!! (Guess how I know)

    In my case forcing it to reboot into recovery, shutting it down, and booting it up manually (instead of auto reboot after system crash) did the trick, freeing 17MB, enough to boot up.

    • @kirk781@discuss.tchncs.de
      link
      fedilink
      57 months ago

      I have used Termux, even have it installed right now but apart from the odd cron job, I never used it for something heavy. You, sir, are basically running full fledged Linux with it.

      • u/lukmly013 💾 (lemmy.sdf.org)
        link
        English
        27 months ago

        Depends on what I do with it. Usually the only noticeable drain is WiFi being active.

        But for example encrypting and compressing large files will absolutely toast the phone.

        The errors can be a problem, even if they aren’t written to a file. For example with tinyproxy. Disconnecting the network interface it’s running on won’t shut it down, it just keeps producing errors and clearly doing something as it can really heat up the phone.
        This is what it spits out (as fast as it can):

        ...
        ERROR     May 25 13:01:06.107 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.107 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.107 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.107 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.112 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.112 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.112 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.112 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.112 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.112 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.114 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.114 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.114 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.114 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.114 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ERROR     May 25 13:01:06.114 [9701]: Accept returned an error (Invalid argument) ... retrying.
        ...
        

        Which is also why I run it with -d which keeps it in foreground and this goes to stdout/stderr instead of a file. I keep everything I can in foreground. I can have multiple sessions open and just CTRL-C anything.

    • mesamune
      link
      fedilink
      English
      17 months ago

      I have an RTLSDR any good beginner friendly apps for it? Ive used a pi for NOAA before and it worked really well with SATNOGs. Being on the go with it would be fun.