There are no ways around the San Francisco rent ordinance if it applies in this situation. Moreover, this is a very pro-tenant city and tenants fight hard in eviction case. Your grandmother would be best served by hiring a very experienced attorney to help with the eviction to ensure it is done properly.
The information provided herein is general information only and not legal advice. The information provided herein does not create an attorney client relationship and is not a substitute for having a consultation with an attorney. It is important to have a consultation with an attorney as the information provided in this forum is limited and cannot possibly cover all potential issues in a given situation.