8 ms·
Termux singlehandedly makes me feel like I'm living my childhood dream of having a full computer in my pocket. I use git to blog from my phone, I have ffmpeg an
by knaik94 3y ago
Termux singlehandedly makes me feel like I'm living my childhood dream of having a full computer in my pocket. I use git to blog from my phone, I have ffmpeg and yt-dlp installed to download videos for when I am going to be away from internet access for a while, and I even have some home automation scripts setup that control the lights over the local network. But I am concerned about the direction Android is headed, Google policies have been aligning closer to Apple's. I don't like having to stay on a previous generation OS just to make sure I don't lose "power user" fuctionality. Just recently I had to install a root mod to allow apps complete access to SD cards, a recent update caused me to get the dreaded "To protect your privacy, choose another folder" while trying to give a gallery app permissions. I am grateful for Termux devs for working hard to maintain functionality via workarounds.
https://github.com/termux/termux-app/issues/2366 https://github.com/termux/termux-app/issues/2366
- routerl 3y ago> But I am concerned about the direction Android is headed I'm with you, but we'll always have AOSP. And the cellphone market is now segmented enough that we'll probably also always have rootable phones.
- solarkraft 3y agoWe'll always have the versions of AOSP Google has released, but they're not forced to do so in the future. And I'm not sure anyone else is interested in maintaining it.
- ta8903 3y agoGoogle only releases AOSP for Pixel devices, for most devices you need to rely on (and trust) some dude on a forum and it might not have 100% compatibility.
- drpixie 3y agoIsn't Fuchsia google's attempt to move phone off open systems, and onto all-google-no-license code? If it becomes a big thing, then only increasingly obsolete open-systems for us :(
- saagarjha 3y agoFuchsia is about as open as Android is today.
- Ruq 3y agoIronically, I specifically have a Google Pixel so that I can mod it and gain more control over my phone.
- kragen 3y agois anybody outside of google able to maintain aosp though
- knaik94 3y agoOne of the most unfortunate things in the US is locked bootloaders. AT&T has even started whitelisting phones for Wifi Calling and VoLTE. And with 3g shutting down, it means international phone variants won't work at all on the network, regardless of the underlying band support. Many companies, including Samsung don't allow you to unlock your bootloader to root your phone even if you bought it outright. I found that midrange phones are now the best option if you want things like AOSP. The only true flagship left, that I know of, with a headphone jack and sd card and good rooting support is the Sony Xperia phones.
- qbasic_forever 3y agoI really wish Android would properly enable containers like they've done for Chrome OS. It's silly we run little Linux machines and can't pop a fully isolated container shell on them!
- AviationAtom 3y agoNot quite the same, but interesting: https://www.xda-developers.com/android-13-dp1-google-pixel-6-kvm-virtual-machine/ https://www.xda-developers.com/android-13-dp1-google-pixel-6...
- derefr 3y agoI think it hasn't happened because much of the sandboxing of Android is part of the Android runtime, thereby only sandboxing code compiled for the Android runtime. If you could spawn a native Linux executable (that hasn't been compiled for Android the way the Termux executables have) from an Android application, then that process can escape the application's sandbox and do stuff it shouldn't be able to do given the permissions granted to the Android application. That just means no container-based virtualization, though. There's nothing stopping a sufficiently-powerful Android device from running a Linux virtual machine, presuming that the hypervisor is implemented as a regular Android application using regular Android-runtime APIs.
- ignoramous 3y agoAndroid 13+ includes a crosvm based virtulization setup: https://source.android.com/docs/core/virtualization https://source.android.com/docs/core/virtualization > ...then that process can escape the application's sandbox and do stuff it shouldn't be able to do given the permissions granted to the Android application. Android's sandboxing is not limited to ART and has multiple layers [0]. Native apps cannot bypass sandboxing, I don't think. [0] https://hernan.de/blog/tailoring-cve-2019-2215-to-achieve-root/ https://hernan.de/blog/tailoring-cve-2019-2215-to-achieve-ro...
- derefr 3y ago> Android 13+ includes a crosvm based virtulization setup Interesting; but I feel that their choice of a hypervisor-based design here supports my point of plain container-based isolation (or even containers + gVisor) being insufficient to achieve true sandboxing on Android. > Android's sandboxing is not limited to ART and has multiple layers [0]. Native apps cannot bypass sandboxing, I don't think. Yes, but when I say "sandboxing", I mean just the ART sandbox, not the other layers. I don't care whether you can get root / jailbreak the device. I (and presumably Google, in not publishing apps that do this in the Play Store) care about whether an application that, upon installation, doesn't request permission to e.g. read your contacts, can actually read your contacts. There are certain capabilities like that (not sure if "reading your contacts" is one of them, but you get the idea), that are only prevented from being accessed by ART, not by Linux ACLs. This is especially true when there's one level of permission that gets you access to a certain database file through an API, but then another level of permission that gets you access to certain special records in that database file through the same API. The lower level of permission is already granting you Linux filesystem ACLs to the database file; the only difference between the two permissions comes down to what ART will allow you to request through the higher-level API.
- orbisvicis 3y agoWhy would I want to install termux? You basically need a keyboard to use it; at which point you might as well grab a laptop.
- Ugohcet 3y agoYou don't. I almost always use termux with virtual keyboard and it feels fine for doing something quick and on the go. Modal UIs (like vim) work better than modifier- and functional keys-heavy though.
- qbasic_forever 3y agoYou really don't need a keyboard, I use it just fine with onscreen and even wrote some simple scripts in vim with it. Tab completion in the shell helps a lot too and termux's keyboard has a button for it right there. But if you _do_ need a keyboard... it's android and it perfectly supports USB or Bluetooth input devices including mice, keyboards, etc. If you have a Samsung or some other devices you can even get a nice HDMI output to a monitor and desktop experience out of the box. It's really like a little laptop in your pocket at all times. And if you need a GUI Termux runs X11, vnc, etc and GUI apps just fine. Just download a X11 server or vnc app from the play store (there are tons) and you're good to go.
- colordrops 3y agoIt has additional keys above the standard keyboard for tabs, Ctrl, arrow keys etc. It also has good scroll support, even in vim. Definitely fine for quick jobs.
- jchw 3y agoYou do not! You can use volume down as a Ctrl key, and volume up also unlocks other keys (volume up + wasd for example gives you arrows.) It also gives you an extra row above the touch keyboard with escape, tab, and some other keys, and a text input for pasting/IME/swiping/etc. And even if that sounds uncomfortable there's still plenty of useful things you can do with minimal typing! For example... You could run Tailscale as a normal Android app, then use SSH forwarding in Termux to get a local port that goes to a web server on another computer in your tailnet, and browse to that locally on the phone using Fennec F-Droid (Firefox). All of that works just fine. If I leave one of my computers on and I'm in bed or away from home I can ssh in and run systemctl suspend. Wayland/X server locked up? You can use your magic sysrq keys of course, OR you can ssh in with termux and kill it, which doesn't depend on magic sysrq being enabled (or remembering how to get it on your keyboard.) You could also run yt-dlp to download some video or audio content from the internet; everyone hates the Reddit video player, so why not just get the MP4 out of it? Admittedly, there's a better solution here: you can get an app called Seal on F-Droid which is a pretty good yt-dlp frontend. But, the fact that you can easily do it in Termux using their package manager is testament to just how useful Termux is. I honestly only want one thing; an SSH Agent implementation built into the app, so I can import SSH keys and not have to enter the passphrase constantly. Not a huge deal really, but having a built-in agent would be super convenient.
- rektide 3y ago> But I am concerned about the direction Android is headed, Over securing systems seems to be the modern trend, and mercy, it's such suffocating paternalism. We have incredible phones and Android/Google just keeps making them less and less capable.
- drpixie 3y agoI'm sure security is part of the reason for the ever increasing locking-down of android ... but I'm more sure it's an excuse and that security FROM the user is a huge factor in google's thinking.
- rektide 3y agoI agree & I don't. I'm sure that being an app store owner exposes you to the absolute worst just most constant stream of really really awful people doing the worst things, like, forever & ever. There are some warped incentives too, for sure. But I do think Occam's razor explains why app stores get to be worse & worse & worse: because they are responding to horrors. I'd love to see some better mechanisms for trust emerge. Software as it is is basically unobservable. You grant or don't grant some permissions & otherwise have no idea what's actually happening. So app stores are the only arbiters of trust.
- bhawks 3y agoYou have to weight the aggressive security posture against the fact that there are nearly 1.5 billion smart phones sold every year. [0] In addition to having ridiculous computing power and storage capabilities, they carry microphones, cameras, WiFi, Bluetooth, NFC, lidar, radar... If you can grasp not just the power of the device but the scale of its reach the only responsible and ethical action is to security harden it every chance you get as much as you can. 0: https://www.zippia.com/advice/us-smartphone-industry-statistics/ https://www.zippia.com/advice/us-smartphone-industry-statist...
- rektide 3y agoI get it, but building a prison for computing is a horrible fate to trap us in. Bad use constantly being used to consign us all to worse & worse forms of computing is a godforsaken trend.
- pjmlp 3y agoThey can switch to provide an UNIX like experience rewritten in Java/Kotlin instead, CLI and stuff, their option. Google has been quite clear since NDK was introduced in Android 2.0, that is only for games and native methods implementations.
- peterhadlaw 3y agoFWIW I ran into the "To protect your privacy..." thing when using Syncthing. I was able to manually specify the path to one of those "protected" folders in the text input. It worked. Might be just the native file picker that's protecting users from granting access to folders albeit in a very shallow manner.
- knaik94 3y agoThe restrictions are regarding specifying the root folders, /emulated/0 and /sdcard as well as android/data and /obb folders. You are able to pick folders, other than data and obb, manually one by one but that would be over a hundred folders on my sdcard to use a gallery app. The /data and /obb folders are inaccessible to users even though it's in user space. As of android 13, third party apps can't open /data or /obb, you have to install an app that creates a shortcut to the hidden AOSP files app and drag/drop manually. Rooting/usb gives you access, but play store guidelines about android app api targets make things difficult for third party apps. By "protecting" users from security threats, they are pushing power users to daily drive a rooted device, which is a bigger security risk. I expect incomplete/broken file storage access from Apple devices, not Androids. The thing I hate the most is that certain apps only store files in their respective android/data/ folder and delete that data on uninstall. These workarounds are the only way to backup that data. https://www.reddit.com/r/Android/comments/j3zgmm/managing_files_in_the_androiddata_folder_on/ https://www.reddit.com/r/Android/comments/j3zgmm/managing_fi...
- fsflover 3y ago> feel like I'm living my childhood dream of having a full computer in my pocket While Android can provide such feel, GNU/Linux smartphones (Librem 5 and Pinephone) are such computers. And they do not depend on Google in any way. (I'm a happy owner of both.)
- knaik94 3y agoI understand the sentiment, but I disagree. From the last time I checked, the big compromise with GNU/Linux phones is still the lack of social media and messaging apps and appstore ecosystem. Android, with root, is every bit as much a computer as a Pinephone and Librem 5, but the opposite isn't true. Termux has PRoot, a user-space implementation of chroot allowing a full distro install. I personally don't have any problem depending on Google, I have a problem with things being locked away with no alternative. Given the option, I will happily accept the risks and void my warray to root. https://wiki.termux.com/wiki/PRoot https://wiki.termux.com/wiki/PRoot
- fsflover 3y ago> Android, with root, is every bit as much a computer Can you install a completely different OS on your Android phone? AFAIK no, whereas on Pinephone you can choose among 15+ systems and on Librem 5 currently among 4 or more. What about installing a mainline kernel? > lack of social media and messaging apps You can use Waydroid for Android apps, or install one of a few Matrix and Mastodon clients. Telegram works, too. Also, Flatpak apps work natively. > I personally don't have any problem depending on Google, I have a problem with things being locked away with no alternative To me these sound like the same problem. Google is restricting your freedom, not someone else.
- pabs3 3y ago> Can you install a completely different OS on your Android phone? You could in 2012, not sure about in 2023: https://bonedaddy.net/pabs3/log/2012/12/03/debian-mobile/ https://bonedaddy.net/pabs3/log/2012/12/03/debian-mobile/ > What about installing a mainline kernel? I think Sony were working on that for their Xperia devices: https://developer.sony.com/develop/open-devices/guides/kernel-compilation-guides/how-to-build-mainline-linux-kernel-for-xperia-devices https://developer.sony.com/develop/open-devices/guides/kerne...
- noman-land 3y agoYou should check out GrapheneOS as an alternative to regular Android.
- knaik94 3y agoI hadn't checked out GrapheneOS in a while. Based on the current trajectory, in a few years it might become more practical to add play services back into GrapheneOS rather than continue to fight Google's android releases. I have been doing the worst alternative possible, refusing to upgrade. I was even considering of upgrading to an older flagship. I require a phone with a microsd card and headphone jack on my phone, so that rules out a new GrapheneOS device for now, but I hope that changes.
- noman-land 3y agoI'm not sure I totally understand your Google Play Services comment but they do allow you to enable it and it's "sandboxed" whatever that means. Do you have specific gripes about their implementation?
- jgtrosh 3y ago> I have ffmpeg and yt-dlp installed to download videos for when I am going to be away from internet access for a while Have you tried NewPipe for that use case?
- knaik94 3y agoYt-dlp exposes all of the codecs, I think I remember newpipe hiding some options when I last used it. I struggled to find how to download just the ~140k opus audio (-f251) or maybe the combination audio+video I wanted wasn't there. I'm sure things have changed since the last time I checked. But Yt-dlp is still more powerful, it has extractors for way more sites. If I download a video, I usually care to archive it for a longer term, so I add things like subtitles and metadata. For opus files, I don't like the webm container, so I would end up installing ffmpeg for that anyway. I also make heavy use of the regular youtube app, I appreciate the interface. Although I haven't had the need, Termux + yt-dlp also allows using aria2c for downloading. And yt-dlp has also been useful in bandwidth starved situations, because the url and format flags are enough to get the video, it doesn't hang while waiting to download related/recommended video metadata.
- walrus01 3y ago> Termux singlehandedly makes me feel like I'm living my childhood dream of having a full computer in my pocket I still remember the first time I successfully SSHed to something from my Handspring Treo 180 over GPRS data, and felt like I was living in some kind of cyberpunk future.
- rootw0rm 3y agoI felt the same way when I got my Nokia N900 back in the day
- knaik94 3y agoThe Nokia n900 still seems almost mythical to me, because it has an fm transmitter. The galaxy note with an ir transmitter is a close second.
- toastal 3y agoIt's hostile that Android doesn't let you modify things like the host file. It's running Linux but it feels like it's not your device.
- nyarlathotep_ 3y agook this is a really cool idea.