AI News HubLIVE
站內改寫3 分鐘閱讀

待翻譯:You can turn an old Android into a Raspberry Pi alternative - but know this first

AI 服務暫時不可用,以下為來源摘要,待恢復後補全翻譯:With AI-driven RAM shortages pushing Raspberry Pi prices sky high, here's how to repurpose your old handset into a portable powerhouse for your projects.

來源ZDNet AI

AI 服務暫時不可用,以下為來源正文,待恢復後補全翻譯。

Follow ZDNET: Add us as a preferred source on Google.ZDNET's key takeawaysRaspberry Pi boards have skyrocketed in price this year.There are pros and cons to using an old phone as a Raspberry Pi replacement.Here's a way to unlock your handset's power without risking bricking it.With demand from AI data centers sending RAM and storage prices through the roof, Raspberry Pi buyers have been among the many victims of this trend. We've seen the prices of single-board computers skyrocket to the point where two 16GB Pi 5 boards cost the same as a MacBook Neo.No wonder there's been a huge spike in interest in turning an old Android handset into a portable project computer. Also: You're charging your phone all wrong: 6 common myths, debunkedAfter all, it looks like the perfect portable computer because it is a highly optimized portable computer, and most of us have a few old handsets sitting in a drawer or on a shelf somewhere, doing nothing. But… there is a but. Several, actually. Before I tell you what you need to do to turn that old phone into a portable powerhouse for your projects, I'm going to list both the pros and the potential pitfalls of using that old handset.The prosIt's a smartphone -- a portable, self-powered computer you can slip into your pocket. At first blush, it looks like the perfect system. And that initial infatuation might make you think that it's the superior option. Also: How I survive summer without AC: My top hot weather coping tips, tricks, and gadgetsNot only is it free (or cheap, since the secondhand market is flooded with old Android handsets), but it also has a built-in battery, a display, Wi-Fi, Bluetooth, and even cellular connectivity. On top of that, it should be loaded with RAM and storage -- and if you're lucky, it might have a microSD card slot -- a camera, a CPU that usually has better single-core performance than a Pi, and a USB-C port for expansion.Perfect.As for software, one way to make use of your hardware is to use Termux -- an app that's both an Android terminal emulator and a Linux environment -- on Android without the hassle of rooting the handset. (Never rooted an Android smartphone? You have no idea about the horrors of bricking a handset.)Throw proot-distro on top of Termux, and you have the power to run Linux distributions, again, without rooting.So far, so good, right?The consA smartphone is a very different animal from a Raspberry Pi. There are no GPIO pins, so anything and everything that you'd plug into the Pi this way is a no-go without a lot of futzing about with (and even with a lot of futzing, it can be unpredictable). You also lose out on Ethernet and a bunch of USB ports, so you'll have to rely on docks, dongles, and such for any expansion. Also: This Mac dock gives me lag-free dual displays with no sketchy drivers - for $150Termux also puts obstacles and limitations in your way, stuff relating to power management and storage access, and you'll have to become familiar with things like wake lock and bypassing storage limitations. Termux can also be buggy, and you'll no doubt be spending a lot of time in the wiki. On top of all this, I can't even guarantee you'll be able to do what you want. Hopefully, someone's gone ahead of you, and you can walk in their footprints. One really big limitation of using an Android handset for this type of endeavor is that some ports (ports 1024 and below, which are considered privileged network ports) are off-limits to apps that aren't rooted. Doesn't sound like a big hurdle -- and for the most part, it isn't -- but if you try to build something around certain apps, they can fail. One such app is the ad-blocker Pi-hole, which you'll only get to run on rooted hardware. I know this because I encountered this limitation earlier this year, which is why I used an ESP32-S3 board instead.This is going to be one of many hurdles, speed bumps, and dead ends that you encounter.If this is your first time trying something like this, you'll quickly learn why the is as popular as it is. A way around Termux limitations is to install something like postmarketOS, but this involves rooting, and you need a compatible handset. OK, here's how to get startedBecause I have no idea what you want to do with your Franken-Android handset, I'll show you how to install Termux and make a few tweaks to it. After that, you're on your own.The quickest, easiest, safest way to get Termux is via F-Droid. Either download the APK file directly, or download and install the F-Droid app, and download it through that. Either way, you're going to have to navigate a few security permissions screens (allow everything or things will break). Also: I lost 100 pounds in 7 months: How a smart scale and an Apple Watch helped track my progressGot it installed and open? Good! Next, update everything by typing the following:pkg update && pkg upgrade -yHit ENTER, sit back, and wait for everything to refresh. Keep an eye on the screen because there you might be prompted for some inputs (say yes to everything). Next, you need to set up the storage. For this, type the following, then press ENTER, and when prompted for permissions, be sure to allow them.termux-setup-storageNext, install the tools you'll need. For this, use:pkg install proot-distro git opensshNext, we need to give Termux access to the phone's hardware:pkg install termux-apiNow you need to flip over to the F-Droid app and search for and install the Termux:API app.Back to Termux, and now it's time to get Linux installed:proot-distro install debianFinally, you're ready to get into Linux… all it takes is one command:proot-distro login debianWe're in! From here, you have all sorts of projects to choose from, from a self-hosted password server, media server, file syncing, to web server. Good luck!