19
\$\begingroup\$

I have a couple of cell phones laying around, one of them being this one: http://www.gsmarena.com/sony_ericsson_elm-3057.php


Is possible to clear the flash memory and replace it with a bootloader and then upload arduino sketches or pic32 sketches(C#/C++).

I got this idea because it is a very cheap platform for developing hardware projects. (You get a screen, buttons, audio I/O, internet, etc, you get everything for a very cheap price compared to what you get by buying each part separately.)

Is it possible to erase the flash memory and install a boot-loader into a phone to use it as an embedded computer?

\$\endgroup\$
  • 3
    \$\begingroup\$ Why the down vote, this is an excellent question. \$\endgroup\$ – Rocketmagnet Jun 4 '12 at 19:00
  • \$\begingroup\$ It really needs to be cleaned up. (I didn't down-vote, but iIMade a pending edit that really clears up the question being asked) \$\endgroup\$ – CyberMen Jun 4 '12 at 19:01
  • \$\begingroup\$ You might be interested in the Rockbox project, which has been doing something similar with mp3 players. The people involved in that could tell you how difficult it is to get information about proprietary hardware. \$\endgroup\$ – Jeanne Pindar Jun 4 '12 at 19:15
  • \$\begingroup\$ @CyberMen I am not sure what you mean with "What is the formatting the flash memory in a phone and installing" \$\endgroup\$ – varesa Jun 4 '12 at 20:30
  • \$\begingroup\$ @varesa don't ask me, ask OP. Use your deductive English skills. \$\endgroup\$ – CyberMen Jun 4 '12 at 20:31
1
\$\begingroup\$

Cost is never a problem. Many enthusiasts will be willing to pay moderate price for easily hackable high end devices. The problem is that ARM is a closed platform. There typically is a part named private ROM on the very silicon of SoC (system on chip). It blocks the reuse.

This part of ROM is responsible for picking a bootloader in some order: Z-Modem on serial, external Nand, serial ROM, SDCard, external USB. For every device the order is individual and poorly documented, you typically should hold few buttons when powering to branch into alternative loader. The image of bootloader if most of the time checked for digital signature of platform owner. So no luck.

For one off project it is OK to pick random device. But you possibly will be more interested in well known device, with published schematics and available source code for Linux, Android etc.

So my suggestion is to look at devices surrounded by active user's communities: Raspberry Pi, BeagleBone, BeagleBoard, some Samsung evaluation platform (PandaBoard ?)

My personal experience with TI AM35XX ended with disappointment with complexity of everything. The smallest Linux in the world named Angstrom has 3GB distribution image. The docs for chips are 4000-5000 pages. It did not feel much like a hobby and was not enjoyable.

The situation may change after Intel Atom SoC will become popular. I expect massive user interest and will follow the crowd in direction of smallest possible Atom with screen. Hope someone will complete a panel mountable piece with size of credit card and GPIO. It will be fun.

\$\endgroup\$
  • 2
    \$\begingroup\$ Actually, the TI AM35XX is awesome - the smallest Linux on this platform fits well under 3MB. I'm personally using these (and the AM33XX) for a whole bunch of things, once you get through the hassle of crosscompilation, you have a well supported, well documented piece of hardware. Yes, it's complicated, and the TRM (5000 pages) is a huge brick, but it's meant as a reference document, not as a lullaby (thou it can serve as such as well) \$\endgroup\$ – qdot Jun 5 '12 at 21:31
  • \$\begingroup\$ +1. Yes I agree that TI ARM is possibly best one can find. I meant only my personal experience as a hobbyist. If it was my day job to wrestle with ARM in a team, it would be much more fun. \$\endgroup\$ – user924 Jun 5 '12 at 22:18
  • \$\begingroup\$ Well, I'd wrestle with an overpowered machine, than an underpowered one, in general. It's clearly no Arduino, but it is linux, once you get kernel booting on it, it's no different than any other crossdev platform out there. Build some userland (or build your own init and run from there), and you're home :) \$\endgroup\$ – qdot Jun 5 '12 at 23:48
5
\$\begingroup\$

Ages ago, there was a project to do something similar (reverse engineering a cheap and very popular phone family).

http://nokix.pasjagsm.pl/help/blacksphere/sub_050main.htm

And yes, the Android option is probably the easiest.. or Windows Mobile, it's reasonably open as well.

\$\endgroup\$
  • \$\begingroup\$ Wait, is the low-level stuff for WP open too? \$\endgroup\$ – varesa Jun 4 '12 at 20:23
  • \$\begingroup\$ WP or WM? Windows Phone, i.e. Version 7 and above, is something I have limited experience with, but I think it can still run native C binaries. Version 6, which makes up the bulk of the old but extremely powerful PDA-phones, is extremely open - it runs native C code, it can be compiled for with MSVC and GCC, it has almost no security.. you literally can launch a bootloader as a regular app, and it jumps to linux kernel :) \$\endgroup\$ – qdot Jun 4 '12 at 21:34
  • \$\begingroup\$ Having tried this very thing ages ago with my HTC Touch Pro I can vouch that yes, you can jump into a Linux kernel (or a custom Android build). That's not to say that talking to all the hardware is equally easy or feasible. (sadly, as I hated WM6 with a passion, but there was no way I could retain the same level of functionality with any other OS) \$\endgroup\$ – Alexios Jun 4 '12 at 22:30
  • \$\begingroup\$ qdot, why don't you tell us more about the approach from having a windows phone 6/7 bought from the store to having it run my own code controlling let's say 5 servos through the serial port. \$\endgroup\$ – Harry Svensson Jun 4 '12 at 23:16
  • 1
    \$\begingroup\$ @qdot can you bring some of this info over so that the link is just a reference, right now it is susceptible to link rot. \$\endgroup\$ – Kortuk Jun 5 '12 at 0:17
3
\$\begingroup\$

I have no experience on this, but I don't think it would be easy (if even possible). I think you can forget programming it in C++ or C#, and rather in ASM + C. It would not be compatible with arduino sketches or PIC32 code or anything, that is not made for the specific CPU. Many new phones have something like a ARM core.

I don't really know how you would program the device, but I assume it is possible, as they can usually update the firmware if you send it to them for service.

Also you would have to code your own drivers for all the hardware ( display, WLAN, sensors, etc... ), which would be really hard without more information on the hardware, which the phone manufacturer is propably not going to release to you.

I think the easiest way would be something like a old android-phone, as you can get the source code with drivers and all the low-level stuff for free. You could rip away or use the UI and other components visible to the user. But this propably is not what you want, unless you have some old android phones lying around.

Also, if the phone has been "hacked" to run any other OS, especially open-source ones like android, you might be able to get the sources for the port to play with.

\$\endgroup\$
  • \$\begingroup\$ Wouldn't it be possible to read everything off the flash memory and read/modify the flash memory from there? \$\endgroup\$ – Harry Svensson Jun 4 '12 at 19:43
  • \$\begingroup\$ @HarrySvensson Well you would either have to modify the memory directly, or use some kind of programming port/header which might be there for upgrading the firmware. Possible, but not easy. \$\endgroup\$ – varesa Jun 4 '12 at 19:48
  • 2
    \$\begingroup\$ Why the random down-vote? \$\endgroup\$ – varesa Jun 4 '12 at 20:31
  • \$\begingroup\$ @HarrySvensson, assuming you had the tools to dump all of the flash memory (there could be several flash chips meant to contain different things like secure boot-loaders and what not, some maybe requiring proprietary tools), would you be comfortable in decoding all of it by hand? Don't expect all of it to be in a nice file system format that you can just mount on your computer like a thumb drive. You could see a lot of proprietary and unrecognizable stuff or just strait raw assembly code where there may be some program code. \$\endgroup\$ – Jon L Jun 5 '12 at 4:42
2
\$\begingroup\$

Doing it all yourself will be difficult at best. You would have a much easier time with one of the devices supported by the Rockbox project, which is open source firmware for mp3 players. Some of these devices are inexpensive and offer many of the advantages you mention, and they are designed to have their firmware upgraded via USB. You'd have the help of an active community who have already figured out the basic issues regarding compilers, bootloaders, etc. as well as some source code to start with.

A nice feature of Rockbox is that it sets up the devices to dual boot, so they can still be used for their original purpose when you are not using the new firmware.

\$\endgroup\$
0
\$\begingroup\$

No.

The public documentation for this phone (such as on the page you linked to) doesn't even list the processor type. Even if it did, you would need the schematic (including part numbers of all the ICs) to be able to write code for it. That would be proprietary to Sony/Ericsson, so you're not going to get it). Same for any other cell phone.

In the unlikely case you got all of the documentation for the processor, flash memory etc., it might be possible to write an Arduino compatible bootloader after spending several weeks of your time. Of course this would require that you get the development environment for the phone, which would likely cost hundreds if not thousands of dollars.

Even if you were able to write a Arduino compatible bootloader, it would be impossible repeat impossible to upload and run Arduino sketches because 1) the compiler for the Arduino is going to be emitting code for an Arduino compatible microcontroller (Atmega, PIC32 etc.), and the phone is definitely not going to be using gone of those -- mostly likely it will be some variant of ARM); and 2) the I/O ports are not going to be located at the same locations (ports) on the cell phone as they are on the Arduino.

Note there are some open-source cell phones, but you are not going to be able run Arduino software on those for the same as I cited above (processor and hardware incompatibility). Some of the other answers have suggested Android, but notice that it is not on the list of open-source phones because of proprietary drivers. And once again the question was can you run Arduino code on those, and the answer is definitely no.

So it's way cheaper to just bite the bullet and get an Arduino board and peripherals.

\$\endgroup\$
0
\$\begingroup\$

What does it take to turn various "everyday" hardware into microcontroller platforms? Sprite's mods is an excellent source of inspiration. It gives a good explanation of the process needed to "open up" the devices and gain control over them. TL;DR: You can run Linux on an SD card, and on a hard drive. No, not using a hard drive. On a hard drive - on the fairly powerful CPU that is the drive's controller.

\$\endgroup\$
  • \$\begingroup\$ The Linksys WRT54G router was a popular device to hack, since it used open-source software so Linksys was obligated to release the source code. You ended up with a customizable platform running Linux, with Ethernet ports and Wi-Fi built in. \$\endgroup\$ – tcrosley Mar 9 '15 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.