I am not sure what you are asking. There is no question here. It sounds like you have a lawyer if you went through a preliminary hearing. You should talk to him or her. You seem to focus on the failure to knock at your apartment door. A knock may or may not be necessary depending on whether your roommate gave permission to the police to come in. Even if the police don't knock it makes little difference in the criminal case. Knock-notice is a requirement but there is no remedy anymore for a violation.
You and your roommate have immigration consequences to think about as well as the criminal case.
The search warrant and the affidavit that supports the search warrant are important to review.
There may be a Miranda issue, meaning whether your statements to the police were taken after being advised of your rights to remain silent or before. There is a remedy of exclusion of your statement if Miranda is violated.
Please communicate with your lawyer about all of this.
Every case is different. Specific facts of your case must be applied before relying on an answer to a general question. The answer given here is a general statement of the law on the issue that you presented in your question.
I am not sure what your question is, but it sounds like you confessed quite a bit and they found a scale, as well as messages of you engaging in sales. I suppose you want to know if the error-filled search warrant is enough to have your case dismissed. The answer is no, as long as the police rely upon it in good faith, which is quite likely once the police find something.
Some search warrants require a knock notice but many do not particularly in drug cases where the evidence could be destroyed while the police are waiting for you to answer the door. Time to lawyer up.