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 ex开发者_运维技巧actly 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.
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. ;)
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.
What works for me is to connect it to USB to charge up and run Wifi Tether. That gets the CPU up to about 43 degrees Celsius at least.
My droid gets awfully warm while using Google Navigator. It tends to warm up while gaming and browsing the internet too but Google Nav makes it heat up the most.
Searching for nearby bluetooth devices over and over is not recommended since it will drain the battery. This might generate some heat too.
I find playing high quality video gets my Nexus One blazing in no time at all.
I always get cold feet when I'm skiing in Colorado. Would love a copy of your handywork!
And to add a suggestion, in case the video playback suggestion does not generate enough heat, try video conversion with crop and resize... I had one of those ugly overpriced Alienware gaming laptop clunkers that would play back video without getting hot, but upon running a video conversion (reducing a DVD to 600x300 rez with 4 sided crop for my phone) using Handbreak, it overheated so bad, it died with a puff of smoke. When I turn it on now, the screen simply flashes back and white.
Once i was fixing the game which heating app devices. There were a lot of frequent writing/reading SharedPreferences
. Before every round(~4sec) it read scores from SharedPreferences
and after it wrote scores. It crazy heats up the phone.
My 2 cents regarding efficiency, which in this case is how much of the battery energy is transformed in heat. The maximum efficiency is obtained when all energy is converted in heat inside the phone. So, looking from another perspective, all energy emitted (in any other form than heat) is wasted.
For example, using wireless (in any form) would imply transmitting some energy in the environment in the form of electromagnetic waves, which wouldn't transform in energy inside the phone and therefore be wasted for the purpose of this application. "Flight mode" would avoid wasting energy in this respect.
The same might be said for keeping the display on: battery energy would be converted in light and it would exit from the phone.
Therefore using at maximum CPU and GPU (although keeping the display off :) ) seems to be the way to obtain the maximum efficiency for an application thought for warming up the phone. Also monitoring position through GPS antenna should be fine (passive reception). Playing audio might be a good idea, as long as energy is not wasted by generating sound waves. Somebody suggested writing on the internal storage and SD card, also a good idea (but might ware off the SD card).
精彩评论