News for hackers. Stuff that matters.
Re:Repurposing an old Android phone as a web server by hifikuno on Wednesday June 22, 2022 @05:10PM (#31841901)
It's worth mentioning if you are going to follow these instructions that the creator of Termux no longer recommends you install from the Play Store[1], and to instead install from F-Droid or Github.

---

1. https://wiki.termux.com/wiki/Main_Page#:~:text=do%20not%20in...

Re:Repurposing an old Android phone as a web server by readyoubestbook on Wednesday June 22, 2022 @05:27PM (#31842082)
Does he also mention why?
Re:Repurposing an old Android phone as a web server by andyjohnson0 on Wednesday June 22, 2022 @05:57PM (#31842379)
Its to do with the Play Store requiring apps to target the Android 10 api level. Details at [1].

[1] https://www.xda-developers.com/termux-terminal-linux-google-...

Re:Repurposing an old Android phone as a web server by rektide on Wednesday June 22, 2022 @06:23PM (#31842604)
The "write-or-execute" policy causing this havoc is remarkably similar to what is being done with WebExtensions v3 banning any dynamic code execution. Termux wants to be able to bring down code & let users run it, but that's verboten. Similarly, all WebExtensions will be forbidden from bringing down code (or accepting user entered code).

That sounds fine/good for like 98% of extensions. But the other 2%... extensions like GreaseMonkey/VioletMonkey/TamperMonkey, or one could imagine something like IFTTT or PushBullet, where the extension might perhaps want some intrinsic extensibility to itself: those are all now verboten. There's not really any discussion or push/pull on the new security regimes. Computers just get more and more clamped down.

I'm interested to see how Termux goes forward. In the past they seemed to have some "in-APK packaging" notions for how to deal with Android 10+. I haven't stumbled upon a good description of what this is or how it would work, and I'm not really sure whether these ideas are still active or whether F-Droid and using ever aging SDKs is the way forward.

Re:Repurposing an old Android phone as a web server by jeroenhd on Wednesday June 22, 2022 @07:26PM (#31843224)
Termux still works fine on any Android device, all you've got to do is install it through F-Droid or similar. Google Play is the party blocking W+X, Android itself will happily execute your downloaded binaries (for now, at least).

There are also other APIs that are absolutely verboten by Google Play but will work fine if the app is installed through alternative app stores.

Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @02:12AM (#31845707)
Nope, Android started to ban linking to native APIs that aren't officially part of the NDK, like Linux syscalls.

More recent versions will just kill the application if they get used, and Termux folks refuse to accept that they have to go through JNI for specific OS features, so they won't be around for much longer, other than on rooted devices.

Or they might eventually accept how things are done on Android.

Re:Repurposing an old Android phone as a web server by danhor on Thursday June 23, 2022 @04:03AM (#31846292)
Since termux just uses regular unix applications, adapting them to use JNI sounds like a world of pain.
Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @04:38AM (#31846486)
That is what they refuse to accept, Android isn't UNIX, it just happens to use Linux kernel.

The official APIs are Java based, ISO C and ISO C++ standard libraries, and the NDK libraries that ship on device.

Re:Repurposing an old Android phone as a web server by nyanpasu64 on Thursday June 23, 2022 @08:28AM (#31848075)
Google is killing Android as a general-purpose computing platform.
Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @09:34AM (#31848889)
Phones were never a general-purpose computing platform to start with.
Re:Repurposing an old Android phone as a web server by yjftsjthsd-h on Thursday June 23, 2022 @11:20AM (#31850359)
That's begging the question; the only reason phones aren't general-purpose computers is because Google and Apple tend to block out anything that would let the user actually use the computer as more than a toy.
Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @12:51PM (#31851817)
Mobile phones preceed Google and Apple, including the whole concept of stores and selling apps.

Series 30, Series 60, brew, J2ME, Psion OS, Pocket PC,....

They were never general purpose computers.

Re:Repurposing an old Android phone as a web server by rektide on Thursday June 23, 2022 @01:29PM (#31852422)
Pocket PC/Windows CE/Windows Mobile all seem far more like examples of phones trying really hard to be general-purpose like, rather than examples of phones being different. And getting fairly close.

Personally I think it's hard to justify phones as something different than general purpose computers. A device that can load fairly arbitrary apps is already almost by definition a general purpose computers, it's just a matter of what has been built and/or what is allowed to be shipped, and what system resources are available (few, in many of your examples, often owing to it being the aughts). Now that the system resources are clearly no longer a differentiator, it's almost all just corporate-politics & the war-against-general-purpose-computing vested-interests enforcing the distinction.

Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @03:13PM (#31853868)
There are plenty of apps to do coding if one so will, with the APIs provided on the platform.

Not everything with a CPU needs to run yet another UNIX clone.

There are plenty of computers and maker boards for that purpose.

Re:Repurposing an old Android phone as a web server by albrewer on Thursday June 23, 2022 @12:30PM (#31851481)
Yeah, and Q-Tips weren't meant to go in your ear, but we do it anyway. Modern smart phones are built to run applications - they're built with a CPU, RAM, and storage, just like your desktop. The only thing special about them is the integration of the cellular phone radio/modem into the main chip. Doesn't matter what they were or weren't "meant for", it matters what they _are_. Smart phones, nowadays, are essentially general-purpose ARM computers with really good power management.
Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @12:49PM (#31851786)
Some people have this hurge to turn anything with CPU into something beyond their original purpose, the large majority of consumers don't.
Re:Repurposing an old Android phone as a web server by danhor on Sunday June 26, 2022 @05:22AM (#31882352)
That may be the case, but that's the reason why termux exists. If termux accepts that, the only logical consequence is to cease development.
Re:Repurposing an old Android phone as a web server by yjftsjthsd-h on Thursday June 23, 2022 @11:16AM (#31850289)
> Or they might eventually accept how things are done on Android.

Given that the way you say "things are done on Android" is that tools like termux don't exist, you're effectively saying they should just give up and kill the project. I understand that this is consistent with your view of the OS, but can you understand why nobody involved is interested?

Re:Repurposing an old Android phone as a web server by pjmlp on Thursday June 23, 2022 @12:47PM (#31851758)
On the contrary, they should embrace the way Android applications are supposed to be written.
Re:Repurposing an old Android phone as a web server by Gigachad on Wednesday June 22, 2022 @10:26PM (#31844502)
I think this is not the worst situation. Downloading executable code is very rare in normal use cases and is extremely common and powerful for malware. For the common user, its better to just turn this off. And for the power user, they are free to sideload apps that can do whatever they want.
Re:Repurposing an old Android phone as a web server by R0b0t1 on Wednesday June 22, 2022 @11:33PM (#31844912)
The problem is you can't actually turn it off like you think you should be able to do. As well, you should expect feature parity (automated updates and so on) with the R^X turned off.
Re:Repurposing an old Android phone as a web server by syrrim on Wednesday June 22, 2022 @05:57PM (#31842380)
The play store version isn't being updated, owing to a policy change by google affecting their package manager