I think that your roommate is feeling the danger of his own eviction and wants to get activity to come to a slower pace as to not bring focus on them and possible eviction. Your Boyfriend needs to find a crib he can crash at and you should try to keep activity in and out of the place to a minimum. You are living off of the kindness of strangers here so walk humbly!
She cannot lock you out at least not in California. You should try and work out a reasonable date to leave and work amicably with your friend and try and retain the friendship if you can. If not, you need to contact a competent lawyer who specializes in Tenants rights and find out what your legal options are.
You should note that you are asking for a legal advice and we as real estate professionals cannot give legal advice so be advsed that this is my opinion not legal advice.
Best of luck to you..
Your friend did you a favor and you extended that generosity to someone else in your world by inviting the bf into her apartment.That was your mistake and the reason that your friend is no longer comfortable with you living there. You do not have the same legal rights and entitlements to use of the space as the master tenant. I would figure out your living situation asap and move on. -Good luck