How i can protect my android from Master Key Vulneralability? When i install apps ,that i take from my friends , it seems quite fishy , so how to check that the apps are trusted or not.
You can check whether your device is affected using e.g. Bluebox Security Scanner.

To close the vulnerability, your device needs root access. If that pre-condition is given, there are different fixes available, e.g.


Master Key dual fix (a module for the xposed-framework)
Master-Key Security Patch (again a module for Xposed)
ReKey (a stand-alone app)