News for hackers. Stuff that matters.
Re:Why does the Librem 5 phone cost that much? by traverseda on Thursday November 28, 2019 @12:30PM (#21658920)
Barely, although termux makes it a lot more reasonable. It's more a package management issue.
Re:Why does the Librem 5 phone cost that much? by 0x38B on Thursday November 28, 2019 @04:04PM (#21660170)
I can share to Termux from the YouTube app on my Pixel and download an entire playlist to my music folder - Ffmpeg handles any audio.

It's quicker than any of the YouTube downloader apps I've tried!

How it works: in ~/bin there's a termux-url-opener script that handles what you share:

"#!/bin/bash

case "$1" in

  *youtu*)

    echo "$1 is a YouTube URL,
      downloading"

    sh ~/shortcuts/dl_yt.sh $1

    ..."
(dl_yt just calls youtube-dl -x)

I love it and am still finding new uses for Termux. I've got neovim and all my dotfiles loaded, so in a pinch I can ssh into my phone to do some work.

Re:Why does the Librem 5 phone cost that much? by Ycros on Thursday November 28, 2019 @08:12PM (#21661224)
Ah, nice to see I'm not the only one running youtube-dl on a phone via Termux.
Re:Why does the Librem 5 phone cost that much? by chronogram on Thursday November 28, 2019 @06:27PM (#21660845)
Would it not be nicer to save a whole lot on bandwidth by using "youtube-dl -f bestaudio[ext=m4a]" instead of "youtube-dl -x"?
Re:Why does the Librem 5 phone cost that much? by 0x38B on Friday November 29, 2019 @02:27AM (#21662727)
Good point! My command line looks like this:

youtube-dl -f bestaudio -x --no-progress -o "~/storage/music/YouTube/%(title)s.%(ext)s" "$1"

This generally gives me .opus files, which play OK but my player can't change the tags.

Re:Why does the Librem 5 phone cost that much? by mike-cardwell on Thursday November 28, 2019 @02:28PM (#21659624)
I installed Debian in a chroot on my HTC Desire Z in 2011, and proceeded to apt-get install exim on it to tinker.
Re:Why does the Librem 5 phone cost that much? by icebraining on Thursday November 28, 2019 @12:49PM (#21659034)
You can run a full GNU/Linux distro, and apt-get install most stuff: https://f-droid.org/packages/tech.ula/
Re:Why does the Librem 5 phone cost that much? by pjmlp on Thursday November 28, 2019 @12:57PM (#21659103)
If one roots the device.

Modern Android has been locking down access to everything that isn't an NDK public API.

Re:Why does the Librem 5 phone cost that much? by icebraining on Thursday November 28, 2019 @01:12PM (#21659195)
Nope, no root required.
Re:Why does the Librem 5 phone cost that much? by pjmlp on Thursday November 28, 2019 @02:57PM (#21659805)
So how does it work around the missing APIs not described here?

https://developer.android.com/ndk/guides/stable_apis

Given the changes started with Android 7 to block access to everything else?

In fact, https://wiki.termux.com/wiki/Differences_from_Linux

Re:Why does the Librem 5 phone cost that much? by Mathnerd314 on Thursday November 28, 2019 @05:02PM (#21660479)
It runs stuff in a container (PRoot) with standard Linux libraries and FHS layout, then you ssh or VNC in locally. The emulation isn't perfect due to Android's security policies, but close enough.
Re:Why does the Librem 5 phone cost that much? by pjmlp on Thursday November 28, 2019 @05:08PM (#21660502)
Standard Android does not support chroot, nor standard Linux libraries, hence why termux needs to patch them.
Re:Why does the Librem 5 phone cost that much? by imtringued on Friday November 29, 2019 @06:35AM (#21663715)
Try installing OpenJDK without root.
Re:Why does the Librem 5 phone cost that much? by gallexme on Thursday November 28, 2019 @02:43PM (#21659723)
Theres also https://github.com/t184256/nix-on-droid-bootstrap on fdroid for a good package manager