I'll let the SF Lawyers figure that out.
From what has happened and has been reported, the SFPD were out of line. They went to his house with Apple employees and questioned his legality in being in the us. Then they didn't follow protocol and never recorded it.
That's just waiting for a lawyer to sue on infringing his rights.
As for Apple, if the Apple employees entered his house on the pretense they were SFPD then there is your problem.
Either way he is going to get money.
Ooooo! Trespassing!!! Horror of horrors!!!! How will this fellow ever be able to resume a normal life after having Apple security searching for an iPhone in his house instead of the police officers he was perfectly fine with having search his house! Oh, the humanity! Only millions and millions of dollars will give him any chance of putting back the pieces of his shattered life.
The truth is that even in the unlikely event a jury one day finds that the man didn't validly give his consent for the non-police personnel to enter his home because his consent was dependent on their being police officers , all he will be due is damages for trespass--that's all. And no meaningful damages are assessed for trespassing.
Also there's no law against asking anyone if he is in the country illegally, just as there is no law against anyone--civilian or law enforcement officer--asking if you've been drinking or taken drugs. You can say "yes", "no", or "it's none of your business". If the occupant were legally in the country all he had to do was say so. And if he wants to say that he refuses to answer the question, that's his right too.
Failure to follow some bureaucratic administrative procedure might get you a demerit but it isn't a crime, and it is certainly no violation of any citizen's rights. Otherwise there would be lines around the courthouse of lawyers filing lawsuits any time some government employee failed to file in quadruplicate because he overlooked the salmon copy.
The published reports say that at no time did the Apple representatives tell anyone they were police officers. The occupant apparently assumed that everyone was a police officer, but he voluntarily gave his consent for his house to be searched by people who had the power to charge him with a crime and throw him in jail, and who had to go away if he just said "no". He said "yes".
Remember that the occupant was asked permission to have his house searched because Apple traced the prototype to his house. Remember that when they asked him if he'd been at the very bar where and when the prototype was stolen, he admitted that he was. Something the size of an iPhone could be hidden or disposed of quickly, and time was of the essence. The police and the Apple reps acted perfectly appropriately under the circumstances, and since nothing came of the visit, or the search, there was nothing material to report--other than Apple had lost a prototype. I'm pretty sure that the purpose of the filing requirement was not to make sure that news of Apple losing a prototype made it to the police blotter so geeks like us could find out about it. The occupant wasn't harmed because an official report of the search wasn't filed, and so he can't claim money damages for it.
So while this fellow may find some publicity-hungry lawyer to file a vituperative complaint, no real money is ever going to be paid to either of them.