Introduction: How to Recycle Android Phones for BOINC or Folding Rig Without Using Batteries
I AM IN NOT IN ANYWAY RESPONSIBLE FOR ANY DAMAGE DONE TO YOUR HARDWARE BY FOLLOWING THIS GUIDE.
This guide is more effective for BOINC users (personal choice / reasons), it can also be used for FOLDING
Since I do not have too much time, I will try to make this tutorial short, but will add info if more people request it.
Step 1: Hardware
The idea is to have a
regulated power supply with enough Amps to feed as many octo-core android you can get your hands on
My setup is based on a TDK-Lambda HWS-150A-3/A 3.96 V/DC 30 A which I bought for under 100 euros. This open frame power supply gives 30A at 3.3V +/- 20%, which means 3.96V max, above the 3.8V requested by the “battery”
Initially I used another TDK Lambda with 12V & 12.5A (much cheaper version LS150-12) together with a cheap buck converter which reduce the voltage to 3.8V.
For ideal results, all batteries used in the smartphones should have a nearly identical voltage which should be around the 3.8V. For almost an year I’ve been using 2 octo core Landvo smartphones with USB 5V by using the “salvaged” battery circuit. For the other Allview androids this method is not working, although at 5V I was getting messages of … over current, since I did not “salvaged” the battery circuit.
The most important/difficult piece of the hadware is the USB hub. A friend of mine had to 3D print it and solder all the circuitry. Basically it feeds the desired non-standard voltage (in my case 3.8V) but it has the option to “fast charge” at 5V (which I did not test, since if you need 5V there are a bunch of options to buy from)
The 3D schematics he will add them a bit later and I’ll update the tutorial here
Since no batteries are involved, on the back of the phones I soldered the “red” to the plus and “black” to the minus. The other 1, 2 or 3 middle pins I found them irrelevant, you can search on the internet
4th picture is showing pin configuration on a typically Samsung 4 pin battery. Basically Pin 1 is positive, Pin 2 & 3 are negative, and pin 4 is for temperature sensor, so not need it. The soldering for power should be done for Pin 1 & Pin 2 (not recommend it since it is too close and can short out) or Pin 1 and Pin 3 (recommend it since they are far apart, also better use hot glue). In case of non standard battery, as a rule of thumb, better solder between pins who have a voltage of 3.7-4.2 V if finding the pins is too difficult.
Step 2: Software
I only used official
BOINC, and I guess it will be better to enable also play store updates, unless the phones are not limited by RAM
I prefer to run WCG since this is basically a Badge Rig, although the 256MB RAM limitations depends on the project, and sometimes I guess 7 Cores take up something like 400MB RAM
So basically I have been running this for the last two weeks or so and I am getting around 97%
CPU Time / Elapsed Time (hours) in WCG :)
Step 3: Control & Tuning
I am using team viewer + host installed on the phones. Although Landvo + Allview does not support full remote control, it is the only solution I could find. Please add in comments if you are using another solution.
I am running only 7 out of 8 cores, just for caution, but the SoC does not get very hot.
Right now I am running 4 octa + 1 dual on the rig, and 2 octa (Landvo) on a normal usb hub, see table below.
Step 4: Possible Improvements
I will try to switch to Samsung phones since they should be able to run team viewer with quick support.
It will also be nice if I could print a 3D battery with only the red + cable coming out in order to use the phone back cover.
10 cores phones would be nice to try when they will be more common and cheaper.
In order to reach the goal of 20 octa, I could use some wago 222-415 (5 wires) lever nuts connectors (one hub of 5 usb per wire) since the open frame power supply does not have enough place to insert the 4 hubs wires
For errors and correction please leave them in the section comments below.
Step 5: This Is for the Makers
3D printing + Soldering required
My friend did this part, so I cannot give too many details.
KiCad files attached also for soldering and to have a view of the 3D model
Step 6: 6. 2018 March Update
6.1 Device selection
I personally prefer using at least octa cores, since quad cores I assume can consume as much as a octa core.
However, if you do manage to buy quads for almost nothing, it would make sense to have a small inexpensive android farm. Fewer cores could have an advantage for more headroom, in respect to higher end cores.
I am suing this filter to have a selection of phone to choose from https://www.gsmarena.com/results.php3?nCPUCoresMi... I would recommend at least 1.5 GB of RAM, and based on my experience, Samsung devices would be the best option to choose from since the community is bigger (TWRP and custom ROMs) in comparison to Mediatek devices. However, since most of the new smart phones have non-removable battery, I fear it will be difficult to find phones with non-removable batteries. I tested on the following: 6 Allview E4 - MT6753, with kingroot 2 Landvo L700 - MT6592, with magisk 1 Samsung Galaxy Alpha - Exynos 5430, with magisk+TWRP
I would strongly recommend to root your device in order to disable thermal throttling.
This is the easiest method, but is also insecure
If you have custom kernel just flash the magisk zip. Side-note, I also managed to patch the boot.img for the Allview E4 by finding the original files on needrom (a good place to find phone files for magisk root)
6.2.3 Custom ROM with root support
If you have a more expensive phone and have Custom ROM installed, then you are all set.
You could also play with some power/thermal parameters to get the maximum out of your device. Attached is a picture of cpufreq_power_dump which I still couldn't figure out how to set the power state "0" :)
6.3 Power delivery
As a rule of thumb, my advice is whatever power supply you buy, try to make sure that you are using it at around 50% of total "advertised" power output.
6.3.1 PCB with power delivery (good solution but difficult, SEE PREVIOUS STEP 1 - 5 for applicability, not used currently)
As described in my original post, I would highly recommend to use a 4.62V source(e.g. TDK-Lambda CUS-250LD-4 4.62 V/DC 50 A) It is more suitable since it covers ranges from 4.2V - 5.0V Due to the voltage drop on some USB cables (0-0.2V) better to improve my previous solution with "thick" screw cable. I will post an update for this solution when my friend has enough time to build the custom made power delivery pcb.
6.3.2 With batteries (worst solution, check Coleslaw posts on WCG)
You could use this solution, but it would definitely explode your battery, unless you keep the batteries cool enough, or reduce the CPU frequency
6.3.3 With battery circuit, but no battery (good solution)
You can destroy the battery and extract carefully the battery circuit Better to discharge it first, so it does not explode in your face! Then you can hook to a 5V usb cable I've tried it on the Landvo L700 and basically it ran without problems for about 1.5 years at a lower voltage (I guess the battery circuit did have something to lower the input voltage)
6.3.4 USB cables with Diodes (good solution and easy, current solution)
You could hook the cables directly, but I prefer to use diodes (1N5400 series) The diode supports up to 3A, and has a drop voltage of about 0.7V - 0.9V for 0.6A - 1.2A (3W - 6W) It gets pretty hot, but since the USB cables have a drop voltage of 0-0.2V, you should get a voltage of 3.9V - 4.4V, similar to your voltage battery You do not need to many components for soldering (low level from my point of view), see attached picture. You should use multi-meter to measure the different pin voltages. My rule of thumb is to measure all pins, identify which provide the 3.8-3.9V (and disregard the battery pins), and choose the most extreme pins for better clearance.
Currently I am using 2 Anker 5 port USB 40W to feed 9 android + diodes and one fire tv stick
22.214.171.124 Ripple effect
Not sure about this, please do correct me, since the diode has a ripple current, if you put too many of the devices together, it could have an influence on the circuit. Not fully tested this, but it might have an impact.
6.3.5 USB cables with Diodes (ok solution,check joneill003 posts on WCG)
You could hook directly 5V to phone pins and hope that it does not fry the circuitry. Based on
joneill003's posts it should run ok, depending also on the hardware.
6.4 Remote access
Teamviewer is a viable option, but is closed source. If anyone using a different method, please post it here. Better to set up a mail account and use it only for android remote (can use upto 40 devices) Better to search on google play and forums if your device supports remote control for easier access.
Made a workaround with automate flow since teamviewer sometimes disconnects, see
6.4.1 PC access via cable
A portable / open source software I used recently is scrcpy. Very useful if you're screen is broken but still have adb enabled in your android.
6.5 Thermal throttling
This is the tricky part and took some time to figure it out, it definitely needs root If you do not disable thermal throttling, some cores will go offline, which is not good if you want to run some WCG units Always keep an eye on the CPU-Z thermal tab for real time values.
I will try to update as much as accurate my overview android graph attached, room temperatrue
6.5.1 Samsung devices
"should" be universal method
https://forum.xda-developers.com/galaxy-s8/how-to... On the Samsung I went up to 94 deg C :)
6.5.2 Mediatek devices
"should" be universal method
6.5.3 Hotplugging drivers
If you have a custom rom supporting this, then "maybe" you can also modify the min_core online, and "maybe" other thermal setting
6.6 CPU Monitoring
I am using CPU-Z for thermal tab to keep an eye for temperatures CPU monitor for individual core frequency history. I found some bugs (not reporting the real frequency ) if anyone has a better alternative please post it
I am also using the following flow if CPU temp is falling under a predefined individual limit
6.7 Wifi interference
If your phone has dual band, then I strongly recommend to use the 5GHz band. I am already having issues with a chinese box (low end router without 5GHz) with almost 20 devices for boinc and 5 personal devices Every since I put online the Amlogic H96 Pro sticks, they seemed kind of aggressive (bumping out) the Allview E4 phones. I tried to mitigate this with Phone schedule but I am quite sure it is not working. So I kind of turn the screen on and wait for some seconds to get new units I am keeping an eye with https://login.teamviewer.com/ to see the last time these devices were online
Update1: There was an issue with my router due to ... bad firmware.
I highly recommend using a secondary router only for the boinc devices (if you have 10+ devices), preferably with openwrt dual band, so you can lower the powerTx (better to put the devices around the router) and have them all online.
Or you could use automate to rotate the devices in order not to "load" the router, see my link at
6.8 Deep Sleep
I had some issues with Landvo L700 phones, where they could not run when screen is off. For me it worked with CPU Awake (99% probably), while it did not work with battery saver You could use some app to minimize the screen intensity, but is not efficient. A full phone with 8 cores at about 1 GHz consumes 6W with screen on (3W with screen off)
6.9 CPU Frequency
I am using Kernel Adiutor which is open source so you can set your own CPU frequency (needs root). WHEN (and not IF) you hit the throttle temperature, frequency will go down (or cores get offline while frequencies go up) Even with throttling disabled, I still cannot get max freq from all cores at the same time. So I guess it is a kernel "feature". As a rule of thumb, you should most of the time get at least 60-70% of max theoretical CPU frequency.
Check on team viewer if a device is offline. When using multiple devices, just put a number on the cover for easy identification
Obviously you can use this for coin mining. But it would be nice to use all the 3 millions GPU out there (0.24% world power consumption) for an estimation (mine) of 10 EFlops to solve medical projects. They would finish all the GPUgrid and FOLDING tasks in a few weeks.
I am using a Glue-gun due to the following: Keeps the wires in place. Since they are fragile, it prevents the twisting and possible connection breaking. Cheap, easy to apply and easy to take off. Do not recommend to apply over the Diodes, since it will melt (diode gets upto 105 deg C) around it ... constantly.
For the final setup I used an IKEA KALLAX shelving unit to fill it with legos.
6.12.1 For quad cores or lower temperature devices
I made 3 floors of lego (42 units wide, 9 units (3x height) tall, 16 units depth)
It took around 2.5 kg of Legos, could have used 2 more kg to fill all the ribs completely.
Some of the phones got really hot, around 90degC and some of them kept boot looping
6.12.2 For high temperature devices
Better to use the pictures from my first picture, where the cables are self made and the diode is not in contact with the phone
6.13 Home made cables
I bought the following from amazon
I used the following instructable
The AWG 18 wire was a bit overkill, AWG 20 should be just fine
The plastic usb sleeving kept destroying my connection, so I used a heat shrunk instead.
A diode N5402 is reducing the voltage by 0.7-0.9V which should keep the phone around 4.2-4.4V loaded, which is from what I see the best case scenario
With this approach the diode is not in contact with the phone, thus lower temperature, and better cable management.
6.14 Use Battery Internal Circuit (best solution)
I have a UMI Rome phone which I could not boot with the pin hack.
So I've cut the battery circuit (CAREFULL TO DRAIN THE BATTERY FIRST SO IT WILL NOT EXPLODE) and soldered the red/black wires to the battery pins.
Hot glue was applied in order to constrain the pins so they are always in contact with the battery circuit.
This was my original design 2 years ago on the Landvo phones, and it should be the best since the 4.3V voltage(0.7V diode was also used) SHOULD be regulated by the battery circuit.
6.15 Phones with integrated battery
I have also an Apollo Vernee Lite deca core MTK6797 Helio X20 which I was a bit disappointed of, not sure if it was already broken when I bought it from ebay.
Initially I was able to boot it by using the internal battery circuit, and it ran fine on all 10 cores, but after a few hours the voltage dropped to 2.5V, and it would not boot.
It could be that the Power Management hardware was broken?!?.
Also when attached to the 5 usb hub, on boot it would restart other 2 octo core phones, which was kind of weird/not cool at the same time.
Also it was a pain to run all 3 clusters simultaneously (quad+quad+dual) since you need to create and run a file at boot with each cluster frequency (http://en.miui.com/thread-2105983-1-1.html).
So, maybe I was unlucky with the first deca core, but it is a bit more complicated than the octa cores.
However, if the internal battery circuit is stable with the 5V and diode, you could remove other components to minimise power consumption (the phone booted without: rear camera, finger print sensor, entire daughter board: mobile antena, micro usb charger) and still control the thermal envelope due to a lower fabrication node.
- This method is not quite future proof since I played with a Vernee Apollo Lite deca-core and I cannot keep all 10 cores loaded
- New phones have integrated battery which will be trickier to replace via cable, any help would be appreciated.
- Found the first octa core (UMI Rome) which cannot load via this method, due to, I guess battery rezistor which needs to be put in place
- restart device when last cpu freq is lower than a certain value, needs root : Can be covered by the CPU Temp check flow
- auto restart after power-outage
- one anker 40W with 5 usb ports had one usb port die on me after 3-4 years
- Samsung G850F and one of the Landvo L700 sometimes decides to stop computing for boinc, and I need to wake the device manually or restart the device which is ... annoying
Step 7: 7. How to Recycle Streaming Sticks for BOINC 2018 March Update
See also the 6th step for more detail info
7.1 Device selection
I am using one fire stick TV (3/4 cores always enabled) which is pretty solid (5GHz also include) Cons: 4 cores, no team viewer remote control
10 Amlogic H96 pro octa core
Cons: no aac support as codec (or another one, can't remember). no remote control (I am using a logitech usb/keyboard with usb port) If you combine this with aukey aukey pa-t8, then you get a small 80 cores "cluster" with 0.11x0.16x0.17 liters (using also 10 usb 3.0 male to male adapters from ebay) All this for around 32W consumption :). You can pick up the stick from gearbest for as low as 25 euros (choose the cheapest of EU/US/UK ) And for 300 euros you get 80 cores while consuming around 30W, which I guess is ... pretty efficient
For the Amlogic sticks comes default :)
7.3 Power delivery
For all sticks, normal 5V usb port is sufficient. For the Amlogic I am using one of the 2 USB ports to power them with USB 3.0 male to male adapter (0.9V max = 4.5W, 3.2W nominal at 1GHz frequency)
7.4 Remote access
Amlogic stick comes with Teamviewer remote control
7.5 Thermal throttling
For Amlogic, I just use Kernel Adiutor and set all frequency to 1GHz while temperatures are under 80 deg(which I guess is the throttling temperature) Did not search a way to disable this on the streaming sticks
7.6 CPU Monitoring
CPU-Z & CPU monitor. CPU monitor shows a CPU temperature of about 7 degrees cooler in respect to CPU-Z
7.7 Wifi interference
The Amlogic sticks are maybe offline for some minutes but no more.
7.8 Deep Sleep
7.9 CPU Frequency
Just set all of the cores to 1 GHz and for the last weeks they've been running ok
- Some of the stick were getting to hot, so I had to reduce the CPU freq in order no to reach 80 degC
If you are afraid that someone is crypto jacking with your phones then (applicable for running only WCG projects): Calculate how many cores you have. Multiply with 97% CPU Time / Elapsed Time (hours) and 24 hours The sum should be equal to the Total Run Time (Hours)
I will update more on this instructable for specific requested issues.
Step 8: Update 2020 December
Final setup is based on wago 5 connectors is shown above
Boinc Tasks for Android based on efmer software should be coming in the next weeks/months
2 years ago
Hi, I have a LG H 735 G4s and when I measure the 4 pins I get several
different voltages: 4.2, 1.7 and 2.5. Do you think that I can still get
it to work with only one power supply?
I just realised the battery only has 3.85 volts.
Here's the table of the different voltages I measure on the phone's pins when I connect it with a USB charger:
Reply 2 years ago
4thThere is definitely smth non standard with you're battery. But as rule of thumb, better solder between pins who have a voltage of 3.7-4.2 V.
picture is showing pin configuration on a typically Samsung 4 pin
battery. Basically Pin 1 is positive, Pin 2 & 3 are negative, and
pin 4 is for temperature sensor, so not need it. The soldering for power
should be done for Pin 1 & Pin 2 (not recommend it since it is too
close and can short out) or Pin 1 and Pin 3 (recommend it since they are
far apart, also better use hot glue)
Reply 2 years ago
I measured the phone's pins. Not the battery since it became "thick" and I had ripped off the circuit subsequently.
Reply 2 years ago
See previous reply, it woulkd be helpful how you measured the voltage on the phone and where you added the reistor.
You could also try to monitor instead of teamviewer efmer's implementation under
4 years ago
I love your work, I have about 5 phones running unmodified, but as soon as I get a chance to remove those batteries, I will.
Have you considered further opening up the phones, applying thermal paste and a huge heatsink?
It works quite well for the rpi3, keeping it around 50 degrees - size of the heatsink matters. Check it out https://youtu.be/1AYGnw6MwFM
Next question would be if it's possible to clock the cores to Max frequency constantly and get 100 percent out of boinc, I'm actually planning on what I described above but it'll be at least 1 year from now when I can actually do it.
Reply 2 years ago
Could work, but I need them working in a tight environment.
If I do that, maybe the individual CPU temp goes down, but the entire bookshelf stays still worm.
Reply 4 years ago
It could work with the heat-sink, but I have to use them in a small space. I do not think you could lower the temps by more than 10-15deg.
Running them at 100% is kind of optimistic. All of my phones run at about 70-80% max frequency.
Question 4 years ago
Wow, it's really nice to see someone actually do this. How did you manage to get all these phones? :o
Anyway, I've been trying to do a smaller scale thing only starting with two phones (one P8 lite and a Samsung S4 mini) but I have a problem with both phones: even with a constant 4.2v directly to the battery pins, both phones work and boot starting with 100% battery but they start draining all the way to 0% even if the input voltage stays the same. Did you have the same problem with any of these phones?
Reply 2 years ago
I have the same issue with 0%, but, just ignore it.
Reply 4 years ago
I did not try it on those phones, but the battery is going down till 1% and then it just stays there while crunching
5 years ago
I participate in many projects on BOINC platform for years. Nice project. I have a question: what is the efficiency of such mobile phones grid? Power/cost to points?
Reply 2 years ago
Sorry for late reply. Over the last 3 years, they consume on average 3W for 8core. PPD depends on project, but they are pretty efficient.
Reply 4 years ago
On my ARMv7 Quad Core 1Ghz, charging battery takes 5W. Running on power takes ~2.5W. In rest of BOINC world, RAC (recent average credit) seems to be the measure most people take. Most RAC I've gotten on Rosetta@Home is 375. So, while a ARM Android is more energy efficient than a desktop PC, the number of smartphones you'd need would get messy to configure and organize really fast.
Reply 5 years ago
I've added my picture from WCG stats (which include also an Intel J1900 running three cores) . Basically not too many points though I guess. I care more about cores than points.
5 years ago
This sounds interesting, but even after more than 40 years working with a wide variety of computing environments, I have a few questions. This mainly because you us a lot of terms I have never seen before. However, my two main questions are these:
What are "BOINC" and "FOLDING" in this context? (I assume you are not referring to folding paper or clothes.)
What is the purpose of this setup? Is this for doing something I may be interested in?
Reply 5 years ago
Reply 5 years ago
Thank you for your Service Sir