Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate heat on an android phone (from code, of course)

Tags:

android

I need to heat up an android phone (don't ask...)

So far I tried running a max priority thread with a while loop which ROL-s an integer around, but that generates too little heat, even though the phone comes down almost to a halt. I tried doing complex math in the loop, but the results were same. I tried with more threads, but as expected it behaves exactly as it was with just one thread.

What can I do to tax it enough in order for it to generate more heat?

Edit: Some additional info - It's basically an application that should run as a background service (android Service started with startService()) which uses notifications to indicate that it's running (or not). Ideally, it should have no UI at all, other than the control-activity to start/stop it. I already made the service, notifications and the controlling activity. The Service uses it's own thread for phone heating, so that it would not interfere with activity's UI (which is in the same android app), now I only need to write the "meat" of the thread, i.e. some code that would actually cause the phone to heat up.

like image 743
Boris B. Avatar asked Sep 27 '10 09:09

Boris B.


People also ask

How do I know which app is heating my phone?

If apps run in this way, your device can heat up. Android's battery settings let you identify what apps are leeching resources. Go to Settings > Battery > Battery usage. This tool will detect which apps are draining the battery and let you restrict them.

Why do some apps make my phone hot?

Running too many apps at once Bugs and older software may cause apps to take in more energy to run smoothly (or, at all) and that alone can cause smartphones to overheat. Frequently updating your apps keeps them from overexerting your phone's energy reserves.

Why is phone getting hot?

Various factors cause a phone to get hot and they generally have varying levels of severity. Your phone may be hot from direct sunlight, running too many apps, malware, faulty charging equipment, internal damage, blocked ventilation, or old hardware.


2 Answers

Basically turn on everything you can that uses power, in addition to the CPU:

  • Keep the screen on and bright (if you have an OLED fill it with white). The best way to do this is with an activity setting FLAG_KEEP_SCREEN_ON and maximum brightness.
  • Monitor location with GPS.
  • Send and receive data over the network.
  • Use OpenGL to draw some moving graphics (to run the GPU, and get the surface compositor going).
  • Play audio.

Something you can't do in software but is also a big battery drain is being in a low signal area, so the cell radio needs to bump up its power.

Or just run Google Navigation... it already does nearly all of that, and is indeed and big battery drainer and device warmer. ;)

like image 99
hackbod Avatar answered Nov 07 '22 22:11

hackbod


I would try to also write data to SD-Card and phone storage at a high frequency and enable the Wifi and GPS sensors. Also set the screen to the maximal brightness and maybe show some complex graphics or videos on it too.

like image 43
Janusz Avatar answered Nov 07 '22 20:11

Janusz