The only things the cops can hope to gain on this guy is a plea deal. The search and seizure was illegal. It does seem as though he had a "friend" (using the term loosely) that thought rolling over on others would save him. As has been stated, if a minor opened the door and they came in ( I doubt the minor said comeon in ya'll and be comfortable), it is illegal. If no warrant was shown and you did not consent, it was illegal.
If a situation ever happens like this again and police are in your house because the door was open or someone opened a door and they "worked their way in", do not interfere with them or resist. Stand there and continue to state out loudly, "I do not consent to your being in my home. I do not consent to this illegal search and violation of my 4th amendment rights." Mkae sure they all hear you, neighbors as well if possible. That way, there can be no confusion in court as to whether you consented or not. Remember, that ANYTHING found in the course of an illegal search and seizure cannot be used to convict you of any wrongdoing.
Your friend needs to learn to protect his front door from within. He needs to have a talk with his family, and maybe use this event for a reason never to allow kids to answer the door, and never open the door to cops. Just by opening the door, one of them is going to "smell" marijuana whether it is there or not. Just yell through door that you do not talk to police and you mind your own business. They won't like it, but you'll preserve your freedoms and rights.