11 ms·
Turn your old, cracked Android phone into a backup server
- fulafel 5y agoUnfortunately this is also a recipe of dropping an unpatched unmaintainable Linux machine on the network to provide interesting security challenges in the future.
- BelenusMordred 5y agoSomething like PostmarketOS is likely a better choice if it is supported for your device.
- outsomnia 5y agoRight, they are at least trying to use current, updatable kernels. Vendor kernels are a continual security apocalypse that never ends. https://source.android.com/security/bulletin https://source.android.com/security/bulletin
- cookiengineer 5y agoFor people that are not aware: ArchLinuxARM [1] is an unofficial Arch based distro for all kinds of ARM devices. Using it for my router, firewall and NAS hardware - and can totally recommend it. [1] https://archlinuxarm.org/platforms https://archlinuxarm.org/platforms
- cunidev 5y agopostmarketOS has much more active mainline work though
- atatatat 5y agoSo...most Android phones?
- mattowen_uk 5y agoAren't most dedicated home NAS units basically 'an unpatched unmaintainable Linux machine' also ?
- Wronnay 5y agoI think most ppl here have something like a Synology which isn’t too bad with updates… Of course, my Buffalo NAS can’t compete with that and got fewer updates than my old phone…
- techrat 5y agoMy Lenovo NAS, despite continuing to be sold well past when Linux Kernel v4.19 was released... is still on 2.6.32 It is no longer connected to an internet facing network.
- rustymatter 5y agoWhy do you care if you don't open any port on the phone to the public internet? It should be fine running locally in your home network.
- notjulianjaynes 5y agoRoot required, darn. I have 2 or 3 android phones with bad screens sitting in a drawer I'd like to do something with. Unfortunately they a.) don't have USB debugging enabled and b.) don't support any sort of external display. If anyone had some tips on how I could get into these machines it would be much appreciated.
- BelenusMordred 5y agoNot sure about this guide but you should be able to install a linux rom through fastboot instead of a recovery. You won't need a working screen to do that.
- dehrmann 5y agoYou're better off getting a single-board computer for this. You'll be able to install your own mSATA drive, and it'll run most distros without any fuss. That said, this quickly escalates to just set up a real NAS box. You don't really want to use an SSD for backup because they can lose data when not used. Alternatively, just go with a cloud provider.
- hungryforcodes 5y agoObviously solid advice, but I think the point here is about reusing old electronics. I also have a couple of old phones I'd like to try this with.
- KronisLV 5y agoAs funnny as this is, i never really go the whole concept of a "real NAS box" - do people usually mean specialized hardware in combination with something like the FreeNAS OS? Because right now i'm just using consumer hardware (an Athlon 200GE for its low 35W TDP, some cheapo RAM and a number of Seagate BarraCuda HDDs) in combination with Debian, which also runs on my other cloud servers. It's all mounted on my other devices either through SFTP or a Nextcloud instance that's also running on them for easier file replication. I don't even have RAID or ZFS/XFS/Btrfs file systems, just ext4 because any sort of clustering would introduce unneeded complexity to the setup - instead, a cron job with rsync backs the data from the "primary" HDDs to "secondary" ones every day in an incremental manner (well there's also BackupPC that does network rsync backups across servers). What purpose would running a NAS oriented OS distro even serve, for simple uses cases like that? It feels like the current "ad hoc" setup is really affordable and easy to operate. I think a SoC would also be nicely suited for this, as long as there is sufficient I/O capability. In regards to phones, however, i feel like drivers for obscure devices could probably become problematic quickly.
- ev1 5y agoWhat's keeping a plugged in unremovable battery charging on power 24/7 like
- rollcat 5y agoYou don't need to continue charging the battery past given percentage. It just happens that by default batteries don't charge past 100%, you can tell the firmware to stop at e.g. 40% which is a perfect compromise between having a bit of backup power and considerably extending its lifespan.
- jeroenhd 5y agoIs there a standardised way to do that on old Android devices? I've got a tablet that I'd like to run continuously at some point as a touch interface to my house but I'm wary if hooking up the battery 24/7 after seeing what happened to other people's devices when they did that.
- e3bc54b2 5y agoI've been using this fantastic work for years without side effects https://github.com/Magisk-Modules-Repo/acc https://github.com/Magisk-Modules-Repo/acc I had my phone plugged in for almost 3 years, and the battery still lasts for 3 days on its own. Highly recommended. As a side note, can someone tell me if something like this can be made for postmarketOS? I installed it couple months back and this is really bugging me. Apart from constant vibrations.
- MayeulC 5y ago> As a side note, can someone tell me if something like this can be made for postmarketOS? I installed it couple months back and this is really bugging me. In theory, if changing charge thresholds is supported by the PMIC (power-management IC) driver, it should be exposed in the sysfs. It is device-specific though, and might not be exposed by the driver.
- dendriti 5y ago
- teddyh 5y agoAny Internet-connected device is, in fact, a server, and must be seen and managed as one. This means strict control of installed services and, first and foremost, regular updates of all its software components (including firmware). If you acquire and install such a server which either can’t be updated or one which you know, realistically, won’t get any updates six months after installation, that’s asking to lose. — Me, 2½ years ago: https://news.ycombinator.com/item?id=18019343 https://news.ycombinator.com/item?id=18019343
- slim 5y agoI'd add any system with an uptime of more than one month is a decent server. Android has nothing to shy of
- teddyh 5y agoUptime is not the only gauge of significance. Security is one of the most important ones, as is reliability.
- pmlnr 5y ago> regular updates of all its software NO. You need security patches. The current "regular updates" bullshit where the Play Store wants to update and app I updated an hour ago is insane.
- orf 5y agoWe’ve discovered that backporting security fixes to a large matrix of (outdated) versions isn’t generally sustainable outside of a few specific cases. So… YES. Regular updates to all of its software is how you stay on top of security updates.
- Black101 5y agoYes and that is really bad... hopefully someone, one day, will solve this problem. I don't auto-update Android apps that what I need, because as a rule of thumb, app quality declines over time...
- 1vuio0pswjnm7 5y agoWithout needing to "root" the "phone", the user can install primitive ftpd from f-droid. Works great.
- slim 5y agoAlso termux is the best software you can have for android
- 1vuio0pswjnm7 5y agoEarliest version of termux on f-droid in the internet archive requires android 5.0 or later. Current versions require andoid 7.0 or later. How does the user with old android phone, e.g., 4.x, use termux. Current versions of primitive ftpd will work with android 4.0.3 or later.
- seniorivn 5y agoif your old phone has no unofficial support for more or less modern on version, either forget about it or go all in native linux route postmarketos etc
- 1vuio0pswjnm7 5y ago"... either forget about it or..." Will forget about it. Not really that interested in wireless anyway.
- imvetri 5y agoHow to make the ports available in internet ?
- pmlnr 5y agoGet on your router and follow the instructions for port forwarding. READ the documentation though, because opening devices up for the internet can be nasty, especially when it's your first time doing so.
- pmlnr 5y agoThe lesson of the cracked screen is: always pair you phone for adb as one of the first steps in setting it up, and if possible, root it. You might need it if the screen cracks and you want to save data off it. Sometimes there are ways around it by dirty booting a recovery image, but it's not as simple as it sounds, and you'd need an unlocked bootloader to do so: https://petermolnar.net/article/save-files-from-a-dead-screen-android/index.html https://petermolnar.net/article/save-files-from-a-dead-scree...
- techrat 5y agoProbably unnecessary at this point. Nearly every phone today is sold with a USB C port. "But this phone is older than..." My Moto Z Play was released in 2016. That phone is now 5 years old. It came with Nougat... and I can mirror the screen with a USB C hub with Built in HDMI. Plug in a mouse and you're done. No need to leave adb enabled, which is a security hole that can be exploited by unsafe USB ports and bad actors. (Also, police.)
- OJFord 5y agoCan you unlock it (pin/password I mean, not finger/face) with a keyboard and mouse though?
- wongarsu 5y agoOn my android I can enter pin/password per keyboard, or the swipe pattern per mouse. Some early android phones had slide-out keyboards (like a Blackberry), so good support for physical keyboards isn't that surprising. I wasn't expecting the mouse support tough.
- megous 5y agoIt's all standard HID interface these days.
- techrat 5y agoYep. Even did a video: https://www.youtube.com/watch?v=Qkh4oagFfb8 https://www.youtube.com/watch?v=Qkh4oagFfb8 Got out my old Moto Z Play which was retired. Restarted the phone so I couldn't use fingerprint to unlock. Plugged in a mouse, clicked pin. Unlocked. Moto Z Play runs Nougat, stock but rooted. You don't need root to be able to do this nor do you need ADB to be enabled. Also confirmed to be working on Razer Phone (stock, 9/Pie) and Essential Phone (stock, 10). Also works with Keyboard instead of mouse. Just type in the pin and hit enter. Pattern unlock will have to be done with the mouse for obvious reasons. So if your digitizer is completely busted, you can still use a mouse and keyboard. If your display is completely busted, you likely will be able to get video alt mode with USB C out. I tried it on a few other devices that I had in my pile. Chances are, if it's Micro USB, you won't get video on boot, even with a proper MHL adapter. * Sony Xperia J (Jelly Bean): Nothing, Micro USB * Sony Xperia Play (Gingerbread): Nothing, Micro USB * Marshall London (Lollipop): Mouse and Keyboard Works, Micro USB * Asus Zenphone 3 Zoom (Nougat): Mouse and keyboard works, USB C IIRC, Displaylink and OTG support was officially added in Lollipop, so that kind of jives with my experience here. As always, YMMV.
- HPsquared 5y agoIt's possible to install Debian on an Android phone without root, by using Termux. Would this software also work in that environment?
- jeroenhd 5y agoFor those looking for backup servers on Linux, using the backup tool built into many Linux distros (Deja-Dup or Duplicity) you can make file level backups without setting up backup software at the server side by using SFTP. Backups are encrypted and through a few (admittedly hidden) settings you can enforce a period after which full backups are made rather than diffed backups. That's the system in currently using, at least. I'd be happy to read about other open source solutions if anyone has a better solution. My backup system is geared towards a service that exposes nothing more than SFTP or WebDav as a backup location because of a cheap cloud storage subscription I've managed to get.
- khimaros 5y agoi personally recommend borgbackup
- mananaysiempre 5y agoI have two gripes with Déjà Dup (or rather had, the last time I reviewed my backup setup several years ago): - It can only do one set of backup settings and consequently only one backup destination without additional tooling, which is not Right™. - It cannot add different prefixes to the names of index and data files, making it impossible to set up S3 lifecycle rules for dumping the latter to Glacier. (Duplicity requires the former to be hot for some reason, I don’t know why.) Both of those are things you can do with the underlying Duplicity tool and a scheduler, but the UI does not expose them. Thus I sadly had to discard Déjà Dup’s shiny GNOME UI, and I know of no other backup tool with a shiny GNOME UI (and am too lazy to write one so far). Have any parts of this become false?
- MonaroVXR 5y agoNo, it's still the same as you described.
- develatio 5y agoWhile, from a technical POV, this sounds fun, I'd really recommend against using an old and cracked phone (which, to add insult to injury, is probably running very outdated and vulnerable software) for backup purposes. Please, run your backup servers on machines designed to do so, capable of receiving regular software updates, etc...
- Anunayj 5y agoif one backup is no backup, a backup on a old cracked phone is a backup with a timebomb.
- rustymatter 5y agoIf you don't open any port on your phone to the public internet, I guess it's fine for this use case? Most (if not all) home routers have firewall enabled by default. So your home devices are protected from inbound connections.
- justusthane 5y agoSomewhat off-topic, but the article uses UrBackup. I came across UrBackup a couple years ago when I was looking for a free workstation backup solution with centralized control. It's pretty neat! Check it out if you have a need for it.
- omginternets 5y agoThis is a bit of a tangent, but is there a way to get low-level access to an Android phone's radio without installing Android? I have an old OnePlus One and I'd really like to use it as an SDR for weekend projects. Ideally, I'd have it run some sort of minimal linux installation. If such a thing exists, I'm betting someone on HN knows about it.
- schrijver 5y agoI think PostmarketOS intends to be that linux installation: “a sustainable, privacy and security focused free software mobile OS that is modeled after traditional Linux distributions.” https://postmarketos.org/ https://postmarketos.org/ No idea how easy it would be to access that radio though.
- omginternets 5y agoThis is a fine start. Many thanks.
- moftz 5y agoWith the right USB adapter, you can plug an RTLSDR into an android phone.
- anilgulecha 5y agoThis is over-engineering IMO. If you want to use an old phone, simply setup syncthing, and add in the folder from the connected hard disk. Instantly available synced folders from other places. No root, no fuss.
- tolbish 5y agoLooks promising, thanks for the info!
- fnord77 5y agowhat's a good phone to try this with?
- jablan 5y agoAnother cheap solution is buying a used router and then installing OpenWRT on it. Get one with USB.
- CTOSian 5y agoused routers?! someone can find 10+ yrs NAS really cheap nowadays.. I ve got a ..bucket of Netgear's (most of them ReadyNAS Duo v2) for £5 each!!!
- gattilorenz 5y ago> ReadyNAS Duo v2 don't you have problems with SSL certificates and accessing the interface via browser? In general, both a router and a NAS do lack the backup battery, unless an UPS is also used...
- ProtoAES256 5y agoThe first thing that come to my mind is: "How will this fare for a long term daily backup?" A few of my old phones and SD cards died due to the flash being used up(can't write new data, ro only). That said, with some magic linux command sauce, external drives can be used(part 2 of link), then software RAID, offloading data to them to prolong flash writes lifetime, then more stuffs like AnLinux can instead be used to add functionality to it. Interesting read indeed.