Author Topic: Repurpose of smartphones  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6203
  • Country: ro
Repurpose of smartphones
« on: April 29, 2023, 12:12:31 pm »
For hobby/edu projects, there are tons of surplus mobile phones.  99% of the smartphones collected at e-waste are fully functional.  Some might be with scratches, or might need a new battery, but otherwise in working condition.

Many have about the same processing power as a Raspberry Pi, but with bundled touchscreen, battery backup, 1-2 webcams, case, mains power adapter and other perks one would have to buy extra for a RPi.  Phones are not as generous in RAM, though depending on the task, 1-4GB of RAM (as a typical 5-10 years old smartphone has), might be more than enough.

Main drawbacks is that it's tricky to overcome vendor locks, or to find a clean OS that properly runs on former mobile phones.  Another limitation is the lack of digital and analog IOs, so most of the peripherals are not directly accessible as in a devboard or a SBC.  Maybe a USB extender for a few IO would be nice.  Such an USB IOextender could be useful for PC, too, or for other SBC/devboards.



To give an example, went to a random collecting center last week, and got virtually for free some e-surplus, including:
- Nokia Lumia 635 - 4x1.2GHz Cortex-A7, 8GB flash, 1GB RAM, 5MP camera, Win8.1 mobile
- Samsung Galaxy J5 - 4x1.2GHz Cortex-A53, 8GB flash, 1.5GB RAM, 13MP camera, Android 6
- Sony Xperia Z5 Compact - 4x1.5GHz Cortex-A53 + 4x2GHz Cortex-A57, 2GB RAM, 23MP camera, Android 6/7



I've searched for Linux on mobile phones for a whole afternoon, and it's confusing.

It seems that for some models there are very specific image builds, with various alternatives for the OS, no idea which one to choose.  Many of them were work in progress, with incomplete hardware support, or with known problems as heating or hanging, some were not even capable of adjusting screen luminosity, or so I've read.

1. - Is there a generic Linux for mobile phones?
2. - Should I let the OS as it is, with all the factory bloatware, and just write an App for that OS, to repurpose the phone for whatever project is to be done?
3. - Is smartphones repurposing a thing for makers, or everybody's just waiting for the next stock replenish of RaspberryPi?

No phone/SIM/carrier functionality needed, only need the peripherals embedded in any smartphone.
« Last Edit: April 29, 2023, 12:27:03 pm by RoGeorge »
 

Offline 50ShadesOfDirt

  • Regular Contributor
  • *
  • Posts: 110
  • Country: us
Re: Repurpose of smartphones
« Reply #1 on: May 02, 2023, 07:36:44 pm »
I usually just leave a subset of apps running on the older smartphone, and everything is accessible via wifi; phone service aged out or turned off, but the apps I need still run. So, the older smartphone sits in a charger stand, always on, always running those apps for me.

Generally, to do a linux thing on a smartphone, I'd go to these folks:

xda-developers.com/

And then look here for a listing of phones where linux has been reported to work:

xda-developers.com/android-phone-linux-distributions/

You may or may not have to "root" the phone first, in order to do what you want with it:

xda-developers.com/root/

Hope this helps ...
 
The following users thanked this post: NiHaoMike, RoGeorge

Online Bicurico

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: pt
    • VMA's Satellite Blog
Re: Repurpose of smartphones
« Reply #2 on: May 02, 2023, 07:56:03 pm »
The Nokia n900 runs Linux. But it was pretty shitty, otherwise.

The best you can do with the phones you got for free is to sell them with profit on eBay...

While they are cheaper than a Raspberry Pi, you will pay with your time spent, no warranties, etc. Most importantly, you won't have the GPIO ports!

Some things are simply not worth the trouble.

This is my opinion, though. Eager to se what other write .
« Last Edit: May 02, 2023, 07:57:55 pm by Bicurico »
 

Offline RoGeorgeTopic starter

  • Super Contributor
  • ***
  • Posts: 6203
  • Country: ro
Re: Repurpose of smartphones
« Reply #3 on: May 03, 2023, 12:58:20 pm »
They probably wouldn't worth selling, some might have hidden defects, too (for example I've noticed after about a week that the Lumia635 has a problem with the embedded speaker, while on headphones works OK).

From the ones I happened to recover, the Nokia Lumia 635 is just right as a photo camera for the lab, has very good macro.  :-+

It can transfer the pics wireless (which the previous photo camera, a Minolta DiMAGE Z1 can't do), Lumia635 has had a very good camera, and the smartphone is flat, smaller and very convenient to use:  easier to choose the focus point by tapping the screen, has optical focus and some optical zoom, too, can take pics through the optical microscope, etc.  As a plus, the smartphone has Li-Ion battery, which self discharges very slow, in comparison with the NiMH in the Minolta camera.

This is the first pic, taken out of curiosity after a factory reset, and another one taken through an optical microscope.  Both at 50% jpg quality, which doesn't show any visible quality differences, but reduce the file size 5-10 times (for the forum).

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3719
  • Country: us
Re: Repurpose of smartphones
« Reply #4 on: October 16, 2023, 03:42:56 am »
1. - Is there a generic Linux for mobile phones?

No, unfortunately.  Basically the ARM ecosystem is not like the PC world at all in that there is basically no standard platform to target with an OS.  Every SoC is different and every phone uses the SoC a bit differently - and there are no standard APIs such as BIOS, PnP, or ACPI for the OS to discover this at runtime.  Instead a custom image needs to be built for each platform.

In addition the chip makers and IP vendors treat their hardware register interfaces as super secret special sauce.  This is almost completely unjustified, but it means that the drivers are all proprietary closed source and can only be rebuilt by the chip vendor.  So even if you run an alternative OS you are basically stuck with the kernel it shipped with.  And the open source operating systems need to not only build a custom image for each system but to make sure they can work with the variable kernels that ship with different phones.

Quote
2. - Should I let the OS as it is, with all the factory bloatware, and just write an App for that OS, to repurpose the phone for whatever project is to be done?

That's almost certainly the easiest, if not the best way to do it.
 

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: us
Re: Repurpose of smartphones
« Reply #5 on: October 16, 2023, 08:02:13 am »
Termux is another option on android, and gives you a linux userspace environment on top of android without replacing/jailbreaking it

https://termux.dev/en/
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Repurpose of smartphones
« Reply #6 on: October 16, 2023, 09:38:16 pm »
Yeah, unfortunately that repurposing is usually a dead-end due to the vast variety of hardware and complete lack of documentation.

Your best bet to have a chance is to visit one of the web sites for the AOSP distributions (the alternative Android distributions) such as LineageOS and focus on the models that are supported. Supported phones can be unlocked and the source code is available, Android uses a Linux kernel so you'll have access to the source code for a given phone.

https://lineageos.org/
https://github.com/LineageOS

They have done an enormous amount of work, do not even think of doing that from scratch yourself. But even so, with a supported phone, you'll still have a lot of work ahead figuring out the source code, how to enable modules that aren't enabled by default, how to write user apps, and so on. But I'd say that would be the way to go, if there is any.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf