Finally, A Use For Old Cellphones

In what is now a three-year long search, I’ve finally found the perfect use for an old cellphone. And with it, the answer to a burning question: Why aren’t we hacking cellphones?

First, the application. The Octo4a project lets you use an old Android phone as a 3D printer server, web interface, and even time-lapse camera to make those nice movies where the print seems to grow up out of nothing before your eyes. It’s the perfect application for an old phone, making use of the memory, WiFi, graphics capabilities, and even the touch-screen if you want local control of your prints.

Connecting to the phone was the main hurdle that I’ve always seen in developing for cellphone projects, because I have robotics applications in mind. But Octo4a gets around this with low or no effort. Most 3D printers are designed to run on USB anyway, so connecting it to the phone is as simple as buying a USB OTG cable. With the USB port taken over, powering the phone long-run becomes a tiny problem, which can be solved with a Y-cable or a little solder. Keep the OS from going to sleep, somehow, and it’s problem solved!

But here’s why this isn’t a solution, and it points out the deeper problem with cellphone hacking that many pointed out in the comments three years ago. Octoprint is written in Python, and because of this is very easy to write extensions for and to hack on, if that’s your thing. When I first saw Octo4a, I thought “oh great, a working Android Python port”. Then I went to dig into the code.

Octo4a is written in Kotlin and uses the Gradle framework. It’s a complete port of Octoprint, not just to a different platform, but to a different programming language and to an almost entirely different programming paradigm. My hat is off to [feelfreelinux] for doing it, but my guess is that the community of other people fluent enough in Kotlin and Python to help port across upstream changes in Octoprint is a lot smaller than the community of Python programmers would have been. Octo4a is a great project, but it’s not a walk in the park to develop on it.

So all of you who wrote in the comments to my previous piece that it’s the Android software ecosystem that’s preventing phone reuse, well here’s the exception that proves your rule! A dedicated and talented, multi-lingual developer community could pull it off, but the hurdle is so high that few will rise to it.

Anyway, thanks [Feelfree Filip] for your great work! I’ll be putting this on my old S4.

50 thoughts on “Finally, A Use For Old Cellphones

  1. Back in 2014 or 2015 I rooted my old android phone, then I copied over a debian image in a file. I could then mount the debian image and chroot into it, giving me a full fledged debian system (with limited hardware control though).
    I mostly used it as a downloadbox, and accumulated a respectable over 300GiB of films over a few months.

  2. These kinds of projects tend not to be long-lived. It’s just simply quite a lot of work to keep a port up-to-date and compatible with the original, if the port is written in an entirely different language altogether, and then the port tends to either become entirely its own thing or slowly become more and more outdated.

  3. I use old cellphones as security cameras as well as a monitoring camera for my 3d printer. They all had bloated batteries so I took the battery apart and removed the circuit board, soldered a micro usb connector to where the battery used to connect, then put all of it into a 3d printed frame to act as a drop-in battery replacement that converts the phone to being usb powered instead of requiring a battery like most android phones. This both frees up the USB port for other uses and makes it so you don’t have to replace bloated batteries anymore from having the device plugged in all the time.

    1. Developing mobile phones, we used to do pretty similar, wire up to the battery terminals and substitute a power supply. Quite often there would be a big electrolytic at the phone end, but if you’re not using the radio even that might not be necessary.

      Most phones will run on anything between 3.2V and 4.2V Vbat and probably 0.1V lower than that, but might shut down if too low, so 3.7V nominal is a good choice.

      @James below, yes I’m sure there are lots of USB relays and gpio ports that can be pressed into service, via a USB hub. I have some USB mains relays for instance.

      Probably the only phones that will be totally useless for this are iphones, as the platform isn’t open.

      1. Older phones (not Pixel 3 but like… even cheaper, older phones) make great GPS tracking systems since you don’t need a SIM card for that and can configure the wifi to connect and dump information when in range.

        For real time GPS tracking, you can get cheap SIMs to an MVNO.

        One might have to weather harden the phone and epoxy a neodynium magnet to it, depends on how/where one will mount the phone. ;-)

      1. You can download Android apps that do exactly this.

        Previously I have used DroidScript for app development but I going to have another look at what’s available today including Kotlin.

  4. The python dialect issues are only a small part of the hurdle really. They are certainly significant for this particular project (though it looks like they are solved nicely). The idea of using old cell phones really does merit more attention, and to be honest, python would be the least of my concerns. Someday soon I may upgrade from my current Samsung S4 and will have a couple of those to play with, and my son has several old Iphones gathering dust. A lot of hardware muscle going to waste.

    Apart from rooting the phone and being able to (let’s say) compile C code, the big show stopper for most projects is the need for IO, which frankly is the handiest thing about whatever single board computer you can buy for a few dollars. If all you need is USB (like this project) a phone is a viable choice.

    This is a very interesting and valuable writeup, and I am busy watching the video. Thanks.

    1. Exactly!

      If you use Android inbuilt features like Bluetooth, Wi-Fi, BLE etc then your app will run on any Android phone without code modification (porting). Mobile phones are perfect for these use cases.

    1. Lisp is the real best language…

      Seriously, your comment is really pointless. No language is useful for a project written by a community who uses an entirely different language!

  5. I use old cellphones as Squeezebox players, since many years. As the Logitec Media Server is free, and runs everywhere, you can míx Windows, Linux and Android clients, and even let them play in sync. A

  6. Have a few old android phones, worth making them into DSO type data loggers & review. Heck I only ‘just’ need cheap analog input through USB or wifi, then kotlin or java even minibasic to grab the data & display, optionally upload to tethered wifi the anywhere.

    The number of phones being thrown out & with good displays is getting ridiculous, thanks for posting, lots of use potential !

    Actually I’d like to use a mobile phone with sim card as a gateway to the cell network and be able to have it receive an SMS or phone call and pass it on to another android phone (without a sim & via wifi) as if that phone acted the very same as the gateway ie get SMS, reply, get phone call, make calls just like an ordinary dect type extension :sigh: looked around none I’ve found :-/

    Any ideas on that ?

    1. The Phone over Wi-Fi is the easy part with some newer phones. We’ve long had VOIP (Voice over IP) where we get a new phone number from a VOIP provider and us the phone over a data connection that way. Many newer phones support VOWiFi – Voice over Wi-Fi compatible. The difference is that you get to use your normal, existing phone number for calls, MMS and text. You service provider has to support VOWiFi of course and there may be additional charges.

      Also, many data USB dongles that are made for data only SIMs will do data and text (not MMS) nut don’t do voice phone.

  7. There are so many app programming apps in play store for Android that I don’t know why we’re still asking this question unless you want a specific language.

    A better article may be one about the pros and cons of each and interfacing out via USB, BLE, WiFi or Bluetooth.

  8. I’ve never liked the idea of streaming gcode to a 3D printer from an external computer of any kind, so Octoprint has very little utility to me. I know, I know, it generates tons of baseball style useless stats on the print that seem to make some people feel like there’s more going on than there is, but it does have actually useful remote print-kill capability if your printer is unreliable.

    I use an old cell phone to monitor very long prints once in a while, but there’s no need to use Octoprint to do it. Android phones can be set to back up photos to Google Photos right after they are snapped. Combine that with a free camera app like Open Camera and you can program the phone to snap a picture in whatever resolution you like as often as you like (and the phone has memory). The uploaded photos can be converted to a movie very easily if making time lapse videos is your thing. There’s probably a way to do it directly in Google Photos, but I usually DL the images to my computer, batch edit/crop them in Irfanview (free), then convert to video using imageJ (free).

    https://drmrehorst.blogspot.com/2019/08/putting-old-cell-phone-to-good-use.html

    I came up with a way to make layer synchronized time lapse videos by triggering the camera with a bluetooth shutter button mounted on the printer. At each layer change I send the X axis to the back of the printer where it bumps the button. Easy-peazy and all free software with no subscriptions or advertising.

    https://drmrehorst.blogspot.com/2020/04/fancy-no-hack-layer-synchronized-time.html

  9. The reality is that unless you need a screen or camera a r-pi 0 or r-pi 0 W will do the job much better than an old android and you don’t have to do a dirty hack even if you have rooted and loaded LineageOS.
    It is cool for a person who is ultra poor and/or without a supply chain but is so much work for someone who can afford $5-10 of hardware and have it show up in a few days. Usually even for the poor a phone that works is worth more than $5-10. This project is cool like the ironman power armor suit built in a cave cool.
    Android hardware is poisoned by the unavailability of FOSS drivers so we can never do what we want and are held back to kernels which support the released closed blobs and requires the dirty libhybris kludge unless someone does deep i/o analysis and makes an unofficial FOSS driver.
    Cool hack but apple/androids are trash on delivery day, support and contribute to hardware like Librem or pinephone which only builds from hardware with FOSS drivers available.

  10. I’ve found uses for old cellphones, one of my favorites is the hued cable (https://ihued.com) so that you can use the phone as a garage security camera and also use it to open/close your garage door from anywhere in the world. Very useful when I forget my keys in the house and when I need to let in my neighbor to feed my cat when I’m on vaca…

    1. How do you use as garage door opener? Bought car that does not have door opener because i did not get moon roof. Garage door opener attached to software for moon roof. I have android phones.

  11. Does anyone have an idea what to do with an old tablet (actually two) or a smartphone without touchscreen?
    Everything works and it kills me to think that I have to throw away such powerful equipment that are working perfectly just because I can’t interact with them.
    Yes I can add a keyboard+mouse, but I can’t think of something truly useful that could be replaced by a cheap tablet (which astonishingly cost around 150e only, new!)

    1. I’m a big fan of installing a chrooted linux distro and using it as a small linux playground. I recently set one up as a DNS based ad blocker (similar to pihole) using blocky (go based). Couple it with a musl based distro and you can use fairly recent software even if your stuck using a very old android kernel.

    2. Smart home dashboard (or like Grafana display), calendar display, … If you have a camera on it, you could even use that for “user detect” to turn off the screen when nobody is near.

  12. I’m a basic person that likes to game, so I use old phones for things like Remote Play on a PS4/PS5 as well as an emulation station of sorts. If I want to play old games then a cell phone is great for that, and I can just leave it in a controller grip if it doesn’t need to be charged for awhile.

  13. I’ve seen at least one project to allow running python code in an Android run time. I wonder if there are missing features that would have prevented it here vs a complete rewrite.

  14. I use old Android devices for my radio hobby..
    They’re nice as dedicated devices that run a single application all the time each. That way, I can use these useful applications simulationsly.

    I use old tablets, smartphones etc. as SSTV monitors (Robot36 application), as SDR receivers (Touch SDR application and RTL dongle), as a satellite tracker (Heavens Above application), as a host for DOSBox (iDosbox application), as a Tricorder (“” application) and so on.

    With an old navi mounting (thosemade for Win CE PDAs with attached GPS mouse etc), I could even mount the smaller smartphone models on the wall, similar to VESA mountings. :D

  15. If you’re prepared to open the phone up (and can do so without destroying the screen) you can also tack onto actual GPIO’s such as the volume buttons, any physical buttons on the front, and for output the vibrator motor, backlight and any front-panel LEDs (such as the power/charge LED), and don’t forget for a multicolour LED that might be 2 or 3 GPIO’s possibly with PWM capability.

    1. How would you use these GPIOs in your program then?
      Can you have a direct access ton the gpio (like setting a register) or do you hack in sending a command like “turn blue the notification led”?

  16. I use Octo4a on a daily basis. It has its flaws, but it has it’s perks. It will leave blobs EVERYWHERE if baud rate is not configured right, but it genuinely works with EVERY printer I have tried. Only thing you cant adjust is live Z offset out of the box.

  17. Old phones also can be used as assistive devices. My example is an audio book player with a UI designed for those who have trouble with most tech. For example, putting the phone face down stops playback. See the Aesop Player (or the similar but somewhat less capable Homer Player) both available free in the Play Store.

    I strongly suspect there are other similar uses.

  18. I have always wondered why so many people buy a Raspberry Pi to accomplish a simple project that could be accomplished with an old android phone. Raspberry Pis are not all cheap nor are they even readily available. Pis are more capable in many respects but if your going to run a touch screen on Pi 4 to make a portable music player, security camera, web browser, torrent grabber, or retro gaming device that’s just silly (cost wise at least). That same $300 to $400 bucks would buy a really decent old phone, some nice bluetooth headphones, keyboard/mouse, and a game controller. It all comes in a nice case already. Tons of support for those types of projects too.

    1. The Pi 4 is 50$ shipped with screens between 30 and 50 (all USD). So 80$ to 100$. I’m unsure what 300$ to 400$ is pricing.

      The Pi is less capable for the most part. But doesn’t come with a crippled operating system. From the standpoint of you being able to update it for starters.

      Phones are a computer engineered in an attempt to make you throw them out after a brief span. The Pi isn’t.

  19. So you were able to get the Octo4A app to work properly on a Galaxy S4 including the video feeds? Any tricks for the rest of us who keep getting green video although the previews are full color?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.