As I am certain you understood before you posted your question, this is a highly complex and extremely high risk and unpredictable situation.
There exists multiple directions of activity, the most productive depend on the co-operation of the owner.
Here is what you should do.
Pick up the phone and speak with a REALTOR at the local Remax office.
After reviewing your situation and objectives, set up a meeting with the REALTOR and the current owner of the home. Based on the co-operation of the owner, the lender(s) involved, time available, and the end game of the owner, a strategy can be put in place. This strategy, with the co-operation and participation of the owner may extend your stay significantly.
This is way to complex to attempt directing you via the internet.
Doing nothing is the worst possible decision of the owner.
Do as I've suggested and let the Remax professional communicate the options and urgency.
If you choose to take no action, and simply choose to spend time, you will come home one day and find the locks changed.
We quickly overcome the bad decisions we make but live to regret the decision we let other make for us. Your friend is heading down a path of great peril.
If the owner of the home is gone, the mortgage is not being paid, and you are living there... you are basically a squatter at that point.
Here are some websites you might find helpful:
You can also google "squatter rights texas"
Hope that is helpful