In theory you can (on Android). There is an app called boinc. You can load work for some projects to your phone. I tryed it a few years a ago, but phones are really not made for a workload over a long time. Even with work just for the half cores and not 100% processor time the phone got very very hot. What works well is Raspis and co, at least with a heatsink and a fan.