First, tell your "friend" if he can't afford to hire a lawyer, one will be appointed at no charge. That's a Miranda right. Second, your "friend" is not guilty of anything until he's proven guilty *beyond a reasonable doubt* in a court of law. The police may have taken your "friend" into custody, and the district attorney may have obtained an indictment and/or filed charges, but, until the conclusion of the trial, nothing has been written in stone, so, your "friend" can change his plea to not guilty. That's also a right. If your "friend" felt he was threatened with emminent physical danger from the trespasser, he *might* be able to claim the use of justifiable defensive force. This is something your "friend" would need a lawyer's advice on in planning his defense for trial. Your "friend" NEEDS a lawyer. Whatever time he's got left prior to the trial date will be time the lawyer needs to plan your "friend"'s defense, file pre-trial motions, etc. This is often where a case is made or lost, so demand (for your "friend", of course) that a lawyer be appointed as soon as possible. If your "friend" is delusional enough to think he can successfully represent himself at trial, he probably has a fool for a client.
This is general, NOT legal advice. I am NOT a lawyer. You are NOT my client.