Is there a good way to find out why an Android phone hangs? Are there any log files you can look into, or any good ways of finding out if an app is causing the phone to hang (if even possible)? My friend has an Xperia Arc and after a while with a custom ROM he's having issues with his phone hanging completely, requiring him to do a "battery reboot" to use it again.

I know that it's probably good to try another ROM and kernel to see if it's specific to that or not, but I'm just wondering if there are any good, general pointers on what to look up first.
Problem with most log files is: They do not survive a boot, as they are stored on tmpfs (a temporary file system in RAM). So once you have to boot, they are gone. Leaving your best chances to some app capturing the log and saving the capture to SDCard. As far as I know, aLogCat is capable of that. An alternative is to send the log to another machine (such as a PC) via WiFi, which can be done using Logcat UDP. The so-captured log might not directly mention the cause (as the freeze probably keeps the final bytes from being sent/written), but at least it should yield some useful information of what was going on at the time of the freeze.

Some other sources you might want to check:


Where are log files located on Android?
Where does Android store shutdown logs?
How can I view and examine the Android log?
plus check the "Related" section to the right of this page :)