Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "termux-android"
-
Guys try installing Termux. Its Linux for Android. It comes with its own version of Apt package manager. Using this opens up alot of possibilities ;)10
-
Long rant ahead.. 5k characters pretty much completely used. So feel free to have another cup of coffee and have a seat 🙂
So.. a while back this flash drive was stolen from me, right. Well it turns out that other than me, the other guy in that incident also got to the police 😃
Now, let me explain the smiley face. At the time of the incident I was completely at fault. I had no real reason to throw a punch at this guy and my only "excuse" would be that I was drunk as fuck - I've never drank so much as I did that day. Needless to say, not a very good excuse and I don't treat it as such.
But that guy and whoever else it was that he was with, that was the guy (or at least part of the group that did) that stole that flash drive from me.
Context: https://devrant.com/rants/2049733 and https://devrant.com/rants/2088970
So that's great! I thought that I'd lost this flash drive and most importantly the data on it forever. But just this Friday evening as I was meeting with my friend to buy some illicit electronics (high voltage, low frequency arc generators if you catch my drift), a policeman came along and told me about that other guy filing a report as well, with apparently much of the blame now lying on his side due to him having punched me right into the hospital.
So I told the cop, well most of the blame is on me really, I shouldn't have started that fight to begin with, and for that matter not have drunk that much, yada yada yada.. anyway he walked away (good grief, as I was having that friend on visit to purchase those electronics at that exact time!) and he said that this case could just be classified then. Maybe just come along next week to the police office to file a proper explanation but maybe even that won't be needed.
So yeah, great. But for me there's more in it of course - that other guy knows more about that flash drive and the data on it that I care about. So I figured, let's go to the police office and arrange an appointment with this guy. And I got thinking about the technicalities for if I see that drive back and want to recover its data.
So I've got 2 phones, 1 rooted but reliant on the other one that's unrooted for a data connection to my home (because Android Q, and no bootable TWRP available for it yet). And theoretically a laptop that I can put Arch on it no problem but its display backlight is cooked. So if I want to bring that one I'd have to rely on a display from them. Good luck getting that done. No option. And then there's a flash drive that I can bake up with a portable Arch install that I can sideload from one of their machines but on that.. even more so - good luck getting that done. So my phones are my only option.
Just to be clear, the technical challenge is to read that flash drive and get as much data off of it as possible. The drive is 32GB large and has about 16GB used. So I'll need at least that much on whatever I decide to store a copy on, assuming unchanged contents (unlikely). My Nexus 6P with a VPN profile to connect to my home network has 32GB of storage. So theoretically I could use dd and pipe it to gzip to compress the zeroes. That'd give me a resulting file that's close to the actual usage on the flash drive in size. But just in case.. my OnePlus 6T has 256GB of storage but it's got no root access.. so I don't have block access to an attached flash drive from it. Worst case I'd have to open a WiFi hotspot to it and get an sshd going for the Nexus to connect to.
And there we have it! A large storage device, no root access, that nonetheless can make use of something else that doesn't have the storage but satisfies the other requirements.
And then we have things like parted to read out the partition table (and if unchanged, cryptsetup to read out LUKS). Now, I don't know if Termux has these and frankly I don't care. What I need for that is a chroot. But I can't just install Arch x86_64 on a flash drive and plug it into my phone. Linux Deploy to the rescue! 😁
It can make chrooted installations of common distributions on arm64, and it comes extremely close to actual Linux. With some Linux magic I could make that able to read the block device from Android and do all the required sorcery with it. Just a USB-C to 3x USB-A hub required (which I have), with the target flash drive and one to store my chroot on, connected to my Nexus. And fixed!
Let's see if I can get that flash drive back!
P.S.: if you're into electronics and worried about getting stuff like this stolen, customize it. I happen to know one particular property of that flash drive that I can use for verification, although it wasn't explicitly customized. But for instance in that flash drive there was a decorative LED. Those are current limited by a resistor. Factory default can be say 200 ohm - replace it with one with a higher value. That way you can without any doubt verify it to be yours. Along with other extra security additions, this is one of the things I'll be adding to my "keychain v2".11 -
I like npm errors.
So i installed nodejs on termux on my android smartphone to watch npm fail, even when I take a walk.
Great times!5 -
Last Monday I bought an iPhone as a little music player, and just to see how iOS works or doesn't work.. which arguments against Apple are valid, which aren't etc. And at a price point of €60 for a secondhand SE I figured, why not. And needless to say I've jailbroken it shortly after.
Initially setting up the iPhone when coming from fairly unrestricted Android ended up being quite a chore. I just wanted to use this thing as a music player, so how would you do it..?
Well you first have to set up the phone, iCloud account and whatnot, yada yada... Asks for an email address and flat out rejects your email address if it's got "apple" in it, catch-all email servers be damned I guess. So I chose ishit at my domain instead, much better. Address information for billing.. just bullshit that, give it some nulls. Phone number.. well I guess I could just give it a secondary SIM card's number.
So now the phone has been set up, more or less. To get music on it was quite a maze solving experience in its own right. There's some stuff about it on the Debian and Arch Wikis but it's fairly outdated. From the iPhone itself you can install VLC and use its app directory, which I'll get back to later. Then from e.g. Safari, download any music file.. which it downloads to iCloud.. Think Different I guess. Go to your iCloud and pull it into the iPhone for real this time. Now you can share the file to your VLC app, at which point it initializes a database for that particular app.
The databases / app storage can be considered equivalent to the /data directories for applications in Android, minus /sdcard. There is little to no shared storage between apps, most stuff works through sharing from one app to another.
Now you can connect the iPhone to your computer and see a mount point for your pictures, and one for your documents. In that documents mount point, there are directories for each app, which you can just drag files into. For some reason the AFC protocol just hangs up when you try to delete files from your computer however... Think Different?
Anyway, the music has been put on it. Such features, what a nugget! It's less bad than I thought, but still pretty fucked up.
At that point I was fairly dejected and that didn't get better with an update from iOS 14.1 to iOS 14.3. Turns out that Apple in its nannying galore now turns down the volume to 50% every half an hour or so, "for hearing safety" and "EU regulations" that don't exist. Saying that I was fuming and wanting to smack this piece of shit into the wall would be an understatement. And even among the iSheep, I found very few people that thought this is fine. Though despite all that, there were still some. I have no idea what it would take to make those people finally reconsider.. maybe Tim Cook himself shoving an iPhone up their ass, or maybe they'd be honored that Tim Cook noticed them even then... But I digress.
And then, then it really started to take off because I finally ended up jailbreaking the thing. Many people think that it's only third-party apps, but that is far from true. It is equivalent to rooting, and you do get access to a Unix root account by doing it. The way you do it is usually a bootkit, which in a desktop's ring model would be a negative ring. The access level is extremely high.
So you can root it, great. What use is that in a locked down system where there's nothing available..? Aha, that's where the next thing comes in, 2 actually. Cydia has an OpenSSH server in it, and it just binds to port 22 and supports all of OpenSSH's known goodness. All of it, I'm using ed25519 keys and a CA to log into my phone! Fuck yea boi, what a nugget! This is better than Android even! And it doesn't end there.. there's a second thing it has up its sleeve. This thing has an apt package manager in it, which is easily equivalent to what Termux offers, at the system level! You can install not just common CLI applications, but even graphical apps from Cydia over the network!
Without a jailbreak, I would say that iOS is pretty fucking terrible and if you care about modding, you shouldn't use it. But jailbroken, fufu.. this thing trades many blows with Android in the modding scene. I've said it before, but what a nugget!8 -
Have you ever wanted to open links with firefox from within termux?
$ cat firefox.sh
d=$@
am start -a android.intent.action.WEB_SEARCH --activity-clear-task -t text/plain -d "$d" org.mozilla.firefox/org.mozilla.gecko.BrowserApp
thank me later5 -
To the person who talked about termux in a post, thank you. I tryed to find said post but to no avail.
I've been frustrated because I can't use servers or run Linux in Android 8 and termux is a bliss.
I'm a noob in Linux so it's extra time in the terminal -
So I am broke and can't buy a vds, I installed Termux on my android phone instead. Now I have a portable server that is capable to recieve calls and transmit sms for logs.
BUT, then I had to go to customer support due to case makes the phone get short circuited şn random times. Obviously they deleted all info and Samsung Cloud doesn't backup other users' data. (Termux emulates a terminal running on another user, which is not root by default)
Can anyone teach this teenager how to use tar properly? :D3 -
termux : Android terminal with apt repos like vim, nano, tar, zsh, wget, plugable & more. Also small footprint.
.. htop in gif (incase if don't know)12 -
Only now just discovered Termux for android... How have i not known of this?!
My Chromebook just got a million times more useful! :-D
Now to learn about vim and start hating myself :-34 -
So I reverse engineered the
protocol of QONQR: World in Play and made a mitmproxy addon running locally inside termux that can see when I launch in the game and uses Termux:API to notify me when my ingame resources are replenished.
I direct the traffic through mitmproxy using Drony. I configured it so that by default Drony passes traffic directly to the internet except if it comes from the QONQR app.
The problem is that while Drony is running, there is a chance of network traffic being corrupted so I often get spammed by connection and ssl errors.
So I have to either continue sacrificimg my network integrity or stop getting assistance ppaying QONQR :-/
Does anyone know an alternative to Drony (basically an app that can connect you to a proxy without root using the android vpn api, if possible with filtering by app or ip)?
Also does anyone else have problems with drony on Android 9 or other versions? I don't really have an opportunity to test it.
Edit: It only took 4 tries to post this yay3 -
What keyboard do you use/recommend for use with Termux on Android? I use Hacker's Keyboard but the layout it's ugly.6
-
I've recently found out that you can have Arch on termux! It's amazing!
I'm currently installing pantheon to it! -
Why do I always get attached to dead/dying platforms 😖😫😭
I mean, I got the PSP Go a mere year before devs dropped support. (Still awesome for emulation because of the physical buttons)
I was really interested in windows phone for a while that I almost bit the bullet and bought it.(you obviously know what happened to the beloved windows phone platform)
And now suddenly a blackberry passport video pops up on my YouTube recommended feed and now I really want one.
The problem is the lack of apps, I was hopeful because it supported android runtime.
Then my hopes were crushed after I knew that its based off KitKat.
Which means one of my favorite apps doesn't work there (my beloved termux, I get a boner whenever I think about using it with an actual keyboard 😂)
Should i just bite the bullet? I'm too broke and that 200$ is kinda of a major purchase for me (I'm 17 in a third world country, so the piggy bank is empty AF)
God, why do I always get introduced to platforms too late...6 -
Tried running piHole on android using termux + ubuntu(using Andronix). No luck. Has anyone else tried?4
-
woooooooooooooo
today i want introduce a awesome tool:
"Termux"
with termox i install node and express on my android phone and build a simple web app.
its awesome😎
try this:
https://play.google.com/store/apps/...7 -
Just wanted to do some scripted image resizing for school in school because the teacher asked me to help her with that.
So I thought: Let's just write a tiny script. Written the script in almost no time (just iterates over all jpg's and resizes them)
30sec.
Now I tried to run it. Didn't have my laptop so I had to somehow run it on their windows PCs. At least it's windows 10, unlike other schools that still run XP and stuff so I thought it might be doable. Well guess what, nope it wasn't.
First tried to install imagemagick, that didn't work as only teacher accounts have admin and the teacher was already pretty scarred once he saw me doing stuff in powershell so I thought I'd better not ask to do this via a teacher account and mess with stuff as admin.
Next method: Installing msys2. That worked at least (after taking forever to install and having to mess with the av software to get it to run).
And there comes the next problem: pacman doesn't connect via the proxy so I can't download any packages. There is free wifi but only for teachers, and students aren't going to get access until the school finally has a faster connection because they'd (understandably) cause this connection to be constantly overloaded. I just happen to have access to this wifi network, too, because at least the guys from the IT dept know how bad using proxies under linux is. So I connect via wifi and it works. At least I thought: After running the script it yields weird errors about unsupported arguments even though the command is exactly the same I have been using for years (already checked typos twice)
Then got the idea of simply installing imagemagick on termux on android and transferring the files onto my phone.
Too bad we aren't allowed to attach our own USBs to the pcs. Luckily I got a rooted phone so I simply activate adb over network and connect to it.
After downloading the platform-tools I can't run them because of AV software. Luckily there is an option to add an exception per executable so I do that. After doing that it works.... nope it doesn't. The wifi only allows 443/tcp and 80/tcp, even for internal network devices.
So that's it. I'm simply going to upload that stuff to my nextcloud and convert it at home.
Windows, I hate you!!!2 -
How to write programs on Android 10 that work with files/directories? Have used a number of JVM-based languages like Groovy, Clojure and Kotlin.
My last try was with Groovy. I ran it under Dcoder which has to be cloud-, based as it supports numerous languages. I gave it permission to access storage but got a file not found error from Java. Copied this excerpt for the file path.
import java.io.File
class Example {
static void main(String[] args) {
new File("/storage/emulated/0/read_file.grvy").eachLine {
line -> println "line : $line";
}
}
}
Do I need root? Do I need to change file permissions using Termux? Why can't I find a way to write simple software on a Motorola Super, 3 GB RAM and 8 cores? I hate using a phone for a computer but a seizure has me in a nursing home with only one usable hand.
Any help is greatly appreciated.5 -
well... I really dont know how to explain this error
in the directory where I have my testing.cpp file, I type "clang testing.cpp -o testing"
my result is just supposed to be hello world and I am getting this.
note: clang is my c++ compiler since for some divine reason I can't install GCC on termux.
I checked the github and no one gives this complaint. I honestly can't read that error code, I just want it to go away
I hate coding on android, it's always a sorry case
I could have been a farmer or a teacher or a bus driver or an alien but I chose coding. I am really tired
I took a very long screenshot6 -
Can anyone Tell me. Is there any way to use node js with MySQL or Mongo Db on TERMUX Android.
If you Help me. I will be very thankful to you.
I want to learn but I don't have computer.9 -
Any recommendations for a terminal app for iPad? I only need it to ssh into Linux servers and run stuff/vim/htop/etc., don't really care about fancy features or local device access. Good performance and security would be pluses. I don't mind paying if it's worth it. Coming from Termux on Android the ones I've tried so far (Termius, Shelly, LibTerm) have felt pretty crap so far, though I guess Shelly is the best one out of them.1
-
Previously on devRant: https://devrant.com/rants/2010573/...
And here's something similar for vlc, but it expects you to point it at a local file (note: vlc can not access files inside termux's private storage). Obvious copy&paste from SO for escape characters aside, here you go:
https://pastebin.com/raw/QeHSnDK51 -
I just found the Android Termux app. With a wireless keyboard, I can use Vim on my phone! :D
Is it safe to give it admin privileges or something so I can actually use ls to see what is in the current folder?1 -
!comforting
TL;DR - I’ve done some thinking about operating systems and sticking to one
Mk
so I, like many of you, have seen far more than my fair share of “X operating system is perfect for it all, so don’t use Y operating system because it’s just awful” posts.
Over this week i’ve really done some thinking and experimenting with multiple devices and OSes and programs for various tasks. People coming from windows over to linux (like myself) tend to diss windows (rightfully so for the most part, but still). I’ve also noticed that the android vs. apple debate can get heated among users.
Listen guys,
iOS has its shortcomings obviously, UI being kinda a big one; but no one can deny that apple shoves some of the nicest hardware into their devices. Yes, this stuff is pricey as hell obviously, but the new macs come with an i9 and quite a bit of memory as well. Apple devices tend to have longer lasting batteries too - i cant count the times where i’ve just turned on my mobile hotspot, and stuck my android in my pocket to use my iphone (its a wifi-only 5s). the applications run nicely on apple hardware.
i couldnt learn even half as much programming as i do on my android though; Termux is a godsend, and im able to run and test scripts right there in the palm of my hand. can’t get that on an iphone.
Some of my favorite game developers only develop for windows; I’m dual booting for that sole reason (warframe and the epic games launcher don’t properly run through wine).
Just boil it down inside for a second; You might have come from a more “user friendly” operating system, to learn on one that is less so - wether you wanted the freedom and wiggle room for customization, or just a more developer friendly working environment (God bless conky and its devs) - so you didn’t have to be locked down into one way of seeing things. Putting a previously used OS down directly violates that thougjt process, and at that point you’re just another windows hater, or arch junkie, or whatever. I think we need to be open to appreciating the pros of every system, even if we almost never use some of them, and we should try not to put down other devs-to-be or csci/sec enthusiasts down because of that either.2