G1 Root Bug Explained
From Android Wiki
What is happening
Basically now we know that the bug that caused you to gain root access to the G1 is due to text redirection to a terminal. As it was explained, on a fresh boot everything that is typed on the phone gets sent to wherever you are typing it and also to a root terminal. If you type in "reboot" in a text message, search or even on your home screen and hit enter, you are going to (attempt) to send a text message "reboot", or search for "reboot", or do nothing. While this text is trying to send, or this search is preparing to be performed the text "reboot" was sent to a console and your device is now in the process of rebooting (hence the attempt at sending the text and the lack of it finishing). The reason it does not always work is because after a while all of the text and key presses you have sent to your various applications that is also getting routed to the phone causes the terminal to get backed up and stop responding.
Source(s): G1 Root Bug solutions